Browse Source

made a function-call of HUGE_VAL

eck 34 years ago
parent
commit
8eff8f8cfb

+ 2 - 1
lang/cem/libcc.ansi/headers/math.h

@@ -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);

+ 1 - 0
lang/cem/libcc.ansi/math/.distr

@@ -9,6 +9,7 @@ fabs.c
 floor.c
 fmod.c
 frexp.e
+hugeval.c
 ldexp.c
 localmath.h
 log.c

+ 1 - 0
lang/cem/libcc.ansi/math/LIST

@@ -16,5 +16,6 @@ exp.c
 ldexp.c
 fmod.c
 floor.c
+hugeval.c
 frexp.e
 modf.e

+ 1 - 1
lang/cem/libcc.ansi/math/Makefile

@@ -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

+ 14 - 0
lang/cem/libcc.ansi/math/hugeval.c

@@ -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 */
+}