[project @ 1998-04-10 10:54:14 by simonm]
[ghc-hetmet.git] / ghc / lib / std / cbits / floatExtreme.c
similarity index 82%
rename from ghc/lib/std/cbits/floatExtreme.lc
rename to ghc/lib/std/cbits/floatExtreme.c
index 3dbecde..997e6a9 100644 (file)
@@ -1,19 +1,21 @@
-%
-%
-%
-
-Stubs to check for extremities of (IEEE) floats, 
-the tests have been (artfully) lifted from the hbc-0.9999.3 (lib/fltcode.c)
-source.
-
+/* 
+ * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
+ *
+ * $Id: floatExtreme.c,v 1.1 1998/04/10 10:54:28 simonm Exp $
+ *
+ * Stubs to check for extremities of (IEEE) floats, 
+ * the tests have been (artfully) lifted from the hbc-0.9999.3 (lib/fltcode.c)
+ * source.
+ */
+
+/*
 ToDo:
   - avoid hard-wiring the fact that on an
     Alpha we repr. a StgFloat as a double.
     (introduce int equivalent of {ASSIGN,PK}_FLT? )
+*/
 
-\begin{code}
-
-#include "rtsdefs.h"
+#include "Rts.h"
 #include "ieee-flpt.h"
 #include "floatExtreme.h"
 
@@ -28,8 +30,7 @@ ToDo:
 #ifdef IEEE_FLOATING_POINT
 
 StgInt
-isDoubleNaN(d)
-StgDouble d;
+isDoubleNaN(StgDouble d)
 {
     union { double d; int i[2]; } u;
     int hx,lx;
@@ -46,8 +47,7 @@ StgDouble d;
 }
 
 StgInt
-isDoubleInfinite(d)
-StgDouble d;
+isDoubleInfinite(StgDouble d)
 {
     union { double d; int i[2]; } u;
     int hx,lx;
@@ -62,8 +62,7 @@ StgDouble d;
 }
 
 StgInt
-isDoubleDenormalized(d) 
-StgDouble d;
+isDoubleDenormalized(StgDouble d) 
 {
     union { double d; int i[2]; } u;
     int high, iexp;
@@ -75,8 +74,7 @@ StgDouble d;
 }
 
 StgInt
-isDoubleNegativeZero(d) 
-StgDouble d;
+isDoubleNegativeZero(StgDouble d) 
 {
     union { double d; int i[2]; } u;
     int high, iexp;
@@ -88,8 +86,7 @@ StgDouble d;
 /* Same tests, this time for StgFloats. */
 
 StgInt
-isFloatNaN(f) 
-StgFloat f;
+isFloatNaN(StgFloat f)
 {
 #if !defined(alpha_TARGET_OS)
     /* StgFloat = double on alphas */
@@ -107,8 +104,7 @@ StgFloat f;
 }
 
 StgInt
-isFloatInfinite(f) 
-StgFloat f;
+isFloatInfinite(StgFloat f)
 {
 #if !defined(alpha_TARGET_OS)
     /* StgFloat = double on alphas */
@@ -125,8 +121,7 @@ StgFloat f;
 }
 
 StgInt
-isFloatDenormalized(f) 
-StgFloat f;
+isFloatDenormalized(StgFloat f)
 {
 #if !defined(alpha_TARGET_OS)
     /* StgFloat = double on alphas */
@@ -142,8 +137,7 @@ StgFloat f;
 }
 
 StgInt
-isFloatNegativeZero(f) 
-StgFloat f;
+isFloatNegativeZero(StgFloat f)
 {
 #if !defined(alpha_TARGET_OS)
     /* StgFloat = double on alphas */
@@ -169,6 +163,3 @@ StgInt isFloatDenormalized(f) StgFloat f; { return 0; }
 StgInt isFloatNegativeZero(f) StgFloat f; { return 0; }
 
 #endif
-
-
-\end{code}