| version 1.9, 2010/04/23 19:17:07 |
version 1.10, 2013/01/28 06:34:09 |
| Line 22 __RCSID("$NetBSD$"); |
|
| Line 22 __RCSID("$NetBSD$"); |
|
| #include "math.h" |
#include "math.h" |
| #include "math_private.h" |
#include "math_private.h" |
| |
|
| #ifdef __weak_alias |
#ifndef _LP64 |
| __weak_alias(scalbnf, _scalbnf) |
__strong_alias(_scalbnf, _scalblnf) |
| #endif |
#endif |
| |
__weak_alias(scalbnf, _scalbnf) |
| |
__weak_alias(scalblnf, _scalblnf) |
| |
|
| static const float |
static const float |
| two25 = 3.355443200e+07, /* 0x4c000000 */ |
two25 = 0x1.0p25, /* 0x4c000000 */ |
| twom25 = 2.9802322388e-08, /* 0x33000000 */ |
twom25 = 0x1.0p-25, /* 0x33000000 */ |
| huge = 1.0e+30, |
huge = 1.0e+30, |
| tiny = 1.0e-30; |
tiny = 1.0e-30; |
| |
|
| |
#ifdef _LP64 |
| float |
float |
| scalbnf(float x, int n) |
scalbnf(float x, int n) |
| { |
{ |
| |
return scalblnf(x, n); |
| |
} |
| |
#endif |
| |
|
| |
float |
| |
scalblnf(float x, long n) |
| |
{ |
| int32_t k,ix; |
int32_t k,ix; |
| GET_FLOAT_WORD(ix,x); |
GET_FLOAT_WORD(ix,x); |
| k = (ix&0x7f800000)>>23; /* extract exponent */ |
k = (ix&0x7f800000)>>23; /* extract exponent */ |