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

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
phobos
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2007-01-04T15:15:00Z
Last change time
2014-02-15T13:12:58Z
Assigned to
bugzilla
Creator
Robert

Comments

Comment #0 by Robert — 2007-01-04T15:15:12Z
Comment #1 by lio+bugzilla — 2007-01-05T06:38:05Z
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 by bugzilla — 2007-02-12T03:36:58Z
Fixed DMD 1.005