Go to the source code of this file.
|
double | ceil (double x) |
| Mathematical ceiling function. More...
|
|
|
static const double | huge = 1.0e300 |
|
Mathematical ceiling function.
- Version
- 1.3
- Date
- 95/01/18
Return x rounded toward -inf to integral value
Method:
Bit twiddling.
Exception:
Inexact flag raised if x not equal to ceil(x).
- Copyright
- Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice is preserved.
Definition at line 65 of file ceil.c.
References huge.
70 j0 = ((i0>>20)&0x7ff)-0x3ff;
85 if(((i0&i)|i1)==0)
return x;
87 if(i0>0) i0 += (0x00100000)>>j0;
93 if(j0==0x400)
return x+x;
96 i = ((
uword)(0xffffffff))>>(j0-20);
97 if((i1&i)==0)
return x;
102 j = i1 + (1<<(52-j0));
#define INSERT_WORDS(d, ix0, ix1)
Set a double from two 32 bit ints.
#define EXTRACT_WORDS(ix0, ix1, d)
Get two 32 bit ints from a double.
signed int sword
32 bit signed integer.
unsigned int uword
32 bit unsigned integer.
const double huge = 1.0e300 |
|
static |