[fpc-devel] [patch] ucomplex cln() bug

Dimitrios Apostolou jimis at gmx.net
Fri Aug 4 06:58:25 CEST 2006


> P.S. Something more seems wrong in uComplex but could be related to this.
> If not, expect another bug report soon

OK, I conclude. My symptoms are: 
z**3-2=                                  NanNani
z*z*z-2=             -2.000000000000000E+000

After digging a bit I realized that this is not a problem of uComplex, but a 
problem of math unit. In particular exp(-Inf) returns NaN, where it should 
return 0. Unfortunately I got really lost when studying the fpc_exp_real 
implementation, and when I saw that the actually used version is in assembly 
I just gave up! 

Any ideas of how it can be fixed? 


Thanks in advance, 
Dimitris



More information about the fpc-devel mailing list