diff options
author | Tom Tromey <tromey@redhat.com> | 2005-06-29 19:54:43 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2005-06-29 19:54:43 +0000 |
commit | 81d19d3f07976732f34c028aa103ffb69763b2ad (patch) | |
tree | 034b71b1cb99d2b64dcccb16666f59a76ccc4b3e | |
parent | 8144baf8c1294fe56040a665069f42affb438aaa (diff) | |
download | classpath-81d19d3f07976732f34c028aa103ffb69763b2ad.tar.gz |
2005-06-29 Christian Thalinger <twisti@complang.tuwien.ac.at>
* native/fdlibm/Makefile.am: Added s_finite.c
* native/fdlibm/s_finite.c: Added
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | native/fdlibm/Makefile.am | 1 | ||||
-rw-r--r-- | native/fdlibm/s_finite.c | 31 |
3 files changed, 37 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2005-06-29 Christian Thalinger <twisti@complang.tuwien.ac.at> + + * native/fdlibm/Makefile.am: Added s_finite.c + * native/fdlibm/s_finite.c: Added + 2005-06-29 Anthony Balkissoon <abalkiss@redhat.com> * javax/swing/DefaultListSelectionModel.java: diff --git a/native/fdlibm/Makefile.am b/native/fdlibm/Makefile.am index c4f460a16..e3e3eecd2 100644 --- a/native/fdlibm/Makefile.am +++ b/native/fdlibm/Makefile.am @@ -28,6 +28,7 @@ libfdlibm_la_SOURCES = \ s_cos.c \ s_fabs.c \ sf_fabs.c \ + s_finite.c \ s_floor.c \ sf_rint.c \ s_rint.c \ diff --git a/native/fdlibm/s_finite.c b/native/fdlibm/s_finite.c new file mode 100644 index 000000000..3e6c8122b --- /dev/null +++ b/native/fdlibm/s_finite.c @@ -0,0 +1,31 @@ + +/* @(#)s_finite.c 1.3 95/01/18 */ +/* + * ==================================================== + * 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. + * ==================================================== + */ + +/* + * finite(x) returns 1 is x is finite, else 0; + * no branching! + */ + +#include "fdlibm.h" + +#ifdef __STDC__ + int finite(double x) +#else + int finite(x) + double x; +#endif +{ + uint32_t high; + GET_HIGH_WORD(high,x); + return (unsigned)((high&0x7fffffff)-0x7ff00000)>>31; +} |