@@ -794,7 +794,7 @@ float cos(float x) @safe pure nothrow @nogc { return cos(cast(real) x); }
794
794
// /
795
795
@safe unittest
796
796
{
797
- assert (cos(0.0 ).approxEqual( 1.0 ) );
797
+ assert (cos(0.0 ) == 1.0 );
798
798
assert (cos(1.0 ).approxEqual(0.540 ));
799
799
assert (cos(3.0 ).approxEqual(- 0.989 ));
800
800
}
@@ -1169,7 +1169,7 @@ Lret: {}
1169
1169
// /
1170
1170
@safe unittest
1171
1171
{
1172
- assert (tan(0.0 ).approxEqual( 0 ));
1172
+ assert (isIdentical( tan(0.0 ), 0. 0 ));
1173
1173
assert (tan(PI ).approxEqual(0 ));
1174
1174
assert (tan(PI / 3 ).approxEqual(sqrt(3.0 )));
1175
1175
}
@@ -1239,7 +1239,7 @@ float asin(float x) @safe pure nothrow @nogc { return asin(cast(real) x); }
1239
1239
// /
1240
1240
@safe unittest
1241
1241
{
1242
- assert (asin(0.0 ).approxEqual( 0.0 ));
1242
+ assert (isIdentical( asin(0.0 ), 0.0 ));
1243
1243
assert (asin(0.5 ).approxEqual(PI / 6 ));
1244
1244
assert (asin(PI ).isNaN);
1245
1245
}
@@ -1363,7 +1363,7 @@ float atan(float x) @safe pure nothrow @nogc { return atan(cast(real) x); }
1363
1363
// /
1364
1364
@safe unittest
1365
1365
{
1366
- assert (atan(0.0 ).approxEqual( 0.0 ));
1366
+ assert (isIdentical( atan(0.0 ), 0.0 ));
1367
1367
assert (atan(sqrt(3.0 )).approxEqual(PI / 3 ));
1368
1368
}
1369
1369
@@ -1516,7 +1516,7 @@ float cosh(float x) @safe pure nothrow @nogc { return cosh(cast(real) x); }
1516
1516
// /
1517
1517
@safe unittest
1518
1518
{
1519
- assert (cosh(0.0 ).approxEqual( 1.0 ) );
1519
+ assert (cosh(0.0 ) == 1.0 );
1520
1520
assert (cosh(1.0 ).approxEqual((E + 1.0 / E) / 2 ));
1521
1521
}
1522
1522
@@ -1558,7 +1558,7 @@ float sinh(float x) @safe pure nothrow @nogc { return sinh(cast(real) x); }
1558
1558
// /
1559
1559
@safe unittest
1560
1560
{
1561
- assert (sinh(0.0 ).approxEqual( 0.0 ));
1561
+ assert (isIdentical( sinh(0.0 ), 0.0 ));
1562
1562
assert (sinh(1.0 ).approxEqual((E - 1.0 / E) / 2 ));
1563
1563
}
1564
1564
@@ -1597,7 +1597,7 @@ float tanh(float x) @safe pure nothrow @nogc { return tanh(cast(real) x); }
1597
1597
// /
1598
1598
@safe unittest
1599
1599
{
1600
- assert (tanh(0.0 ).approxEqual( 0.0 ));
1600
+ assert (isIdentical( tanh(0.0 ), 0.0 ));
1601
1601
assert (tanh(1.0 ).approxEqual(sinh(1.0 ) / cosh(1.0 )));
1602
1602
}
1603
1603
@@ -1674,7 +1674,7 @@ float acosh(float x) @safe pure nothrow @nogc { return acosh(cast(real) x); }
1674
1674
{
1675
1675
assert (isNaN(acosh(0.9 )));
1676
1676
assert (isNaN(acosh(real .nan)));
1677
- assert (acosh(1.0 ) == 0.0 );
1677
+ assert (isIdentical( acosh(1.0 ), 0.0 ) );
1678
1678
assert (acosh(real .infinity) == real .infinity);
1679
1679
assert (isNaN(acosh(0.5 )));
1680
1680
}
@@ -2062,7 +2062,7 @@ float exp(float x) @safe pure nothrow @nogc { return exp(cast(real) x); }
2062
2062
// /
2063
2063
@safe unittest
2064
2064
{
2065
- assert (exp(0.0 ).feqrel( 1.0 ) > 16 );
2065
+ assert (exp(0.0 ) == 1.0 );
2066
2066
assert (exp(3.0 ).feqrel(E * E * E) > 16 );
2067
2067
}
2068
2068
@@ -2339,7 +2339,7 @@ L_largenegative:
2339
2339
// /
2340
2340
@safe unittest
2341
2341
{
2342
- assert (expm1(0.0 ).feqrel( 0 ) > 16 );
2342
+ assert (isIdentical( expm1(0.0 ), 0.0 ) );
2343
2343
assert (expm1(1.0 ).feqrel(1.71828 ) > 16 );
2344
2344
assert (expm1(2.0 ).feqrel(6.3890 ) > 16 );
2345
2345
}
@@ -2373,7 +2373,7 @@ real exp2(real x) @nogc @trusted pure nothrow
2373
2373
// /
2374
2374
@safe unittest
2375
2375
{
2376
- assert (exp2(0.0 ).feqrel( 1.0 ) > 16 );
2376
+ assert (isIdentical( exp2(0.0 ), 1.0 ));
2377
2377
assert (exp2(2.0 ).feqrel(4.0 ) > 16 );
2378
2378
assert (exp2(8.0 ).feqrel(256.0 ) > 16 );
2379
2379
}
@@ -3809,7 +3809,7 @@ real log1p(real x) @safe pure nothrow @nogc
3809
3809
// /
3810
3810
@safe pure unittest
3811
3811
{
3812
- assert (log1p(0.0 ).feqrel( 0.0 ) > 16 );
3812
+ assert (isIdentical( log1p(0.0 ), 0.0 ));
3813
3813
assert (log1p(1.0 ).feqrel(0.69314 ) > 16 );
3814
3814
3815
3815
assert (log1p(- 1.0 ) == - real .infinity);
@@ -3957,8 +3957,8 @@ real logb(real x) @trusted nothrow @nogc
3957
3957
// /
3958
3958
@safe @nogc nothrow unittest
3959
3959
{
3960
- assert (logb(1.0 ).feqrel( 0.0 ) > 16 );
3961
- assert (logb(100.0 ).feqrel( 6.0 ) > 16 );
3960
+ assert (logb(1.0 ) == 0 );
3961
+ assert (logb(100.0 ) == 6 );
3962
3962
3963
3963
assert (logb(0.0 ) == - real .infinity);
3964
3964
assert (logb(real .infinity) == real .infinity);
@@ -3992,7 +3992,7 @@ real fmod(real x, real y) @trusted nothrow @nogc
3992
3992
// /
3993
3993
@safe unittest
3994
3994
{
3995
- assert (fmod(0.0 , 1.0 ).feqrel( 0.0 ) > 16 );
3995
+ assert (isIdentical( fmod(0.0 , 1.0 ), 0.0 ));
3996
3996
assert (fmod(5.0 , 3.0 ).feqrel(2.0 ) > 16 );
3997
3997
assert (isNaN(fmod(5.0 , 0.0 )));
3998
3998
}
@@ -4132,8 +4132,8 @@ float fabs(float x) @safe pure nothrow @nogc { return fabs(cast(real) x); }
4132
4132
// /
4133
4133
@safe unittest
4134
4134
{
4135
- assert (fabs(0.0 ) == 0.0 );
4136
- assert (fabs(- 0.0 ) == 0.0 );
4135
+ assert (isIdentical( fabs(0.0 ), 0.0 ) );
4136
+ assert (isIdentical( fabs(- 0.0 ), 0.0 ) );
4137
4137
assert (fabs(- 10.0 ) == 10.0 );
4138
4138
}
4139
4139
0 commit comments