mathh.inc 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1999-2000 by Florian Klaempfl,
  5. member of the Free Pascal development team
  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. { declarations of the math routines }
  13. {$ifdef DEFAULT_EXTENDED}
  14. function abs(d : extended) : extended;
  15. function arctan(d : extended) : extended;
  16. function cos(d : extended) : extended;
  17. function exp(d : extended) : extended;
  18. function frac(d : extended) : extended;
  19. function int(d : extended) : extended;
  20. function ln(d : extended) : extended;
  21. function pi : extended;
  22. function round(d : extended) : longint;
  23. function sin(d : extended) : extended;
  24. function sqr(d : extended) : extended;
  25. function sqrt(d : extended) : extended;
  26. function trunc(d : extended) : longint;
  27. function power(bas,expo : extended) : extended;
  28. {$else DEFAULT_EXTENDED}
  29. function abs(d : real) : real;
  30. function arctan(d : real) : real;
  31. function cos(d : real) : real;
  32. function exp(d : real) : real;
  33. function frac(d : real) : real;
  34. function int(d : real) : real;
  35. function ln(d : real) : real;
  36. function round(d : real) : longint;
  37. function sin(d : real) : real;
  38. function sqr(d : real) : real;
  39. function sqrt(d : real) : real;
  40. function trunc(d : real) : longint;
  41. function power(bas,expo : real) : real;
  42. function pi : real;
  43. {$endif DEFAULT_EXTENDED}
  44. function power(bas,expo : longint) : longint;
  45. type
  46. real48 = array[0..5] of byte;
  47. function Real2Double(r : real48) : double;
  48. {$ifdef HASFIXED}
  49. function sqrt(d : fixed) : fixed;
  50. function Round(x: fixed): longint;
  51. function sqr(d : fixed) : fixed;
  52. function abs(d : fixed) : fixed;
  53. function frac(d : fixed) : fixed;
  54. function trunc(d : fixed) : longint;
  55. function int(d : fixed) : fixed;
  56. {$endif HASFIXED}
  57. {
  58. $Log$
  59. Revision 1.3 2000-10-21 18:20:17 florian
  60. * a lot of small changes:
  61. - setlength is internal
  62. - win32 graph unit extended
  63. ....
  64. Revision 1.2 2000/07/13 11:33:44 michael
  65. + removed logs
  66. }