Issue Details (XML | Word | Printable)

Key: MATH-264
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Luc Maisonobe
Reporter: Gilles
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons Math

New "equals" method in "MathUtils"

Created: 29/Apr/09 11:25 AM   Updated: 07/Aug/09 09:13 AM
Return to search "STDCXX Sun C++ issues"
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Resolution Date: 29/Apr/09 06:35 PM


 Description  « Hide
Hello.

The article

http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm

proposes a robust way of comparing floating-point numbers (look for "AlmostEqual2sComplement").
It provides an implementation (in C) for type "float", which should be adapted to take 2 "double"s instead.

Gilles



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Luc Maisonobe added a comment - 29/Apr/09 06:35 PM
fixed in subversion as of r769867
thanks to Gilles for directly providing the patch

Luc Maisonobe added a comment - 07/Aug/09 09:13 AM
closing resolved issue for 2.0 release