Changeset 2013 for trunk


Ignore:
Timestamp:
Jun 12, 2005, 7:33:38 AM (20 years ago)
Author:
bird
Message:

o The smallcnv stuff is gone, waste of space since we're not really into

static linking. Should've done this when switching to gdtoa.

o Ported the msun and some other math bits from current FreeBSD libc.

This mostly replaces the EMX math, except for some double long variants
and some EMX specific ones. This is a risky change, but it's needed
if we're gonna catch up on the C99 bits and make libstdc++ happy.
There are some new headers, complex.h and fenv.h being the importan ones.
float.h have gotten some updates while math.h is totally replaced.
More than 100 standard functions were added!
NOTE: msun is using MATH_ERREXCEPT (math_errhandling) and not

MATH_ERRNO for error reporting.

I really hope this is not gonna uncover more OS/2 387 mess.

Location:
trunk/src/emx
Files:
8 added
17 deleted
204 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/ChangeLog.LIBC

    • Property cvs2svn:cvs-rev changed from 1.51 to 1.52
    r2012 r2013  
    11/* $Id$ */
     2
     32005-06-11: knut st. osmundsen <bird-gccos2-spam@anduin.net>
     4    - libc:
     5        o The smallcnv stuff is gone, waste of space since we're not really into
     6          static linking. Should've done this when switching to gdtoa.
     7        o Ported the msun and some other math bits from current FreeBSD libc.
     8          This mostly replaces the EMX math, except for some double long variants
     9          and some EMX specific ones. This is a risky change, but it's needed
     10          if we're gonna catch up on the C99 bits and make libstdc++ happy.
     11          There are some new headers, complex.h and fenv.h being the importan ones.
     12          float.h have gotten some updates while math.h is totally replaced.
     13          More than 100 standard functions were added!
     14          NOTE: msun is using MATH_ERREXCEPT (math_errhandling) and not
     15                MATH_ERRNO for error reporting.
     16          I really hope this is not gonna uncover more OS/2 387 mess.
    217
    3182005-06-05: knut st. osmundsen <bird-gccos2-spam@anduin.net>
  • trunk/src/emx/include/emx/asm386.h

    • Property cvs2svn:cvs-rev changed from 1.9 to 1.10
    r2012 r2013  
    6363/* Cf. <math.h> */
    6464
    65 #define FP_ZERO         0
    66 #define FP_SUBNORMAL    1
    67 #define FP_NORMAL       2
    68 #define FP_INFINITE     3
    69 #define FP_NAN          4
     65#define FP_INFINITE     0x01
     66#define FP_NAN          0x02
     67#define FP_NORMAL       0x04
     68#define FP_SUBNORMAL    0x08
     69#define FP_ZERO         0x10
     70
  • trunk/src/emx/include/float.h

    • Property cvs2svn:cvs-rev changed from 1.5 to 1.6
    r2012 r2013  
    11/* float.h,v 1.5 2004/09/14 22:27:33 bird Exp */
    22/** @file
    3  * EMX + GCC
     3 * EMX + GCC + Some FreeBSD Bits.
    44 *
    55 * @remark Must be used instead of the GCC one.
     
    1111#include <sys/cdefs.h>
    1212
     13__BEGIN_DECLS
     14extern int __flt_rounds(void);
     15__END_DECLS
    1316
    1417#define FLT_RADIX       2               /* b */
    15 #define FLT_ROUNDS      1               /* FP addition rounds to nearest */
     18#define FLT_ROUNDS      __flt_rounds()
     19
    1620#define FLT_EVAL_METHOD (-1)            /* i387 semantics are...interesting */
    1721#define DECIMAL_DIG     21              /* max precision in decimal digits */
     
    6771#if !defined (__STRICT_ANSI__) && !defined (_POSIX_SOURCE) || defined(__USE_EMX)
    6872
    69 #define M_E             2.71828182845904523536
    70 #define M_LOG2E         1.44269504088896340736
    71 #define M_LOG10E        0.434294481903251827651
    72 #define M_LN2           0.693147180559945309422
    73 #define M_LN10          2.302585092994045684018
    74 
    75 #define M_PI            3.14159265358979323846
    76 #define M_PI_2          1.57079632679489661923
    77 #define M_PI_4          0.785398163397448309616
    78 #define M_1_PI          0.318309886183790671538
    79 #define M_2_PI          0.636619772367581343076
    80 #define M_2_SQRTPI      1.12837916709551257390
    81 
    82 #define M_SQRT2         1.41421356237309504880
    83 #define M_SQRT1_2       0.707106781186547524401
    84 
    8573#if !defined (_OMIT_387_STUFF)
    8674
  • trunk/src/emx/include/math.h

    • Property cvs2svn:cvs-rev changed from 1.6 to 1.7
    r2012 r2013  
    1 /* math.h,v 1.5 2004/09/14 22:27:34 bird Exp */
     1/*
     2 * ====================================================
     3 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
     4 *
     5 * Developed at SunPro, a Sun Microsystems, Inc. business.
     6 * Permission to use, copy, modify, and distribute this
     7 * software is freely granted, provided that this notice
     8 * is preserved.
     9 * ====================================================
     10 */
     11
     12/*
     13 * from: @(#)fdlibm.h 5.1 93/09/24
     14 * $FreeBSD: src/lib/msun/src/math.h,v 1.61 2005/04/16 21:12:47 das Exp $
     15 */
     16
    217/** @file
    3  * EMX
    4  * @todo This needs C99 attention!
    5  */
    6 
    7 #ifndef _MATH_H
    8 #define _MATH_H
    9 
    10 #if defined (__cplusplus)
    11 extern "C" {
    12 #endif
    13 
    14 #define HUGE_VAL        1e9999
    15 
    16 double acos (double);
    17 double asin (double);
    18 double atan (double);
    19 double atan2 (double, double);
    20 double cbrt (double);
    21 double ceil (double);
    22 double cos (double);
    23 double cosh (double);
    24 double exp (double);
    25 double fabs (double);
    26 double floor (double);
    27 double fmod (double, double);
    28 double frexp (double, int *);
    29 double hypot (double, double);
    30 double ldexp (double, int);
    31 double log (double);
    32 double log10 (double);
    33 double modf (double, double *);
    34 double pow (double, double);
    35 double rint (double);
    36 double sin (double);
    37 double sinh (double);
    38 double sqrt (double);
    39 double tan (double);
    40 double tanh (double);
    41 double trunc (double);
    42 
    43 #if !defined (__NO_C9X)
    44 
    45 #define HUGE_VALF       1e9999F
    46 #define HUGE_VALL       1e9999L
    47 #define INFINITY        1e9999          /* TODO: float_t */
    48 #define NAN             (0.0/0.0)       /* TODO: Exceptions, float_t */
    49 
    50 #define DECIMAL_DIG     21
    51 
    52 #define FP_ZERO         0
    53 #define FP_SUBNORMAL    1
    54 #define FP_NORMAL       2
    55 #define FP_INFINITE     3
    56 #define FP_NAN          4
    57 
    58 #define fpclassify(x) \
    59     ((sizeof (x) == sizeof (float))  ? __fpclassifyf (x) \
    60    : (sizeof (x) == sizeof (double)) ? __fpclassify (x) \
    61    :                                   __fpclassifyl (x))
    62 
    63 #define signbit(x) \
    64     ((sizeof (x) == sizeof (float))  ? __signbitf (x) \
    65    : (sizeof (x) == sizeof (double)) ? __signbit (x) \
    66    :                                   __signbitl (x))
    67 
    68 #define isfinite(x) \
    69     ((sizeof (x) == sizeof (float))  ? __isfinitef (x) \
    70    : (sizeof (x) == sizeof (double)) ? __isfinite (x) \
    71    :                                   __isfinitel (x))
    72 
    73 #define isnormal(x) \
    74     ((sizeof (x) == sizeof (float))  ? __isnormalf (x) \
    75    : (sizeof (x) == sizeof (double)) ? __isnormal (x) \
    76    :                                   __isnormall (x))
    77 
    78 #define isnan(x) \
    79     ((sizeof (x) == sizeof (float))  ? __isnanf (x) \
    80    : (sizeof (x) == sizeof (double)) ? __isnan (x) \
    81    :                                   __isnanl (x))
    82 
    83 float copysignf (float, float);
    84 double copysign (double, double);
    85 long double copysignl (long double, long double);
    86 
    87 float nextafterf (float, float);
    88 double nextafter (double, double);
    89 long double nextafterl (long double, long double);
    90 
    91 long double acosl (long double);
    92 long double asinl (long double);
    93 long double atanl (long double);
    94 long double atan2l (long double, long double);
    95 long double cbrtl (long double);
    96 long double ceill (long double);
    97 long double cosl (long double);
    98 long double coshl (long double);
    99 long double expl (long double);
    100 long double fabsl (long double);
    101 long double floorl (long double);
    102 long double fmodl (long double, long double);
    103 long double frexpl (long double, int *);
    104 long double hypotl (long double, long double);
    105 long double ldexpl (long double, int);
    106 long double logl (long double);
    107 long double log10l (long double);
    108 long double modfl (long double, long double *);
    109 long double powl (long double, long double);
    110 long double rintl (long double);
    111 long double sinl (long double);
    112 long double sinhl (long double);
    113 long double sqrtl (long double);
    114 long double tanl (long double);
    115 long double tanhl (long double);
    116 long double truncl (long double);
    117 
    118 int __fpclassify (double);
    119 int __fpclassifyf (float);
    120 int __fpclassifyl (long double);
    121 
    122 int __signbit (double);
    123 int __signbitf (float);
    124 int __signbitl (long double);
    125 
    126 int __isfinite (double);
    127 int __isfinitef (float);
    128 int __isfinitel (long double);
    129 
    130 int __isnormal (double);
    131 int __isnormalf (float);
    132 int __isnormall (long double);
    133 
    134 int __isnan (double);
    135 int __isnanf (float);
    136 int __isnanl (long double);
    137 
    138 #endif
    139 
    140 #if !defined (__STRICT_ANSI__)
    141 
    142 #define HUGE    HUGE_VAL
    143 
    144 double atof (__const__ char *);
    145 
    146 #endif
    147 
    148 
    149 #if !defined (__STRICT_ANSI__) || defined (_WITH_UNDERSCORE)
    150 
    151 #define _HUGE_VALF      1e9999F
    152 #define _HUGE_VALL      1e9999L
    153 #define _INFINITY       1e9999          /* TODO: float_t */
    154 #define _NAN            (0.0/0.0)       /* TODO: Exceptions, float_t */
    155 
    156 #define _LHUGE_VAL      _HUGE_VALL
    157 #define _LHUGE          _HUGE_VALL
    158 
    159 
    160 float _copysignf (float, float);
    161 double _copysign (double, double);
    162 long double _copysignl (long double, long double);
    163 
    164 float _nextafterf (float, float);
    165 double _nextafter (double, double);
    166 long double _nextafterl (long double, long double);
    167 
    168 long double _acosl (long double);
    169 long double _asinl (long double);
    170 long double _atanl (long double);
    171 long double _atan2l (long double, long double);
    172 long double _atofl (__const__ char *);
    173 long double _cbrtl (long double);
    174 long double _ceill (long double);
    175 long double _cosl (long double);
    176 long double _coshl (long double);
    177 long double _hypotl (long double, long double);
    178 long double _expl (long double);
    179 long double _fabsl (long double);
    180 long double _floorl (long double);
    181 long double _fmodl (long double, long double);
    182 long double _frexpl (long double, int *);
    183 long double _ldexpl (long double, int);
    184 long double _logl (long double);
    185 long double _log10l (long double);
    186 long double _modfl (long double, long double *);
    187 long double _powl (long double, long double);
    188 long double _rintl (long double);
    189 long double _sinl (long double);
    190 long double _sinhl (long double);
    191 long double _sqrtl (long double);
    192 long double _tanl (long double);
    193 long double _tanhl (long double);
    194 long double _truncl (long double);
    195 
    196 #endif
    197 
    198 
    199 #if defined (__cplusplus)
    200 }
    201 #endif
    202 
    203 #endif /* not _MATH_H */
     18 * FreeBSD HEAD 2005-06-xx
     19 */
     20
     21#ifndef _MATH_H_
     22#define _MATH_H_
     23
     24#include <sys/cdefs.h>
     25#include <sys/_types.h>
     26#include <machine/_limits.h>
     27
     28/*
     29 * ANSI/POSIX
     30 */
     31extern const union __infinity_un {
     32        unsigned char   __uc[8];
     33        double          __ud;
     34} __infinity;
     35
     36extern const union __nan_un {
     37        unsigned char   __uc[sizeof(float)];
     38        float           __uf;
     39} __nan;
     40
     41#if __GNUC_PREREQ__(3, 3) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800)
     42#define __MATH_BUILTIN_CONSTANTS
     43#endif
     44
     45#if __GNUC_PREREQ__(3, 0) && !defined(__INTEL_COMPILER)
     46#define __MATH_BUILTIN_RELOPS
     47#endif
     48
     49#ifdef __MATH_BUILTIN_CONSTANTS
     50#define HUGE_VAL        __builtin_huge_val()
     51#else
     52#define HUGE_VAL        (__infinity.__ud)
     53#endif
     54
     55#if __ISO_C_VISIBLE >= 1999
     56#define FP_ILOGB0       (-__INT_MAX)
     57#define FP_ILOGBNAN     __INT_MAX
     58
     59#ifdef __MATH_BUILTIN_CONSTANTS
     60#define HUGE_VALF       __builtin_huge_valf()
     61#define HUGE_VALL       __builtin_huge_vall()
     62#define INFINITY        __builtin_inf()
     63#define NAN             __builtin_nan("")
     64#else
     65#define HUGE_VALF       (float)HUGE_VAL
     66#define HUGE_VALL       (long double)HUGE_VAL
     67#define INFINITY        HUGE_VALF
     68#define NAN             (__nan.__uf)
     69#endif /* __MATH_BUILTIN_CONSTANTS */
     70
     71#define MATH_ERRNO      1
     72#define MATH_ERREXCEPT  2
     73#define math_errhandling        MATH_ERREXCEPT
     74
     75/* XXX We need a <machine/math.h>. */
     76#if defined(__ia64__) || defined(__sparc64__)
     77#define FP_FAST_FMA
     78#endif
     79#ifdef __ia64__
     80#define FP_FAST_FMAL
     81#endif
     82#define FP_FAST_FMAF
     83
     84/* Symbolic constants to classify floating point numbers. */
     85#define FP_INFINITE     0x01
     86#define FP_NAN          0x02
     87#define FP_NORMAL       0x04
     88#define FP_SUBNORMAL    0x08
     89#define FP_ZERO         0x10
     90#define fpclassify(x) \
     91    ((sizeof (x) == sizeof (float)) ? __fpclassifyf(x) \
     92    : (sizeof (x) == sizeof (double)) ? __fpclassifyd(x) \
     93    : __fpclassifyl(x))
     94
     95#define isfinite(x)                                     \
     96    ((sizeof (x) == sizeof (float)) ? __isfinitef(x)    \
     97    : (sizeof (x) == sizeof (double)) ? __isfinite(x)   \
     98    : __isfinitel(x))
     99#define isinf(x)                                        \
     100    ((sizeof (x) == sizeof (float)) ? __isinff(x)       \
     101    : (sizeof (x) == sizeof (double)) ? isinf(x)        \
     102    : __isinfl(x))
     103#define isnan(x)                                        \
     104    ((sizeof (x) == sizeof (float)) ? isnanf(x)         \
     105    : (sizeof (x) == sizeof (double)) ? isnan(x)        \
     106    : __isnanl(x))
     107#define isnormal(x)                                     \
     108    ((sizeof (x) == sizeof (float)) ? __isnormalf(x)    \
     109    : (sizeof (x) == sizeof (double)) ? __isnormal(x)   \
     110    : __isnormall(x))
     111
     112#ifdef __MATH_BUILTIN_RELOPS
     113#define isgreater(x, y)         __builtin_isgreater((x), (y))
     114#define isgreaterequal(x, y)    __builtin_isgreaterequal((x), (y))
     115#define isless(x, y)            __builtin_isless((x), (y))
     116#define islessequal(x, y)       __builtin_islessequal((x), (y))
     117#define islessgreater(x, y)     __builtin_islessgreater((x), (y))
     118#define isunordered(x, y)       __builtin_isunordered((x), (y))
     119#else
     120#define isgreater(x, y)         (!isunordered((x), (y)) && (x) > (y))
     121#define isgreaterequal(x, y)    (!isunordered((x), (y)) && (x) >= (y))
     122#define isless(x, y)            (!isunordered((x), (y)) && (x) < (y))
     123#define islessequal(x, y)       (!isunordered((x), (y)) && (x) <= (y))
     124#define islessgreater(x, y)     (!isunordered((x), (y)) && \
     125                                        ((x) > (y) || (y) > (x)))
     126#define isunordered(x, y)       (isnan(x) || isnan(y))
     127#endif /* __MATH_BUILTIN_RELOPS */
     128
     129#define signbit(x)                                      \
     130    ((sizeof (x) == sizeof (float)) ? __signbitf(x)     \
     131    : (sizeof (x) == sizeof (double)) ? __signbit(x)    \
     132    : __signbitl(x))
     133
     134typedef __double_t      double_t;
     135typedef __float_t       float_t;
     136#endif /* __ISO_C_VISIBLE >= 1999 */
     137
     138/*
     139 * XOPEN/SVID
     140 */
     141#if __BSD_VISIBLE || __XSI_VISIBLE
     142#define M_E             2.7182818284590452354   /* e */
     143#define M_LOG2E         1.4426950408889634074   /* log 2e */
     144#define M_LOG10E        0.43429448190325182765  /* log 10e */
     145#define M_LN2           0.69314718055994530942  /* log e2 */
     146#define M_LN10          2.30258509299404568402  /* log e10 */
     147#define M_PI            3.14159265358979323846  /* pi */
     148#define M_PI_2          1.57079632679489661923  /* pi/2 */
     149#define M_PI_4          0.78539816339744830962  /* pi/4 */
     150#define M_1_PI          0.31830988618379067154  /* 1/pi */
     151#define M_2_PI          0.63661977236758134308  /* 2/pi */
     152#define M_2_SQRTPI      1.12837916709551257390  /* 2/sqrt(pi) */
     153#define M_SQRT2         1.41421356237309504880  /* sqrt(2) */
     154#define M_SQRT1_2       0.70710678118654752440  /* 1/sqrt(2) */
     155
     156#define MAXFLOAT        ((float)3.40282346638528860e+38)
     157extern int signgam;
     158#endif /* __BSD_VISIBLE || __XSI_VISIBLE */
     159
     160#if __BSD_VISIBLE
     161#if 0
     162/* Old value from 4.4BSD-Lite math.h; this is probably better. */
     163#define HUGE            HUGE_VAL
     164#else
     165#define HUGE            MAXFLOAT
     166#endif
     167#endif /* __BSD_VISIBLE */
     168
     169/*
     170 * Most of these functions depend on the rounding mode and have the side
     171 * effect of raising floating-point exceptions, so they are not declared
     172 * as __pure2.  In C99, FENV_ACCESS affects the purity of these functions.
     173 */
     174__BEGIN_DECLS
     175/*
     176 * ANSI/POSIX
     177 */
     178int     __fpclassifyd(double) __pure2;
     179int     __fpclassifyf(float) __pure2;
     180int     __fpclassifyl(long double) __pure2;
     181int     __isfinitef(float) __pure2;
     182int     __isfinite(double) __pure2;
     183int     __isfinitel(long double) __pure2;
     184int     __isinff(float) __pure2;
     185int     __isinfl(long double) __pure2;
     186int     __isnanl(long double) __pure2;
     187int     __isnormalf(float) __pure2;
     188int     __isnormal(double) __pure2;
     189int     __isnormall(long double) __pure2;
     190int     __signbit(double) __pure2;
     191int     __signbitf(float) __pure2;
     192int     __signbitl(long double) __pure2;
     193
     194double  acos(double);
     195double  asin(double);
     196double  atan(double);
     197double  atan2(double, double);
     198double  cos(double);
     199double  sin(double);
     200double  tan(double);
     201
     202double  cosh(double);
     203double  sinh(double);
     204double  tanh(double);
     205
     206double  exp(double);
     207double  frexp(double, int *);   /* fundamentally !__pure2 */
     208double  ldexp(double, int);
     209double  log(double);
     210double  log10(double);
     211double  modf(double, double *); /* fundamentally !__pure2 */
     212
     213double  pow(double, double);
     214double  sqrt(double);
     215
     216double  ceil(double);
     217double  fabs(double) __pure2;
     218double  floor(double);
     219double  fmod(double, double);
     220
     221/*
     222 * These functions are not in C90.
     223 */
     224#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE
     225double  acosh(double);
     226double  asinh(double);
     227double  atanh(double);
     228double  cbrt(double);
     229double  erf(double);
     230double  erfc(double);
     231double  exp2(double);
     232double  expm1(double);
     233double  fma(double, double, double);
     234double  hypot(double, double);
     235int     ilogb(double) __pure2;
     236int     (isinf)(double) __pure2;
     237int     (isnan)(double) __pure2;
     238double  lgamma(double);
     239long long llrint(double);
     240long long llround(double);
     241double  log1p(double);
     242double  logb(double);
     243long    lrint(double);
     244long    lround(double);
     245double  nextafter(double, double);
     246double  remainder(double, double);
     247double  remquo(double, double, int *);
     248double  rint(double);
     249#endif /* __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */
     250
     251#if __BSD_VISIBLE || __XSI_VISIBLE
     252double  j0(double);
     253double  j1(double);
     254double  jn(int, double);
     255double  scalb(double, double);
     256double  y0(double);
     257double  y1(double);
     258double  yn(int, double);
     259
     260#if __XSI_VISIBLE <= 500 || __BSD_VISIBLE
     261double  gamma(double);
     262#endif
     263#endif /* __BSD_VISIBLE || __XSI_VISIBLE */
     264
     265#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999
     266double  copysign(double, double) __pure2;
     267double  fdim(double, double);
     268double  fmax(double, double) __pure2;
     269double  fmin(double, double) __pure2;
     270double  nearbyint(double);
     271double  round(double);
     272double  scalbln(double, long);
     273double  scalbn(double, int);
     274double  tgamma(double);
     275double  trunc(double);
     276#endif
     277
     278/*
     279 * BSD math library entry points
     280 */
     281#if __BSD_VISIBLE
     282double  drem(double, double);
     283int     finite(double) __pure2;
     284int     isnanf(float) __pure2;
     285
     286/*
     287 * Reentrant version of gamma & lgamma; passes signgam back by reference
     288 * as the second argument; user must allocate space for signgam.
     289 */
     290double  gamma_r(double, int *);
     291double  lgamma_r(double, int *);
     292
     293/*
     294 * IEEE Test Vector
     295 */
     296double  significand(double);
     297#endif /* __BSD_VISIBLE */
     298
     299/* float versions of ANSI/POSIX functions */
     300#if __ISO_C_VISIBLE >= 1999
     301float   acosf(float);
     302float   asinf(float);
     303float   atanf(float);
     304float   atan2f(float, float);
     305float   cosf(float);
     306float   sinf(float);
     307float   tanf(float);
     308
     309float   coshf(float);
     310float   sinhf(float);
     311float   tanhf(float);
     312
     313float   exp2f(float);
     314float   expf(float);
     315float   expm1f(float);
     316float   frexpf(float, int *);   /* fundamentally !__pure2 */
     317int     ilogbf(float) __pure2;
     318float   ldexpf(float, int);
     319float   log10f(float);
     320float   log1pf(float);
     321float   logf(float);
     322float   modff(float, float *);  /* fundamentally !__pure2 */
     323
     324float   powf(float, float);
     325float   sqrtf(float);
     326
     327float   ceilf(float);
     328float   fabsf(float) __pure2;
     329float   floorf(float);
     330float   fmodf(float, float);
     331float   roundf(float);
     332
     333float   erff(float);
     334float   erfcf(float);
     335float   hypotf(float, float);
     336float   lgammaf(float);
     337
     338float   acoshf(float);
     339float   asinhf(float);
     340float   atanhf(float);
     341float   cbrtf(float);
     342float   logbf(float);
     343float   copysignf(float, float) __pure2;
     344long long llrintf(float);
     345long long llroundf(float);
     346long    lrintf(float);
     347long    lroundf(float);
     348float   nearbyintf(float);
     349float   nextafterf(float, float);
     350float   remainderf(float, float);
     351float   remquof(float, float, int *);
     352float   rintf(float);
     353float   scalblnf(float, long);
     354float   scalbnf(float, int);
     355float   truncf(float);
     356
     357float   fdimf(float, float);
     358float   fmaf(float, float, float);
     359float   fmaxf(float, float) __pure2;
     360float   fminf(float, float) __pure2;
     361#endif
     362
     363/*
     364 * float versions of BSD math library entry points
     365 */
     366#if __BSD_VISIBLE
     367float   dremf(float, float);
     368int     finitef(float) __pure2;
     369float   gammaf(float);
     370float   j0f(float);
     371float   j1f(float);
     372float   jnf(int, float);
     373float   scalbf(float, float);
     374float   y0f(float);
     375float   y1f(float);
     376float   ynf(int, float);
     377
     378/*
     379 * Float versions of reentrant version of gamma & lgamma; passes
     380 * signgam back by reference as the second argument; user must
     381 * allocate space for signgam.
     382 */
     383float   gammaf_r(float, int *);
     384float   lgammaf_r(float, int *);
     385
     386/*
     387 * float version of IEEE Test Vector
     388 */
     389float   significandf(float);
     390#endif  /* __BSD_VISIBLE */
     391
     392/*
     393 * long double versions of ISO/POSIX math functions
     394 */
     395#if __ISO_C_VISIBLE >= 1999
     396#if 1  /* bird: we've got these */
     397long double     acoshl(long double);
     398long double     acosl(long double);
     399long double     asinhl(long double);
     400long double     asinl(long double);
     401long double     atan2l(long double, long double);
     402long double     atanhl(long double);
     403long double     atanl(long double);
     404long double     cbrtl(long double);
     405#endif
     406long double     ceill(long double);
     407long double     copysignl(long double, long double) __pure2;
     408#if 1 /* bird: we've got some of these */
     409long double     coshl(long double);
     410long double     cosl(long double);
     411/*long double   erfcl(long double);
     412long double     erfl(long double);
     413long double     exp2l(long double);*/
     414long double     expl(long double);
     415/*long double   expm1l(long double);*/
     416#endif
     417long double     fabsl(long double) __pure2;
     418long double     fdiml(long double, long double);
     419long double     floorl(long double);
     420long double     fmal(long double, long double, long double);
     421long double     fmaxl(long double, long double) __pure2;
     422long double     fminl(long double, long double) __pure2;
     423#if 1 /* bird: we've got this one */
     424long double     fmodl(long double, long double);
     425#endif
     426long double     frexpl(long double value, int *); /* fundamentally !__pure2 */
     427#if 1 /* bird: we've got this one */
     428long double     hypotl(long double, long double);
     429#endif
     430int             ilogbl(long double) __pure2;
     431long double     ldexpl(long double, int);
     432#if 0
     433long double     lgammal(long double);
     434long long       llrintl(long double);
     435#endif
     436long long       llroundl(long double);
     437#if 1 /* bird: we've got some of these */
     438long double     log10l(long double);
     439/*long double   log1pl(long double);
     440long double     log2l(long double);
     441long double     logbl(long double);*/
     442long double     logl(long double);
     443/*long          lrintl(long double);*/
     444#endif
     445long            lroundl(long double);
     446#if 1 /* bird: we've got some of these. */
     447long double     modfl(long double, long double *); /* fundamentally !__pure2 */
     448/*long double   nanl(const char *) __pure2;
     449long double     nearbyintl(long double);*/
     450#endif
     451long double     nextafterl(long double, long double);
     452double          nexttoward(double, long double);
     453float           nexttowardf(float, long double);
     454long double     nexttowardl(long double, long double);
     455#if 1 /* bird: we've got powl. */
     456long double     powl(long double, long double);
     457/*long double   remainderl(long double, long double);
     458long double     remquol(long double, long double, int *);*/
     459long double     rintl(long double);
     460#endif
     461long double     roundl(long double);
     462long double     scalblnl(long double, long);
     463long double     scalbnl(long double, int);
     464#if 1 /* birdL we 've got most of these. */
     465long double     sinhl(long double);
     466long double     sinl(long double);
     467long double     sqrtl(long double);
     468long double     tanhl(long double);
     469long double     tanl(long double);
     470/*long double   tgammal(long double); */
     471#endif
     472long double     truncl(long double);
     473
     474#endif /* __ISO_C_VISIBLE >= 1999 */
     475__END_DECLS
     476
     477#endif /* !_MATH_H_ */
  • trunk/src/emx/src/lib/bsd/gen/fpclassify.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2828 */
    2929
     30#include "namespace.h"
    3031#include <sys/endian.h>
    3132
  • trunk/src/emx/src/lib/bsd/i386/gen/fabs.S

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    4141__FBSDID("$FreeBSD: src/lib/libc/i386/gen/fabs.S,v 1.9 2002/03/23 02:44:18 obrien Exp $");
    4242
    43 ENTRY(fabs)
     43STDENTRY(fabs)
    4444        fldl    4(%esp)
    4545        fabs
  • trunk/src/emx/src/lib/bsd/i386/gen/flt_rounds.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    44 */
    55
     6#include "namespace.h"
    67#include <sys/cdefs.h>
    78__FBSDID("$FreeBSD: src/lib/libc/i386/gen/flt_rounds.c,v 1.1 2004/07/19 08:17:24 das Exp $");
  • trunk/src/emx/src/lib/bsd/i386/gen/infinity.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    33 */
    44
     5#include "namespace.h"
    56#include <sys/cdefs.h>
    67__FBSDID("$FreeBSD: src/lib/libc/i386/gen/infinity.c,v 1.10 2003/02/08 20:37:52 mike Exp $");
  • trunk/src/emx/src/lib/bsd/i386/gen/ldexp.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    3535 */
    3636
     37#include "namespace.h"
    3738#if defined(LIBC_SCCS) && !defined(lint)
    3839static char sccsid[] = "@(#)ldexp.c     8.1 (Berkeley) 6/4/93";
     
    5253 */
    5354double
    54 ldexp (double value, int exp)
     55_STD(ldexp) (double value, int exp)
    5556{
    5657        double temp, texp, temp2;
  • trunk/src/emx/src/lib/bsd/i386/gen/modf.S

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    5151/* With CHOP mode on, frndint behaves as TRUNC does.  Useful. */
    5252
    53 ENTRY(modf)
     53STDENTRY(modf)
    5454        pushl %ebp
    5555        movl %esp,%ebp
  • trunk/src/emx/src/lib/bsd/include/_fpmath.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    11/*-
    2  * Copyright (c) 2002, 2003 David Schultz <dschultz@uclink.Berkeley.EDU>
     2 * Copyright (c) 2002, 2003 David Schultz <das@FreeBSD.ORG>
    33 * All rights reserved.
    44 *
     
    2424 * SUCH DAMAGE.
    2525 *
    26  * $FreeBSD: src/lib/libc/i386/_fpmath.h,v 1.3 2004/01/18 07:57:01 das Exp $
     26 * $FreeBSD: src/lib/libc/i386/_fpmath.h,v 1.5 2005/03/07 04:55:22 das Exp $
    2727 */
    2828
     
    3838};
    3939
    40 #define mask_nbit_l(u)  ((u).bits.manh &= 0x7fffffff)
     40#define LDBL_NBIT       0x80000000
     41#define mask_nbit_l(u)  ((u).bits.manh &= ~LDBL_NBIT)
    4142
    4243#define LDBL_MANH_SIZE  32
  • trunk/src/emx/src/lib/conv/conv.smak

    • Property cvs2svn:cvs-rev changed from 1.6 to 1.7
    r2012 r2013  
    4646.MODULE :=
    4747.TKIND  := aout
    48 .TSRC.386 := src/lib/conv/386/smallcnv.s
     48#.TSRC.386 := src/lib/conv/386/smallcnv.s - smallcnv is dead.
    4949.TSRC   := $(.TSRC.$(CPU))
    5050.INSDIR :=
  • trunk/src/emx/src/lib/libc.def

    • Property cvs2svn:cvs-rev changed from 1.112 to 1.113
    r2012 r2013  
    237237    "___fmutex_request_internal_must_complete" @250
    238238    "___fork" @251
    239     "___fpclassify" @252
    240     "___fpclassifyf" @253
    241     "___fpclassifyl" @254
     239    ;msun - dead "___fpclassify" @252
     240    ;msun - dead "___fpclassifyf" @253
     241    ;msun - dead "___fpclassifyl" @254
    242242    "___free_ovflpage" @255
    243243    "___ftime" @256
     
    258258    "___isfinitef" @271
    259259    "___isfinitel" @272
    260     "___isnan" @273
    261     "___isnanf" @274
     260    "_isnan" @273   ;msun changed name
     261    "_isnanf" @274  ;msun changed name
    262262    "___isnanl" @275
    263263    "___isnormal" @276
     
    407407    "___signbitl" @420
    408408    "___sigpause_bsd" @421
    409     "___small_atod" @422
    410     "___small_dtoa" @423
     409    ; dead "___small_atod" @422
     410    ; dead "___small_dtoa" @423
    411411    "___smutex_request_internal" @424
    412412    "___spawni" @425
     
    876876    "__std_posix_memalign" @889
    877877    "__std_pow" @890
    878     "__std_powl" @891
     878    ;msun - "__std_powl" @891
    879879    "__std_printf" @892
    880880    "__std_psignal" @893
     
    15541554    "__std_shmdt" @1559
    15551555    "__std_shmget" @1560
     1556    ; sunm
     1557    "__std_acosf" @1561
     1558    "__std_acosh" @1562
     1559    "__std_acoshf" @1563
     1560    "__std_asinf" @1564
     1561    "__std_asinh" @1565
     1562    "__std_asinhf" @1566
     1563    "__std_atan2f" @1567
     1564    "__std_atanf" @1568
     1565    "__std_atanh" @1569
     1566    "__std_atanhf" @1570
     1567    "__std_cabs" @1571
     1568    "__std_cabsf" @1572
     1569    "__std_cbrtf" @1573
     1570    "__std_ceilf" @1574
     1571    "__std_cimag" @1575
     1572    "__std_cimagf" @1576
     1573    "__std_cimagl" @1577
     1574    "__std_conj" @1578
     1575    "__std_conjf" @1579
     1576    "__std_conjl" @1580
     1577    "__std_cosf" @1581
     1578    "__std_coshf" @1582
     1579    "__std_creal" @1583
     1580    "__std_crealf" @1584
     1581    "__std_creall" @1585
     1582    "__std_erf" @1586
     1583    "__std_erfc" @1587
     1584    "__std_erfcf" @1588
     1585    "__std_erff" @1589
     1586    "__std_exp2" @1590
     1587    "__std_exp2f" @1591
     1588    "__std_expf" @1592
     1589    "__std_expm1" @1593
     1590    "__std_expm1f" @1594
     1591    "__std_truncf" @1595
     1592    "__std_fabsf" @1596
     1593    "__std_fdim" @1597
     1594    "__std_fdimf" @1598
     1595    "__std_fdiml" @1599
     1596    "__std_fegetenv" @1600
     1597    "__std_feholdexcept" @1601
     1598    "__std_feraiseexcept" @1602
     1599    "__std_fesetexceptflag" @1603
     1600    "__std_feupdateenv" @1604
     1601    "__std_floorf" @1605
     1602    "__std_fma" @1606
     1603    "__std_fmaf" @1607
     1604    "__std_fmal" @1608
     1605    "__std_fmax" @1609
     1606    "__std_fmaxf" @1610
     1607    "__std_fmaxl" @1611
     1608    "__std_fmin" @1612
     1609    "__std_fminf" @1613
     1610    "__std_fminl" @1614
     1611    "__std_fmodf" @1615
     1612    "__std_frexpf" @1616
     1613    "__std_hypotf" @1617
     1614    "__std_ilogb" @1618
     1615    "__std_ilogbf" @1619
     1616    "__std_ilogbl" @1620
     1617    "__std_ldexpf" @1621
     1618    "__std_lgamma" @1622
     1619    "__std_lgammaf" @1623
     1620    "__std_llrint" @1624
     1621    "__std_llrintf" @1625
     1622    "__std_llround" @1626
     1623    "__std_llroundf" @1627
     1624    "__std_llroundl" @1628
     1625    "__std_log10f" @1629
     1626    "__std_log1p" @1630
     1627    "__std_log1pf" @1631
     1628    "__std_logb" @1632
     1629    "__std_logbf" @1633
     1630    "__std_logf" @1634
     1631    "__std_lrint" @1635
     1632    "__std_lrintf" @1636
     1633    "__std_lround" @1637
     1634    "__std_lroundf" @1638
     1635    "__std_lroundl" @1639
     1636    "__std_modff" @1640
     1637    "__std_nearbyint" @1641
     1638    "__std_nearbyintf" @1642
     1639    "__std_nexttoward" @1643
     1640    "__std_nexttowardf" @1644
     1641    "__std_powf" @1645
     1642    "__std_remainder" @1646
     1643    "__std_remainderf" @1647
     1644    "__std_remquo" @1648
     1645    "__std_remquof" @1649
     1646    "__std_rintf" @1650
     1647    "__std_round" @1651
     1648    "__std_roundf" @1652
     1649    "__std_roundl" @1653
     1650    "__std_scalbf" @1654
     1651    "__std_scalbln" @1655
     1652    "__std_scalblnf" @1656
     1653    "__std_scalblnl" @1657
     1654    "__std_scalbn" @1658
     1655    "__std_scalbnf" @1659
     1656    "__std_scalbnl" @1660
     1657    "__std_signgam" @1661
     1658    "__std_sinf" @1662
     1659    "__std_sinhf" @1663
     1660    "__std_sqrtf" @1664
     1661    "__std_tanf" @1665
     1662    "__std_tanhf" @1666
     1663    "__std_tgamma" @1667
     1664    "___fpclassifyd" @1668
     1665    "___fpclassifyf" @1669
     1666    "___fpclassifyl" @1670
     1667    "_drem" @1671
     1668    "_dremf" @1672
     1669    "___exp__D" @1673
     1670    "___fe_dfl_env" @1674
     1671    "___fedisableexcept" @1675
     1672    "___feenableexcept" @1676
     1673    "_finite" @1677
     1674    "_finitef" @1678
     1675    "_gamma" @1679
     1676    "_gammaf" @1680
     1677    "_gammaf_r" @1681
     1678    "_gamma_r" @1682
     1679    "___has_sse" @1683
     1680    "___ieee754_rem_pio2" @1684
     1681    "___ieee754_rem_pio2f" @1685
     1682    "_j0" @1686
     1683    "_j0f" @1687
     1684    "_j1" @1688
     1685    "_j1f" @1689
     1686    "_jn" @1690
     1687    "_jnf" @1691
     1688    "___kernel_cos" @1692
     1689    "___kernel_cosf" @1693
     1690    "___kernel_rem_pio2" @1694
     1691    "___kernel_rem_pio2f" @1695
     1692    "___kernel_sin" @1696
     1693    "___kernel_sinf" @1697
     1694    "___kernel_tan" @1698
     1695    "___kernel_tanf" @1699
     1696    "_lgammaf_r" @1700
     1697    "_lgamma_r" @1701
     1698    "___log__D" @1702
     1699    "_scalb" @1703
     1700    "_significand" @1704
     1701    "_significandf" @1705
     1702    "__std_powl" @1706
     1703    "___test_sse" @1707
     1704    "_y0" @1708
     1705    "_y0f" @1709
     1706    "_y1" @1710
     1707    "_y1f" @1711
     1708    "_yn" @1712
     1709    "_ynf" @1713
     1710    "_z_abs" @1714
  • trunk/src/emx/src/lib/libc.smak

    • Property cvs2svn:cvs-rev changed from 1.63 to 1.64
    r2012 r2013  
    398398# files for _STD() macros invocations. Fortunately, gawk rulez forever thus
    399399# this happens in just a fraction of second.
    400 $.stmp-libc-std: $(wildcard src/lib/*/*.c src/lib/*/386/*.s src/lib/bsd/*/*.c src/lib/bsd/*/glue/*.c src/lib/lgpl/*/*.c)
     400$.stmp-libc-std: $(wildcard src/lib/*/*.c src/lib/*/386/*.s src/lib/bsd/*/*.c src/lib/bsd/*/glue/*.c src/lib/lgpl/*/*.c src/lib/msun/*/*.c)
    401401        gawk -f src/lib/mkstd.awk $^ >__tmp__
    402402        $(call UPDATE,__tmp__,$.libc-std.h)
  • trunk/src/emx/src/lib/libc06b4.def

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r2012 r2013  
    235235    "___fmutex_request_internal_must_complete" @250
    236236    "___fork" @251
    237     "___fpclassify" @252
    238     "___fpclassifyf" @253
    239     "___fpclassifyl" @254
     237    "___fpclassify" = ___nullstub_function @252
     238    "___fpclassifyf" = ___nullstub_function @253
     239    "___fpclassifyl" = ___nullstub_function @254
    240240    "___free_ovflpage" @255
    241241    "___ftime" @256
     
    256256    "___isfinitef" @271
    257257    "___isfinitel" @272
    258     "___isnan" @273
    259     "___isnanf" @274
     258    "_isnan" @273
     259    "_isnanf" @274
    260260    "___isnanl" @275
    261261    "___isnormal" @276
     
    405405    "___signbitl" @420
    406406    "___sigpause_bsd" @421
    407     "___small_atod" @422
    408     "___small_dtoa" @423
     407    "___small_atod" = ___nullstub_function @422
     408    "___small_dtoa" = ___legacy_dtoa @423
    409409    "___smutex_request_internal" @424
    410410    "___spawni" @425
  • trunk/src/emx/src/lib/math/386/acos.s

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r2012 r2013  
    11/ acos.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes
    22
     3#define LONG_DOUBLE
    34#include <emx/asm386.h>
    45
    5 #define FUNC    MATHSUFFIX1(acos)
     6#define FUNC    _STD(acosl)
    67
    78        .globl  FUNC
  • trunk/src/emx/src/lib/math/386/asin.s

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r2012 r2013  
    11/ asin.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes
    22
     3#define LONG_DOUBLE
    34#include <emx/asm386.h>
    45
    5 #define FUNC    MATHSUFFIX1(asin)
     6#define FUNC    _STD(asinl)
    67
    78        .globl  FUNC
  • trunk/src/emx/src/lib/math/386/atan.s

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r2012 r2013  
    11/ atan.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes
    22
     3#define LONG_DOUBLE
    34#include <emx/asm386.h>
    45
    5 #define FUNC    MATHSUFFIX1(atan)
     6#define FUNC    _STD(atanl)
    67
    78        .globl  FUNC
  • trunk/src/emx/src/lib/math/386/atan2.s

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r2012 r2013  
    11/ atan2.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes
    22
     3#define LONG_DOUBLE
    34#include <emx/asm386.h>
    45
    5 #define FUNC    MATHSUFFIX1(atan2)
     6#define FUNC    _STD(atan2l)
    67
    78        .globl  FUNC
  • trunk/src/emx/src/lib/math/386/cos.s

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r2012 r2013  
    22/                    Modified 1993-1996 by Eberhard Mattes
    33
     4#define LONG_DOUBLE
    45#include <emx/asm386.h>
    56
    6 #define FUNC    MATHSUFFIX1(cos)
     7#define FUNC    _STD(cosl)
    78
    89        .globl  FUNC
     
    2122        fcos                            /* cos(x) */
    2223        fstsw   %ax
    23         testb   $0x04, %ah                             
     24        testb   $0x04, %ah
    2425        jnz     Llarge                  /* C2 != 0 ? */
    2526Lreturn:EPILOGUE(FUNC)
  • trunk/src/emx/src/lib/math/386/cosh.s

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r2012 r2013  
    11/ cosh.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes
    22
     3#define LONG_DOUBLE
    34#include <emx/asm386.h>
    45
    5 #define FUNC    MATHSUFFIX1(cosh)
     6#define FUNC    _STD(coshl)
    67
    78        .globl  FUNC
     
    3132        orw     $0x0400, %ax            /* round down towards -inf */
    3233        movw    %ax, cw2
    33         fldcw   cw2     
     34        fldcw   cw2
    3435        fld     %st                     /* y, y */
    3536        frndint                         /* int (y), y */
  • trunk/src/emx/src/lib/math/386/exp.s

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r2012 r2013  
    11/ exp.s (emx+gcc) -- Copyright (c) 1991-2000 by Eberhard Mattes
    22
     3#define LONG_DOUBLE
    34#include <emx/asm386.h>
    45
    5 #define FUNC    MATHSUFFIX1(exp)
     6#define FUNC    _STD(expl)
    67
    78        .globl  FUNC
     
    3637        orw     $0x0400, %ax            /* round down towards -inf */
    3738        movw    %ax, cw2
    38         fldcw   cw2     
     39        fldcw   cw2
    3940        fld     %st                     /* y, y */
    4041        frndint                         /* int (y), y */
  • trunk/src/emx/src/lib/math/386/fmod.s

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r2012 r2013  
    22/                     Modified 1993-1996 by Eberhard Mattes
    33
     4#define LONG_DOUBLE
    45#include <emx/asm386.h>
    56
    6 #define FUNC    MATHSUFFIX1(fmod)
     7#define FUNC    _STD(fmodl)
    78
    89        .globl  FUNC
  • trunk/src/emx/src/lib/math/386/fxam.s

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r2012 r2013  
    33#include <emx/asm386.h>
    44
    5 #define FUNC    MATHSUFFIX2(fxam)
     5#define FUNC    __fxam
    66
    77        .globl  FUNC
  • trunk/src/emx/src/lib/math/386/hypot.s

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r2012 r2013  
    55/ However, such an algorithm should perhaps be used for _hypotl().
    66
     7#define LONG_DOUBLE
    78#include <emx/asm386.h>
    89
    9 #define FUNC    MATHSUFFIX1(hypot)
     10#define FUNC    _STD(hypotl)
    1011
    1112        .globl  FUNC
  • trunk/src/emx/src/lib/math/386/log.s

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r2012 r2013  
    11/ log.s (emx+gcc) -- Copyright (c) 1991-2000 by Eberhard Mattes
    22
     3#define LONG_DOUBLE
    34#include <emx/asm386.h>
    45
    5 #define FUNC    MATHSUFFIX1(log)
     6#define FUNC    _STD(logl)
    67
    78        .globl  FUNC
  • trunk/src/emx/src/lib/math/386/log10.s

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r2012 r2013  
    11/ log10.s (emx+gcc) -- Copyright (c) 1991-2000 by Eberhard Mattes
    22
     3#define LONG_DOUBLE
    34#include <emx/asm386.h>
    45
    5 #define FUNC    MATHSUFFIX1(log10)
     6#define FUNC    _STD(log10l)
    67
    78        .globl  FUNC
  • trunk/src/emx/src/lib/math/386/modf.s

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r2012 r2013  
    11/ modf.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes
    22
     3#define LONG_DOUBLE
    34#include <emx/asm386.h>
    45
    5 #define FUNC    MATHSUFFIX1(modf)
     6#define FUNC    _STD(modfl)
    67
    78        .globl  FUNC
  • trunk/src/emx/src/lib/math/386/pow.s

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r2012 r2013  
    22/                    Modified 1992-1996 by Eberhard Mattes
    33
     4#define LONG_DOUBLE
    45#include <emx/asm386.h>
    56
    6 #define FUNC    MATHSUFFIX1(pow)
     7#define FUNC    _STD(powl)
    78
    89        .globl  FUNC
     
    116117        jmp     Ldone
    117118
    118 / x = +INF, y non-zero and finite 
     119/ x = +INF, y non-zero and finite
    119120        ALIGN
    120121Lx_pinf:fstp    %st(1)                  /* pop x, st(0):=x */
     
    125126        jmp     Ldone
    126127
    127 / x = -INF, y non-zero and finite 
     128/ x = -INF, y non-zero and finite
    128129        ALIGN
    129130Lx_minf:testb   $2, %cl                 /* y < 0? */
  • trunk/src/emx/src/lib/math/386/rint.s

    • Property cvs2svn:cvs-rev changed from 1.5 to 1.6
    r2012 r2013  
    11/ rint.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes
    22
     3#define LONG_DOUBLE
    34#include <emx/asm386.h>
    45
    5 #define FUNC    MATHSUFFIX1(rint)
     6#define FUNC    _STD(rintl)
    67
    78        .globl  FUNC
  • trunk/src/emx/src/lib/math/386/sin.s

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r2012 r2013  
    22/                    Modified 1993-1996 by Eberhard Mattes
    33
     4#define LONG_DOUBLE
    45#include <emx/asm386.h>
    56
    6 #define FUNC    MATHSUFFIX1(sin)
     7#define FUNC    _STD(sinl)
    78
    89        .globl  FUNC
     
    2122        fsin                            /* sin(x) */
    2223        fstsw   %ax
    23         testb   $0x04, %ah                             
     24        testb   $0x04, %ah
    2425        jnz     Llarge                  /* C2 != 0 ? */
    2526Lreturn:EPILOGUE(FUNC)
  • trunk/src/emx/src/lib/math/386/sinh.s

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r2012 r2013  
    11/ sinh.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes
    22
     3#define LONG_DOUBLE
    34#include <emx/asm386.h>
    45
    5 #define FUNC    MATHSUFFIX1(sinh)
     6#define FUNC    _STD(sinhl)
    67
    78        .globl  FUNC
     
    3132        orw     $0x0400, %ax            /* round down towards -inf */
    3233        movw    %ax, cw2
    33         fldcw   cw2     
     34        fldcw   cw2
    3435        fld     %st                     /* y, y */
    3536        frndint                         /* int (y), y */
  • trunk/src/emx/src/lib/math/386/sqrt.s

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r2012 r2013  
    11/ sqrt.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes
    22
     3#define LONG_DOUBLE
    34#include <emx/asm386.h>
    45
    5 #define FUNC    MATHSUFFIX1(sqrt)
     6#define FUNC    _STD(sqrtl)
    67
    78        .globl  FUNC
  • trunk/src/emx/src/lib/math/386/tan.s

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r2012 r2013  
    22/                    Modified 1993-1996 by Eberhard Mattes
    33
     4#define LONG_DOUBLE
    45#include <emx/asm386.h>
    56
    6 #define FUNC    MATHSUFFIX1(tan)
     7#define FUNC    _STD(tanl)
    78
    89        .globl  FUNC
  • trunk/src/emx/src/lib/math/386/tanh.s

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r2012 r2013  
    11/ tanh.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes
    22
     3#define LONG_DOUBLE
    34#include <emx/asm386.h>
    45
    5 #define FUNC    MATHSUFFIX1(tanh)
     6#define FUNC    _STD(tanhl)
    67
    78        .globl  FUNC
     
    3233        orw     $0x0400, %ax            /* round down towards -inf */
    3334        movw    %ax, cw2
    34         fldcw   cw2     
     35        fldcw   cw2
    3536        fld     %st                     /* y, y */
    3637        frndint                         /* int (y), y */
  • trunk/src/emx/src/lib/math/cbrtl.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r2012 r2013  
    77{
    88  if (x >= 0)
    9     return _powl (x, 1.0 / 3.0);
     9    return powl (x, 1.0 / 3.0);
    1010  else
    11     return -_powl (-x, 1.0 / 3.0);
     11    return -powl (-x, 1.0 / 3.0);
    1212}
  • trunk/src/emx/src/lib/math/math.smak

    • Property cvs2svn:cvs-rev changed from 1.6 to 1.7
    r2012 r2013  
    22libc.TSRC += $(wildcard src/lib/math/*.c)
    33
    4 # Virtual targets, e.g. compiled from same input files but with different opts
    5 libc.TDEP.386 += $(addprefix @O@src/lib/math/386/, copysigf.o copysigl.o \
    6   fpclassf.o fpclassl.o isfinf.o isfinl.o isnanf.o isnanl.o isnormf.o \
    7   isnorml.o nextaftf.o nextaftl.o signbitf.o signbitl.o acosl.o asinl.o \
    8   atanl.o atan2l.o ceill.o cosl.o coshl.o expl.o fabsl.o floorl.o fmodl.o \
    9   frexpl.o fxaml.o hypotl.o ldexpl.o logl.o log10l.o modfl.o powl.o rintl.o \
    10   sinl.o sinhl.o sqrtl.o tanl.o tanhl.o truncl.o)
    11 
    12 # bird: this doesn't work any better now. sorry. :/
    13 #$(call .MVER,math/386/%f.o): src/lib/math/386/%.s
    14 #       $(call DO.COMPILE.s, -DFLOAT)
    15 #$(call .MVER,math/386/%l.o): src/lib/math/386/%.s
    16 #       $(call DO.COMPILE.s, -DLONG_DOUBLE)
    17        
    18 $.aout-prof/src/lib/math/386/%f.o: src/lib/math/386/%.s
    19         $(call DO.COMPILE.s, -DFLOAT)
    20 $.aout-prof/src/lib/math/386/%l.o: src/lib/math/386/%.s
    21         $(call DO.COMPILE.s, -DLONG_DOUBLE)
    22 
    23 $.aout-log/src/lib/math/386/%f.o: src/lib/math/386/%.s
    24         $(call DO.COMPILE.s, -DFLOAT)
    25 $.aout-log/src/lib/math/386/%l.o: src/lib/math/386/%.s
    26         $(call DO.COMPILE.s, -DLONG_DOUBLE)
    27        
    28 $.aout/src/lib/math/386/%f.o: src/lib/math/386/%.s
    29         $(call DO.COMPILE.s, -DFLOAT)
    30 $.aout/src/lib/math/386/%l.o: src/lib/math/386/%.s
    31         $(call DO.COMPILE.s, -DLONG_DOUBLE)
    32        
  • trunk/src/emx/src/lib/mkstd.awk

    • Property cvs2svn:cvs-rev changed from 1.5 to 1.6
    r2012 r2013  
    5454}
    5555
     56/STDENTRY\( *[_0-9A-Za-z]+ *\)/{
     57  while (match($0, "STDENTRY\\( *[_0-9A-Za-z ]+ *\\)"))
     58  {
     59    std_fun[gensub("STDENTRY\\( *([_0-9A-Za-z]+) *\\).*", "\\1", "", substr($0,RSTART,RLENGTH))]=1;
     60    $0 = substr($0, 1, RSTART-1) substr($0, RSTART+RLENGTH);
     61  }
     62}
     63
    5664/__weak_reference\( *[_0-9A-Za-z]+ *, *[_0-9A-Za-z]+ *\)/{
    5765  while (match($0, "__weak_reference\\( *[_0-9A-Za-z ]+ *, *[_0-9A-Za-z ]+ *\\)"))
  • trunk/src/emx/src/lib/msun/bsdsrc/b_exp.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    3232 */
    3333
     34#include "namespace.h"
    3435#ifndef lint
    3536static char sccsid[] = "@(#)exp.c       8.1 (Berkeley) 6/4/93";
  • trunk/src/emx/src/lib/msun/bsdsrc/b_log.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    3232 */
    3333
     34#include "namespace.h"
    3435#ifndef lint
    3536static char sccsid[] = "@(#)log.c       8.2 (Berkeley) 11/30/93";
  • trunk/src/emx/src/lib/msun/bsdsrc/b_tgamma.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    3232 */
    3333
     34#include "namespace.h"
    3435#ifndef lint
    3536static char sccsid[] = "@(#)gamma.c     8.1 (Berkeley) 6/4/93";
  • trunk/src/emx/src/lib/msun/msun.smak

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    5959
    6060# Add to libc modules.
    61 libc.TSRC.386 += $(addprefix src/lib/msun/i386/,$(ARCH_SRCS))
     61libc.TSRC.386 += $(addprefix src/lib/msun/i387/,$(ARCH_SRCS))
    6262libc.TSRC += $(MSUN_SRCS)
    6363
  • trunk/src/emx/src/lib/msun/src/e_acos.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
    1212 */
    1313
     14#include "namespace.h"
    1415#ifndef lint
    1516static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_acos.c,v 1.10 2005/02/04 18:26:05 das Exp $";
     
    1718
    1819/* __ieee754_acos(x)
    19  * Method :                 
     20 * Method :
    2021 *      acos(x)  = pi/2 - asin(x)
    2122 *      acos(-x) = pi/2 + asin(x)
     
    2425 * For x>0.5
    2526 *      acos(x) = pi/2 - (pi/2 - 2asin(sqrt((1-x)/2)))
    26  *              = 2asin(sqrt((1-x)/2)) 
     27 *              = 2asin(sqrt((1-x)/2))
    2728 *              = 2s + 2s*z*R(z)        ...z=(1-x)/2, s=sqrt(z)
    2829 *              = 2f + (2c + 2s*z*R(z))
  • trunk/src/emx/src/lib/msun/src/e_acosf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_acosf.c,v 1.7 2002/05/28 17:03:12 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/e_acosh.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
     
    1313 */
    1414
     15#include "namespace.h"
    1516#ifndef lint
    1617static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_acosh.c,v 1.8 2005/02/04 18:26:05 das Exp $";
     
    1920/* __ieee754_acosh(x)
    2021 * Method :
    21  *      Based on 
     22 *      Based on
    2223 *              acosh(x) = log [ x + sqrt(x*x-1) ]
    2324 *      we have
     
    5051            if(hx >=0x7ff00000) {       /* x is inf of NaN */
    5152                return x+x;
    52             } else 
     53            } else
    5354                return __ieee754_log(x)+ln2;    /* acosh(huge)=log(2x) */
    5455        } else if(((hx-0x3ff00000)|lx)==0) {
  • trunk/src/emx/src/lib/msun/src/e_acoshf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_acoshf.c,v 1.7 2002/05/28 17:03:12 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/e_asin.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
    1212 */
    1313
     14#include "namespace.h"
    1415#ifndef lint
    1516static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_asin.c,v 1.11 2005/02/04 18:26:05 das Exp $";
     
    1718
    1819/* __ieee754_asin(x)
    19  * Method :                 
     20 * Method :
    2021 *      Since  asin(x) = x + x^3/6 + x^5*3/40 + x^7*15/336 + ...
    2122 *      we approximate asin(x) on [0,0.5] by
    2223 *              asin(x) = x + x*x^2*R(x^2)
    2324 *      where
    24  *              R(x^2) is a rational approximation of (asin(x)-x)/x^3 
     25 *              R(x^2) is a rational approximation of (asin(x)-x)/x^3
    2526 *      and its remez error is bounded by
    2627 *              |(asin(x)-x)/x^3 - R(x^2)| < 2^(-58.75)
     
    8182                    /* asin(1)=+-pi/2 with inexact */
    8283                return x*pio2_hi+x*pio2_lo;     
    83             return (x-x)/(x-x);         /* asin(|x|>1) is NaN */   
     84            return (x-x)/(x-x);         /* asin(|x|>1) is NaN */
    8485        } else if (ix<0x3fe00000) {     /* |x|<0.5 */
    8586            if(ix<0x3e400000) {         /* if |x| < 2**-27 */
    8687                if(huge+x>one) return x;/* return x with inexact if x!=0*/
    87             } else 
     88            } else
    8889                t = x*x;
    8990                p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5)))));
     
    109110            q  = pio4_hi-2.0*w;
    110111            t  = pio4_hi-(p-q);
    111         }   
    112         if(hx>0) return t; else return -t;   
     112        }
     113        if(hx>0) return t; else return -t;
    113114}
  • trunk/src/emx/src/lib/msun/src/e_asinf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_asinf.c,v 1.8 2002/05/28 17:03:12 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/e_atan2.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
     
    1313 */
    1414
     15#include "namespace.h"
    1516#ifndef lint
    1617static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_atan2.c,v 1.10 2005/02/04 18:26:05 das Exp $";
     
    2021 * Method :
    2122 *      1. Reduce y to positive by atan2(y,x)=-atan2(-y,x).
    22  *      2. Reduce x to positive by (if x and y are unexceptional): 
     23 *      2. Reduce x to positive by (if x and y are unexceptional):
    2324 *              ARG (x+iy) = arctan(y/x)           ... if x > 0,
    2425 *              ARG (x+iy) = pi - arctan[y/(-x)]   ... if x < 0,
     
    3839 *
    3940 * Constants:
    40  * The hexadecimal values are the intended ones for the following 
    41  * constants. The decimal values may be used, provided that the 
    42  * compiler will convert from decimal to binary accurately enough 
     41 * The hexadecimal values are the intended ones for the following
     42 * constants. The decimal values may be used, provided that the
     43 * compiler will convert from decimal to binary accurately enough
    4344 * to produce the hexadecimal values shown.
    4445 */
     
    7576        if((iy|ly)==0) {
    7677            switch(m) {
    77                 case 0: 
     78                case 0:
    7879                case 1: return y;       /* atan(+-0,+anything)=+-0 */
    7980                case 2: return  pi+tiny;/* atan(+0,-anything) = pi */
     
    8384    /* when x = 0 */
    8485        if((ix|lx)==0) return (hy<0)?  -pi_o_2-tiny: pi_o_2+tiny;
    85            
     86       
    8687    /* when x is INF */
    8788        if(ix==0x7ff00000) {
  • trunk/src/emx/src/lib/msun/src/e_atan2f.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_atan2f.c,v 1.7 2004/06/02 17:09:05 bde Exp $";
  • trunk/src/emx/src/lib/msun/src/e_atanh.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
     
    1313 */
    1414
     15#include "namespace.h"
    1516#ifndef lint
    1617static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_atanh.c,v 1.7 2005/02/04 18:26:05 das Exp $";
     
    5152        if ((ix|((lx|(-lx))>>31))>0x3ff00000) /* |x|>1 */
    5253            return (x-x)/(x-x);
    53         if(ix==0x3ff00000) 
     54        if(ix==0x3ff00000)
    5455            return x/zero;
    5556        if(ix<0x3e300000&&(huge+x)>zero) return x;      /* x<2**-28 */
     
    5859            t = x+x;
    5960            t = 0.5*log1p(t+t*x/(one-x));
    60         } else 
     61        } else
    6162            t = 0.5*log1p((x+x)/(one-x));
    6263        if(hx>=0) return t; else return -t;
  • trunk/src/emx/src/lib/msun/src/e_atanhf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_atanhf.c,v 1.6 2002/05/28 17:03:12 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/e_cosh.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
    1212 */
    1313
     14#include "namespace.h"
    1415#ifndef lint
    1516static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_cosh.c,v 1.8 2005/02/04 18:26:05 das Exp $";
     
    1718
    1819/* __ieee754_cosh(x)
    19  * Method : 
     20 * Method :
    2021 * mathematically cosh(x) if defined to be (exp(x)+exp(-x))/2
    21  *      1. Replace x by |x| (cosh(x) = cosh(-x)). 
    22  *      2. 
    23  *                                                      [ exp(x) - 1 ]^2 
     22 *      1. Replace x by |x| (cosh(x) = cosh(-x)).
     23 *      2.
     24 *                                                      [ exp(x) - 1 ]^2
    2425 *          0        <= x <= ln2/2  :  cosh(x) := 1 + -------------------
    2526 *                                                         2*exp(x)
     
    2829 *          ln2/2    <= x <= 22     :  cosh(x) := -------------------
    2930 *                                                        2
    30  *          22       <= x <= lnovft :  cosh(x) := exp(x)/2 
     31 *          22       <= x <= lnovft :  cosh(x) := exp(x)/2
    3132 *          lnovft   <= x <= ln2ovft:  cosh(x) := exp(x/2)/2 * exp(x/2)
    3233 *          ln2ovft  <  x           :  cosh(x) := huge*huge (overflow)
  • trunk/src/emx/src/lib/msun/src/e_coshf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_coshf.c,v 1.6 2002/05/28 17:03:12 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/e_exp.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    66 *
    77 * Permission to use, copy, modify, and distribute this
    8  * software is freely granted, provided that this notice 
     8 * software is freely granted, provided that this notice
    99 * is preserved.
    1010 * ====================================================
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_exp.c,v 1.10 2005/02/04 18:26:05 das Exp $";
     
    2324 *      Given x, find r and integer k such that
    2425 *
    25  *               x = k*ln2 + r,  |r| <= 0.5*ln2. 
     26 *               x = k*ln2 + r,  |r| <= 0.5*ln2.
    2627 *
    27  *      Here r will be represented as r = hi-lo for better 
     28 *      Here r will be represented as r = hi-lo for better
    2829 *      accuracy.
    2930 *
     
    3233 *      Write
    3334 *          R(r**2) = r*(exp(r)+1)/(exp(r)-1) = 2 + r*r/6 - r**4/360 + ...
    34  *      We use a special Remes algorithm on [0,0.34658] to generate 
    35  *      a polynomial of degree 5 to approximate R. The maximum error 
     35 *      We use a special Remes algorithm on [0,0.34658] to generate
     36 *      a polynomial of degree 5 to approximate R. The maximum error
    3637 *      of this polynomial approximation is bounded by 2**-59. In
    3738 *      other words,
     
    4041 *      and
    4142 *          |                  5          |     -59
    42  *          | 2.0+P1*z+...+P5*z   -  R(z) | <= 2 
     43 *          | 2.0+P1*z+...+P5*z   -  R(z) | <= 2
    4344 *          |                             |
    4445 *      The computation of exp(r) thus becomes
     
    6768 *
    6869 * Misc. info.
    69  *      For IEEE double 
     70 *      For IEEE double
    7071 *          if x >  7.09782712893383973096e+02 then exp(x) overflow
    7172 *          if x < -7.45133219101941108420e+02 then exp(x) underflow
    7273 *
    7374 * Constants:
    74  * The hexadecimal values are the intended ones for the following 
    75  * constants. The decimal values may be used, provided that the 
     75 * The hexadecimal values are the intended ones for the following
     76 * constants. The decimal values may be used, provided that the
    7677 * compiler will convert from decimal to binary accurately enough
    7778 * to produce the hexadecimal values shown.
     
    125126
    126127    /* argument reduction */
    127         if(hx > 0x3fd62e42) {           /* if  |x| > 0.5 ln2 */ 
     128        if(hx > 0x3fd62e42) {           /* if  |x| > 0.5 ln2 */
    128129            if(hx < 0x3FF0A2B2) {       /* and |x| < 1.5 ln2 */
    129130                hi = x-ln2HI[xsb]; lo=ln2LO[xsb]; k = 1-xsb-xsb;
     
    135136            }
    136137            x  = hi - lo;
    137         } 
     138        }
    138139        else if(hx < 0x3e300000)  {     /* when |x|<2**-28 */
    139140            if(huge+x>one) return one+x;/* trigger inexact */
     
    144145        t  = x*x;
    145146        c  = x - t*(P1+t*(P2+t*(P3+t*(P4+t*P5))));
    146         if(k==0)        return one-((x*c)/(c-2.0)-x); 
     147        if(k==0)        return one-((x*c)/(c-2.0)-x);
    147148        else            y = one-((lo-(x*c)/(2.0-c))-hi);
    148149        if(k >= -1021) {
  • trunk/src/emx/src/lib/msun/src/e_expf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_expf.c,v 1.9 2005/02/24 06:32:13 das Exp $";
  • trunk/src/emx/src/lib/msun/src/e_fmod.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
    1212 */
    1313
     14#include "namespace.h"
    1415#ifndef lint
    1516static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_fmod.c,v 1.9 2005/02/04 18:26:05 das Exp $";
    1617#endif
    1718
    18 /* 
     19/*
    1920 * __ieee754_fmod(x,y)
    2021 * Return x mod y in exact arithmetic
     
    4546        if(hx<=hy) {
    4647            if((hx<hy)||(lx<ly)) return x;      /* |x|<|y| return x */
    47             if(lx==ly) 
     48            if(lx==ly)
    4849                return Zero[(u_int32_t)sx>>31]; /* |x|=|y| return x*0*/
    4950        }
     
    6869
    6970    /* set up {hx,lx}, {hy,ly} and align y to x */
    70         if(ix >= -1022) 
     71        if(ix >= -1022)
    7172            hx = 0x00100000|(0x000fffff&hx);
    7273        else {          /* subnormal x, shift x to normal */
     
    8081            }
    8182        }
    82         if(iy >= -1022) 
     83        if(iy >= -1022)
    8384            hy = 0x00100000|(0x000fffff&hy);
    8485        else {          /* subnormal y, shift y to normal */
  • trunk/src/emx/src/lib/msun/src/e_fmodf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_fmodf.c,v 1.6 2002/05/28 17:03:12 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/e_gamma.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
     
    1313 */
    1414
     15#include "namespace.h"
    1516#ifndef lint
    1617static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_gamma.c,v 1.7 2005/02/04 18:26:05 das Exp $";
  • trunk/src/emx/src/lib/msun/src/e_gamma_r.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
     
    1313 */
    1414
     15#include "namespace.h"
    1516#ifndef lint
    1617static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_gamma_r.c,v 1.7 2005/02/04 18:26:05 das Exp $";
     
    1819
    1920/* __ieee754_gamma_r(x, signgamp)
    20  * Reentrant version of the logarithm of the Gamma function 
    21  * with user provide pointer for the sign of Gamma(x). 
     21 * Reentrant version of the logarithm of the Gamma function
     22 * with user provide pointer for the sign of Gamma(x).
    2223 *
    2324 * Method: See __ieee754_lgamma_r
  • trunk/src/emx/src/lib/msun/src/e_gammaf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_gammaf.c,v 1.6 2002/05/28 17:03:12 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/e_gammaf_r.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_gammaf_r.c,v 1.7 2002/05/28 18:15:03 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/e_hypot.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
    1212 */
    1313
     14#include "namespace.h"
    1415#ifndef lint
    1516static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_hypot.c,v 1.9 2005/02/04 18:26:05 das Exp $";
     
    1819/* __ieee754_hypot(x,y)
    1920 *
    20  * Method :                 
    21  *      If (assume round-to-nearest) z=x*x+y*y 
    22  *      has error less than sqrt(2)/2 ulp, than 
     21 * Method :
     22 *      If (assume round-to-nearest) z=x*x+y*y
     23 *      has error less than sqrt(2)/2 ulp, than
    2324 *      sqrt(z) has error less than 1 ulp (exercise).
    2425 *
    25  *      So, compute sqrt(x*x+y*y) with some care as 
     26 *      So, compute sqrt(x*x+y*y) with some care as
    2627 *      follows to get the error below 1 ulp:
    2728 *
     
    3334 *      2. if x <= 2y use
    3435 *              t1*y1+((x-y)*(x-y)+(t1*y2+t2*y))
    35  *      where t1 = 2x with lower 32 bits cleared, t2 = 2x-t1, 
     36 *      where t1 = 2x with lower 32 bits cleared, t2 = 2x-t1,
    3637 *      y1= y with lower 32 bits chopped, y2 = y-y1.
    3738 *             
    38  *      NOTE: scaling may be necessary if some argument is too 
     39 *      NOTE: scaling may be necessary if some argument is too
    3940 *            large or too tiny
    4041 *
     
    4445 *
    4546 * Accuracy:
    46  *      hypot(x,y) returns sqrt(x^2+y^2) with error less 
    47  *      than 1 ulps (units in the last place) 
     47 *      hypot(x,y) returns sqrt(x^2+y^2) with error less
     48 *      than 1 ulps (units in the last place)
    4849 */
    4950
  • trunk/src/emx/src/lib/msun/src/e_hypotf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_hypotf.c,v 1.9 2002/05/28 18:15:03 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/e_j0.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
    1212 */
    1313
     14#include "namespace.h"
    1415#ifndef lint
    1516static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_j0.c,v 1.8 2005/02/04 18:26:05 das Exp $";
     
    3536 *              sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
    3637 *          to compute the worse one.)
    37  *         
     38 *     
    3839 *      3 Special cases
    3940 *              j0(nan)= nan
     
    4344 * Method -- y0(x):
    4445 *      1. For x<2.
    45  *         Since 
     46 *         Since
    4647 *              y0(x) = 2/pi*(j0(x)*(ln(x/2)+Euler) + x^2/4 - ...)
    4748 *         therefore y0(x)-2/pi*j0(x)*ln(x) is an even function.
    4849 *         We use the following function to approximate y0,
    4950 *              y0(x) = U(z)/V(z) + (2/pi)*(j0(x)*ln(x)), z= x^2
    50  *         where 
     51 *         where
    5152 *              U(z) = u00 + u01*z + ... + u06*z^6
    5253 *              V(z) = 1  + v01*z + ... + v04*z^4
     
    153154        ix = 0x7fffffff&hx;
    154155    /* Y0(NaN) is NaN, y0(-inf) is Nan, y0(inf) is 0  */
    155         if(ix>=0x7ff00000) return  one/(x+x*x); 
     156        if(ix>=0x7ff00000) return  one/(x+x*x);
    156157        if((ix|lx)==0) return -one/zero;
    157158        if(hx<0) return zero/zero;
  • trunk/src/emx/src/lib/msun/src/e_j0f.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_j0f.c,v 1.7 2002/05/28 18:15:03 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/e_j1.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
    1212 */
    1313
     14#include "namespace.h"
    1415#ifndef lint
    1516static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_j1.c,v 1.8 2005/02/04 18:26:06 das Exp $";
     
    3637 *              sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
    3738 *          to compute the worse one.)
    38  *         
     39 *     
    3940 *      3 Special cases
    4041 *              j1(nan)= nan
     
    4344 *             
    4445 * Method -- y1(x):
    45  *      1. screen out x<=0 cases: y1(0)=-inf, y1(x<0)=NaN 
     46 *      1. screen out x<=0 cases: y1(0)=-inf, y1(x<0)=NaN
    4647 *      2. For x<2.
    47  *         Since 
     48 *         Since
    4849 *              y1(x) = 2/pi*(j1(x)*(ln(x/2)+Euler)-1/x-x/2+5/64*x^3-...)
    4950 *         therefore y1(x)-2/pi*j1(x)*ln(x)-1/x is an odd function.
     
    150151        ix = 0x7fffffff&hx;
    151152    /* if Y1(NaN) is NaN, Y1(-inf) is NaN, Y1(inf) is 0 */
    152         if(ix>=0x7ff00000) return  one/(x+x*x); 
     153        if(ix>=0x7ff00000) return  one/(x+x*x);
    153154        if((ix|lx)==0) return -one/zero;
    154155        if(hx<0) return zero/zero;
     
    180181                }
    181182                return z;
    182         } 
     183        }
    183184        if(ix<=0x3c900000) {    /* x < 2**-54 */
    184185            return(-tpi/x);
    185         } 
     186        }
    186187        z = x*x;
    187188        u = U0[0]+z*(U0[1]+z*(U0[2]+z*(U0[3]+z*U0[4])));
  • trunk/src/emx/src/lib/msun/src/e_j1f.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_j1f.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/e_jn.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
    1212 */
    1313
     14#include "namespace.h"
    1415#ifndef lint
    1516static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_jn.c,v 1.9 2005/02/04 18:26:06 das Exp $";
     
    2021 * floating point Bessel's function of the 1st and 2nd kind
    2122 * of order n
    22  *         
     23 *
    2324 * Special cases:
    2425 *      y0(0)=y1(0)=yn(n,0) = -inf with division by zero signal;
     
    7778        if((ix|lx)==0||ix>=0x7ff00000)  /* if x is 0 or inf */
    7879            b = zero;
    79         else if((double)n<=x) {   
     80        else if((double)n<=x) {
    8081                /* Safe to use J(n+1,x)=2n/x *J(n,x)-J(n-1,x) */
    8182            if(ix>=0x52D00000) { /* x > 2**302 */
    82     /* (x >> n**2) 
     83    /* (x >> n**2)
    8384     *      Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi)
    8485     *      Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi)
    85      *      Let s=sin(x), c=cos(x), 
     86     *      Let s=sin(x), c=cos(x),
    8687     *          xn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then
    8788     *
     
    111112        } else {
    112113            if(ix<0x3e100000) { /* x < 2**-29 */
    113     /* x is tiny, return the first Taylor expansion of J(n,x) 
     114    /* x is tiny, return the first Taylor expansion of J(n,x)
    114115     * J(n,x) = 1/n!*(x/2)^n  - ...
    115116     */
     
    126127            } else {
    127128                /* use backward recurrence */
    128                 /*                      x      x^2      x^2       
     129                /*                      x      x^2      x^2
    129130                 *  J(n,x)/J(n-1,x) =  ----   ------   ------   .....
    130131                 *                      2n  - 2(n+1) - 2(n+2)
    131132                 *
    132                  *                      1      1        1       
     133                 *                      1      1        1
    133134                 *  (for large x)   =  ----  ------   ------   .....
    134135                 *                      2n   2(n+1)   2(n+2)
    135                  *                      -- - ------ - ------ - 
     136                 *                      -- - ------ - ------ -
    136137                 *                       x     x         x
    137138                 *
     
    149150                 * Q(0) = w, Q(1) = w(w+h) - 1,
    150151                 * Q(k) = (w+k*h)*Q(k-1) - Q(k-2),
    151                  * When Q(k) > 1e4      good for single 
    152                  * When Q(k) > 1e9      good for double 
    153                  * When Q(k) > 1e17     good for quadruple 
     152                 * When Q(k) > 1e4      good for single
     153                 * When Q(k) > 1e9      good for double
     154                 * When Q(k) > 1e17     good for quadruple
    154155                 */
    155156            /* determine k */
     
    230231        if(ix==0x7ff00000) return zero;
    231232        if(ix>=0x52D00000) { /* x > 2**302 */
    232     /* (x >> n**2) 
     233    /* (x >> n**2)
    233234     *      Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi)
    234235     *      Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi)
    235      *      Let s=sin(x), c=cos(x), 
     236     *      Let s=sin(x), c=cos(x),
    236237     *          xn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then
    237238     *
  • trunk/src/emx/src/lib/msun/src/e_jnf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_jnf.c,v 1.8 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/e_lgamma.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
     
    1313 */
    1414
     15#include "namespace.h"
    1516#ifndef lint
    1617static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_lgamma.c,v 1.8 2005/02/04 18:26:06 das Exp $";
  • trunk/src/emx/src/lib/msun/src/e_lgamma_r.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
     
    1313 */
    1414
     15#include "namespace.h"
    1516#ifndef lint
    1617static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_lgamma_r.c,v 1.8 2005/02/04 18:26:06 das Exp $";
     
    1819
    1920/* __ieee754_lgamma_r(x, signgamp)
    20  * Reentrant version of the logarithm of the Gamma function 
    21  * with user provide pointer for the sign of Gamma(x). 
     21 * Reentrant version of the logarithm of the Gamma function
     22 * with user provide pointer for the sign of Gamma(x).
    2223 *
    2324 * Method:
    2425 *   1. Argument Reduction for 0 < x <= 8
    25  *      Since gamma(1+s)=s*gamma(s), for x in [0,8], we may 
     26 *      Since gamma(1+s)=s*gamma(s), for x in [0,8], we may
    2627 *      reduce x to a number in [1.5,2.5] by
    2728 *              lgamma(1+s) = log(s) + lgamma(s)
     
    6162 *                                  3       5             11
    6263 *              w = w0 + w1*z + w2*z  + w3*z  + ... + w6*z
    63  *      where 
     64 *      where
    6465 *              |w - f(z)| < 2**-58.74
    6566 *             
     
    6970 *              G(x) = pi/(sin(pi*x)*(-x)*G(-x))
    7071 *      since G(-x) is positive, sign(G(x)) = sign(sin(pi*x)) for x<0
    71  *      Hence, for x<0, signgam = sign(sin(pi*x)) and 
     72 *      Hence, for x<0, signgam = sign(sin(pi*x)) and
    7273 *              lgamma(x) = log(|Gamma(x)|)
    7374 *                        = log(pi/(|x*sin(pi*x)|)) - lgamma(-x);
    74  *      Note: one should avoid compute pi*(-x) directly in the 
     75 *      Note: one should avoid compute pi*(-x) directly in the
    7576 *            computation of sin(pi*(-x)).
    7677 *             
     
    190191        switch (n) {
    191192            case 0:   y =  __kernel_sin(pi*y,zero,0); break;
    192             case 1:   
     193            case 1:
    193194            case 2:   y =  __kernel_cos(pi*(0.5-y),zero); break;
    194             case 3: 
     195            case 3:
    195196            case 4:   y =  __kernel_sin(pi*(one-y),zero,0); break;
    196197            case 5:
     
    290291            w = w0+z*(w1+y*(w2+y*(w3+y*(w4+y*(w5+y*w6)))));
    291292            r = (x-half)*(t-one)+w;
    292         } else 
     293        } else
    293294    /* 2**58 <= x <= inf */
    294295            r =  x*(__ieee754_log(x)-one);
  • trunk/src/emx/src/lib/msun/src/e_lgammaf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_lgammaf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/e_lgammaf_r.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_lgammaf_r.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/e_log.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
    1212 */
    1313
     14#include "namespace.h"
    1415#ifndef lint
    1516static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_log.c,v 1.10 2005/02/04 18:26:06 das Exp $";
     
    1920 * Return the logrithm of x
    2021 *
    21  * Method :                 
    22  *   1. Argument Reduction: find k and f such that 
    23  *                      x = 2^k * (1+f), 
     22 * Method :
     23 *   1. Argument Reduction: find k and f such that
     24 *                      x = 2^k * (1+f),
    2425 *         where  sqrt(2)/2 < 1+f < sqrt(2) .
    2526 *
     
    2829 *               = 2s + 2/3 s**3 + 2/5 s**5 + .....,
    2930 *               = 2s + s*R
    30  *      We use a special Reme algorithm on [0,0.1716] to generate 
    31  *      a polynomial of degree 14 to approximate R The maximum error 
     31 *      We use a special Reme algorithm on [0,0.1716] to generate
     32 *      a polynomial of degree 14 to approximate R The maximum error
    3233 *      of this polynomial approximation is bounded by 2**-58.45. In
    3334 *      other words,
     
    3738 *      and
    3839 *          |      2          14          |     -58.45
    39  *          | Lg1*s +...+Lg7*s    -  R(z) | <= 2 
     40 *          | Lg1*s +...+Lg7*s    -  R(z) | <= 2
    4041 *          |                             |
    4142 *      Note that 2s = f - s*f = f - hfsq + s*hfsq, where hfsq = f*f/2.
     
    4546 *              log(1+f) = f - (hfsq - s*(hfsq+R)).     (better accuracy)
    4647 *     
    47  *      3. Finally,  log(x) = k*ln2 + log(1+f). 
     48 *      3. Finally,  log(x) = k*ln2 + log(1+f).
    4849 *                          = k*ln2_hi+(f-(hfsq-(s*(hfsq+R)+k*ln2_lo)))
    49  *         Here ln2 is split into two floating point number: 
     50 *         Here ln2 is split into two floating point number:
    5051 *                      ln2_hi + ln2_lo,
    5152 *         where n*ln2_hi is always exact for |n| < 2000.
    5253 *
    5354 * Special cases:
    54  *      log(x) is NaN with signal if x < 0 (including -INF) ; 
     55 *      log(x) is NaN with signal if x < 0 (including -INF) ;
    5556 *      log(+INF) is +INF; log(0) is -INF with signal;
    5657 *      log(NaN) is that NaN with no signal.
     
    6162 *
    6263 * Constants:
    63  * The hexadecimal values are the intended ones for the following 
    64  * constants. The decimal values may be used, provided that the 
    65  * compiler will convert from decimal to binary accurately enough 
     64 * The hexadecimal values are the intended ones for the following
     65 * constants. The decimal values may be used, provided that the
     66 * compiler will convert from decimal to binary accurately enough
    6667 * to produce the hexadecimal values shown.
    6768 */
     
    9596        k=0;
    9697        if (hx < 0x00100000) {                  /* x < 2**-1022  */
    97             if (((hx&0x7fffffff)|lx)==0) 
     98            if (((hx&0x7fffffff)|lx)==0)
    9899                return -two54/zero;             /* log(+-0)=-inf */
    99100            if (hx<0) return (x-x)/zero;        /* log(-#) = NaN */
    100101            k -= 54; x *= two54; /* subnormal number, scale up x */
    101102            GET_HIGH_WORD(hx,x);
    102         } 
     103        }
    103104        if (hx >= 0x7ff00000) return x+x;
    104105        k += (hx>>20)-1023;
     
    115116                     return dk*ln2_hi-((R-dk*ln2_lo)-f);}
    116117        }
    117         s = f/(2.0+f); 
     118        s = f/(2.0+f);
    118119        dk = (double)k;
    119120        z = s*s;
     
    121122        w = z*z;
    122123        j = 0x6b851-hx;
    123         t1= w*(Lg2+w*(Lg4+w*Lg6)); 
    124         t2= z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7))); 
     124        t1= w*(Lg2+w*(Lg4+w*Lg6));
     125        t2= z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7)));
    125126        i |= j;
    126127        R = t2+t1;
  • trunk/src/emx/src/lib/msun/src/e_log10.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
    1212 */
    1313
     14#include "namespace.h"
    1415#ifndef lint
    1516static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_log10.c,v 1.11 2005/02/04 18:26:06 das Exp $";
     
    1819/* __ieee754_log10(x)
    1920 * Return the base 10 logarithm of x
    20  * 
     21 *
    2122 * Method :
    2223 *      Let log10_2hi = leading 40 bits of log10(2) and
     
    2425 *          ivln10   = 1/log(10) rounded.
    2526 *      Then
    26  *              n = ilogb(x), 
     27 *              n = ilogb(x),
    2728 *              if(n<0)  n = n+1;
    2829 *              x = scalbn(x,-n);
     
    3031 *
    3132 * Note 1:
    32  *      To guarantee log10(10**n)=n, where 10**n is normal, the rounding 
     33 *      To guarantee log10(10**n)=n, where 10**n is normal, the rounding
    3334 *      mode must set to Round-to-Nearest.
    3435 * Note 2:
     
    3738 *
    3839 * Special cases:
    39  *      log10(x) is NaN with signal if x < 0; 
     40 *      log10(x) is NaN with signal if x < 0;
    4041 *      log10(+INF) is +INF with no signal; log10(0) is -INF with signal;
    4142 *      log10(NaN) is that NaN with no signal;
  • trunk/src/emx/src/lib/msun/src/e_log10f.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_log10f.c,v 1.8 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/e_logf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_logf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/e_pow.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    55 *
    66 * Permission to use, copy, modify, and distribute this
    7  * software is freely granted, provided that this notice 
     7 * software is freely granted, provided that this notice
    88 * is preserved.
    99 * ====================================================
    1010 */
    1111
     12#include "namespace.h"
    1213#ifndef lint
    1314static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_pow.c,v 1.11 2005/02/04 18:26:06 das Exp $";
     
    2122 *              log2(x) = w1 + w2,
    2223 *         where w1 has 53-24 = 29 bit trailing zeros.
    23  *      2. Perform y*log2(x) = n+y' by simulating muti-precision 
     24 *      2. Perform y*log2(x) = n+y' by simulating muti-precision
    2425 *         arithmetic, where |y'|<=0.5.
    2526 *      3. Return x**y = 2**n*exp(y'*log2)
     
    4950 *      pow(x,y) returns x**y nearly rounded. In particular
    5051 *                      pow(integer,integer)
    51  *      always returns the correct integer provided it is 
     52 *      always returns the correct integer provided it is
    5253 *      representable.
    5354 *
    5455 * Constants :
    55  * The hexadecimal values are the intended ones for the following 
    56  * constants. The decimal values may be used, provided that the 
    57  * compiler will convert from decimal to binary accurately enough 
     56 * The hexadecimal values are the intended ones for the following
     57 * constants. The decimal values may be used, provided that the
     58 * compiler will convert from decimal to binary accurately enough
    5859 * to produce the hexadecimal values shown.
    5960 */
     
    113114    /* +-NaN return x+y */
    114115        if(ix > 0x7ff00000 || ((ix==0x7ff00000)&&(lx!=0)) ||
    115            iy > 0x7ff00000 || ((iy==0x7ff00000)&&(ly!=0))) 
     116           iy > 0x7ff00000 || ((iy==0x7ff00000)&&(ly!=0)))
    116117                return x+y;     
    117118
     
    134135                }
    135136            }           
    136         } 
     137        }
    137138
    138139    /* special value of y */
     
    145146                else                    /* (|x|<1)**-,+inf = inf,0 */
    146147                    return (hy<0)?-y: zero;
    147             } 
     148            }
    148149            if(iy==0x3ff00000) {        /* y is  +-1 */
    149150                if(hy<0) return one/x; else return x;
     
    165166                    if(((ix-0x3ff00000)|yisint)==0) {
    166167                        z = (z-z)/(z-z); /* (-1)**non-int is NaN */
    167                     } else if(yisint==1) 
     168                    } else if(yisint==1)
    168169                        z = -z;         /* (x<0)**odd = -(|x|**odd) */
    169170                }
     
    171172            }
    172173        }
    173    
     174
    174175    /* CYGNUS LOCAL + fdlibm-5.3 fix: This used to be
    175176        n = (hx>>31)+1;
     
    193194            if(ix<0x3fefffff) return (hy<0)? s*huge*huge:s*tiny*tiny;
    194195            if(ix>0x3ff00000) return (hy>0)? s*huge*huge:s*tiny*tiny;
    195         /* now |1-x| is tiny <= 2**-20, suffice to compute 
     196        /* now |1-x| is tiny <= 2**-20, suffice to compute
    196197           log(x) by x-x^2/2+x^3/3-x^4/4 */
    197198            t = ax-one;         /* t has 20 trailing zeros */
     
    286287            if(j<0) n = -n;
    287288            p_h -= t;
    288         } 
     289        }
    289290        t = p_l+p_h;
    290291        SET_LOW_WORD(t,0);
  • trunk/src/emx/src/lib/msun/src/e_powf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_powf.c,v 1.12 2004/06/01 19:33:30 bde Exp $";
  • trunk/src/emx/src/lib/msun/src/e_rem_pio2.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
     
    1313 */
    1414
     15#include "namespace.h"
    1516#ifndef lint
    1617static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_rem_pio2.c,v 1.8 2005/02/04 18:26:06 das Exp $";
     
    1819
    1920/* __ieee754_rem_pio2(x,y)
    20  * 
    21  * return the remainder of x rem pi/2 in y[0]+y[1] 
     21 *
     22 * return the remainder of x rem pi/2 in y[0]+y[1]
    2223 * use __kernel_rem_pio2()
    2324 */
     
    2728
    2829/*
    29  * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi 
     30 * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi
    3031 */
    3132static const int32_t two_over_pi[] = {
    32 0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62, 
    33 0x95993C, 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A, 
    34 0x424DD2, 0xE00649, 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129, 
    35 0xA73EE8, 0x8235F5, 0x2EBB44, 0x84E99C, 0x7026B4, 0x5F7E41, 
    36 0x3991D6, 0x398353, 0x39F49C, 0x845F8B, 0xBDF928, 0x3B1FF8, 
    37 0x97FFDE, 0x05980F, 0xEF2F11, 0x8B5A0A, 0x6D1F6D, 0x367ECF, 
    38 0x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D, 0x7527BA, 0xC7EBE5, 
    39 0xF17B3D, 0x0739F7, 0x8A5292, 0xEA6BFB, 0x5FB11F, 0x8D5D08, 
    40 0x560330, 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3, 
    41 0x91615E, 0xE61B08, 0x659985, 0x5F14A0, 0x68408D, 0xFFD880, 
    42 0x4D7327, 0x310606, 0x1556CA, 0x73A8C9, 0x60E27B, 0xC08C6B, 
     330xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62,
     340x95993C, 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A,
     350x424DD2, 0xE00649, 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129,
     360xA73EE8, 0x8235F5, 0x2EBB44, 0x84E99C, 0x7026B4, 0x5F7E41,
     370x3991D6, 0x398353, 0x39F49C, 0x845F8B, 0xBDF928, 0x3B1FF8,
     380x97FFDE, 0x05980F, 0xEF2F11, 0x8B5A0A, 0x6D1F6D, 0x367ECF,
     390x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D, 0x7527BA, 0xC7EBE5,
     400xF17B3D, 0x0739F7, 0x8A5292, 0xEA6BFB, 0x5FB11F, 0x8D5D08,
     410x560330, 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3,
     420x91615E, 0xE61B08, 0x659985, 0x5F14A0, 0x68408D, 0xFFD880,
     430x4D7327, 0x310606, 0x1556CA, 0x73A8C9, 0x60E27B, 0xC08C6B,
    4344};
    4445
     
    8687            {y[0] = x; y[1] = 0; return 0;}
    8788        if(ix<0x4002d97c) {  /* |x| < 3pi/4, special case with n=+-1 */
    88             if(hx>0) { 
     89            if(hx>0) {
    8990                z = x - pio2_1;
    9091                if(ix!=0x3ff921fb) {    /* 33+53 bit pi is good enough */
     
    121122                u_int32_t high;
    122123                j  = ix>>20;
    123                 y[0] = r-w; 
     124                y[0] = r-w;
    124125                GET_HIGH_WORD(high,y[0]);
    125126                i = j-((high>>20)&0x7ff);
     
    145146            else         return n;
    146147        }
    147     /* 
     148    /*
    148149     * all other (large) arguments
    149150     */
  • trunk/src/emx/src/lib/msun/src/e_rem_pio2f.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_rem_pio2f.c,v 1.7 2002/05/28 17:51:46 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/e_remainder.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
    1212 */
    1313
     14#include "namespace.h"
    1415#ifndef lint
    1516static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_remainder.c,v 1.10 2005/02/04 18:26:06 das Exp $";
     
    1718
    1819/* __ieee754_remainder(x,p)
    19  * Return :                 
    20  *      returns  x REM p  =  x - [x/p]*p as if in infinite 
    21  *      precise arithmetic, where [x/p] is the (infinite bit) 
     20 * Return :
     21 *      returns  x REM p  =  x - [x/p]*p as if in infinite
     22 *      precise arithmetic, where [x/p] is the (infinite bit)
    2223 *      integer nearest x/p (in half way case choose the even one).
    23  * Method : 
     24 * Method :
    2425 *      Based on fmod() return x-[x/p]chopped*p exactlp.
    2526 */
  • trunk/src/emx/src/lib/msun/src/e_remainderf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_remainderf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/e_scalb.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
    1212 */
    1313
     14#include "namespace.h"
    1415#ifndef lint
    1516static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_scalb.c,v 1.12 2005/02/04 18:26:06 das Exp $";
     
    1819/*
    1920 * __ieee754_scalb(x, fn) is provide for
    20  * passing various standard test suite. One 
     21 * passing various standard test suite. One
    2122 * should use scalbn() instead.
    2223 */
  • trunk/src/emx/src/lib/msun/src/e_scalbf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_scalbf.c,v 1.9 2004/07/09 10:01:10 das Exp $";
  • trunk/src/emx/src/lib/msun/src/e_sinh.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
    1212 */
    1313
     14#include "namespace.h"
    1415#ifndef lint
    1516static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_sinh.c,v 1.9 2005/02/04 18:26:06 das Exp $";
     
    1718
    1819/* __ieee754_sinh(x)
    19  * Method : 
     20 * Method :
    2021 * mathematically sinh(x) if defined to be (exp(x)-exp(-x))/2
    21  *      1. Replace x by |x| (sinh(-x) = -sinh(x)). 
    22  *      2. 
     22 *      1. Replace x by |x| (sinh(-x) = -sinh(x)).
     23 *      2.
    2324 *                                                  E + E/(E+1)
    2425 *          0        <= x <= 22     :  sinh(x) := --------------, E=expm1(x)
    2526 *                                                      2
    2627 *
    27  *          22       <= x <= lnovft :  sinh(x) := exp(x)/2 
     28 *          22       <= x <= lnovft :  sinh(x) := exp(x)/2
    2829 *          lnovft   <= x <= ln2ovft:  sinh(x) := exp(x/2)/2 * exp(x/2)
    2930 *          ln2ovft  <  x           :  sinh(x) := x*shuge (overflow)
  • trunk/src/emx/src/lib/msun/src/e_sinhf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_sinhf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/e_sqrt.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
    1212 */
    1313
     14#include "namespace.h"
    1415#ifndef lint
    1516static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_sqrt.c,v 1.10 2005/02/04 18:26:06 das Exp $";
     
    2122 *           |  Use the hardware sqrt if you have one |
    2223 *           ------------------------------------------
    23  * Method: 
    24  *   Bit by bit method using integer arithmetic. (Slow, but portable) 
     24 * Method:
     25 *   Bit by bit method using integer arithmetic. (Slow, but portable)
    2526 *   1. Normalization
    26  *      Scale x to y in [1,4) with even powers of 2: 
     27 *      Scale x to y in [1,4) with even powers of 2:
    2728 *      find an integer k such that  1 <= (y=x*2^(2k)) < 4, then
    2829 *              sqrt(x) = 2^k * sqrt(y)
     
    3334 *          s  = 2*q , and      y  =  2   * ( y - q  ).         (1)
    3435 *           i      i            i                 i
    35  *                                                       
    36  *      To compute q    from q , one checks whether 
    37  *                  i+1       i                       
     36 *
     37 *      To compute q    from q , one checks whether
     38 *                  i+1       i
    3839 *
    3940 *                            -(i+1) 2
     
    4546 *
    4647 *      With some algebric manipulation, it is not difficult to see
    47  *      that (2) is equivalent to 
     48 *      that (2) is equivalent to
    4849 *                             -(i+1)
    4950 *                      s  +  2       <= y                      (3)
    5051 *                       i                i
    5152 *
    52  *      The advantage of (3) is that s  and y  can be computed by 
     53 *      The advantage of (3) is that s  and y  can be computed by
    5354 *                                    i      i
    5455 *      the following recurrence formula:
     
    6364 *           i+1      i          i+1    i     i
    6465 *                             
    65  *      One may easily use induction to prove (4) and (5). 
     66 *      One may easily use induction to prove (4) and (5).
    6667 *      Note. Since the left hand side of (3) contain only i+2 bits,
    67  *            it does not necessary to do a full (53-bit) comparison 
     68 *            it does not necessary to do a full (53-bit) comparison
    6869 *            in (3).
    6970 *   3. Final rounding
     
    105106            return x*x+x;               /* sqrt(NaN)=NaN, sqrt(+inf)=+inf
    106107                                           sqrt(-inf)=sNaN */
    107         } 
     108        }
    108109    /* take care of zero */
    109110        if(ix0<=0) {
     
    139140
    140141        while(r!=0) {
    141             t = s0+r; 
    142             if(t<=ix0) { 
    143                 s0   = t+r; 
    144                 ix0 -= t; 
    145                 q   += r; 
    146             } 
     142            t = s0+r;
     143            if(t<=ix0) {
     144                s0   = t+r;
     145                ix0 -= t;
     146                q   += r;
     147            }
    147148            ix0 += ix0 + ((ix1&sign)>>31);
    148149            ix1 += ix1;
     
    152153        r = sign;
    153154        while(r!=0) {
    154             t1 = s1+r; 
     155            t1 = s1+r;
    155156            t  = s0;
    156             if((t<ix0)||((t==ix0)&&(t1<=ix1))) { 
     157            if((t<ix0)||((t==ix0)&&(t1<=ix1))) {
    157158                s1  = t1+r;
    158159                if(((t1&sign)==sign)&&(s1&sign)==0) s0 += 1;
     
    175176                else if (z>one) {
    176177                    if (q1==(u_int32_t)0xfffffffe) q+=1;
    177                     q1+=2; 
     178                    q1+=2;
    178179                } else
    179180                    q1 += (q1&1);
     
    191192Other methods  (use floating-point arithmetic)
    192193-------------
    193 (This is a copy of a drafted paper by Prof W. Kahan 
     194(This is a copy of a drafted paper by Prof W. Kahan
    194195and K.C. Ng, written in May, 1986)
    195196
    196         Two algorithms are given here to implement sqrt(x) 
     197        Two algorithms are given here to implement sqrt(x)
    197198        (IEEE double precision arithmetic) in software.
    198199        Both supply sqrt(x) correctly rounded. The first algorithm (in
     
    200201        The second one uses reciproot iterations to avoid division, but
    201202        requires more multiplications. Both algorithms need the ability
    202         to chop results of arithmetic operations instead of round them, 
     203        to chop results of arithmetic operations instead of round them,
    203204        and the INEXACT flag to indicate when an arithmetic operation
    204         is executed exactly with no roundoff error, all part of the 
     205        is executed exactly with no roundoff error, all part of the
    205206        standard (IEEE 754-1985). The ability to perform shift, add,
    206207        subtract and logical AND operations upon 32-bit words is needed
     
    212213
    213214        Let x0 and x1 be the leading and the trailing 32-bit words of
    214         a floating point number x (in IEEE double format) respectively 
     215        a floating point number x (in IEEE double format) respectively
    215216
    216217            1    11                  52                           ...widths
     
    220221              msb    lsb  msb                                 lsb ...order
    221222
    222  
     223
    223224             ------------------------        ------------------------
    224225        x0:  |s|   e    |    f1     |    x1: |          f2           |
     
    245246    (2) Iterative refinement
    246247
    247         Apply Heron's rule three times to y, we have y approximates 
     248        Apply Heron's rule three times to y, we have y approximates
    248249        sqrt(x) to within 1 ulp (Unit in the Last Place):
    249250
     
    270271        scaled in advance to avoid spurious overflow in evaluating the
    271272        expression 3y*y+x. Hence it is not recommended uless division
    272         is slow. If division is very slow, then one should use the 
     273        is slow. If division is very slow, then one should use the
    273274        reciproot algorithm given in section B.
    274275
    275276    (3) Final adjustment
    276277
    277         By twiddling y's last bit it is possible to force y to be 
     278        By twiddling y's last bit it is possible to force y to be
    278279        correctly rounded according to the prevailing rounding mode
    279280        as follows. Let r and i be copies of the rounding mode and
     
    306307                R := r;                 ... restore rounded mode
    307308                return sqrt(x):=y.
    308                    
     309               
    309310    (4) Special cases
    310311
     
    325326            y0:= k - T2[63&(k>>14)].    ... y ~ 1/sqrt(x) to 7.8 bits
    326327
    327         Here k is a 32-bit integer and T2[] is an integer array 
     328        Here k is a 32-bit integer and T2[] is an integer array
    328329        containing correction terms. Now magically the floating
    329330        value of y (y's leading 32-bit word is y0, the value of
     
    346347        Apply Reciproot iteration three times to y and multiply the
    347348        result by x to get an approximation z that matches sqrt(x)
    348         to about 1 ulp. To be exact, we will have 
     349        to about 1 ulp. To be exact, we will have
    349350                -1ulp < sqrt(x)-z<1.0625ulp.
    350351       
     
    357358
    358359        Remark 2. The constant 1.5-2^-30 is chosen to bias the error so that
    359         (a) the term z*y in the final iteration is always less than 1; 
     360        (a) the term z*y in the final iteration is always less than 1;
    360361        (b) the error in the final result is biased upward so that
    361362                -1 ulp < sqrt(x) - z < 1.0625 ulp
     
    364365    (3) Final adjustment
    365366
    366         By twiddling y's last bit it is possible to force y to be 
     367        By twiddling y's last bit it is possible to force y to be
    367368        correctly rounded according to the prevailing rounding mode
    368369        as follows. Let r and i be copies of the rounding mode and
     
    404405        else {
    405406            j := 1 - [(x0>>20)&1]       ... j = logb(x) mod 2
    406             k := z1 >> 26;              ... get z's 25-th and 26-th 
     407            k := z1 >> 26;              ... get z's 25-th and 26-th
    407408                                            fraction bits
    408409            I := i or (k&j) or ((k&(j+j+1))!=(x1&3));
     
    411412        return sqrt(x):=z.
    412413
    413         If multiplication is cheaper then the foregoing red tape, the 
     414        If multiplication is cheaper then the foregoing red tape, the
    414415        Inexact flag can be evaluated by
    415416
     
    417418            I := (z*z!=x) or I.
    418419
    419         Note that z*z can overwrite I; this value must be sensed if it is 
     420        Note that z*z can overwrite I; this value must be sensed if it is
    420421        True.
    421422
     
    424425
    425426                    --------------------
    426                 z1: |        f2        | 
     427                z1: |        f2        |
    427428                    --------------------
    428429                bit 31             bit 0
     
    442443
    443444    (4) Special cases (see (4) of Section A).   
    444  
     445
    445446 */
    446  
     447
  • trunk/src/emx/src/lib/msun/src/e_sqrtf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_sqrtf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/k_cos.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
    1212 */
    1313
     14#include "namespace.h"
    1415#ifndef lint
    1516static char rcsid[] = "$FreeBSD: src/lib/msun/src/k_cos.c,v 1.8 2005/02/04 18:26:06 das Exp $";
     
    2021 * kernel cos function on [-pi/4, pi/4], pi/4 ~ 0.785398164
    2122 * Input x is assumed to be bounded by ~pi/4 in magnitude.
    22  * Input y is the tail of x. 
     23 * Input y is the tail of x.
    2324 *
    2425 * Algorithm
     
    3334 *      |              2     4     6     8     10    12     14 |     -58
    3435 *      |cos(x)-(1-.5*x +C1*x +C2*x +C3*x +C4*x +C5*x  +C6*x  )| <= 2
    35  *      |                                                      | 
    36  * 
    37  *                     4     6     8     10    12     14 
     36 *      |                                                      |
     37 *
     38 *                     4     6     8     10    12     14
    3839 *      4. let r = C1*x +C2*x +C3*x +C4*x +C5*x  +C6*x  , then
    3940 *             cos(x) = 1 - x*x/2 + r
    40  *         since cos(x+y) ~ cos(x) - sin(x)*y 
     41 *         since cos(x+y) ~ cos(x) - sin(x)*y
    4142 *                        ~ cos(x) - x*y,
    4243 *         a correction term is necessary in cos(x) and hence
     
    7576        z  = x*x;
    7677        r  = z*(C1+z*(C2+z*(C3+z*(C4+z*(C5+z*C6)))));
    77         if(ix < 0x3FD33333)                     /* if |x| < 0.3 */ 
     78        if(ix < 0x3FD33333)                     /* if |x| < 0.3 */
    7879            return one - (0.5*z - (z*r - x*y));
    7980        else {
  • trunk/src/emx/src/lib/msun/src/k_cosf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/k_cosf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/k_rem_pio2.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
    1212 */
    1313
     14#include "namespace.h"
    1415#ifndef lint
    1516static char rcsid[] = "$FreeBSD: src/lib/msun/src/k_rem_pio2.c,v 1.7 2005/02/04 18:26:06 das Exp $";
     
    1920 * __kernel_rem_pio2(x,y,e0,nx,prec,ipio2)
    2021 * double x[],y[]; int e0,nx,prec; int ipio2[];
    21  * 
    22  * __kernel_rem_pio2 return the last three digits of N with 
     22 *
     23 * __kernel_rem_pio2 return the last three digits of N with
    2324 *              y = x - N*pi/2
    2425 * so that |y| < pi/2.
    2526 *
    26  * The method is to compute the integer (mod 8) and fraction parts of 
     27 * The method is to compute the integer (mod 8) and fraction parts of
    2728 * (2/pi)*x without doing the full multiplication. In general we
    2829 * skip the part of the product that are known to be a huge integer (
     
    3334 *
    3435 * Input parameters:
    35  *      x[]     The input value (must be positive) is broken into nx 
     36 *      x[]     The input value (must be positive) is broken into nx
    3637 *              pieces of 24-bit integers in double precision format.
    37  *              x[i] will be the i-th 24 bit of x. The scaled exponent 
    38  *              of x[0] is given in input parameter e0 (i.e., x[0]*2^e0 
     38 *              x[i] will be the i-th 24 bit of x. The scaled exponent
     39 *              of x[0] is given in input parameter e0 (i.e., x[0]*2^e0
    3940 *              match x's up to 24 bits.
    4041 *
     
    7374 *
    7475 *      ipio2[]
    75  *              integer array, contains the (24*i)-th to (24*i+23)-th 
    76  *              bit of 2/pi after binary point. The corresponding 
     76 *              integer array, contains the (24*i)-th to (24*i+23)-th
     77 *              bit of 2/pi after binary point. The corresponding
    7778 *              floating value is
    7879 *
     
    8990 *              6 for single, double, extended,and quad.
    9091 *
    91  *      jz      local integer variable indicating the number of 
    92  *              terms of ipio2[] used. 
     92 *      jz      local integer variable indicating the number of
     93 *              terms of ipio2[] used.
    9394 *
    9495 *      jx      nx - 1
     
    110111 *
    111112 *      PIo2[]  double precision array, obtained by cutting pi/2
    112  *              into 24 bits chunks. 
    113  *
    114  *      f[]     ipio2[] in floating point 
     113 *              into 24 bits chunks.
     114 *
     115 *      f[]     ipio2[] in floating point
    115116 *
    116117 *      iq[]    integer array by breaking up q[] in 24-bits chunk.
     
    126127/*
    127128 * Constants:
    128  * The hexadecimal values are the intended ones for the following 
    129  * constants. The decimal values may be used, provided that the 
    130  * compiler will convert from decimal to binary accurately enough 
     129 * The hexadecimal values are the intended ones for the following
     130 * constants. The decimal values may be used, provided that the
     131 * compiler will convert from decimal to binary accurately enough
    131132 * to produce the hexadecimal values shown.
    132133 */
     
    196197            iq[jz-1] -= i<<(24-q0);
    197198            ih = iq[jz-1]>>(23-q0);
    198         } 
     199        }
    199200        else if(q0==0) ih = iq[jz-1]>>23;
    200201        else if(z>=0.5) ih=2;
     
    247248        } else { /* break z into 24-bit if necessary */
    248249            z = scalbn(z,-q0);
    249             if(z>=two24) { 
     250            if(z>=two24) {
    250251                fw = (double)((int32_t)(twon24*z));
    251252                iq[jz] = (int32_t)(z-two24*fw);
     
    272273                fw = 0.0;
    273274                for (i=jz;i>=0;i--) fw += fq[i];
    274                 y[0] = (ih==0)? fw: -fw; 
     275                y[0] = (ih==0)? fw: -fw;
    275276                break;
    276277            case 1:
    277278            case 2:
    278279                fw = 0.0;
    279                 for (i=jz;i>=0;i--) fw += fq[i]; 
    280                 y[0] = (ih==0)? fw: -fw; 
     280                for (i=jz;i>=0;i--) fw += fq[i];
     281                y[0] = (ih==0)? fw: -fw;
    281282                fw = fq[0]-fw;
    282283                for (i=1;i<=jz;i++) fw += fq[i];
    283                 y[1] = (ih==0)? fw: -fw; 
     284                y[1] = (ih==0)? fw: -fw;
    284285                break;
    285286            case 3:     /* painful */
    286287                for (i=jz;i>0;i--) {
    287                     fw      = fq[i-1]+fq[i]; 
     288                    fw      = fq[i-1]+fq[i];
    288289                    fq[i]  += fq[i-1]-fw;
    289290                    fq[i-1] = fw;
    290291                }
    291292                for (i=jz;i>1;i--) {
    292                     fw      = fq[i-1]+fq[i]; 
     293                    fw      = fq[i-1]+fq[i];
    293294                    fq[i]  += fq[i-1]-fw;
    294295                    fq[i-1] = fw;
    295296                }
    296                 for (fw=0.0,i=jz;i>=2;i--) fw += fq[i]; 
     297                for (fw=0.0,i=jz;i>=2;i--) fw += fq[i];
    297298                if(ih==0) {
    298299                    y[0] =  fq[0]; y[1] =  fq[1]; y[2] =  fw;
  • trunk/src/emx/src/lib/msun/src/k_rem_pio2f.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/k_rem_pio2f.c,v 1.7 2005/04/05 23:27:47 das Exp $";
  • trunk/src/emx/src/lib/msun/src/k_sin.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    88 * Permission to use, copy, modify, and distribute this
    9  * software is freely granted, provided that this notice 
     9 * software is freely granted, provided that this notice
    1010 * is preserved.
    1111 * ====================================================
    1212 */
    1313
     14#include "namespace.h"
    1415#ifndef lint
    1516static char rcsid[] = "$FreeBSD: src/lib/msun/src/k_sin.c,v 1.8 2005/02/04 18:26:06 das Exp $";
     
    2021 * Input x is assumed to be bounded by ~pi/4 in magnitude.
    2122 * Input y is the tail of x.
    22  * Input iy indicates whether y is 0. (if iy=0, y assume to be 0). 
     23 * Input iy indicates whether y is 0. (if iy=0, y assume to be 0).
    2324 *
    2425 * Algorithm
    25  *      1. Since sin(-x) = -sin(x), we need only to consider positive x. 
     26 *      1. Since sin(-x) = -sin(x), we need only to consider positive x.
    2627 *      2. if x < 2^-27 (hx<0x3e400000 0), return x with inexact if x!=0.
    2728 *      3. sin(x) is approximated by a polynomial of degree 13 on
     
    3334 *      |sin(x)         2     4     6     8     10     12  |     -58
    3435 *      |----- - (1+S1*x +S2*x +S3*x +S4*x +S5*x  +S6*x   )| <= 2
    35  *      |  x                                               | 
    36  * 
     36 *      |  x                                               |
     37 *
    3738 *      4. sin(x+y) = sin(x) + sin'(x')*y
    3839 *                  ~ sin(x) + (1-x*x/2)*y
    39  *         For better accuracy, let 
     40 *         For better accuracy, let
    4041 *                   3      2      2      2      2
    4142 *              r = x *(S2+x *(S3+x *(S4+x *(S5+x *S6))))
  • trunk/src/emx/src/lib/msun/src/k_sinf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/k_sinf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/k_tan.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1212
    1313/* INDENT OFF */
     14#include "namespace.h"
    1415#ifndef lint
    1516static char rcsid[] = "$FreeBSD: src/lib/msun/src/k_tan.c,v 1.10 2005/02/04 18:26:06 das Exp $";
  • trunk/src/emx/src/lib/msun/src/k_tanf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1313 */
    1414
     15#include "namespace.h"
    1516#ifndef lint
    1617static char rcsid[] = "$FreeBSD: src/lib/msun/src/k_tanf.c,v 1.8 2004/06/02 04:39:44 das Exp $";
  • trunk/src/emx/src/lib/msun/src/s_asinh.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_asinh.c,v 1.8 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_asinhf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_asinhf.c,v 1.8 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_atan.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_atan.c,v 1.9 2003/07/23 04:53:46 peter Exp $";
  • trunk/src/emx/src/lib/msun/src/s_atanf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_atanf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_cbrt.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_cbrt.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_cbrtf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_cbrtf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_ceil.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_ceil.c,v 1.9 2003/07/23 04:53:46 peter Exp $";
  • trunk/src/emx/src/lib/msun/src/s_ceilf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_ceilf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_ceill.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1212 */
    1313
     14#include "namespace.h"
    1415#ifndef lint
    1516static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_ceill.c,v 1.3 2005/04/22 09:57:55 stefanf Exp $";
  • trunk/src/emx/src/lib/msun/src/s_cimag.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2727 */
    2828
     29#include "namespace.h"
    2930#include <complex.h>
    3031
  • trunk/src/emx/src/lib/msun/src/s_cimagf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2727 */
    2828
     29#include "namespace.h"
    2930#include <complex.h>
    3031
  • trunk/src/emx/src/lib/msun/src/s_cimagl.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2727 */
    2828
     29#include "namespace.h"
    2930#include <complex.h>
    3031
  • trunk/src/emx/src/lib/msun/src/s_conj.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2727 */
    2828
     29#include "namespace.h"
    2930#include <complex.h>
    3031
  • trunk/src/emx/src/lib/msun/src/s_conjf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2727 */
    2828
     29#include "namespace.h"
    2930#include <complex.h>
    3031
  • trunk/src/emx/src/lib/msun/src/s_conjl.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2727 */
    2828
     29#include "namespace.h"
    2930#include <complex.h>
    3031
  • trunk/src/emx/src/lib/msun/src/s_copysign.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_copysign.c,v 1.9 2003/07/23 04:53:46 peter Exp $";
  • trunk/src/emx/src/lib/msun/src/s_copysignf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_copysignf.c,v 1.9 2003/07/23 04:53:46 peter Exp $";
  • trunk/src/emx/src/lib/msun/src/s_copysignl.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2727 */
    2828
     29#include "namespace.h"
    2930#include <math.h>
    3031
  • trunk/src/emx/src/lib/msun/src/s_cos.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_cos.c,v 1.9 2003/07/23 04:53:46 peter Exp $";
  • trunk/src/emx/src/lib/msun/src/s_cosf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_cosf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_creal.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2727 */
    2828
     29#include "namespace.h"
    2930#include <complex.h>
    3031
  • trunk/src/emx/src/lib/msun/src/s_crealf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2727 */
    2828
     29#include "namespace.h"
    2930#include <complex.h>
    3031
  • trunk/src/emx/src/lib/msun/src/s_creall.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2727 */
    2828
     29#include "namespace.h"
    2930#include <complex.h>
    3031
  • trunk/src/emx/src/lib/msun/src/s_erf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_erf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_erff.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_erff.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_exp2.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2525 */
    2626
     27#include "namespace.h"
    2728#include <sys/cdefs.h>
    2829__FBSDID("$FreeBSD: src/lib/msun/src/s_exp2.c,v 1.1 2005/04/05 02:57:15 das Exp $");
     
    350351                        if(((ix & 0xfffff) | lx) != 0 || (hx & 0x80000000) == 0)
    351352                                return (x);     /* x is NaN or +Inf */
    352                         else 
     353                        else
    353354                                return (0.0);   /* x is -Inf */
    354355                }
  • trunk/src/emx/src/lib/msun/src/s_exp2f.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2525 */
    2626
     27#include "namespace.h"
    2728#include <sys/cdefs.h>
    2829__FBSDID("$FreeBSD: src/lib/msun/src/s_exp2f.c,v 1.1 2005/04/05 02:57:15 das Exp $");
     
    103104                        if ((ix & 0x7fffff) != 0 || (hx & 0x80000000) == 0)
    104105                                return (x);     /* x is NaN or +Inf */
    105                         else 
     106                        else
    106107                                return (0.0);   /* x is -Inf */
    107108                }
  • trunk/src/emx/src/lib/msun/src/s_expm1.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_expm1.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_expm1f.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_expm1f.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_fabs.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_fabs.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_fabsf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_fabsf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_fabsl.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2929 */
    3030
     31#include "namespace.h"
    3132#include <math.h>
    3233
  • trunk/src/emx/src/lib/msun/src/s_fdim.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2525 */
    2626
     27#include "namespace.h"
    2728#include <sys/cdefs.h>
    2829__FBSDID("$FreeBSD: src/lib/msun/src/s_fdim.c,v 1.1 2004/06/30 07:04:01 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_finite.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_finite.c,v 1.8 2003/07/23 04:53:46 peter Exp $";
  • trunk/src/emx/src/lib/msun/src/s_finitef.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_finitef.c,v 1.6 2002/05/28 17:51:46 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_floor.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_floor.c,v 1.9 2003/07/23 04:53:46 peter Exp $";
  • trunk/src/emx/src/lib/msun/src/s_floorf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_floorf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_floorl.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1212 */
    1313
     14#include "namespace.h"
    1415#ifndef lint
    1516static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_floorl.c,v 1.3 2005/04/22 09:57:55 stefanf Exp $";
  • trunk/src/emx/src/lib/msun/src/s_fma.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2525 */
    2626
     27#include "namespace.h"
    2728#include <sys/cdefs.h>
    2829__FBSDID("$FreeBSD: src/lib/msun/src/s_fma.c,v 1.4 2005/03/18 02:27:59 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_fmaf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2525 */
    2626
     27#include "namespace.h"
    2728#include <sys/cdefs.h>
    2829__FBSDID("$FreeBSD: src/lib/msun/src/s_fmaf.c,v 1.1 2005/01/22 09:53:18 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_fmal.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2525 */
    2626
     27#include "namespace.h"
    2728#include <sys/cdefs.h>
    2829__FBSDID("$FreeBSD: src/lib/msun/src/s_fmal.c,v 1.2 2005/03/18 02:27:59 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_fmax.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2525 */
    2626
     27#include "namespace.h"
    2728#include <sys/cdefs.h>
    2829__FBSDID("$FreeBSD: src/lib/msun/src/s_fmax.c,v 1.1 2004/06/30 07:04:01 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_fmaxf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2525 */
    2626
     27#include "namespace.h"
    2728#include <sys/cdefs.h>
    2829__FBSDID("$FreeBSD: src/lib/msun/src/s_fmaxf.c,v 1.1 2004/06/30 07:04:01 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_fmaxl.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2525 */
    2626
     27#include "namespace.h"
    2728#include <sys/cdefs.h>
    2829__FBSDID("$FreeBSD: src/lib/msun/src/s_fmaxl.c,v 1.1 2004/06/30 07:04:01 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_fmin.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2525 */
    2626
     27#include "namespace.h"
    2728#include <sys/cdefs.h>
    2829__FBSDID("$FreeBSD: src/lib/msun/src/s_fmin.c,v 1.1 2004/06/30 07:04:01 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_fminf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2525 */
    2626
     27#include "namespace.h"
    2728#include <sys/cdefs.h>
    2829__FBSDID("$FreeBSD: src/lib/msun/src/s_fminf.c,v 1.1 2004/06/30 07:04:01 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_fminl.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2525 */
    2626
     27#include "namespace.h"
    2728#include <sys/cdefs.h>
    2829__FBSDID("$FreeBSD: src/lib/msun/src/s_fminl.c,v 1.1 2004/06/30 07:04:01 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_frexp.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_frexp.c,v 1.10 2005/03/07 21:27:37 das Exp $";
  • trunk/src/emx/src/lib/msun/src/s_frexpf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_frexpf.c,v 1.8 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_frexpl.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2727 */
    2828
     29#include "namespace.h"
    2930#include <float.h>
    3031#include <math.h>
  • trunk/src/emx/src/lib/msun/src/s_ilogb.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_ilogb.c,v 1.9 2004/10/09 17:14:28 stefanf Exp $";
  • trunk/src/emx/src/lib/msun/src/s_ilogbf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_ilogbf.c,v 1.7 2004/10/09 17:14:28 stefanf Exp $";
  • trunk/src/emx/src/lib/msun/src/s_ilogbl.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_ilogbl.c,v 1.1 2004/10/11 18:13:52 stefanf Exp $";
  • trunk/src/emx/src/lib/msun/src/s_isfinite.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2727 */
    2828
     29#include "namespace.h"
    2930#include <math.h>
    3031
  • trunk/src/emx/src/lib/msun/src/s_isnan.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2727 */
    2828
     29#include "namespace.h"
    2930#include <math.h>
    3031
     
    3233
    3334/* Provided by libc */
    34 #if 0
     35/*#if 0 - not by my libc */
    3536int
    36 isnan(double d)
     37(isnan)(double d)
    3738{
    3839        union IEEEd2bits u;
     
    4142        return (u.bits.exp == 2047 && (u.bits.manl != 0 || u.bits.manh != 0));
    4243}
    43 #endif
     44/*#endif*/
    4445
    4546int
    46 isnanf(float f)
     47(isnanf)(float f)
    4748{
    4849        union IEEEf2bits u;
  • trunk/src/emx/src/lib/msun/src/s_isnormal.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2727 */
    2828
     29#include "namespace.h"
    2930#include <math.h>
    3031
  • trunk/src/emx/src/lib/msun/src/s_llrint.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
     1#include "namespace.h"
    12#include <sys/cdefs.h>
    23__FBSDID("$FreeBSD: src/lib/msun/src/s_llrint.c,v 1.1 2005/01/11 23:12:55 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_llrintf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
     1#include "namespace.h"
    12#include <sys/cdefs.h>
    23__FBSDID("$FreeBSD: src/lib/msun/src/s_llrintf.c,v 1.1 2005/01/11 23:12:55 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_llround.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
     1#include "namespace.h"
    12#include <sys/cdefs.h>
    23__FBSDID("$FreeBSD: src/lib/msun/src/s_llround.c,v 1.2 2005/04/08 00:52:27 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_llroundf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
     1#include "namespace.h"
    12#include <sys/cdefs.h>
    23__FBSDID("$FreeBSD: src/lib/msun/src/s_llroundf.c,v 1.2 2005/04/08 00:52:27 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_llroundl.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
     1#include "namespace.h"
    12#include <sys/cdefs.h>
    23__FBSDID("$FreeBSD: src/lib/msun/src/s_llroundl.c,v 1.1 2005/04/08 01:24:08 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_log1p.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_log1p.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_log1pf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_log1pf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_logb.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_logb.c,v 1.9 2003/07/23 04:53:46 peter Exp $";
  • trunk/src/emx/src/lib/msun/src/s_logbf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_logbf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_lrint.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2525 */
    2626
     27#include "namespace.h"
    2728#include <sys/cdefs.h>
    2829#include <fenv.h>
  • trunk/src/emx/src/lib/msun/src/s_lrintf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
     1#include "namespace.h"
    12#include <sys/cdefs.h>
    23__FBSDID("$FreeBSD: src/lib/msun/src/s_lrintf.c,v 1.1 2005/01/11 23:12:55 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_lround.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2525 */
    2626
     27#include "namespace.h"
    2728#include <sys/cdefs.h>
    2829#include <sys/limits.h>
     
    6566        }
    6667}
     68
  • trunk/src/emx/src/lib/msun/src/s_lroundf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
     1#include "namespace.h"
    12#include <sys/cdefs.h>
    23__FBSDID("$FreeBSD: src/lib/msun/src/s_lroundf.c,v 1.2 2005/04/08 00:52:27 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_lroundl.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
     1#include "namespace.h"
    12#include <sys/cdefs.h>
    23__FBSDID("$FreeBSD: src/lib/msun/src/s_lroundl.c,v 1.1 2005/04/08 01:24:08 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_modf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_modf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_modff.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_modff.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_nearbyint.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2525 */
    2626
     27#include "namespace.h"
    2728#include <sys/cdefs.h>
    2829__FBSDID("$FreeBSD: src/lib/msun/src/s_nearbyint.c,v 1.1 2004/07/06 04:46:08 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_nextafter.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_nextafter.c,v 1.11 2005/03/07 21:27:37 das Exp $";
  • trunk/src/emx/src/lib/msun/src/s_nextafterf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_nextafterf.c,v 1.10 2005/03/07 04:55:58 das Exp $";
  • trunk/src/emx/src/lib/msun/src/s_nextafterl.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_nextafterl.c,v 1.1 2005/03/07 04:56:46 das Exp $";
  • trunk/src/emx/src/lib/msun/src/s_nexttoward.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_nexttoward.c,v 1.1 2005/03/07 04:56:46 das Exp $";
  • trunk/src/emx/src/lib/msun/src/s_nexttowardf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1010 */
    1111
     12#include "namespace.h"
    1213#ifndef lint
    1314static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_nexttowardf.c,v 1.1 2005/03/07 04:57:38 das Exp $";
  • trunk/src/emx/src/lib/msun/src/s_remquo.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    66 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    77 * Permission to use, copy, modify, and distribute this
    8  * software is freely granted, provided that this notice 
     8 * software is freely granted, provided that this notice
    99 * is preserved.
    1010 * ====================================================
    1111 */
    1212
     13#include "namespace.h"
    1314#include <sys/cdefs.h>
    1415__FBSDID("$FreeBSD: src/lib/msun/src/s_remquo.c,v 1.1 2005/03/25 04:40:44 das Exp $");
     
    7475
    7576    /* set up {hx,lx}, {hy,ly} and align y to x */
    76         if(ix >= -1022) 
     77        if(ix >= -1022)
    7778            hx = 0x00100000|(0x000fffff&hx);
    7879        else {          /* subnormal x, shift x to normal */
     
    8687            }
    8788        }
    88         if(iy >= -1022) 
     89        if(iy >= -1022)
    8990            hy = 0x00100000|(0x000fffff&hy);
    9091        else {          /* subnormal y, shift y to normal */
  • trunk/src/emx/src/lib/msun/src/s_remquof.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    66 * Developed at SunSoft, a Sun Microsystems, Inc. business.
    77 * Permission to use, copy, modify, and distribute this
    8  * software is freely granted, provided that this notice 
     8 * software is freely granted, provided that this notice
    99 * is preserved.
    1010 * ====================================================
    1111 */
    1212
     13#include "namespace.h"
    1314#include <sys/cdefs.h>
    1415__FBSDID("$FreeBSD: src/lib/msun/src/s_remquof.c,v 1.1 2005/03/25 04:40:44 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_rint.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_rint.c,v 1.11 2005/03/07 20:28:26 stefanf Exp $";
  • trunk/src/emx/src/lib/msun/src/s_rintf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_rintf.c,v 1.9 2004/06/09 21:24:52 das Exp $";
  • trunk/src/emx/src/lib/msun/src/s_round.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2525 */
    2626
     27#include "namespace.h"
    2728#include <sys/cdefs.h>
    2829__FBSDID("$FreeBSD: src/lib/msun/src/s_round.c,v 1.3 2005/01/13 15:43:41 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_roundf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2525 */
    2626
     27#include "namespace.h"
    2728#include <sys/cdefs.h>
    2829__FBSDID("$FreeBSD: src/lib/msun/src/s_roundf.c,v 1.3 2005/01/13 15:43:41 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_roundl.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2525 */
    2626
     27#include "namespace.h"
    2728#include <sys/cdefs.h>
    2829__FBSDID("$FreeBSD: src/lib/msun/src/s_roundl.c,v 1.1 2005/04/08 01:24:08 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_scalbln.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2525 */
    2626
     27#include "namespace.h"
    2728#include <sys/cdefs.h>
    2829__FBSDID("$FreeBSD: src/lib/msun/src/s_scalbln.c,v 1.2 2005/03/07 04:57:50 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_scalbn.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_scalbn.c,v 1.11 2005/03/07 21:27:37 das Exp $";
  • trunk/src/emx/src/lib/msun/src/s_scalbnf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_scalbnf.c,v 1.8 2005/03/07 04:52:43 das Exp $";
  • trunk/src/emx/src/lib/msun/src/s_scalbnl.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_scalbnl.c,v 1.1 2005/03/07 04:52:58 das Exp $";
  • trunk/src/emx/src/lib/msun/src/s_signbit.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    2727 */
    2828
     29#include "namespace.h"
    2930#include <math.h>
    3031
  • trunk/src/emx/src/lib/msun/src/s_signgam.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
     1#include "namespace.h"
    12#include "math.h"
    23#include "math_private.h"
  • trunk/src/emx/src/lib/msun/src/s_significand.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_significand.c,v 1.9 2003/07/23 04:53:47 peter Exp $";
  • trunk/src/emx/src/lib/msun/src/s_significandf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_significandf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_sin.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_sin.c,v 1.9 2003/07/23 04:53:47 peter Exp $";
  • trunk/src/emx/src/lib/msun/src/s_sinf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_sinf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_tan.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_tan.c,v 1.9 2003/07/23 04:53:47 peter Exp $";
  • trunk/src/emx/src/lib/msun/src/s_tanf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_tanf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_tanh.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#ifndef lint
    1415static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_tanh.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_tanhf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1414 */
    1515
     16#include "namespace.h"
    1617#ifndef lint
    1718static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_tanhf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
  • trunk/src/emx/src/lib/msun/src/s_trunc.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#include <sys/cdefs.h>
    1415__FBSDID("$FreeBSD: src/lib/msun/src/s_trunc.c,v 1.1 2004/06/20 09:25:43 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_truncf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1111 */
    1212
     13#include "namespace.h"
    1314#include <sys/cdefs.h>
    1415__FBSDID("$FreeBSD: src/lib/msun/src/s_truncf.c,v 1.1 2004/06/20 09:25:43 das Exp $");
  • trunk/src/emx/src/lib/msun/src/s_truncl.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    1212 */
    1313
     14#include "namespace.h"
    1415#ifndef lint
    1516static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_truncl.c,v 1.3 2005/04/22 09:57:55 stefanf Exp $";
  • trunk/src/emx/src/lib/msun/src/w_cabs.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    66 */
    77
     8#include "namespace.h"
    89#ifndef lint
    910static const char rcsid[] =
  • trunk/src/emx/src/lib/msun/src/w_cabsf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    66 */
    77
     8#include "namespace.h"
    89#ifndef lint
    910static const char rcsid[] =
  • trunk/src/emx/src/lib/msun/src/w_drem.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    66 */
    77
     8#include "namespace.h"
    89#include <math.h>
    910
  • trunk/src/emx/src/lib/msun/src/w_dremf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2012 r2013  
    77/* $FreeBSD: src/lib/msun/src/w_dremf.c,v 1.3 2004/07/28 05:53:18 kan Exp $ */
    88
     9#include "namespace.h"
    910#include "math.h"
    1011#include "math_private.h"
Note: See TracChangeset for help on using the changeset viewer.