DMD 1.031 (two missing functions in std.math)

David L. Davis SpottedTiger at yahoo.com
Fri Jun 20 11:06:41 PDT 2008


Walter Bright Wrote:

> Some new stuff to make writing templates easier.
> 
> http://www.digitalmars.com/d/1.0/changelog.html
> http://ftp.digitalmars.com/dmd.1.031.zip
> 
> http://www.digitalmars.com/d/2.0/changelog.html
> http://ftp.digitalmars.com/dmd.2.015.zip

Walter thanks for the updates!

In testing my D v1.0 project source code, I found that two functions were removed between v1.028 and the v1.029 releases, the bool isPosZero(real) and bool isNegZero(real) functions that were in std.math. Since D v1.0 shouldn't be changing much, and just mainly bug fixes for the most part, I normally wait a few releases before testing my code against them. Thus looking at std.math I see a lot of nice improvements, but feel the non-private labeled functions should remain in now that D v1.0 as been reached.

A two simple wrapper functions should be put back in so existing D v1.0 code doesn't break...in this case of course I could simply add in replacement functions for these in my own code. But the point being that functions should not be removed at this point.

I think the following code could replace these two functions using the new changes found in std.math:

bool isPosZero(real x)
{ return isIdentical(x, 0.0); }

bool isNegZero(real x)
{ return isIdentical(x, -0.0); }

Thanks, keep up the good work!
David L. Davis



More information about the Digitalmars-d-announce mailing list