- Timestamp:
- Jun 12, 2005, 7:33:38 AM (20 years ago)
- 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
to1.52
r2012 r2013 1 1 /* $Id$ */ 2 3 2005-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. 2 17 3 18 2005-06-05: knut st. osmundsen <bird-gccos2-spam@anduin.net> -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/emx/asm386.h
-
Property cvs2svn:cvs-rev
changed from
1.9
to1.10
r2012 r2013 63 63 /* Cf. <math.h> */ 64 64 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 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/float.h
-
Property cvs2svn:cvs-rev
changed from
1.5
to1.6
r2012 r2013 1 1 /* float.h,v 1.5 2004/09/14 22:27:33 bird Exp */ 2 2 /** @file 3 * EMX + GCC 3 * EMX + GCC + Some FreeBSD Bits. 4 4 * 5 5 * @remark Must be used instead of the GCC one. … … 11 11 #include <sys/cdefs.h> 12 12 13 __BEGIN_DECLS 14 extern int __flt_rounds(void); 15 __END_DECLS 13 16 14 17 #define FLT_RADIX 2 /* b */ 15 #define FLT_ROUNDS 1 /* FP addition rounds to nearest */ 18 #define FLT_ROUNDS __flt_rounds() 19 16 20 #define FLT_EVAL_METHOD (-1) /* i387 semantics are...interesting */ 17 21 #define DECIMAL_DIG 21 /* max precision in decimal digits */ … … 67 71 #if !defined (__STRICT_ANSI__) && !defined (_POSIX_SOURCE) || defined(__USE_EMX) 68 72 69 #define M_E 2.7182818284590452353670 #define M_LOG2E 1.4426950408889634073671 #define M_LOG10E 0.43429448190325182765172 #define M_LN2 0.69314718055994530942273 #define M_LN10 2.30258509299404568401874 75 #define M_PI 3.1415926535897932384676 #define M_PI_2 1.5707963267948966192377 #define M_PI_4 0.78539816339744830961678 #define M_1_PI 0.31830988618379067153879 #define M_2_PI 0.63661977236758134307680 #define M_2_SQRTPI 1.1283791670955125739081 82 #define M_SQRT2 1.4142135623730950488083 #define M_SQRT1_2 0.70710678118654752440184 85 73 #if !defined (_OMIT_387_STUFF) 86 74 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/math.h
-
Property cvs2svn:cvs-rev
changed from
1.6
to1.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 2 17 /** @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 */ 31 extern const union __infinity_un { 32 unsigned char __uc[8]; 33 double __ud; 34 } __infinity; 35 36 extern 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 134 typedef __double_t double_t; 135 typedef __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) 157 extern 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 */ 178 int __fpclassifyd(double) __pure2; 179 int __fpclassifyf(float) __pure2; 180 int __fpclassifyl(long double) __pure2; 181 int __isfinitef(float) __pure2; 182 int __isfinite(double) __pure2; 183 int __isfinitel(long double) __pure2; 184 int __isinff(float) __pure2; 185 int __isinfl(long double) __pure2; 186 int __isnanl(long double) __pure2; 187 int __isnormalf(float) __pure2; 188 int __isnormal(double) __pure2; 189 int __isnormall(long double) __pure2; 190 int __signbit(double) __pure2; 191 int __signbitf(float) __pure2; 192 int __signbitl(long double) __pure2; 193 194 double acos(double); 195 double asin(double); 196 double atan(double); 197 double atan2(double, double); 198 double cos(double); 199 double sin(double); 200 double tan(double); 201 202 double cosh(double); 203 double sinh(double); 204 double tanh(double); 205 206 double exp(double); 207 double frexp(double, int *); /* fundamentally !__pure2 */ 208 double ldexp(double, int); 209 double log(double); 210 double log10(double); 211 double modf(double, double *); /* fundamentally !__pure2 */ 212 213 double pow(double, double); 214 double sqrt(double); 215 216 double ceil(double); 217 double fabs(double) __pure2; 218 double floor(double); 219 double fmod(double, double); 220 221 /* 222 * These functions are not in C90. 223 */ 224 #if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE 225 double acosh(double); 226 double asinh(double); 227 double atanh(double); 228 double cbrt(double); 229 double erf(double); 230 double erfc(double); 231 double exp2(double); 232 double expm1(double); 233 double fma(double, double, double); 234 double hypot(double, double); 235 int ilogb(double) __pure2; 236 int (isinf)(double) __pure2; 237 int (isnan)(double) __pure2; 238 double lgamma(double); 239 long long llrint(double); 240 long long llround(double); 241 double log1p(double); 242 double logb(double); 243 long lrint(double); 244 long lround(double); 245 double nextafter(double, double); 246 double remainder(double, double); 247 double remquo(double, double, int *); 248 double rint(double); 249 #endif /* __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */ 250 251 #if __BSD_VISIBLE || __XSI_VISIBLE 252 double j0(double); 253 double j1(double); 254 double jn(int, double); 255 double scalb(double, double); 256 double y0(double); 257 double y1(double); 258 double yn(int, double); 259 260 #if __XSI_VISIBLE <= 500 || __BSD_VISIBLE 261 double gamma(double); 262 #endif 263 #endif /* __BSD_VISIBLE || __XSI_VISIBLE */ 264 265 #if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 266 double copysign(double, double) __pure2; 267 double fdim(double, double); 268 double fmax(double, double) __pure2; 269 double fmin(double, double) __pure2; 270 double nearbyint(double); 271 double round(double); 272 double scalbln(double, long); 273 double scalbn(double, int); 274 double tgamma(double); 275 double trunc(double); 276 #endif 277 278 /* 279 * BSD math library entry points 280 */ 281 #if __BSD_VISIBLE 282 double drem(double, double); 283 int finite(double) __pure2; 284 int 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 */ 290 double gamma_r(double, int *); 291 double lgamma_r(double, int *); 292 293 /* 294 * IEEE Test Vector 295 */ 296 double significand(double); 297 #endif /* __BSD_VISIBLE */ 298 299 /* float versions of ANSI/POSIX functions */ 300 #if __ISO_C_VISIBLE >= 1999 301 float acosf(float); 302 float asinf(float); 303 float atanf(float); 304 float atan2f(float, float); 305 float cosf(float); 306 float sinf(float); 307 float tanf(float); 308 309 float coshf(float); 310 float sinhf(float); 311 float tanhf(float); 312 313 float exp2f(float); 314 float expf(float); 315 float expm1f(float); 316 float frexpf(float, int *); /* fundamentally !__pure2 */ 317 int ilogbf(float) __pure2; 318 float ldexpf(float, int); 319 float log10f(float); 320 float log1pf(float); 321 float logf(float); 322 float modff(float, float *); /* fundamentally !__pure2 */ 323 324 float powf(float, float); 325 float sqrtf(float); 326 327 float ceilf(float); 328 float fabsf(float) __pure2; 329 float floorf(float); 330 float fmodf(float, float); 331 float roundf(float); 332 333 float erff(float); 334 float erfcf(float); 335 float hypotf(float, float); 336 float lgammaf(float); 337 338 float acoshf(float); 339 float asinhf(float); 340 float atanhf(float); 341 float cbrtf(float); 342 float logbf(float); 343 float copysignf(float, float) __pure2; 344 long long llrintf(float); 345 long long llroundf(float); 346 long lrintf(float); 347 long lroundf(float); 348 float nearbyintf(float); 349 float nextafterf(float, float); 350 float remainderf(float, float); 351 float remquof(float, float, int *); 352 float rintf(float); 353 float scalblnf(float, long); 354 float scalbnf(float, int); 355 float truncf(float); 356 357 float fdimf(float, float); 358 float fmaf(float, float, float); 359 float fmaxf(float, float) __pure2; 360 float fminf(float, float) __pure2; 361 #endif 362 363 /* 364 * float versions of BSD math library entry points 365 */ 366 #if __BSD_VISIBLE 367 float dremf(float, float); 368 int finitef(float) __pure2; 369 float gammaf(float); 370 float j0f(float); 371 float j1f(float); 372 float jnf(int, float); 373 float scalbf(float, float); 374 float y0f(float); 375 float y1f(float); 376 float 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 */ 383 float gammaf_r(float, int *); 384 float lgammaf_r(float, int *); 385 386 /* 387 * float version of IEEE Test Vector 388 */ 389 float 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 */ 397 long double acoshl(long double); 398 long double acosl(long double); 399 long double asinhl(long double); 400 long double asinl(long double); 401 long double atan2l(long double, long double); 402 long double atanhl(long double); 403 long double atanl(long double); 404 long double cbrtl(long double); 405 #endif 406 long double ceill(long double); 407 long double copysignl(long double, long double) __pure2; 408 #if 1 /* bird: we've got some of these */ 409 long double coshl(long double); 410 long double cosl(long double); 411 /*long double erfcl(long double); 412 long double erfl(long double); 413 long double exp2l(long double);*/ 414 long double expl(long double); 415 /*long double expm1l(long double);*/ 416 #endif 417 long double fabsl(long double) __pure2; 418 long double fdiml(long double, long double); 419 long double floorl(long double); 420 long double fmal(long double, long double, long double); 421 long double fmaxl(long double, long double) __pure2; 422 long double fminl(long double, long double) __pure2; 423 #if 1 /* bird: we've got this one */ 424 long double fmodl(long double, long double); 425 #endif 426 long double frexpl(long double value, int *); /* fundamentally !__pure2 */ 427 #if 1 /* bird: we've got this one */ 428 long double hypotl(long double, long double); 429 #endif 430 int ilogbl(long double) __pure2; 431 long double ldexpl(long double, int); 432 #if 0 433 long double lgammal(long double); 434 long long llrintl(long double); 435 #endif 436 long long llroundl(long double); 437 #if 1 /* bird: we've got some of these */ 438 long double log10l(long double); 439 /*long double log1pl(long double); 440 long double log2l(long double); 441 long double logbl(long double);*/ 442 long double logl(long double); 443 /*long lrintl(long double);*/ 444 #endif 445 long lroundl(long double); 446 #if 1 /* bird: we've got some of these. */ 447 long double modfl(long double, long double *); /* fundamentally !__pure2 */ 448 /*long double nanl(const char *) __pure2; 449 long double nearbyintl(long double);*/ 450 #endif 451 long double nextafterl(long double, long double); 452 double nexttoward(double, long double); 453 float nexttowardf(float, long double); 454 long double nexttowardl(long double, long double); 455 #if 1 /* bird: we've got powl. */ 456 long double powl(long double, long double); 457 /*long double remainderl(long double, long double); 458 long double remquol(long double, long double, int *);*/ 459 long double rintl(long double); 460 #endif 461 long double roundl(long double); 462 long double scalblnl(long double, long); 463 long double scalbnl(long double, int); 464 #if 1 /* birdL we 've got most of these. */ 465 long double sinhl(long double); 466 long double sinl(long double); 467 long double sqrtl(long double); 468 long double tanhl(long double); 469 long double tanl(long double); 470 /*long double tgammal(long double); */ 471 #endif 472 long double truncl(long double); 473 474 #endif /* __ISO_C_VISIBLE >= 1999 */ 475 __END_DECLS 476 477 #endif /* !_MATH_H_ */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/bsd/gen/fpclassify.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 28 28 */ 29 29 30 #include "namespace.h" 30 31 #include <sys/endian.h> 31 32 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/bsd/i386/gen/fabs.S
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 41 41 __FBSDID("$FreeBSD: src/lib/libc/i386/gen/fabs.S,v 1.9 2002/03/23 02:44:18 obrien Exp $"); 42 42 43 ENTRY(fabs)43 STDENTRY(fabs) 44 44 fldl 4(%esp) 45 45 fabs -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/bsd/i386/gen/flt_rounds.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 4 4 */ 5 5 6 #include "namespace.h" 6 7 #include <sys/cdefs.h> 7 8 __FBSDID("$FreeBSD: src/lib/libc/i386/gen/flt_rounds.c,v 1.1 2004/07/19 08:17:24 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/bsd/i386/gen/infinity.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 3 3 */ 4 4 5 #include "namespace.h" 5 6 #include <sys/cdefs.h> 6 7 __FBSDID("$FreeBSD: src/lib/libc/i386/gen/infinity.c,v 1.10 2003/02/08 20:37:52 mike Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/bsd/i386/gen/ldexp.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 35 35 */ 36 36 37 #include "namespace.h" 37 38 #if defined(LIBC_SCCS) && !defined(lint) 38 39 static char sccsid[] = "@(#)ldexp.c 8.1 (Berkeley) 6/4/93"; … … 52 53 */ 53 54 double 54 ldexp(double value, int exp)55 _STD(ldexp) (double value, int exp) 55 56 { 56 57 double temp, texp, temp2; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/bsd/i386/gen/modf.S
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 51 51 /* With CHOP mode on, frndint behaves as TRUNC does. Useful. */ 52 52 53 ENTRY(modf)53 STDENTRY(modf) 54 54 pushl %ebp 55 55 movl %esp,%ebp -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/bsd/include/_fpmath.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 1 1 /*- 2 * Copyright (c) 2002, 2003 David Schultz <d schultz@uclink.Berkeley.EDU>2 * Copyright (c) 2002, 2003 David Schultz <das@FreeBSD.ORG> 3 3 * All rights reserved. 4 4 * … … 24 24 * SUCH DAMAGE. 25 25 * 26 * $FreeBSD: src/lib/libc/i386/_fpmath.h,v 1. 3 2004/01/18 07:57:01das Exp $26 * $FreeBSD: src/lib/libc/i386/_fpmath.h,v 1.5 2005/03/07 04:55:22 das Exp $ 27 27 */ 28 28 … … 38 38 }; 39 39 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) 41 42 42 43 #define LDBL_MANH_SIZE 32 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/conv/conv.smak
-
Property cvs2svn:cvs-rev
changed from
1.6
to1.7
r2012 r2013 46 46 .MODULE := 47 47 .TKIND := aout 48 .TSRC.386 := src/lib/conv/386/smallcnv.s 48 #.TSRC.386 := src/lib/conv/386/smallcnv.s - smallcnv is dead. 49 49 .TSRC := $(.TSRC.$(CPU)) 50 50 .INSDIR := -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/libc.def
-
Property cvs2svn:cvs-rev
changed from
1.112
to1.113
r2012 r2013 237 237 "___fmutex_request_internal_must_complete" @250 238 238 "___fork" @251 239 "___fpclassify" @252240 "___fpclassifyf" @253241 "___fpclassifyl" @254239 ;msun - dead "___fpclassify" @252 240 ;msun - dead "___fpclassifyf" @253 241 ;msun - dead "___fpclassifyl" @254 242 242 "___free_ovflpage" @255 243 243 "___ftime" @256 … … 258 258 "___isfinitef" @271 259 259 "___isfinitel" @272 260 "_ __isnan" @273261 "_ __isnanf" @274260 "_isnan" @273 ;msun changed name 261 "_isnanf" @274 ;msun changed name 262 262 "___isnanl" @275 263 263 "___isnormal" @276 … … 407 407 "___signbitl" @420 408 408 "___sigpause_bsd" @421 409 "___small_atod" @422410 "___small_dtoa" @423409 ; dead "___small_atod" @422 410 ; dead "___small_dtoa" @423 411 411 "___smutex_request_internal" @424 412 412 "___spawni" @425 … … 876 876 "__std_posix_memalign" @889 877 877 "__std_pow" @890 878 "__std_powl" @891878 ;msun - "__std_powl" @891 879 879 "__std_printf" @892 880 880 "__std_psignal" @893 … … 1554 1554 "__std_shmdt" @1559 1555 1555 "__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 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/libc.smak
-
Property cvs2svn:cvs-rev
changed from
1.63
to1.64
r2012 r2013 398 398 # files for _STD() macros invocations. Fortunately, gawk rulez forever thus 399 399 # 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) 401 401 gawk -f src/lib/mkstd.awk $^ >__tmp__ 402 402 $(call UPDATE,__tmp__,$.libc-std.h) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/libc06b4.def
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r2012 r2013 235 235 "___fmutex_request_internal_must_complete" @250 236 236 "___fork" @251 237 "___fpclassify" @252238 "___fpclassifyf" @253239 "___fpclassifyl" @254237 "___fpclassify" = ___nullstub_function @252 238 "___fpclassifyf" = ___nullstub_function @253 239 "___fpclassifyl" = ___nullstub_function @254 240 240 "___free_ovflpage" @255 241 241 "___ftime" @256 … … 256 256 "___isfinitef" @271 257 257 "___isfinitel" @272 258 "_ __isnan" @273259 "_ __isnanf" @274258 "_isnan" @273 259 "_isnanf" @274 260 260 "___isnanl" @275 261 261 "___isnormal" @276 … … 405 405 "___signbitl" @420 406 406 "___sigpause_bsd" @421 407 "___small_atod" @422408 "___small_dtoa" @423407 "___small_atod" = ___nullstub_function @422 408 "___small_dtoa" = ___legacy_dtoa @423 409 409 "___smutex_request_internal" @424 410 410 "___spawni" @425 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/acos.s
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r2012 r2013 1 1 / acos.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes 2 2 3 #define LONG_DOUBLE 3 4 #include <emx/asm386.h> 4 5 5 #define FUNC MATHSUFFIX1(acos)6 #define FUNC _STD(acosl) 6 7 7 8 .globl FUNC -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/asin.s
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r2012 r2013 1 1 / asin.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes 2 2 3 #define LONG_DOUBLE 3 4 #include <emx/asm386.h> 4 5 5 #define FUNC MATHSUFFIX1(asin)6 #define FUNC _STD(asinl) 6 7 7 8 .globl FUNC -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/atan.s
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r2012 r2013 1 1 / atan.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes 2 2 3 #define LONG_DOUBLE 3 4 #include <emx/asm386.h> 4 5 5 #define FUNC MATHSUFFIX1(atan)6 #define FUNC _STD(atanl) 6 7 7 8 .globl FUNC -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/atan2.s
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r2012 r2013 1 1 / atan2.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes 2 2 3 #define LONG_DOUBLE 3 4 #include <emx/asm386.h> 4 5 5 #define FUNC MATHSUFFIX1(atan2)6 #define FUNC _STD(atan2l) 6 7 7 8 .globl FUNC -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/cos.s
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r2012 r2013 2 2 / Modified 1993-1996 by Eberhard Mattes 3 3 4 #define LONG_DOUBLE 4 5 #include <emx/asm386.h> 5 6 6 #define FUNC MATHSUFFIX1(cos)7 #define FUNC _STD(cosl) 7 8 8 9 .globl FUNC … … 21 22 fcos /* cos(x) */ 22 23 fstsw %ax 23 testb $0x04, %ah 24 testb $0x04, %ah 24 25 jnz Llarge /* C2 != 0 ? */ 25 26 Lreturn:EPILOGUE(FUNC) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/cosh.s
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r2012 r2013 1 1 / cosh.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes 2 2 3 #define LONG_DOUBLE 3 4 #include <emx/asm386.h> 4 5 5 #define FUNC MATHSUFFIX1(cosh)6 #define FUNC _STD(coshl) 6 7 7 8 .globl FUNC … … 31 32 orw $0x0400, %ax /* round down towards -inf */ 32 33 movw %ax, cw2 33 fldcw cw2 34 fldcw cw2 34 35 fld %st /* y, y */ 35 36 frndint /* int (y), y */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/exp.s
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r2012 r2013 1 1 / exp.s (emx+gcc) -- Copyright (c) 1991-2000 by Eberhard Mattes 2 2 3 #define LONG_DOUBLE 3 4 #include <emx/asm386.h> 4 5 5 #define FUNC MATHSUFFIX1(exp)6 #define FUNC _STD(expl) 6 7 7 8 .globl FUNC … … 36 37 orw $0x0400, %ax /* round down towards -inf */ 37 38 movw %ax, cw2 38 fldcw cw2 39 fldcw cw2 39 40 fld %st /* y, y */ 40 41 frndint /* int (y), y */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/fmod.s
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r2012 r2013 2 2 / Modified 1993-1996 by Eberhard Mattes 3 3 4 #define LONG_DOUBLE 4 5 #include <emx/asm386.h> 5 6 6 #define FUNC MATHSUFFIX1(fmod)7 #define FUNC _STD(fmodl) 7 8 8 9 .globl FUNC -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/fxam.s
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r2012 r2013 3 3 #include <emx/asm386.h> 4 4 5 #define FUNC MATHSUFFIX2(fxam)5 #define FUNC __fxam 6 6 7 7 .globl FUNC -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/hypot.s
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r2012 r2013 5 5 / However, such an algorithm should perhaps be used for _hypotl(). 6 6 7 #define LONG_DOUBLE 7 8 #include <emx/asm386.h> 8 9 9 #define FUNC MATHSUFFIX1(hypot)10 #define FUNC _STD(hypotl) 10 11 11 12 .globl FUNC -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/log.s
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r2012 r2013 1 1 / log.s (emx+gcc) -- Copyright (c) 1991-2000 by Eberhard Mattes 2 2 3 #define LONG_DOUBLE 3 4 #include <emx/asm386.h> 4 5 5 #define FUNC MATHSUFFIX1(log)6 #define FUNC _STD(logl) 6 7 7 8 .globl FUNC -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/log10.s
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r2012 r2013 1 1 / log10.s (emx+gcc) -- Copyright (c) 1991-2000 by Eberhard Mattes 2 2 3 #define LONG_DOUBLE 3 4 #include <emx/asm386.h> 4 5 5 #define FUNC MATHSUFFIX1(log10)6 #define FUNC _STD(log10l) 6 7 7 8 .globl FUNC -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/modf.s
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r2012 r2013 1 1 / modf.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes 2 2 3 #define LONG_DOUBLE 3 4 #include <emx/asm386.h> 4 5 5 #define FUNC MATHSUFFIX1(modf)6 #define FUNC _STD(modfl) 6 7 7 8 .globl FUNC -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/pow.s
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r2012 r2013 2 2 / Modified 1992-1996 by Eberhard Mattes 3 3 4 #define LONG_DOUBLE 4 5 #include <emx/asm386.h> 5 6 6 #define FUNC MATHSUFFIX1(pow)7 #define FUNC _STD(powl) 7 8 8 9 .globl FUNC … … 116 117 jmp Ldone 117 118 118 / x = +INF, y non-zero and finite 119 / x = +INF, y non-zero and finite 119 120 ALIGN 120 121 Lx_pinf:fstp %st(1) /* pop x, st(0):=x */ … … 125 126 jmp Ldone 126 127 127 / x = -INF, y non-zero and finite 128 / x = -INF, y non-zero and finite 128 129 ALIGN 129 130 Lx_minf:testb $2, %cl /* y < 0? */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/rint.s
-
Property cvs2svn:cvs-rev
changed from
1.5
to1.6
r2012 r2013 1 1 / rint.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes 2 2 3 #define LONG_DOUBLE 3 4 #include <emx/asm386.h> 4 5 5 #define FUNC MATHSUFFIX1(rint)6 #define FUNC _STD(rintl) 6 7 7 8 .globl FUNC -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/sin.s
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r2012 r2013 2 2 / Modified 1993-1996 by Eberhard Mattes 3 3 4 #define LONG_DOUBLE 4 5 #include <emx/asm386.h> 5 6 6 #define FUNC MATHSUFFIX1(sin)7 #define FUNC _STD(sinl) 7 8 8 9 .globl FUNC … … 21 22 fsin /* sin(x) */ 22 23 fstsw %ax 23 testb $0x04, %ah 24 testb $0x04, %ah 24 25 jnz Llarge /* C2 != 0 ? */ 25 26 Lreturn:EPILOGUE(FUNC) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/sinh.s
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r2012 r2013 1 1 / sinh.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes 2 2 3 #define LONG_DOUBLE 3 4 #include <emx/asm386.h> 4 5 5 #define FUNC MATHSUFFIX1(sinh)6 #define FUNC _STD(sinhl) 6 7 7 8 .globl FUNC … … 31 32 orw $0x0400, %ax /* round down towards -inf */ 32 33 movw %ax, cw2 33 fldcw cw2 34 fldcw cw2 34 35 fld %st /* y, y */ 35 36 frndint /* int (y), y */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/sqrt.s
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r2012 r2013 1 1 / sqrt.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes 2 2 3 #define LONG_DOUBLE 3 4 #include <emx/asm386.h> 4 5 5 #define FUNC MATHSUFFIX1(sqrt)6 #define FUNC _STD(sqrtl) 6 7 7 8 .globl FUNC -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/tan.s
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r2012 r2013 2 2 / Modified 1993-1996 by Eberhard Mattes 3 3 4 #define LONG_DOUBLE 4 5 #include <emx/asm386.h> 5 6 6 #define FUNC MATHSUFFIX1(tan)7 #define FUNC _STD(tanl) 7 8 8 9 .globl FUNC -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/tanh.s
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r2012 r2013 1 1 / tanh.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes 2 2 3 #define LONG_DOUBLE 3 4 #include <emx/asm386.h> 4 5 5 #define FUNC MATHSUFFIX1(tanh)6 #define FUNC _STD(tanhl) 6 7 7 8 .globl FUNC … … 32 33 orw $0x0400, %ax /* round down towards -inf */ 33 34 movw %ax, cw2 34 fldcw cw2 35 fldcw cw2 35 36 fld %st /* y, y */ 36 37 frndint /* int (y), y */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/cbrtl.c
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r2012 r2013 7 7 { 8 8 if (x >= 0) 9 return _powl (x, 1.0 / 3.0);9 return powl (x, 1.0 / 3.0); 10 10 else 11 return - _powl (-x, 1.0 / 3.0);11 return -powl (-x, 1.0 / 3.0); 12 12 } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/math.smak
-
Property cvs2svn:cvs-rev
changed from
1.6
to1.7
r2012 r2013 2 2 libc.TSRC += $(wildcard src/lib/math/*.c) 3 3 4 # Virtual targets, e.g. compiled from same input files but with different opts5 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/%.s14 # $(call DO.COMPILE.s, -DFLOAT)15 #$(call .MVER,math/386/%l.o): src/lib/math/386/%.s16 # $(call DO.COMPILE.s, -DLONG_DOUBLE)17 18 $.aout-prof/src/lib/math/386/%f.o: src/lib/math/386/%.s19 $(call DO.COMPILE.s, -DFLOAT)20 $.aout-prof/src/lib/math/386/%l.o: src/lib/math/386/%.s21 $(call DO.COMPILE.s, -DLONG_DOUBLE)22 23 $.aout-log/src/lib/math/386/%f.o: src/lib/math/386/%.s24 $(call DO.COMPILE.s, -DFLOAT)25 $.aout-log/src/lib/math/386/%l.o: src/lib/math/386/%.s26 $(call DO.COMPILE.s, -DLONG_DOUBLE)27 28 $.aout/src/lib/math/386/%f.o: src/lib/math/386/%.s29 $(call DO.COMPILE.s, -DFLOAT)30 $.aout/src/lib/math/386/%l.o: src/lib/math/386/%.s31 $(call DO.COMPILE.s, -DLONG_DOUBLE)32 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/mkstd.awk
-
Property cvs2svn:cvs-rev
changed from
1.5
to1.6
r2012 r2013 54 54 } 55 55 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 56 64 /__weak_reference\( *[_0-9A-Za-z]+ *, *[_0-9A-Za-z]+ *\)/{ 57 65 while (match($0, "__weak_reference\\( *[_0-9A-Za-z ]+ *, *[_0-9A-Za-z ]+ *\\)")) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/bsdsrc/b_exp.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 32 32 */ 33 33 34 #include "namespace.h" 34 35 #ifndef lint 35 36 static char sccsid[] = "@(#)exp.c 8.1 (Berkeley) 6/4/93"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/bsdsrc/b_log.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 32 32 */ 33 33 34 #include "namespace.h" 34 35 #ifndef lint 35 36 static char sccsid[] = "@(#)log.c 8.2 (Berkeley) 11/30/93"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/bsdsrc/b_tgamma.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 32 32 */ 33 33 34 #include "namespace.h" 34 35 #ifndef lint 35 36 static char sccsid[] = "@(#)gamma.c 8.1 (Berkeley) 6/4/93"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/msun.smak
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 59 59 60 60 # Add to libc modules. 61 libc.TSRC.386 += $(addprefix src/lib/msun/i38 6/,$(ARCH_SRCS))61 libc.TSRC.386 += $(addprefix src/lib/msun/i387/,$(ARCH_SRCS)) 62 62 libc.TSRC += $(MSUN_SRCS) 63 63 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_acos.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== 12 12 */ 13 13 14 #include "namespace.h" 14 15 #ifndef lint 15 16 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_acos.c,v 1.10 2005/02/04 18:26:05 das Exp $"; … … 17 18 18 19 /* __ieee754_acos(x) 19 * Method : 20 * Method : 20 21 * acos(x) = pi/2 - asin(x) 21 22 * acos(-x) = pi/2 + asin(x) … … 24 25 * For x>0.5 25 26 * acos(x) = pi/2 - (pi/2 - 2asin(sqrt((1-x)/2))) 26 * = 2asin(sqrt((1-x)/2)) 27 * = 2asin(sqrt((1-x)/2)) 27 28 * = 2s + 2s*z*R(z) ...z=(1-x)/2, s=sqrt(z) 28 29 * = 2f + (2c + 2s*z*R(z)) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_acosf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_acosf.c,v 1.7 2002/05/28 17:03:12 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_acosh.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== … … 13 13 */ 14 14 15 #include "namespace.h" 15 16 #ifndef lint 16 17 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_acosh.c,v 1.8 2005/02/04 18:26:05 das Exp $"; … … 19 20 /* __ieee754_acosh(x) 20 21 * Method : 21 * Based on 22 * Based on 22 23 * acosh(x) = log [ x + sqrt(x*x-1) ] 23 24 * we have … … 50 51 if(hx >=0x7ff00000) { /* x is inf of NaN */ 51 52 return x+x; 52 } else 53 } else 53 54 return __ieee754_log(x)+ln2; /* acosh(huge)=log(2x) */ 54 55 } else if(((hx-0x3ff00000)|lx)==0) { -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_acoshf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_acoshf.c,v 1.7 2002/05/28 17:03:12 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_asin.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== 12 12 */ 13 13 14 #include "namespace.h" 14 15 #ifndef lint 15 16 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_asin.c,v 1.11 2005/02/04 18:26:05 das Exp $"; … … 17 18 18 19 /* __ieee754_asin(x) 19 * Method : 20 * Method : 20 21 * Since asin(x) = x + x^3/6 + x^5*3/40 + x^7*15/336 + ... 21 22 * we approximate asin(x) on [0,0.5] by 22 23 * asin(x) = x + x*x^2*R(x^2) 23 24 * 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 25 26 * and its remez error is bounded by 26 27 * |(asin(x)-x)/x^3 - R(x^2)| < 2^(-58.75) … … 81 82 /* asin(1)=+-pi/2 with inexact */ 82 83 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 */ 84 85 } else if (ix<0x3fe00000) { /* |x|<0.5 */ 85 86 if(ix<0x3e400000) { /* if |x| < 2**-27 */ 86 87 if(huge+x>one) return x;/* return x with inexact if x!=0*/ 87 } else 88 } else 88 89 t = x*x; 89 90 p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5))))); … … 109 110 q = pio4_hi-2.0*w; 110 111 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; 113 114 } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_asinf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_asinf.c,v 1.8 2002/05/28 17:03:12 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_atan2.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== … … 13 13 */ 14 14 15 #include "namespace.h" 15 16 #ifndef lint 16 17 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_atan2.c,v 1.10 2005/02/04 18:26:05 das Exp $"; … … 20 21 * Method : 21 22 * 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): 23 24 * ARG (x+iy) = arctan(y/x) ... if x > 0, 24 25 * ARG (x+iy) = pi - arctan[y/(-x)] ... if x < 0, … … 38 39 * 39 40 * 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 43 44 * to produce the hexadecimal values shown. 44 45 */ … … 75 76 if((iy|ly)==0) { 76 77 switch(m) { 77 case 0: 78 case 0: 78 79 case 1: return y; /* atan(+-0,+anything)=+-0 */ 79 80 case 2: return pi+tiny;/* atan(+0,-anything) = pi */ … … 83 84 /* when x = 0 */ 84 85 if((ix|lx)==0) return (hy<0)? -pi_o_2-tiny: pi_o_2+tiny; 85 86 86 87 /* when x is INF */ 87 88 if(ix==0x7ff00000) { -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_atan2f.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_atan2f.c,v 1.7 2004/06/02 17:09:05 bde Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_atanh.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== … … 13 13 */ 14 14 15 #include "namespace.h" 15 16 #ifndef lint 16 17 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_atanh.c,v 1.7 2005/02/04 18:26:05 das Exp $"; … … 51 52 if ((ix|((lx|(-lx))>>31))>0x3ff00000) /* |x|>1 */ 52 53 return (x-x)/(x-x); 53 if(ix==0x3ff00000) 54 if(ix==0x3ff00000) 54 55 return x/zero; 55 56 if(ix<0x3e300000&&(huge+x)>zero) return x; /* x<2**-28 */ … … 58 59 t = x+x; 59 60 t = 0.5*log1p(t+t*x/(one-x)); 60 } else 61 } else 61 62 t = 0.5*log1p((x+x)/(one-x)); 62 63 if(hx>=0) return t; else return -t; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_atanhf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_atanhf.c,v 1.6 2002/05/28 17:03:12 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_cosh.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== 12 12 */ 13 13 14 #include "namespace.h" 14 15 #ifndef lint 15 16 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_cosh.c,v 1.8 2005/02/04 18:26:05 das Exp $"; … … 17 18 18 19 /* __ieee754_cosh(x) 19 * Method : 20 * Method : 20 21 * 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 24 25 * 0 <= x <= ln2/2 : cosh(x) := 1 + ------------------- 25 26 * 2*exp(x) … … 28 29 * ln2/2 <= x <= 22 : cosh(x) := ------------------- 29 30 * 2 30 * 22 <= x <= lnovft : cosh(x) := exp(x)/2 31 * 22 <= x <= lnovft : cosh(x) := exp(x)/2 31 32 * lnovft <= x <= ln2ovft: cosh(x) := exp(x/2)/2 * exp(x/2) 32 33 * ln2ovft < x : cosh(x) := huge*huge (overflow) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_coshf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_coshf.c,v 1.6 2002/05/28 17:03:12 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_exp.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 6 6 * 7 7 * 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 9 9 * is preserved. 10 10 * ==================================================== 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_exp.c,v 1.10 2005/02/04 18:26:05 das Exp $"; … … 23 24 * Given x, find r and integer k such that 24 25 * 25 * x = k*ln2 + r, |r| <= 0.5*ln2. 26 * x = k*ln2 + r, |r| <= 0.5*ln2. 26 27 * 27 * Here r will be represented as r = hi-lo for better 28 * Here r will be represented as r = hi-lo for better 28 29 * accuracy. 29 30 * … … 32 33 * Write 33 34 * 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 36 37 * of this polynomial approximation is bounded by 2**-59. In 37 38 * other words, … … 40 41 * and 41 42 * | 5 | -59 42 * | 2.0+P1*z+...+P5*z - R(z) | <= 2 43 * | 2.0+P1*z+...+P5*z - R(z) | <= 2 43 44 * | | 44 45 * The computation of exp(r) thus becomes … … 67 68 * 68 69 * Misc. info. 69 * For IEEE double 70 * For IEEE double 70 71 * if x > 7.09782712893383973096e+02 then exp(x) overflow 71 72 * if x < -7.45133219101941108420e+02 then exp(x) underflow 72 73 * 73 74 * 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 76 77 * compiler will convert from decimal to binary accurately enough 77 78 * to produce the hexadecimal values shown. … … 125 126 126 127 /* argument reduction */ 127 if(hx > 0x3fd62e42) { /* if |x| > 0.5 ln2 */ 128 if(hx > 0x3fd62e42) { /* if |x| > 0.5 ln2 */ 128 129 if(hx < 0x3FF0A2B2) { /* and |x| < 1.5 ln2 */ 129 130 hi = x-ln2HI[xsb]; lo=ln2LO[xsb]; k = 1-xsb-xsb; … … 135 136 } 136 137 x = hi - lo; 137 } 138 } 138 139 else if(hx < 0x3e300000) { /* when |x|<2**-28 */ 139 140 if(huge+x>one) return one+x;/* trigger inexact */ … … 144 145 t = x*x; 145 146 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); 147 148 else y = one-((lo-(x*c)/(2.0-c))-hi); 148 149 if(k >= -1021) { -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_expf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_expf.c,v 1.9 2005/02/24 06:32:13 das Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_fmod.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== 12 12 */ 13 13 14 #include "namespace.h" 14 15 #ifndef lint 15 16 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_fmod.c,v 1.9 2005/02/04 18:26:05 das Exp $"; 16 17 #endif 17 18 18 /* 19 /* 19 20 * __ieee754_fmod(x,y) 20 21 * Return x mod y in exact arithmetic … … 45 46 if(hx<=hy) { 46 47 if((hx<hy)||(lx<ly)) return x; /* |x|<|y| return x */ 47 if(lx==ly) 48 if(lx==ly) 48 49 return Zero[(u_int32_t)sx>>31]; /* |x|=|y| return x*0*/ 49 50 } … … 68 69 69 70 /* set up {hx,lx}, {hy,ly} and align y to x */ 70 if(ix >= -1022) 71 if(ix >= -1022) 71 72 hx = 0x00100000|(0x000fffff&hx); 72 73 else { /* subnormal x, shift x to normal */ … … 80 81 } 81 82 } 82 if(iy >= -1022) 83 if(iy >= -1022) 83 84 hy = 0x00100000|(0x000fffff&hy); 84 85 else { /* subnormal y, shift y to normal */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_fmodf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_fmodf.c,v 1.6 2002/05/28 17:03:12 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_gamma.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== … … 13 13 */ 14 14 15 #include "namespace.h" 15 16 #ifndef lint 16 17 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_gamma.c,v 1.7 2005/02/04 18:26:05 das Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_gamma_r.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== … … 13 13 */ 14 14 15 #include "namespace.h" 15 16 #ifndef lint 16 17 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_gamma_r.c,v 1.7 2005/02/04 18:26:05 das Exp $"; … … 18 19 19 20 /* __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). 22 23 * 23 24 * Method: See __ieee754_lgamma_r -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_gammaf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_gammaf.c,v 1.6 2002/05/28 17:03:12 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_gammaf_r.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_gammaf_r.c,v 1.7 2002/05/28 18:15:03 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_hypot.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== 12 12 */ 13 13 14 #include "namespace.h" 14 15 #ifndef lint 15 16 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_hypot.c,v 1.9 2005/02/04 18:26:05 das Exp $"; … … 18 19 /* __ieee754_hypot(x,y) 19 20 * 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 23 24 * sqrt(z) has error less than 1 ulp (exercise). 24 25 * 25 * So, compute sqrt(x*x+y*y) with some care as 26 * So, compute sqrt(x*x+y*y) with some care as 26 27 * follows to get the error below 1 ulp: 27 28 * … … 33 34 * 2. if x <= 2y use 34 35 * 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, 36 37 * y1= y with lower 32 bits chopped, y2 = y-y1. 37 38 * 38 * NOTE: scaling may be necessary if some argument is too 39 * NOTE: scaling may be necessary if some argument is too 39 40 * large or too tiny 40 41 * … … 44 45 * 45 46 * 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) 48 49 */ 49 50 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_hypotf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_hypotf.c,v 1.9 2002/05/28 18:15:03 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_j0.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== 12 12 */ 13 13 14 #include "namespace.h" 14 15 #ifndef lint 15 16 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_j0.c,v 1.8 2005/02/04 18:26:05 das Exp $"; … … 35 36 * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x)) 36 37 * to compute the worse one.) 37 * 38 * 38 39 * 3 Special cases 39 40 * j0(nan)= nan … … 43 44 * Method -- y0(x): 44 45 * 1. For x<2. 45 * Since 46 * Since 46 47 * y0(x) = 2/pi*(j0(x)*(ln(x/2)+Euler) + x^2/4 - ...) 47 48 * therefore y0(x)-2/pi*j0(x)*ln(x) is an even function. 48 49 * We use the following function to approximate y0, 49 50 * y0(x) = U(z)/V(z) + (2/pi)*(j0(x)*ln(x)), z= x^2 50 * where 51 * where 51 52 * U(z) = u00 + u01*z + ... + u06*z^6 52 53 * V(z) = 1 + v01*z + ... + v04*z^4 … … 153 154 ix = 0x7fffffff&hx; 154 155 /* 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); 156 157 if((ix|lx)==0) return -one/zero; 157 158 if(hx<0) return zero/zero; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_j0f.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_j0f.c,v 1.7 2002/05/28 18:15:03 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_j1.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== 12 12 */ 13 13 14 #include "namespace.h" 14 15 #ifndef lint 15 16 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_j1.c,v 1.8 2005/02/04 18:26:06 das Exp $"; … … 36 37 * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x)) 37 38 * to compute the worse one.) 38 * 39 * 39 40 * 3 Special cases 40 41 * j1(nan)= nan … … 43 44 * 44 45 * 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 46 47 * 2. For x<2. 47 * Since 48 * Since 48 49 * y1(x) = 2/pi*(j1(x)*(ln(x/2)+Euler)-1/x-x/2+5/64*x^3-...) 49 50 * therefore y1(x)-2/pi*j1(x)*ln(x)-1/x is an odd function. … … 150 151 ix = 0x7fffffff&hx; 151 152 /* 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); 153 154 if((ix|lx)==0) return -one/zero; 154 155 if(hx<0) return zero/zero; … … 180 181 } 181 182 return z; 182 } 183 } 183 184 if(ix<=0x3c900000) { /* x < 2**-54 */ 184 185 return(-tpi/x); 185 } 186 } 186 187 z = x*x; 187 188 u = U0[0]+z*(U0[1]+z*(U0[2]+z*(U0[3]+z*U0[4]))); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_j1f.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_j1f.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_jn.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== 12 12 */ 13 13 14 #include "namespace.h" 14 15 #ifndef lint 15 16 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_jn.c,v 1.9 2005/02/04 18:26:06 das Exp $"; … … 20 21 * floating point Bessel's function of the 1st and 2nd kind 21 22 * of order n 22 * 23 * 23 24 * Special cases: 24 25 * y0(0)=y1(0)=yn(n,0) = -inf with division by zero signal; … … 77 78 if((ix|lx)==0||ix>=0x7ff00000) /* if x is 0 or inf */ 78 79 b = zero; 79 else if((double)n<=x) { 80 else if((double)n<=x) { 80 81 /* Safe to use J(n+1,x)=2n/x *J(n,x)-J(n-1,x) */ 81 82 if(ix>=0x52D00000) { /* x > 2**302 */ 82 /* (x >> n**2) 83 /* (x >> n**2) 83 84 * Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi) 84 85 * 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), 86 87 * xn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then 87 88 * … … 111 112 } else { 112 113 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) 114 115 * J(n,x) = 1/n!*(x/2)^n - ... 115 116 */ … … 126 127 } else { 127 128 /* use backward recurrence */ 128 /* x x^2 x^2 129 /* x x^2 x^2 129 130 * J(n,x)/J(n-1,x) = ---- ------ ------ ..... 130 131 * 2n - 2(n+1) - 2(n+2) 131 132 * 132 * 1 1 1 133 * 1 1 1 133 134 * (for large x) = ---- ------ ------ ..... 134 135 * 2n 2(n+1) 2(n+2) 135 * -- - ------ - ------ - 136 * -- - ------ - ------ - 136 137 * x x x 137 138 * … … 149 150 * Q(0) = w, Q(1) = w(w+h) - 1, 150 151 * 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 154 155 */ 155 156 /* determine k */ … … 230 231 if(ix==0x7ff00000) return zero; 231 232 if(ix>=0x52D00000) { /* x > 2**302 */ 232 /* (x >> n**2) 233 /* (x >> n**2) 233 234 * Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi) 234 235 * 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), 236 237 * xn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then 237 238 * -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_jnf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_jnf.c,v 1.8 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_lgamma.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== … … 13 13 */ 14 14 15 #include "namespace.h" 15 16 #ifndef lint 16 17 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_lgamma.c,v 1.8 2005/02/04 18:26:06 das Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_lgamma_r.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== … … 13 13 */ 14 14 15 #include "namespace.h" 15 16 #ifndef lint 16 17 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_lgamma_r.c,v 1.8 2005/02/04 18:26:06 das Exp $"; … … 18 19 19 20 /* __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). 22 23 * 23 24 * Method: 24 25 * 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 26 27 * reduce x to a number in [1.5,2.5] by 27 28 * lgamma(1+s) = log(s) + lgamma(s) … … 61 62 * 3 5 11 62 63 * w = w0 + w1*z + w2*z + w3*z + ... + w6*z 63 * where 64 * where 64 65 * |w - f(z)| < 2**-58.74 65 66 * … … 69 70 * G(x) = pi/(sin(pi*x)*(-x)*G(-x)) 70 71 * 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 72 73 * lgamma(x) = log(|Gamma(x)|) 73 74 * = 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 75 76 * computation of sin(pi*(-x)). 76 77 * … … 190 191 switch (n) { 191 192 case 0: y = __kernel_sin(pi*y,zero,0); break; 192 case 1: 193 case 1: 193 194 case 2: y = __kernel_cos(pi*(0.5-y),zero); break; 194 case 3: 195 case 3: 195 196 case 4: y = __kernel_sin(pi*(one-y),zero,0); break; 196 197 case 5: … … 290 291 w = w0+z*(w1+y*(w2+y*(w3+y*(w4+y*(w5+y*w6))))); 291 292 r = (x-half)*(t-one)+w; 292 } else 293 } else 293 294 /* 2**58 <= x <= inf */ 294 295 r = x*(__ieee754_log(x)-one); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_lgammaf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_lgammaf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_lgammaf_r.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_lgammaf_r.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_log.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== 12 12 */ 13 13 14 #include "namespace.h" 14 15 #ifndef lint 15 16 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_log.c,v 1.10 2005/02/04 18:26:06 das Exp $"; … … 19 20 * Return the logrithm of x 20 21 * 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), 24 25 * where sqrt(2)/2 < 1+f < sqrt(2) . 25 26 * … … 28 29 * = 2s + 2/3 s**3 + 2/5 s**5 + ....., 29 30 * = 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 32 33 * of this polynomial approximation is bounded by 2**-58.45. In 33 34 * other words, … … 37 38 * and 38 39 * | 2 14 | -58.45 39 * | Lg1*s +...+Lg7*s - R(z) | <= 2 40 * | Lg1*s +...+Lg7*s - R(z) | <= 2 40 41 * | | 41 42 * Note that 2s = f - s*f = f - hfsq + s*hfsq, where hfsq = f*f/2. … … 45 46 * log(1+f) = f - (hfsq - s*(hfsq+R)). (better accuracy) 46 47 * 47 * 3. Finally, log(x) = k*ln2 + log(1+f). 48 * 3. Finally, log(x) = k*ln2 + log(1+f). 48 49 * = 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: 50 51 * ln2_hi + ln2_lo, 51 52 * where n*ln2_hi is always exact for |n| < 2000. 52 53 * 53 54 * 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) ; 55 56 * log(+INF) is +INF; log(0) is -INF with signal; 56 57 * log(NaN) is that NaN with no signal. … … 61 62 * 62 63 * 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 66 67 * to produce the hexadecimal values shown. 67 68 */ … … 95 96 k=0; 96 97 if (hx < 0x00100000) { /* x < 2**-1022 */ 97 if (((hx&0x7fffffff)|lx)==0) 98 if (((hx&0x7fffffff)|lx)==0) 98 99 return -two54/zero; /* log(+-0)=-inf */ 99 100 if (hx<0) return (x-x)/zero; /* log(-#) = NaN */ 100 101 k -= 54; x *= two54; /* subnormal number, scale up x */ 101 102 GET_HIGH_WORD(hx,x); 102 } 103 } 103 104 if (hx >= 0x7ff00000) return x+x; 104 105 k += (hx>>20)-1023; … … 115 116 return dk*ln2_hi-((R-dk*ln2_lo)-f);} 116 117 } 117 s = f/(2.0+f); 118 s = f/(2.0+f); 118 119 dk = (double)k; 119 120 z = s*s; … … 121 122 w = z*z; 122 123 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))); 125 126 i |= j; 126 127 R = t2+t1; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_log10.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== 12 12 */ 13 13 14 #include "namespace.h" 14 15 #ifndef lint 15 16 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_log10.c,v 1.11 2005/02/04 18:26:06 das Exp $"; … … 18 19 /* __ieee754_log10(x) 19 20 * Return the base 10 logarithm of x 20 * 21 * 21 22 * Method : 22 23 * Let log10_2hi = leading 40 bits of log10(2) and … … 24 25 * ivln10 = 1/log(10) rounded. 25 26 * Then 26 * n = ilogb(x), 27 * n = ilogb(x), 27 28 * if(n<0) n = n+1; 28 29 * x = scalbn(x,-n); … … 30 31 * 31 32 * 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 33 34 * mode must set to Round-to-Nearest. 34 35 * Note 2: … … 37 38 * 38 39 * Special cases: 39 * log10(x) is NaN with signal if x < 0; 40 * log10(x) is NaN with signal if x < 0; 40 41 * log10(+INF) is +INF with no signal; log10(0) is -INF with signal; 41 42 * log10(NaN) is that NaN with no signal; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_log10f.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_log10f.c,v 1.8 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_logf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_logf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_pow.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 5 5 * 6 6 * 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 8 8 * is preserved. 9 9 * ==================================================== 10 10 */ 11 11 12 #include "namespace.h" 12 13 #ifndef lint 13 14 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_pow.c,v 1.11 2005/02/04 18:26:06 das Exp $"; … … 21 22 * log2(x) = w1 + w2, 22 23 * 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 24 25 * arithmetic, where |y'|<=0.5. 25 26 * 3. Return x**y = 2**n*exp(y'*log2) … … 49 50 * pow(x,y) returns x**y nearly rounded. In particular 50 51 * pow(integer,integer) 51 * always returns the correct integer provided it is 52 * always returns the correct integer provided it is 52 53 * representable. 53 54 * 54 55 * 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 58 59 * to produce the hexadecimal values shown. 59 60 */ … … 113 114 /* +-NaN return x+y */ 114 115 if(ix > 0x7ff00000 || ((ix==0x7ff00000)&&(lx!=0)) || 115 iy > 0x7ff00000 || ((iy==0x7ff00000)&&(ly!=0))) 116 iy > 0x7ff00000 || ((iy==0x7ff00000)&&(ly!=0))) 116 117 return x+y; 117 118 … … 134 135 } 135 136 } 136 } 137 } 137 138 138 139 /* special value of y */ … … 145 146 else /* (|x|<1)**-,+inf = inf,0 */ 146 147 return (hy<0)?-y: zero; 147 } 148 } 148 149 if(iy==0x3ff00000) { /* y is +-1 */ 149 150 if(hy<0) return one/x; else return x; … … 165 166 if(((ix-0x3ff00000)|yisint)==0) { 166 167 z = (z-z)/(z-z); /* (-1)**non-int is NaN */ 167 } else if(yisint==1) 168 } else if(yisint==1) 168 169 z = -z; /* (x<0)**odd = -(|x|**odd) */ 169 170 } … … 171 172 } 172 173 } 173 174 174 175 /* CYGNUS LOCAL + fdlibm-5.3 fix: This used to be 175 176 n = (hx>>31)+1; … … 193 194 if(ix<0x3fefffff) return (hy<0)? s*huge*huge:s*tiny*tiny; 194 195 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 196 197 log(x) by x-x^2/2+x^3/3-x^4/4 */ 197 198 t = ax-one; /* t has 20 trailing zeros */ … … 286 287 if(j<0) n = -n; 287 288 p_h -= t; 288 } 289 } 289 290 t = p_l+p_h; 290 291 SET_LOW_WORD(t,0); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_powf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_powf.c,v 1.12 2004/06/01 19:33:30 bde Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_rem_pio2.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== … … 13 13 */ 14 14 15 #include "namespace.h" 15 16 #ifndef lint 16 17 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_rem_pio2.c,v 1.8 2005/02/04 18:26:06 das Exp $"; … … 18 19 19 20 /* __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] 22 23 * use __kernel_rem_pio2() 23 24 */ … … 27 28 28 29 /* 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 30 31 */ 31 32 static 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, 33 0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62, 34 0x95993C, 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A, 35 0x424DD2, 0xE00649, 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129, 36 0xA73EE8, 0x8235F5, 0x2EBB44, 0x84E99C, 0x7026B4, 0x5F7E41, 37 0x3991D6, 0x398353, 0x39F49C, 0x845F8B, 0xBDF928, 0x3B1FF8, 38 0x97FFDE, 0x05980F, 0xEF2F11, 0x8B5A0A, 0x6D1F6D, 0x367ECF, 39 0x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D, 0x7527BA, 0xC7EBE5, 40 0xF17B3D, 0x0739F7, 0x8A5292, 0xEA6BFB, 0x5FB11F, 0x8D5D08, 41 0x560330, 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3, 42 0x91615E, 0xE61B08, 0x659985, 0x5F14A0, 0x68408D, 0xFFD880, 43 0x4D7327, 0x310606, 0x1556CA, 0x73A8C9, 0x60E27B, 0xC08C6B, 43 44 }; 44 45 … … 86 87 {y[0] = x; y[1] = 0; return 0;} 87 88 if(ix<0x4002d97c) { /* |x| < 3pi/4, special case with n=+-1 */ 88 if(hx>0) { 89 if(hx>0) { 89 90 z = x - pio2_1; 90 91 if(ix!=0x3ff921fb) { /* 33+53 bit pi is good enough */ … … 121 122 u_int32_t high; 122 123 j = ix>>20; 123 y[0] = r-w; 124 y[0] = r-w; 124 125 GET_HIGH_WORD(high,y[0]); 125 126 i = j-((high>>20)&0x7ff); … … 145 146 else return n; 146 147 } 147 /* 148 /* 148 149 * all other (large) arguments 149 150 */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_rem_pio2f.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_rem_pio2f.c,v 1.7 2002/05/28 17:51:46 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_remainder.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== 12 12 */ 13 13 14 #include "namespace.h" 14 15 #ifndef lint 15 16 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_remainder.c,v 1.10 2005/02/04 18:26:06 das Exp $"; … … 17 18 18 19 /* __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) 22 23 * integer nearest x/p (in half way case choose the even one). 23 * Method : 24 * Method : 24 25 * Based on fmod() return x-[x/p]chopped*p exactlp. 25 26 */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_remainderf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_remainderf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_scalb.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== 12 12 */ 13 13 14 #include "namespace.h" 14 15 #ifndef lint 15 16 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_scalb.c,v 1.12 2005/02/04 18:26:06 das Exp $"; … … 18 19 /* 19 20 * __ieee754_scalb(x, fn) is provide for 20 * passing various standard test suite. One 21 * passing various standard test suite. One 21 22 * should use scalbn() instead. 22 23 */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_scalbf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_scalbf.c,v 1.9 2004/07/09 10:01:10 das Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_sinh.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== 12 12 */ 13 13 14 #include "namespace.h" 14 15 #ifndef lint 15 16 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_sinh.c,v 1.9 2005/02/04 18:26:06 das Exp $"; … … 17 18 18 19 /* __ieee754_sinh(x) 19 * Method : 20 * Method : 20 21 * 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. 23 24 * E + E/(E+1) 24 25 * 0 <= x <= 22 : sinh(x) := --------------, E=expm1(x) 25 26 * 2 26 27 * 27 * 22 <= x <= lnovft : sinh(x) := exp(x)/2 28 * 22 <= x <= lnovft : sinh(x) := exp(x)/2 28 29 * lnovft <= x <= ln2ovft: sinh(x) := exp(x/2)/2 * exp(x/2) 29 30 * ln2ovft < x : sinh(x) := x*shuge (overflow) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_sinhf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_sinhf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_sqrt.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== 12 12 */ 13 13 14 #include "namespace.h" 14 15 #ifndef lint 15 16 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_sqrt.c,v 1.10 2005/02/04 18:26:06 das Exp $"; … … 21 22 * | Use the hardware sqrt if you have one | 22 23 * ------------------------------------------ 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) 25 26 * 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: 27 28 * find an integer k such that 1 <= (y=x*2^(2k)) < 4, then 28 29 * sqrt(x) = 2^k * sqrt(y) … … 33 34 * s = 2*q , and y = 2 * ( y - q ). (1) 34 35 * 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 38 39 * 39 40 * -(i+1) 2 … … 45 46 * 46 47 * With some algebric manipulation, it is not difficult to see 47 * that (2) is equivalent to 48 * that (2) is equivalent to 48 49 * -(i+1) 49 50 * s + 2 <= y (3) 50 51 * i i 51 52 * 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 53 54 * i i 54 55 * the following recurrence formula: … … 63 64 * i+1 i i+1 i i 64 65 * 65 * One may easily use induction to prove (4) and (5). 66 * One may easily use induction to prove (4) and (5). 66 67 * 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 68 69 * in (3). 69 70 * 3. Final rounding … … 105 106 return x*x+x; /* sqrt(NaN)=NaN, sqrt(+inf)=+inf 106 107 sqrt(-inf)=sNaN */ 107 } 108 } 108 109 /* take care of zero */ 109 110 if(ix0<=0) { … … 139 140 140 141 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 } 147 148 ix0 += ix0 + ((ix1&sign)>>31); 148 149 ix1 += ix1; … … 152 153 r = sign; 153 154 while(r!=0) { 154 t1 = s1+r; 155 t1 = s1+r; 155 156 t = s0; 156 if((t<ix0)||((t==ix0)&&(t1<=ix1))) { 157 if((t<ix0)||((t==ix0)&&(t1<=ix1))) { 157 158 s1 = t1+r; 158 159 if(((t1&sign)==sign)&&(s1&sign)==0) s0 += 1; … … 175 176 else if (z>one) { 176 177 if (q1==(u_int32_t)0xfffffffe) q+=1; 177 q1+=2; 178 q1+=2; 178 179 } else 179 180 q1 += (q1&1); … … 191 192 Other methods (use floating-point arithmetic) 192 193 ------------- 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 194 195 and K.C. Ng, written in May, 1986) 195 196 196 Two algorithms are given here to implement sqrt(x) 197 Two algorithms are given here to implement sqrt(x) 197 198 (IEEE double precision arithmetic) in software. 198 199 Both supply sqrt(x) correctly rounded. The first algorithm (in … … 200 201 The second one uses reciproot iterations to avoid division, but 201 202 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, 203 204 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 205 206 standard (IEEE 754-1985). The ability to perform shift, add, 206 207 subtract and logical AND operations upon 32-bit words is needed … … 212 213 213 214 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 215 216 216 217 1 11 52 ...widths … … 220 221 msb lsb msb lsb ...order 221 222 222 223 223 224 ------------------------ ------------------------ 224 225 x0: |s| e | f1 | x1: | f2 | … … 245 246 (2) Iterative refinement 246 247 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 248 249 sqrt(x) to within 1 ulp (Unit in the Last Place): 249 250 … … 270 271 scaled in advance to avoid spurious overflow in evaluating the 271 272 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 273 274 reciproot algorithm given in section B. 274 275 275 276 (3) Final adjustment 276 277 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 278 279 correctly rounded according to the prevailing rounding mode 279 280 as follows. Let r and i be copies of the rounding mode and … … 306 307 R := r; ... restore rounded mode 307 308 return sqrt(x):=y. 308 309 309 310 (4) Special cases 310 311 … … 325 326 y0:= k - T2[63&(k>>14)]. ... y ~ 1/sqrt(x) to 7.8 bits 326 327 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 328 329 containing correction terms. Now magically the floating 329 330 value of y (y's leading 32-bit word is y0, the value of … … 346 347 Apply Reciproot iteration three times to y and multiply the 347 348 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 349 350 -1ulp < sqrt(x)-z<1.0625ulp. 350 351 … … 357 358 358 359 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; 360 361 (b) the error in the final result is biased upward so that 361 362 -1 ulp < sqrt(x) - z < 1.0625 ulp … … 364 365 (3) Final adjustment 365 366 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 367 368 correctly rounded according to the prevailing rounding mode 368 369 as follows. Let r and i be copies of the rounding mode and … … 404 405 else { 405 406 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 407 408 fraction bits 408 409 I := i or (k&j) or ((k&(j+j+1))!=(x1&3)); … … 411 412 return sqrt(x):=z. 412 413 413 If multiplication is cheaper then the foregoing red tape, the 414 If multiplication is cheaper then the foregoing red tape, the 414 415 Inexact flag can be evaluated by 415 416 … … 417 418 I := (z*z!=x) or I. 418 419 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 420 421 True. 421 422 … … 424 425 425 426 -------------------- 426 z1: | f2 | 427 z1: | f2 | 427 428 -------------------- 428 429 bit 31 bit 0 … … 442 443 443 444 (4) Special cases (see (4) of Section A). 444 445 445 446 */ 446 447 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/e_sqrtf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_sqrtf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/k_cos.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== 12 12 */ 13 13 14 #include "namespace.h" 14 15 #ifndef lint 15 16 static char rcsid[] = "$FreeBSD: src/lib/msun/src/k_cos.c,v 1.8 2005/02/04 18:26:06 das Exp $"; … … 20 21 * kernel cos function on [-pi/4, pi/4], pi/4 ~ 0.785398164 21 22 * 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. 23 24 * 24 25 * Algorithm … … 33 34 * | 2 4 6 8 10 12 14 | -58 34 35 * |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 38 39 * 4. let r = C1*x +C2*x +C3*x +C4*x +C5*x +C6*x , then 39 40 * 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 41 42 * ~ cos(x) - x*y, 42 43 * a correction term is necessary in cos(x) and hence … … 75 76 z = x*x; 76 77 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 */ 78 79 return one - (0.5*z - (z*r - x*y)); 79 80 else { -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/k_cosf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/k_cosf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/k_rem_pio2.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== 12 12 */ 13 13 14 #include "namespace.h" 14 15 #ifndef lint 15 16 static char rcsid[] = "$FreeBSD: src/lib/msun/src/k_rem_pio2.c,v 1.7 2005/02/04 18:26:06 das Exp $"; … … 19 20 * __kernel_rem_pio2(x,y,e0,nx,prec,ipio2) 20 21 * 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 23 24 * y = x - N*pi/2 24 25 * so that |y| < pi/2. 25 26 * 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 27 28 * (2/pi)*x without doing the full multiplication. In general we 28 29 * skip the part of the product that are known to be a huge integer ( … … 33 34 * 34 35 * 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 36 37 * 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 39 40 * match x's up to 24 bits. 40 41 * … … 73 74 * 74 75 * 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 77 78 * floating value is 78 79 * … … 89 90 * 6 for single, double, extended,and quad. 90 91 * 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. 93 94 * 94 95 * jx nx - 1 … … 110 111 * 111 112 * 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 115 116 * 116 117 * iq[] integer array by breaking up q[] in 24-bits chunk. … … 126 127 /* 127 128 * 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 131 132 * to produce the hexadecimal values shown. 132 133 */ … … 196 197 iq[jz-1] -= i<<(24-q0); 197 198 ih = iq[jz-1]>>(23-q0); 198 } 199 } 199 200 else if(q0==0) ih = iq[jz-1]>>23; 200 201 else if(z>=0.5) ih=2; … … 247 248 } else { /* break z into 24-bit if necessary */ 248 249 z = scalbn(z,-q0); 249 if(z>=two24) { 250 if(z>=two24) { 250 251 fw = (double)((int32_t)(twon24*z)); 251 252 iq[jz] = (int32_t)(z-two24*fw); … … 272 273 fw = 0.0; 273 274 for (i=jz;i>=0;i--) fw += fq[i]; 274 y[0] = (ih==0)? fw: -fw; 275 y[0] = (ih==0)? fw: -fw; 275 276 break; 276 277 case 1: 277 278 case 2: 278 279 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; 281 282 fw = fq[0]-fw; 282 283 for (i=1;i<=jz;i++) fw += fq[i]; 283 y[1] = (ih==0)? fw: -fw; 284 y[1] = (ih==0)? fw: -fw; 284 285 break; 285 286 case 3: /* painful */ 286 287 for (i=jz;i>0;i--) { 287 fw = fq[i-1]+fq[i]; 288 fw = fq[i-1]+fq[i]; 288 289 fq[i] += fq[i-1]-fw; 289 290 fq[i-1] = fw; 290 291 } 291 292 for (i=jz;i>1;i--) { 292 fw = fq[i-1]+fq[i]; 293 fw = fq[i-1]+fq[i]; 293 294 fq[i] += fq[i-1]-fw; 294 295 fq[i-1] = fw; 295 296 } 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]; 297 298 if(ih==0) { 298 299 y[0] = fq[0]; y[1] = fq[1]; y[2] = fw; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/k_rem_pio2f.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/k_rem_pio2f.c,v 1.7 2005/04/05 23:27:47 das Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/k_sin.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 8 * 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 10 10 * is preserved. 11 11 * ==================================================== 12 12 */ 13 13 14 #include "namespace.h" 14 15 #ifndef lint 15 16 static char rcsid[] = "$FreeBSD: src/lib/msun/src/k_sin.c,v 1.8 2005/02/04 18:26:06 das Exp $"; … … 20 21 * Input x is assumed to be bounded by ~pi/4 in magnitude. 21 22 * 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). 23 24 * 24 25 * 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. 26 27 * 2. if x < 2^-27 (hx<0x3e400000 0), return x with inexact if x!=0. 27 28 * 3. sin(x) is approximated by a polynomial of degree 13 on … … 33 34 * |sin(x) 2 4 6 8 10 12 | -58 34 35 * |----- - (1+S1*x +S2*x +S3*x +S4*x +S5*x +S6*x )| <= 2 35 * | x | 36 * 36 * | x | 37 * 37 38 * 4. sin(x+y) = sin(x) + sin'(x')*y 38 39 * ~ sin(x) + (1-x*x/2)*y 39 * For better accuracy, let 40 * For better accuracy, let 40 41 * 3 2 2 2 2 41 42 * r = x *(S2+x *(S3+x *(S4+x *(S5+x *S6)))) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/k_sinf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/k_sinf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/k_tan.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 12 12 13 13 /* INDENT OFF */ 14 #include "namespace.h" 14 15 #ifndef lint 15 16 static char rcsid[] = "$FreeBSD: src/lib/msun/src/k_tan.c,v 1.10 2005/02/04 18:26:06 das Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/k_tanf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 13 13 */ 14 14 15 #include "namespace.h" 15 16 #ifndef lint 16 17 static char rcsid[] = "$FreeBSD: src/lib/msun/src/k_tanf.c,v 1.8 2004/06/02 04:39:44 das Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_asinh.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_asinh.c,v 1.8 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_asinhf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_asinhf.c,v 1.8 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_atan.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_atan.c,v 1.9 2003/07/23 04:53:46 peter Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_atanf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_atanf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_cbrt.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_cbrt.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_cbrtf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_cbrtf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_ceil.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_ceil.c,v 1.9 2003/07/23 04:53:46 peter Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_ceilf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_ceilf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_ceill.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 12 12 */ 13 13 14 #include "namespace.h" 14 15 #ifndef lint 15 16 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_ceill.c,v 1.3 2005/04/22 09:57:55 stefanf Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_cimag.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 27 27 */ 28 28 29 #include "namespace.h" 29 30 #include <complex.h> 30 31 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_cimagf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 27 27 */ 28 28 29 #include "namespace.h" 29 30 #include <complex.h> 30 31 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_cimagl.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 27 27 */ 28 28 29 #include "namespace.h" 29 30 #include <complex.h> 30 31 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_conj.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 27 27 */ 28 28 29 #include "namespace.h" 29 30 #include <complex.h> 30 31 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_conjf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 27 27 */ 28 28 29 #include "namespace.h" 29 30 #include <complex.h> 30 31 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_conjl.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 27 27 */ 28 28 29 #include "namespace.h" 29 30 #include <complex.h> 30 31 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_copysign.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_copysign.c,v 1.9 2003/07/23 04:53:46 peter Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_copysignf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_copysignf.c,v 1.9 2003/07/23 04:53:46 peter Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_copysignl.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 27 27 */ 28 28 29 #include "namespace.h" 29 30 #include <math.h> 30 31 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_cos.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_cos.c,v 1.9 2003/07/23 04:53:46 peter Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_cosf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_cosf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_creal.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 27 27 */ 28 28 29 #include "namespace.h" 29 30 #include <complex.h> 30 31 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_crealf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 27 27 */ 28 28 29 #include "namespace.h" 29 30 #include <complex.h> 30 31 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_creall.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 27 27 */ 28 28 29 #include "namespace.h" 29 30 #include <complex.h> 30 31 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_erf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_erf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_erff.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_erff.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_exp2.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 25 25 */ 26 26 27 #include "namespace.h" 27 28 #include <sys/cdefs.h> 28 29 __FBSDID("$FreeBSD: src/lib/msun/src/s_exp2.c,v 1.1 2005/04/05 02:57:15 das Exp $"); … … 350 351 if(((ix & 0xfffff) | lx) != 0 || (hx & 0x80000000) == 0) 351 352 return (x); /* x is NaN or +Inf */ 352 else 353 else 353 354 return (0.0); /* x is -Inf */ 354 355 } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_exp2f.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 25 25 */ 26 26 27 #include "namespace.h" 27 28 #include <sys/cdefs.h> 28 29 __FBSDID("$FreeBSD: src/lib/msun/src/s_exp2f.c,v 1.1 2005/04/05 02:57:15 das Exp $"); … … 103 104 if ((ix & 0x7fffff) != 0 || (hx & 0x80000000) == 0) 104 105 return (x); /* x is NaN or +Inf */ 105 else 106 else 106 107 return (0.0); /* x is -Inf */ 107 108 } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_expm1.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_expm1.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_expm1f.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_expm1f.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_fabs.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_fabs.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_fabsf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_fabsf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_fabsl.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 29 29 */ 30 30 31 #include "namespace.h" 31 32 #include <math.h> 32 33 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_fdim.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 25 25 */ 26 26 27 #include "namespace.h" 27 28 #include <sys/cdefs.h> 28 29 __FBSDID("$FreeBSD: src/lib/msun/src/s_fdim.c,v 1.1 2004/06/30 07:04:01 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_finite.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_finite.c,v 1.8 2003/07/23 04:53:46 peter Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_finitef.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_finitef.c,v 1.6 2002/05/28 17:51:46 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_floor.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_floor.c,v 1.9 2003/07/23 04:53:46 peter Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_floorf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_floorf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_floorl.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 12 12 */ 13 13 14 #include "namespace.h" 14 15 #ifndef lint 15 16 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_floorl.c,v 1.3 2005/04/22 09:57:55 stefanf Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_fma.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 25 25 */ 26 26 27 #include "namespace.h" 27 28 #include <sys/cdefs.h> 28 29 __FBSDID("$FreeBSD: src/lib/msun/src/s_fma.c,v 1.4 2005/03/18 02:27:59 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_fmaf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 25 25 */ 26 26 27 #include "namespace.h" 27 28 #include <sys/cdefs.h> 28 29 __FBSDID("$FreeBSD: src/lib/msun/src/s_fmaf.c,v 1.1 2005/01/22 09:53:18 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_fmal.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 25 25 */ 26 26 27 #include "namespace.h" 27 28 #include <sys/cdefs.h> 28 29 __FBSDID("$FreeBSD: src/lib/msun/src/s_fmal.c,v 1.2 2005/03/18 02:27:59 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_fmax.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 25 25 */ 26 26 27 #include "namespace.h" 27 28 #include <sys/cdefs.h> 28 29 __FBSDID("$FreeBSD: src/lib/msun/src/s_fmax.c,v 1.1 2004/06/30 07:04:01 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_fmaxf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 25 25 */ 26 26 27 #include "namespace.h" 27 28 #include <sys/cdefs.h> 28 29 __FBSDID("$FreeBSD: src/lib/msun/src/s_fmaxf.c,v 1.1 2004/06/30 07:04:01 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_fmaxl.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 25 25 */ 26 26 27 #include "namespace.h" 27 28 #include <sys/cdefs.h> 28 29 __FBSDID("$FreeBSD: src/lib/msun/src/s_fmaxl.c,v 1.1 2004/06/30 07:04:01 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_fmin.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 25 25 */ 26 26 27 #include "namespace.h" 27 28 #include <sys/cdefs.h> 28 29 __FBSDID("$FreeBSD: src/lib/msun/src/s_fmin.c,v 1.1 2004/06/30 07:04:01 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_fminf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 25 25 */ 26 26 27 #include "namespace.h" 27 28 #include <sys/cdefs.h> 28 29 __FBSDID("$FreeBSD: src/lib/msun/src/s_fminf.c,v 1.1 2004/06/30 07:04:01 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_fminl.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 25 25 */ 26 26 27 #include "namespace.h" 27 28 #include <sys/cdefs.h> 28 29 __FBSDID("$FreeBSD: src/lib/msun/src/s_fminl.c,v 1.1 2004/06/30 07:04:01 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_frexp.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_frexp.c,v 1.10 2005/03/07 21:27:37 das Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_frexpf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_frexpf.c,v 1.8 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_frexpl.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 27 27 */ 28 28 29 #include "namespace.h" 29 30 #include <float.h> 30 31 #include <math.h> -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_ilogb.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_ilogb.c,v 1.9 2004/10/09 17:14:28 stefanf Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_ilogbf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_ilogbf.c,v 1.7 2004/10/09 17:14:28 stefanf Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_ilogbl.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_ilogbl.c,v 1.1 2004/10/11 18:13:52 stefanf Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_isfinite.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 27 27 */ 28 28 29 #include "namespace.h" 29 30 #include <math.h> 30 31 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_isnan.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 27 27 */ 28 28 29 #include "namespace.h" 29 30 #include <math.h> 30 31 … … 32 33 33 34 /* Provided by libc */ 34 #if 0 35 /*#if 0 - not by my libc */ 35 36 int 36 isnan(double d)37 (isnan)(double d) 37 38 { 38 39 union IEEEd2bits u; … … 41 42 return (u.bits.exp == 2047 && (u.bits.manl != 0 || u.bits.manh != 0)); 42 43 } 43 #endif 44 /*#endif*/ 44 45 45 46 int 46 isnanf(float f)47 (isnanf)(float f) 47 48 { 48 49 union IEEEf2bits u; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_isnormal.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 27 27 */ 28 28 29 #include "namespace.h" 29 30 #include <math.h> 30 31 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_llrint.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 1 #include "namespace.h" 1 2 #include <sys/cdefs.h> 2 3 __FBSDID("$FreeBSD: src/lib/msun/src/s_llrint.c,v 1.1 2005/01/11 23:12:55 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_llrintf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 1 #include "namespace.h" 1 2 #include <sys/cdefs.h> 2 3 __FBSDID("$FreeBSD: src/lib/msun/src/s_llrintf.c,v 1.1 2005/01/11 23:12:55 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_llround.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 1 #include "namespace.h" 1 2 #include <sys/cdefs.h> 2 3 __FBSDID("$FreeBSD: src/lib/msun/src/s_llround.c,v 1.2 2005/04/08 00:52:27 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_llroundf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 1 #include "namespace.h" 1 2 #include <sys/cdefs.h> 2 3 __FBSDID("$FreeBSD: src/lib/msun/src/s_llroundf.c,v 1.2 2005/04/08 00:52:27 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_llroundl.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 1 #include "namespace.h" 1 2 #include <sys/cdefs.h> 2 3 __FBSDID("$FreeBSD: src/lib/msun/src/s_llroundl.c,v 1.1 2005/04/08 01:24:08 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_log1p.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_log1p.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_log1pf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_log1pf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_logb.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_logb.c,v 1.9 2003/07/23 04:53:46 peter Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_logbf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_logbf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_lrint.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 25 25 */ 26 26 27 #include "namespace.h" 27 28 #include <sys/cdefs.h> 28 29 #include <fenv.h> -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_lrintf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 1 #include "namespace.h" 1 2 #include <sys/cdefs.h> 2 3 __FBSDID("$FreeBSD: src/lib/msun/src/s_lrintf.c,v 1.1 2005/01/11 23:12:55 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_lround.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 25 25 */ 26 26 27 #include "namespace.h" 27 28 #include <sys/cdefs.h> 28 29 #include <sys/limits.h> … … 65 66 } 66 67 } 68 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_lroundf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 1 #include "namespace.h" 1 2 #include <sys/cdefs.h> 2 3 __FBSDID("$FreeBSD: src/lib/msun/src/s_lroundf.c,v 1.2 2005/04/08 00:52:27 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_lroundl.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 1 #include "namespace.h" 1 2 #include <sys/cdefs.h> 2 3 __FBSDID("$FreeBSD: src/lib/msun/src/s_lroundl.c,v 1.1 2005/04/08 01:24:08 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_modf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_modf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_modff.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_modff.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_nearbyint.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 25 25 */ 26 26 27 #include "namespace.h" 27 28 #include <sys/cdefs.h> 28 29 __FBSDID("$FreeBSD: src/lib/msun/src/s_nearbyint.c,v 1.1 2004/07/06 04:46:08 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_nextafter.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_nextafter.c,v 1.11 2005/03/07 21:27:37 das Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_nextafterf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_nextafterf.c,v 1.10 2005/03/07 04:55:58 das Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_nextafterl.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_nextafterl.c,v 1.1 2005/03/07 04:56:46 das Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_nexttoward.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_nexttoward.c,v 1.1 2005/03/07 04:56:46 das Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_nexttowardf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 10 10 */ 11 11 12 #include "namespace.h" 12 13 #ifndef lint 13 14 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_nexttowardf.c,v 1.1 2005/03/07 04:57:38 das Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_remquo.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 6 6 * Developed at SunSoft, a Sun Microsystems, Inc. business. 7 7 * 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 9 9 * is preserved. 10 10 * ==================================================== 11 11 */ 12 12 13 #include "namespace.h" 13 14 #include <sys/cdefs.h> 14 15 __FBSDID("$FreeBSD: src/lib/msun/src/s_remquo.c,v 1.1 2005/03/25 04:40:44 das Exp $"); … … 74 75 75 76 /* set up {hx,lx}, {hy,ly} and align y to x */ 76 if(ix >= -1022) 77 if(ix >= -1022) 77 78 hx = 0x00100000|(0x000fffff&hx); 78 79 else { /* subnormal x, shift x to normal */ … … 86 87 } 87 88 } 88 if(iy >= -1022) 89 if(iy >= -1022) 89 90 hy = 0x00100000|(0x000fffff&hy); 90 91 else { /* subnormal y, shift y to normal */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_remquof.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 6 6 * Developed at SunSoft, a Sun Microsystems, Inc. business. 7 7 * 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 9 9 * is preserved. 10 10 * ==================================================== 11 11 */ 12 12 13 #include "namespace.h" 13 14 #include <sys/cdefs.h> 14 15 __FBSDID("$FreeBSD: src/lib/msun/src/s_remquof.c,v 1.1 2005/03/25 04:40:44 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_rint.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_rint.c,v 1.11 2005/03/07 20:28:26 stefanf Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_rintf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_rintf.c,v 1.9 2004/06/09 21:24:52 das Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_round.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 25 25 */ 26 26 27 #include "namespace.h" 27 28 #include <sys/cdefs.h> 28 29 __FBSDID("$FreeBSD: src/lib/msun/src/s_round.c,v 1.3 2005/01/13 15:43:41 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_roundf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 25 25 */ 26 26 27 #include "namespace.h" 27 28 #include <sys/cdefs.h> 28 29 __FBSDID("$FreeBSD: src/lib/msun/src/s_roundf.c,v 1.3 2005/01/13 15:43:41 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_roundl.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 25 25 */ 26 26 27 #include "namespace.h" 27 28 #include <sys/cdefs.h> 28 29 __FBSDID("$FreeBSD: src/lib/msun/src/s_roundl.c,v 1.1 2005/04/08 01:24:08 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_scalbln.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 25 25 */ 26 26 27 #include "namespace.h" 27 28 #include <sys/cdefs.h> 28 29 __FBSDID("$FreeBSD: src/lib/msun/src/s_scalbln.c,v 1.2 2005/03/07 04:57:50 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_scalbn.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_scalbn.c,v 1.11 2005/03/07 21:27:37 das Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_scalbnf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_scalbnf.c,v 1.8 2005/03/07 04:52:43 das Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_scalbnl.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_scalbnl.c,v 1.1 2005/03/07 04:52:58 das Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_signbit.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 27 27 */ 28 28 29 #include "namespace.h" 29 30 #include <math.h> 30 31 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_signgam.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 1 #include "namespace.h" 1 2 #include "math.h" 2 3 #include "math_private.h" -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_significand.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_significand.c,v 1.9 2003/07/23 04:53:47 peter Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_significandf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_significandf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_sin.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_sin.c,v 1.9 2003/07/23 04:53:47 peter Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_sinf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_sinf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_tan.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_tan.c,v 1.9 2003/07/23 04:53:47 peter Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_tanf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_tanf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_tanh.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #ifndef lint 14 15 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_tanh.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_tanhf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 14 14 */ 15 15 16 #include "namespace.h" 16 17 #ifndef lint 17 18 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_tanhf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_trunc.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #include <sys/cdefs.h> 14 15 __FBSDID("$FreeBSD: src/lib/msun/src/s_trunc.c,v 1.1 2004/06/20 09:25:43 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_truncf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 11 11 */ 12 12 13 #include "namespace.h" 13 14 #include <sys/cdefs.h> 14 15 __FBSDID("$FreeBSD: src/lib/msun/src/s_truncf.c,v 1.1 2004/06/20 09:25:43 das Exp $"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/s_truncl.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 12 12 */ 13 13 14 #include "namespace.h" 14 15 #ifndef lint 15 16 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_truncl.c,v 1.3 2005/04/22 09:57:55 stefanf Exp $"; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/w_cabs.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 6 6 */ 7 7 8 #include "namespace.h" 8 9 #ifndef lint 9 10 static const char rcsid[] = -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/w_cabsf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 6 6 */ 7 7 8 #include "namespace.h" 8 9 #ifndef lint 9 10 static const char rcsid[] = -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/w_drem.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 6 6 */ 7 7 8 #include "namespace.h" 8 9 #include <math.h> 9 10 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/msun/src/w_dremf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2012 r2013 7 7 /* $FreeBSD: src/lib/msun/src/w_dremf.c,v 1.3 2004/07/28 05:53:18 kan Exp $ */ 8 8 9 #include "namespace.h" 9 10 #include "math.h" 10 11 #include "math_private.h" -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.