s_scalbnf.c (2dcc228679cb39677331f1064bedb9eac825a52f) s_scalbnf.c (59b19ff14a36bb975819fff8c7bd8648a9b29537)
1/* s_scalbnf.c -- float version of s_scalbn.c.
2 * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
3 */
4
5/*
6 * ====================================================
7 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
8 *

--- 12 unchanged lines hidden (view full) ---

21#include "math_private.h"
22
23static const float
24two25 = 3.355443200e+07, /* 0x4c000000 */
25twom25 = 2.9802322388e-08, /* 0x33000000 */
26huge = 1.0e+30,
27tiny = 1.0e-30;
28
1/* s_scalbnf.c -- float version of s_scalbn.c.
2 * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
3 */
4
5/*
6 * ====================================================
7 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
8 *

--- 12 unchanged lines hidden (view full) ---

21#include "math_private.h"
22
23static const float
24two25 = 3.355443200e+07, /* 0x4c000000 */
25twom25 = 2.9802322388e-08, /* 0x33000000 */
26huge = 1.0e+30,
27tiny = 1.0e-30;
28
29 float scalbnf (float x, int n)
29float
30scalbnf (float x, int n)
30{
31 int32_t k,ix;
32 GET_FLOAT_WORD(ix,x);
33 k = (ix&0x7f800000)>>23; /* extract exponent */
34 if (k==0) { /* 0 or subnormal x */
35 if ((ix&0x7fffffff)==0) return x; /* +-0 */
36 x *= two25;
37 GET_FLOAT_WORD(ix,x);

--- 16 unchanged lines hidden ---
31{
32 int32_t k,ix;
33 GET_FLOAT_WORD(ix,x);
34 k = (ix&0x7f800000)>>23; /* extract exponent */
35 if (k==0) { /* 0 or subnormal x */
36 if ((ix&0x7fffffff)==0) return x; /* +-0 */
37 x *= two25;
38 GET_FLOAT_WORD(ix,x);

--- 16 unchanged lines hidden ---