math.inc 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 2003 by the Free Pascal development team.
  5. Implementation of mathematical Routines (only for real)
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. {$ifdef INTERNCONSTINTF}
  13. {$define FPC_SYSTEM_HAS_ABS}
  14. function fpc_abs_real(d : extended) : extended;compilerproc;
  15. begin
  16. { Function is handled internal in the compiler }
  17. runerror(207);
  18. result:=0;
  19. end;
  20. {$define FPC_SYSTEM_HAS_SQR}
  21. function fpc_sqr_real(d : extended) : extended;compilerproc;
  22. begin
  23. { Function is handled internal in the compiler }
  24. runerror(207);
  25. result:=0;
  26. end;
  27. {$define FPC_SYSTEM_HAS_SQRT}
  28. function fpc_sqrt_real(d : extended) : extended;compilerproc;
  29. begin
  30. { Function is handled internal in the compiler }
  31. runerror(207);
  32. result:=0;
  33. end;
  34. {$define FPC_SYSTEM_HAS_ARCTAN}
  35. function fpc_arctan_real(d : extended) : extended;compilerproc;
  36. begin
  37. { Function is handled internal in the compiler }
  38. runerror(207);
  39. result:=0;
  40. end;
  41. { lgn isn't supported by the linux fpe it seems
  42. {$define FPC_SYSTEM_HAS_LN}
  43. function fpc_ln_real(d : extended) : extended;compilerproc;
  44. begin
  45. { Function is handled internal in the compiler }
  46. runerror(207);
  47. result:=0;
  48. end;
  49. }
  50. {$define FPC_SYSTEM_HAS_SIN}
  51. function fpc_sin_real(d : extended) : extended;compilerproc;
  52. begin
  53. { Function is handled internal in the compiler }
  54. runerror(207);
  55. result:=0;
  56. end;
  57. {$define FPC_SYSTEM_HAS_COS}
  58. function fpc_cos_real(d : extended) : extended;compilerproc;
  59. begin
  60. { Function is handled internal in the compiler }
  61. runerror(207);
  62. result:=0;
  63. end;
  64. {$else INTERNCONSTINTF}
  65. {$define FPC_SYSTEM_HAS_ABS}
  66. function abs(d : extended) : extended;[internproc:in_abs_extended];
  67. {$define FPC_SYSTEM_HAS_SQR}
  68. function sqr(d : extended) : extended;[internproc:in_sqr_extended];
  69. {$define FPC_SYSTEM_HAS_SQRT}
  70. function sqrt(d : extended) : extended;[internproc:in_sqrt_extended];
  71. {$define FPC_SYSTEM_HAS_ARCTAN}
  72. function arctan(d : extended) : extended;[internproc:in_arctan_extended];
  73. { lgn isn't supported by the linux fpe it seems
  74. {$define FPC_SYSTEM_HAS_LN}
  75. function ln(d : extended) : extended;[internproc:in_ln_extended];
  76. }
  77. {$define FPC_SYSTEM_HAS_SIN}
  78. function sin(d : extended) : extended;[internproc:in_sin_extended];
  79. {$define FPC_SYSTEM_HAS_COS}
  80. function cos(d : extended) : extended;[internproc:in_cos_extended];
  81. {$endif INTERNCONSTINTF}
  82. {
  83. $Log$
  84. Revision 1.5 2005-01-01 18:34:24 florian
  85. * fixed building
  86. Revision 1.4 2004/03/16 22:02:26 florian
  87. * disabled internal ln
  88. Revision 1.3 2004/01/27 15:04:49 florian
  89. * some math nodes are inlined now
  90. Revision 1.2 2003/09/03 14:09:37 florian
  91. * arm fixes to the common rtl code
  92. * some generic math code fixed
  93. * ...
  94. Revision 1.1 2003/08/21 16:41:54 florian
  95. * empty dummy files
  96. + [long|set]jmp implemented
  97. }