On Tue 01/05/18 20:11 , Jonas Maebe 
jo...@freepascal.org sent:
> On 01/05/18 21:06, J. Gareth Moreton 
wrote:
> 
> > I asked about the rules regarding
> 
> > infinities, but going by what happens 
with
> 
> > the old floating-point stack, an 
exception
> 
> > is raised,
> 
> 
> 
> The code also has to work if exceptions 
are disabled.
> 
> 
> 
> 
> 
> Jonas
> 

The easiest and fastest solution would be 
to return infinity of the same sign, as 
that allows inf, -inf and NaN to be 
checked with a single comparison (all the 
exponent bits equal 1). Since infinity is 
such an abnormal value to get the 
fractional component for, this is an 
acceptable return in my opinion.

Gareth aka. Kit
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to