mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 22:21:09 +03:00
Add regression test for #10491
This commit is contained in:
parent
63ce5c37c0
commit
da127b18b8
1 changed files with 9 additions and 0 deletions
|
@ -420,6 +420,15 @@ if (isFloatingPoint!T)
|
||||||
assert(hypot(double.infinity, double.nan) == double.infinity);
|
assert(hypot(double.infinity, double.nan) == double.infinity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://github.com/dlang/phobos/issues/10491
|
||||||
|
@safe pure nothrow unittest
|
||||||
|
{
|
||||||
|
import std.math : isClose;
|
||||||
|
|
||||||
|
enum small = 5.016556e-20f;
|
||||||
|
assert(hypot(small, 0).isClose(small));
|
||||||
|
}
|
||||||
|
|
||||||
@safe unittest
|
@safe unittest
|
||||||
{
|
{
|
||||||
import std.math.operations : feqrel;
|
import std.math.operations : feqrel;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue