mirror of
https://github.com/dlang/phobos.git
synced 2025-05-13 07:39:15 +03:00
Merge pull request #1725 from yebblies/nceg
Remove uses of nceg operators from std.math
This commit is contained in:
commit
90e7c103a6
1 changed files with 3 additions and 3 deletions
|
@ -655,7 +655,7 @@ unittest
|
||||||
r = -r;
|
r = -r;
|
||||||
t = tan(x);
|
t = tan(x);
|
||||||
//printf("tan(%Lg) = %Lg, should be %Lg\n", x, t, r);
|
//printf("tan(%Lg) = %Lg, should be %Lg\n", x, t, r);
|
||||||
if (!isIdentical(r, t) && !(r!<>=0 && t!<>=0)) assert(fabs(r-t) <= .0000001);
|
if (!isIdentical(r, t) && !(r!=r && t!=t)) assert(fabs(r-t) <= .0000001);
|
||||||
}
|
}
|
||||||
// overflow
|
// overflow
|
||||||
assert(isNaN(tan(real.infinity)));
|
assert(isNaN(tan(real.infinity)));
|
||||||
|
@ -2895,7 +2895,7 @@ real hypot(real x, real y) @safe pure nothrow
|
||||||
|
|
||||||
real u = fabs(x);
|
real u = fabs(x);
|
||||||
real v = fabs(y);
|
real v = fabs(y);
|
||||||
if (u !>= v) // check for NaN as well.
|
if (!(u >= v)) // check for NaN as well.
|
||||||
{
|
{
|
||||||
v = u;
|
v = u;
|
||||||
u = fabs(y);
|
u = fabs(y);
|
||||||
|
@ -5352,7 +5352,7 @@ in
|
||||||
{
|
{
|
||||||
// both x and y must have the same sign, and must not be NaN.
|
// both x and y must have the same sign, and must not be NaN.
|
||||||
assert(signbit(x) == signbit(y));
|
assert(signbit(x) == signbit(y));
|
||||||
assert(x<>=0 && y<>=0);
|
assert(x==x && y==y);
|
||||||
}
|
}
|
||||||
body
|
body
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue