[Lazarus] Floating point comparison with ulps precision

Alexander Klenin klenin at gmail.com
Mon Aug 13 16:46:14 CEST 2012


To fix a bug with caused by rounding errors, I have added ulps-based
comparison code to TAChart in r38232.
The bug was encountered by an actual user, so I requested a merge of
that code to 1.0.

However, since it depends on floating point and integer
representation, it might cause problems
for users on non-Intel platforms (does somebody use TAChart on ARM?),
so perhaps some kind of IFDEF is in order.
Please review.

Also, extended version of this code might be a useful addition to the
FPC's math unit -
 if the FPC team is interested, I'll consider working on that.

-- 
Alexander S. Klenin




More information about the Lazarus mailing list