hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit d94f355481a320fb2aec13ef62cb3bfe2416f5e4
parent 141cf68540cd77db87475942c5d979e07a97d00a
Author: Sebastian <sebastian@sebsite.pw>
Date:   Mon, 27 Nov 2023 01:19:10 -0500

math::complex: clarify isnan behavior

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mmath/complex/complex.ha | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/math/complex/complex.ha b/math/complex/complex.ha @@ -164,7 +164,8 @@ export fn expc128(z: c128) c128 = { // Returns true if the given complex number is infinite. export fn isinf(z: c128) bool = math::isinf(z.0) || math::isinf(z.1); -// Returns true if the given complex number is NaN. +// Returns true if the given complex number is NaN -- that is -- either +// component is NaN and neither component is an infinity. export fn isnan(z: c128) bool = !isinf(z) && (math::isnan(z.0) || math::isnan(z.1));