delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/02/24/13:07:58

From: <ams AT ludd DOT luth DOT se>
Message-Id: <200302241805.h1OI5AM06732@speedy.ludd.luth.se>
Subject: HUGE_VAL == INFINITY
To: DJGPP-WORKERS <djgpp-workers AT delorie DOT com>
Date: Mon, 24 Feb 2003 19:05:10 +0100 (CET)
X-Mailer: ELM [version 2.4ME+ PL78 (25)]
MIME-Version: 1.0
X-MailScanner: Found to be clean
X-MailScanner-SpamScore: ss
Reply-To: djgpp-workers AT delorie DOT com

Hello.

In stdlib.h we have:
#ifdef _USE_LIBM_MATH_H
#include <libm/math.h>
#else
...

extern double __dj_huge_val;

#define HUGE_VAL  __dj_huge_val
...

extern float       __dj_huge_valf;
extern long double __dj_huge_vall;

#define HUGE_VALF __dj_huge_valf
#define HUGE_VALL __dj_huge_vall
...

#endif /* _USE_LIBM_MATH_H */


In libm/math.h we have:
extern const union __dmath __infinity;
#define HUGE_VAL (__infinity.d)


1. What's that (the changing of HUGE_VAL) good for?

2. Where are __dj_huge_val{,f,l} really defined?

3. Is it so that HUGE_VAL == INFINITY (which libm/math.h seems to
imply)?


The most important question to me is 3. I'm hacking on adding
INF(INITY) handling to strtod and co.


Right,

						MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019