aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/lang/s_floor.c
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/lang/s_floor.c')
-rw-r--r--libjava/java/lang/s_floor.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/libjava/java/lang/s_floor.c b/libjava/java/lang/s_floor.c
index 86f73e0..77e39cb 100644
--- a/libjava/java/lang/s_floor.c
+++ b/libjava/java/lang/s_floor.c
@@ -6,7 +6,7 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
@@ -34,20 +34,20 @@ TRAD_SYNOPSIS
#include <math.h>
double floor(<[x]>)
double <[x]>;
- float floorf(<[x]>)
+ float floorf(<[x]>)
float <[x]>;
- double ceil(<[x]>)
+ double ceil(<[x]>)
double <[x]>;
- float ceilf(<[x]>)
+ float ceilf(<[x]>)
float <[x]>;
DESCRIPTION
-<<floor>> and <<floorf>> find
+<<floor>> and <<floorf>> find
@tex
-$\lfloor x \rfloor$,
+$\lfloor x \rfloor$,
@end tex
the nearest integer less than or equal to <[x]>.
-<<ceil>> and <<ceilf>> find
+<<ceil>> and <<ceilf>> find
@tex
$\lceil x\rceil$,
@end tex
@@ -90,14 +90,14 @@ static double huge = 1.0e300;
double x;
#endif
{
- __int32_t i0,i1,j0;
- __uint32_t i,j;
+ int32_t i0,i1,j0;
+ uint32_t i,j;
EXTRACT_WORDS(i0,i1,x);
j0 = ((i0>>20)&0x7ff)-0x3ff;
if(j0<20) {
if(j0<0) { /* raise inexact if x != 0 */
if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */
- if(i0>=0) {i0=i1=0;}
+ if(i0>=0) {i0=i1=0;}
else if(((i0&0x7fffffff)|i1)!=0)
{ i0=0xbff00000;i1=0;}
}
@@ -113,14 +113,14 @@ static double huge = 1.0e300;
if(j0==0x400) return x+x; /* inf or NaN */
else return x; /* x is integral */
} else {
- i = ((__uint32_t)(0xffffffff))>>(j0-20);
+ i = ((uint32_t)(0xffffffff))>>(j0-20);
if((i1&i)==0) return x; /* x is integral */
if(huge+x>0.0) { /* raise inexact flag */
if(i0<0) {
- if(j0==20) i0+=1;
+ if(j0==20) i0+=1;
else {
j = i1+(1<<(52-j0));
- if(j<(__uint32_t)i1) i0 +=1 ; /* got a carry */
+ if(j<(uint32_t)i1) i0 +=1 ; /* got a carry */
i1=j;
}
}