delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/12/17/10:37:28

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <3DFF44B4.FDBE57A2@phekda.freeserve.co.uk>
Date: Tue, 17 Dec 2002 15:37:24 +0000
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.23 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: strtof (C99) [PATCH]
References: <200212171342 DOT OAA29462 AT lws256 DOT lu DOT erisoft DOT se>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Martin Stromberg wrote:
> 
> > Please find below a patch to add strtof. The code is based on strtod.
> 
> Thanks.
> 
> But is there any reason not to call strtod() followed by two
> comparisions for overflow detection (or four, underflow too) and
> returning that?
[snip]

No particular reason. I did think about that.

The behaviour of the functions will change, when we do some C99 updates. For
instance, strtof is supposed to return HUGE_VALF (a float version of HUGE_VAL)
instead of HUGE_VAL, like it's coded right now. strtold is supposed to do
something similar, returning HUGE_VALL.

So it's possible that C99 will not allow us to do what you suggest. But if it
does, then we can do that, when we're making the strto* functions
C99-compliant.

Bye, Rich =]

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]

- Raw text -


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