math.inc 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2003 by the Free Pascal development team.
  4. Implementation of mathematical Routines (only for real)
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. { for bootstrapping with 3.0.x/3.2.x }
  12. {$if defined(FPUFPA) or defined(FPUFPA10) or defined(FPUFPA11)}
  13. {$define FPUARM_HAS_FPA}
  14. {$endif}
  15. {$if defined(FPUVFPV2) or defined(FPUVFPV3) or defined(FPUVFPV4) or defined(FPUVFPV3_D16)}
  16. {$define FPUARM_HAS_VFP_EXTENSION}
  17. {$endif}
  18. {$if defined(FPUARM_HAS_FPA) or defined(FPUARM_HAS_VFP_EXTENSION)}
  19. {$ifndef FPC_SYSTEM_HAS_ABS}
  20. {$define FPC_SYSTEM_HAS_ABS}
  21. function fpc_abs_real(d : ValReal) : ValReal;compilerproc;
  22. begin
  23. { Function is handled internal in the compiler }
  24. runerror(207);
  25. result:=0;
  26. end;
  27. {$endif FPC_SYSTEM_HAS_ABS}
  28. {$ifndef FPC_SYSTEM_HAS_SQR}
  29. {$define FPC_SYSTEM_HAS_SQR}
  30. function fpc_sqr_real(d : ValReal) : ValReal;compilerproc;
  31. begin
  32. { Function is handled internal in the compiler }
  33. runerror(207);
  34. result:=0;
  35. end;
  36. {$endif FPC_SYSTEM_HAS_SQR}
  37. {$ifndef FPC_SYSTEM_HAS_SQRT}
  38. {$define FPC_SYSTEM_HAS_SQRT}
  39. function fpc_sqrt_real(d : ValReal) : ValReal;compilerproc;
  40. begin
  41. { Function is handled internal in the compiler }
  42. runerror(207);
  43. result:=0;
  44. end;
  45. {$endif FPC_SYSTEM_HAS_SQRT}
  46. {$endif}
  47. (* atn isn't supported by the linux fpe it seems
  48. {$define FPC_SYSTEM_HAS_ARCTAN}
  49. function fpc_arctan_real(d : extended) : extended;compilerproc;
  50. begin
  51. { Function is handled internal in the compiler }
  52. runerror(207);
  53. result:=0;
  54. end;
  55. *)
  56. (* lgn isn't supported by the linux fpe it seems
  57. {$define FPC_SYSTEM_HAS_LN}
  58. function fpc_ln_real(d : extended) : extended;compilerproc;
  59. begin
  60. { Function is handled internal in the compiler }
  61. runerror(207);
  62. result:=0;
  63. end;
  64. *)
  65. (* sind isn't supported by the linux fpe it seems
  66. {$define FPC_SYSTEM_HAS_SIN}
  67. function fpc_sin_real(d : extended) : extended;compilerproc;
  68. begin
  69. { Function is handled internal in the compiler }
  70. runerror(207);
  71. result:=0;
  72. end;
  73. *)
  74. (* cos isn't supported by the linux fpe it seems
  75. {$define FPC_SYSTEM_HAS_COS}
  76. function fpc_cos_real(d : extended) : extended;compilerproc;
  77. begin
  78. { Function is handled internal in the compiler }
  79. runerror(207);
  80. result:=0;
  81. end;
  82. *)