From da127b18b8345e53a7deae7a690fe94feefbbf91 Mon Sep 17 00:00:00 2001 From: Inkrementator <70717315+Inkrementator@users.noreply.github.com> Date: Mon, 17 Mar 2025 21:50:30 +0100 Subject: [PATCH] Add regression test for #10491 --- std/math/algebraic.d | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/std/math/algebraic.d b/std/math/algebraic.d index a331668a9..1b9e15b1f 100644 --- a/std/math/algebraic.d +++ b/std/math/algebraic.d @@ -420,6 +420,15 @@ if (isFloatingPoint!T) 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 { import std.math.operations : feqrel;