[Issue 794] std.math.exp2(0) equals 0 instead of 1

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 5 04:38:07 PST 2007


http://d.puremagic.com/issues/show_bug.cgi?id=794





------- Comment #1 from lio at lunesu.com  2007-01-05 06:38 -------
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.


-- 



More information about the Digitalmars-d-bugs mailing list