DMD 1.031 (two missing functions in std.math)
David L. Davis
SpottedTiger at yahoo.com
Mon Jun 23 07:09:26 PDT 2008
Don Wrote:
> David L. Davis wrote:
> > 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
> >
>
> isPosZero() and isNegZero() were private, and used only for internal
> unit tests. (If they were exposed, it was a bug).
> Your code above is correct, though.
Hi Don,
Got it! Thanks for your reply...I'll add the two now missing/modified functions into my existing code. Leave it to me to find public scoped privates to use in my code. :P But you're right, the comments beside the function names did state that they were used only for unit-tests. So with that thought, they were clearly meant to be privates based on the comments alone.
Please keep on the good work on std.math!!
David L. Davis
More information about the Digitalmars-d-announce
mailing list