Mantis - ALGLIB
Viewing Issue Advanced Details
205 General minor have not tried 2009-11-27 11:18 2009-12-14 10:37
SergeyB  
SergeyB  
normal  
resolved  
fixed  
none    
none 2.2.0  
Unspecified
0000205: FIXED: non-IEEE floating point comparison in C++, C#, Delphi, FreePascal
x86 FPU uses 80-bit floating point arithmetics for internal calculations, while in-memory data are stored in 64-bit precision.

Sometimes it leads to unexpected results, for example: you may assign sqrt(3) to A, and still get A<>sqrt(3) (just because A is stored in memory and has double precision, and second sqrt(3) is stored in FPU and has long double precision).

Several unit tests were (erroneously) failed due to floating point inconsistency.

Now all sources use IEEE-compliant floating point comparisons independently of compiler/platform.
Issue History
2009-11-27 11:18 SergeyB New Issue
2009-11-27 11:18 SergeyB Programming language => Unspecified
2009-11-27 11:18 SergeyB Status new => assigned
2009-11-27 11:18 SergeyB Assigned To => SergeyB
2009-11-27 11:18 SergeyB Status assigned => resolved
2009-11-27 11:18 SergeyB Fixed in Version => [NOT RELEASED YET] Next major release
2009-11-27 11:18 SergeyB Resolution open => fixed
2009-12-14 10:37 SergeyB Summary FIXED: non-IEEE floating point comparison in C++ and C# => FIXED: non-IEEE floating point comparison in C++, C#, Delphi, FreePascal
2009-12-14 10:37 SergeyB Description Updated

There are no notes attached to this issue.