s_modf.c (2dcc228679cb39677331f1064bedb9eac825a52f) | s_modf.c (59b19ff14a36bb975819fff8c7bd8648a9b29537) |
---|---|
1/* @(#)s_modf.c 5.1 93/09/24 */ 2/* 3 * ==================================================== 4 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 5 * 6 * Developed at SunPro, a Sun Microsystems, Inc. business. 7 * Permission to use, copy, modify, and distribute this 8 * software is freely granted, provided that this notice --- 15 unchanged lines hidden (view full) --- 24 * No exception. 25 */ 26 27#include "math.h" 28#include "math_private.h" 29 30static const double one = 1.0; 31 | 1/* @(#)s_modf.c 5.1 93/09/24 */ 2/* 3 * ==================================================== 4 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 5 * 6 * Developed at SunPro, a Sun Microsystems, Inc. business. 7 * Permission to use, copy, modify, and distribute this 8 * software is freely granted, provided that this notice --- 15 unchanged lines hidden (view full) --- 24 * No exception. 25 */ 26 27#include "math.h" 28#include "math_private.h" 29 30static const double one = 1.0; 31 |
32 double modf(double x, double *iptr) | 32double 33modf(double x, double *iptr) |
33{ 34 int32_t i0,i1,j0; 35 u_int32_t i; 36 EXTRACT_WORDS(i0,i1,x); 37 j0 = ((i0>>20)&0x7ff)-0x3ff; /* exponent of x */ 38 if(j0<20) { /* integer part in high x */ 39 if(j0<0) { /* |x|<1 */ 40 INSERT_WORDS(*iptr,i0&0x80000000,0); /* *iptr = +-0 */ --- 34 unchanged lines hidden --- | 34{ 35 int32_t i0,i1,j0; 36 u_int32_t i; 37 EXTRACT_WORDS(i0,i1,x); 38 j0 = ((i0>>20)&0x7ff)-0x3ff; /* exponent of x */ 39 if(j0<20) { /* integer part in high x */ 40 if(j0<0) { /* |x|<1 */ 41 INSERT_WORDS(*iptr,i0&0x80000000,0); /* *iptr = +-0 */ --- 34 unchanged lines hidden --- |