math.inc 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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. { atn isn't supported by the linux fpe it seems
  35. {$define FPC_SYSTEM_HAS_ARCTAN}
  36. function fpc_arctan_real(d : extended) : extended;compilerproc;
  37. begin
  38. { Function is handled internal in the compiler }
  39. runerror(207);
  40. result:=0;
  41. end;
  42. }
  43. { lgn isn't supported by the linux fpe it seems
  44. {$define FPC_SYSTEM_HAS_LN}
  45. function fpc_ln_real(d : extended) : extended;compilerproc;
  46. begin
  47. { Function is handled internal in the compiler }
  48. runerror(207);
  49. result:=0;
  50. end;
  51. }
  52. { sind isn't supported by the linux fpe it seems
  53. {$define FPC_SYSTEM_HAS_SIN}
  54. function fpc_sin_real(d : extended) : extended;compilerproc;
  55. begin
  56. { Function is handled internal in the compiler }
  57. runerror(207);
  58. result:=0;
  59. end;
  60. }
  61. { cos isn't supported by the linux fpe it seems
  62. {$define FPC_SYSTEM_HAS_COS}
  63. function fpc_cos_real(d : extended) : extended;compilerproc;
  64. begin
  65. { Function is handled internal in the compiler }
  66. runerror(207);
  67. result:=0;
  68. end;
  69. }
  70. {$else INTERNCONSTINTF}
  71. {$define FPC_SYSTEM_HAS_ABS}
  72. function abs(d : extended) : extended;[internproc:in_abs_extended];
  73. {$define FPC_SYSTEM_HAS_SQR}
  74. function sqr(d : extended) : extended;[internproc:in_sqr_extended];
  75. {$define FPC_SYSTEM_HAS_SQRT}
  76. function sqrt(d : extended) : extended;[internproc:in_sqrt_extended];
  77. { atn isn't supported by the linux fpe it seems
  78. {$define FPC_SYSTEM_HAS_ARCTAN}
  79. function arctan(d : extended) : extended;[internproc:in_arctan_extended];
  80. }
  81. { lgn isn't supported by the linux fpe it seems
  82. {$define FPC_SYSTEM_HAS_LN}
  83. function ln(d : extended) : extended;[internproc:in_ln_extended];
  84. }
  85. { sind isn't supported by the linux fpe it seems
  86. {$define FPC_SYSTEM_HAS_SIN}
  87. function sin(d : extended) : extended;[internproc:in_sin_extended];
  88. }
  89. { cos isn't supported by the linux fpe it seems
  90. {$define FPC_SYSTEM_HAS_COS}
  91. function cos(d : extended) : extended;[internproc:in_cos_extended];
  92. }
  93. {$endif INTERNCONSTINTF}
  94. {
  95. $Log$
  96. Revision 1.6 2005-01-06 13:02:03 florian
  97. * arctan, sin and cos are done in software on the arm
  98. Revision 1.5 2005/01/01 18:34:24 florian
  99. * fixed building
  100. Revision 1.4 2004/03/16 22:02:26 florian
  101. * disabled internal ln
  102. Revision 1.3 2004/01/27 15:04:49 florian
  103. * some math nodes are inlined now
  104. Revision 1.2 2003/09/03 14:09:37 florian
  105. * arm fixes to the common rtl code
  106. * some generic math code fixed
  107. * ...
  108. Revision 1.1 2003/08/21 16:41:54 florian
  109. * empty dummy files
  110. + [long|set]jmp implemented
  111. }