D issues are now
tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Summary: |
std.math.exp2(0) equals 0 instead of 1 |
Product: |
D
|
Reporter: |
Robert |
Component: |
phobos | Assignee: |
Walter Bright <bugzilla> |
Status: |
RESOLVED
FIXED
|
Severity: |
major
|
Priority: |
P2
|
Version: |
D1 (retired) |
Hardware: |
x86 |
OS: |
Windows |
Comment 1
Lionello Lunesu
2007年01月05日 06:38:05 UTC
Must be something wrong with the C run-time:
import std.c.math, std.stdio;
void main()
{
writefln( std.c.math.exp2f(0.0f) );
writefln( std.c.math.exp2(0.0) );
writefln( std.c.math.exp2l(0.0) );
}
These all print 0; when passing 0.00000000001 they'll correctly print 1.
Comment 2
Walter Bright
2007年02月12日 03:36:58 UTC
Fixed DMD 1.005