794 – std.math.exp2(0) equals 0 instead of 1

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 794 - std.math.exp2(0) equals 0 instead of 1
Summary: std.math.exp2(0) equals 0 instead of 1
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D1 (retired)
Hardware: x86 Windows
: P2 major
Assignee: Walter Bright
URL:
Keywords:
Depends on:
Blocks:
Reported: 2007年01月04日 15:15 UTC by Robert
Modified: 2014年02月15日 13:12 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Robert 2007年01月04日 15:15:12 UTC
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


AltStyle によって変換されたページ (->オリジナル) /