home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 Mobile / Chip_Mobile_2001.iso / palm / hobby / palmoon / palmoon.EXE / math.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-07-13  |  3.3 KB  |  91 lines

  1. /* MathLib: Pilot shared library of IEEE-754 double math functions
  2.  *
  3.  * This version of math.h is designed for inclusion by the GCC math
  4.  * functions, not the calling application program.  Its purpose is to
  5.  * allow proper compilation of the GCC source code with as few 
  6.  * changes as possible.
  7.  *
  8.  * Copyright (C) 1997 Rick Huebner
  9.  *
  10.  * This program is free software; you can redistribute it and/or modify
  11.  * it under the terms of the GNU Library General Public License as
  12.  * published by the Free Software Foundation; either version 2 of the
  13.  * License, or (at your option) any later version.
  14.  *
  15.  * This program is distributed in the hope that it will be useful,
  16.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18.  * GNU Library General Public License for more details.
  19.  *
  20.  * You should have received a copy of the GNU Library General Public License
  21.  * along with this program; see file COPYING.LIB.  If not, write to the
  22.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  23.  * Boston, MA 02111-1307, USA
  24.  *
  25.  * Version 1.0, 15 August 1997, Rick Huebner
  26.  */
  27.  
  28. // Typedefs used in math routines
  29. typedef long int32_t;
  30. typedef unsigned long u_int32_t;
  31.  
  32. // Prototypes for primary math functions, copied verbatim from GCC source
  33. double __ieee754_acos(double x);
  34. double __ieee754_asin(double x);
  35. double __atan(double x);
  36. double __ieee754_atan2(double y, double x);
  37. double __cos(double x);
  38. double __sin(double x);
  39. double __tan(double x);
  40. void   __sincos(double x, double *sinx, double *cosx);
  41. double __ieee754_cosh(double x);
  42. double __ieee754_sinh(double x);
  43. double __tanh(double x);
  44. double __ieee754_acosh(double x);
  45. double __asinh(double x);
  46. double __ieee754_atanh(double x);
  47. double __ieee754_exp(double x);
  48. double __frexp(double x, int *eptr);
  49. double __ldexp(double value, int exp);
  50. double __ieee754_log(double x);
  51. double __ieee754_log10(double x);
  52. double __modf(double x, double *iptr);
  53. double __expm1(double x);
  54. double __log1p(double x);
  55. double __logb(double x);
  56. double __log2(double x);
  57. double __ieee754_pow(double x, double y);
  58. double __ieee754_sqrt(double x);
  59. double __ieee754_hypot(double x, double y);
  60. double __cbrt(double x);
  61. double __ceil(double x);
  62. double __fabs(double x);
  63. double __floor(double x);
  64. double __ieee754_fmod(double x, double y);
  65. int    __isinf(double x);
  66. int    __finite(double x);
  67. double __scalbn(double x, int n);
  68. double __ieee754_remainder(double x, double p);
  69. double __significand(double x);
  70. double __copysign(double x, double y);
  71. int    __isnan(double x);
  72. int    __ilogb(double x);
  73. double __rint(double x);
  74. double __nextafter(double x, double y);
  75. double __ieee754_scalb(double x, double fn);
  76. double __round(double x);
  77. double __trunc(double x);
  78. int    __signbit(double x);
  79.  
  80. // Prototypes for special routines used by primary math functions
  81. double __kernel_cos(double x, double y);
  82. double __kernel_sin(double x, double y, int iy);
  83. double __kernel_tan(double x, double y, int iy);
  84. int32_t __ieee754_rem_pio2(double x, double *y);
  85. int __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int32_t *ipio2);
  86.  
  87. // Prototypes for our "jump island" stubs to avoid 32KB pc-rel jsr limit
  88. double jumpto__ieee754_sqrt(double x);
  89. double jumpto__fabs(double x);
  90. double jumpto__scalbn(double x, int n);
  91.