diff options
author | Etienne M. Gagnon <etienne.gagnon@uqam.ca> | 2004-03-27 18:34:15 +0000 |
---|---|---|
committer | Etienne M. Gagnon <etienne.gagnon@uqam.ca> | 2004-03-27 18:34:15 +0000 |
commit | e95f3e9f0dda344ef5da881858e60124a70584c2 (patch) | |
tree | f9f225bd0f48ba4e2d58233b850bf0dadf4a7355 /native/fdlibm/w_fmod.c | |
parent | 3caf373d8bcb6455af0631c36006ea103516303f (diff) | |
download | classpath-e95f3e9f0dda344ef5da881858e60124a70584c2.tar.gz |
2004-03-27 Etienne M. Gagnon <gagnon.etienne_m@uqam.ca>
* native/fdlibm/dtoa.c, native/fdlibm/e_acos.c,
native/fdlibm/e_asin.c, native/fdlibm/e_atan2.c,
native/fdlibm/e_exp.c, native/fdlibm/e_fmod.c,
native/fdlibm/e_log.c, native/fdlibm/e_pow.c,
native/fdlibm/e_rem_pio2.c, native/fdlibm/e_remainder.c,
native/fdlibm/e_scalb.c, native/fdlibm/e_sqrt.c,
native/fdlibm/fdlibm.h, native/fdlibm/k_cos.c,
native/fdlibm/k_rem_pio2.c, native/fdlibm/k_sin.c,
native/fdlibm/k_tan.c, native/fdlibm/mprec.c,
native/fdlibm/mprec.h, native/fdlibm/s_atan.c,
native/fdlibm/s_ceil.c, native/fdlibm/s_copysign.c,
native/fdlibm/s_cos.c, native/fdlibm/s_fabs.c,
native/fdlibm/s_floor.c, native/fdlibm/s_rint.c,
native/fdlibm/s_scalbn.c, native/fdlibm/s_sin.c,
native/fdlibm/s_tan.c, native/fdlibm/sf_fabs.c,
native/fdlibm/sf_rint.c, native/fdlibm/strtod.c,
native/fdlibm/w_acos.c, native/fdlibm/w_asin.c,
native/fdlibm/w_atan2.c, native/fdlibm/w_exp.c,
native/fdlibm/w_fmod.c, native/fdlibm/w_log.c,
native/fdlibm/w_pow.c, native/fdlibm/w_remainder.c,
native/fdlibm/w_sqrt.c, native/jni/classpath/jcl.c,
native/jni/classpath/jcl.h, native/jni/classpath/jnilink.c,
native/jni/classpath/jnilink.h,
native/jni/classpath/native_state.c,
native/jni/classpath/native_state.h,
native/jni/classpath/primlib.c, native/jni/classpath/primlib.h,
native/jni/gtk-peer/gdkfont.h,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImagePainter.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuComponentPeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c,
native/jni/gtk-peer/gthread-jni.c, native/jni/gtk-peer/gtkpeer.h,
native/jni/java-awt/gnu_java_awt_EmbeddedWindow.c,
native/jni/java-io/FileDescriptor.c,
native/jni/java-io/java_io_File.c,
native/jni/java-io/java_io_ObjectInputStream.c,
native/jni/java-io/java_io_VMObjectStreamClass.c,
native/jni/java-io/javaio.c, native/jni/java-io/javaio.h,
native/jni/java-lang/java_lang_Double.c,
native/jni/java-lang/java_lang_Math.c,
native/jni/java-lang/java_lang_Object.c,
native/jni/java-lang/java_lang_VMDouble.c,
native/jni/java-lang/java_lang_VMFloat.c,
native/jni/java-lang/java_lang_VMSystem.c,
native/jni/java-lang/java_lang_reflect_Array.c,
native/jni/java-net/gnu_java_net_PlainDatagramSocketImpl.c,
native/jni/java-net/gnu_java_net_PlainSocketImpl.c,
native/jni/java-net/java_net_InetAddress.c,
native/jni/java-net/java_net_NetworkInterface.c,
native/jni/java-net/javanet.c, native/jni/java-net/javanet.h,
native/jni/java-nio/gnu_java_nio_NIOServerSocket.c,
native/jni/java-nio/java_nio.c,
native/jni/java-nio/java_nio_DirectByteBufferImpl.c,
native/jni/java-nio/java_nio_FileChannelImpl.c,
native/jni/java-nio/java_nio_FileLockImpl.c,
native/jni/java-util/java_util_TimeZone.c,
native/target/Linux/target_native.h,
native/target/Linux/target_native_file.h,
native/target/Linux/target_native_io.h,
native/target/Linux/target_native_math_float.h,
native/target/Linux/target_native_math_int.h,
native/target/Linux/target_native_misc.h,
native/target/Linux/target_native_network.h,
native/target/generic/target_generic.h,
native/target/generic/target_generic_file.h,
native/target/generic/target_generic_io.h,
native/target/generic/target_generic_math_float.h,
native/target/generic/target_generic_math_int.h,
native/target/generic/target_generic_misc.h,
native/target/generic/target_generic_network.h,
native/testsuite/guile-jvm.c, native/vmi/vmi.c, native/vmi/vmi.h:
Indented using GNU indent.
Diffstat (limited to 'native/fdlibm/w_fmod.c')
-rw-r--r-- | native/fdlibm/w_fmod.c | 64 |
1 files changed, 35 insertions, 29 deletions
diff --git a/native/fdlibm/w_fmod.c b/native/fdlibm/w_fmod.c index b6b36cb76..0e9fedc3a 100644 --- a/native/fdlibm/w_fmod.c +++ b/native/fdlibm/w_fmod.c @@ -67,40 +67,46 @@ PORTABILITY #ifndef _DOUBLE_IS_32BITS #ifdef __STDC__ - double fmod(double x, double y) /* wrapper fmod */ +double +fmod (double x, double y) /* wrapper fmod */ #else - double fmod(x,y) /* wrapper fmod */ - double x,y; +double +fmod (x, y) /* wrapper fmod */ + double x, y; #endif { #ifdef _IEEE_LIBM - return __ieee754_fmod(x,y); + return __ieee754_fmod (x, y); #else - double z; - struct exception exc; - z = __ieee754_fmod(x,y); - if(_LIB_VERSION == _IEEE_ ||isnan(y)||isnan(x)) return z; - if(y==0.0) { - /* fmod(x,0) */ - exc.type = DOMAIN; - exc.name = "fmod"; - exc.arg1 = x; - exc.arg2 = y; - exc.err = 0; - if (_LIB_VERSION == _SVID_) - exc.retval = x; - else - exc.retval = 0.0/0.0; - if (_LIB_VERSION == _POSIX_) - errno = EDOM; - else if (!matherr(&exc)) { - errno = EDOM; - } - if (exc.err != 0) - errno = exc.err; - return exc.retval; - } else - return z; + double z; + struct exception exc; + z = __ieee754_fmod (x, y); + if (_LIB_VERSION == _IEEE_ || isnan (y) || isnan (x)) + return z; + if (y == 0.0) + { + /* fmod(x,0) */ + exc.type = DOMAIN; + exc.name = "fmod"; + exc.arg1 = x; + exc.arg2 = y; + exc.err = 0; + if (_LIB_VERSION == _SVID_) + exc.retval = x; + else + exc.retval = 0.0 / 0.0; + if (_LIB_VERSION == _POSIX_) + errno = EDOM; + else if (!matherr (&exc)) + { + errno = EDOM; + } + if (exc.err != 0) + errno = exc.err; + return exc.retval; + } + else + return z; #endif } |