[fpc-devel] Broken frac functionin FPC3.1.1 / Windows x86_64
    J. Gareth Moreton 
    gareth at moreton-family.com
       
    Tue May  1 21:25:49 CEST 2018
    
    
  
On Tue 01/05/18 20:11 , Jonas Maebe 
jonas at 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
    
    
More information about the fpc-devel
mailing list