made a function-call of HUGE_VAL
authoreck <none@none>
Wed, 24 Oct 1990 14:31:50 +0000 (14:31 +0000)
committereck <none@none>
Wed, 24 Oct 1990 14:31:50 +0000 (14:31 +0000)
lang/cem/libcc.ansi/headers/math.h
lang/cem/libcc.ansi/math/.distr
lang/cem/libcc.ansi/math/LIST
lang/cem/libcc.ansi/math/Makefile
lang/cem/libcc.ansi/math/hugeval.c [new file with mode: 0644]

index 04ca453..a63b713 100644 (file)
@@ -6,7 +6,8 @@
 #if    !defined(_MATH_H)
 #define        _MATH_H
 
-#define        HUGE_VAL        9.9e+999        /* though it will generate a warning */
+double __huge_val(void);       /* may be infinity */
+#define        HUGE_VAL        (__huge_val())
 
 double acos(double _x);
 double asin(double _x);
index 54981b0..60a71be 100644 (file)
@@ -9,6 +9,7 @@ fabs.c
 floor.c
 fmod.c
 frexp.e
+hugeval.c
 ldexp.c
 localmath.h
 log.c
index 835e11b..720a4f4 100644 (file)
@@ -16,5 +16,6 @@ exp.c
 ldexp.c
 fmod.c
 floor.c
+hugeval.c
 frexp.e
 modf.e
index 47e4d36..a929104 100644 (file)
@@ -1,4 +1,4 @@
 clean:
        rm -f asin.o atan2.o atan.o ceil.o fabs.o pow.o log10.o \
                log.o sin.o sinh.o sqrt.o tan.o tanh.o exp.o ldexp.o \
-               fmod.o floor.o frexp.o modf.o OLIST
+               fmod.o floor.o hugeval.o frexp.o modf.o OLIST
diff --git a/lang/cem/libcc.ansi/math/hugeval.c b/lang/cem/libcc.ansi/math/hugeval.c
new file mode 100644 (file)
index 0000000..2a5b526
--- /dev/null
@@ -0,0 +1,14 @@
+/*
+ * (c) copyright 1990 by the Vrije Universiteit, Amsterdam, The Netherlands.
+ * See the copyright notice in the ACK home directory, in the file "Copyright".
+ *
+ * Author: Hans van Eck
+ */
+/* $Header$ */
+#include       <math.h>
+
+double
+__huge_val(void)
+{
+       return 1.0e+1000;       /* This will generate a warning */
+}