Glenn Fowler wrote:
> On Mon, 13 Nov 2006 23:53:55 +0100 Roland Mainz wrote:
> > Glenn Fowler wrote:
> > > HUGE_VAL is +Inf on systems supporting IEEE Std 754-1985 and some
> > > "huge" value denoting error on other systems
> > >
> > > ksh arithmetic supports Inf on all systems
> > > so there's no need for { HUGE_VAL HUGE_VALF HUGE_VALL }
> 
> > Mhhh... why does "/usr/include/iso/math_c99.h" then define |HUGE_VAL*|
> > seperately, followed by |INFINITY| ?
> 
> backwards compatibility?

Ok... I was just wondering because the implementation in
/usr/include/iso/math_c99.h doesn't suggest that:
-- snip --
#undef  HUGE_VAL
#define HUGE_VAL        (__builtin_huge_val())
#undef  HUGE_VALF
#define HUGE_VALF       (__builtin_huge_valf())
#undef  HUGE_VALL
#define HUGE_VALL       (__builtin_huge_vall())
#undef  INFINITY
#define INFINITY        (__builtin_inff())
-- snip --

|HUGE_VAL| and |INFINITY| refer to different builtins in this case and
doesn't suggest that they are equal.

> there is no edict that ksh arithmetic implement the duplicated parts of c99 
> <math.h>
> ksh documents and supports { Inf NaN } making { HUGE* INF* } macros 
> superfluous

Yes... I was just wondering about the C99 part and not the ksh93 math
(remeber I started this thread with "...This is slightly offtopic for
ksh93...") ... :-)

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

Reply via email to