← Back to index
|
Original Bugzilla link
Bug 2944 – std.math.approxEqual doesn't work with infinity.
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2009-05-05T18:43:00Z
Last change time
2015-06-09T01:26:25Z
Assigned to
andrei
Creator
dsimcha
Comments
Comment #0
by dsimcha — 2009-05-05T18:43:19Z
import std.math; void main() { real num = real.infinity; assert(num == real.infinity); // Passes. assert(approxEqual(num, real.infinity)); // Fails. }
Comment #1
by andrei — 2010-09-26T15:46:14Z
http://www.dsource.org/projects/phobos/changeset/2063
Comment #2
by yebblies — 2010-10-20T00:46:06Z
The current changes still miss the -infinity case. Reopening so it doesn't get forgotten.
Comment #3
by andrei — 2011-01-09T08:41:57Z
Fixed a while ago, added a unittest with
http://www.dsource.org/projects/phobos/changeset/2289.