From 04be8e84db1cf4f8b2a7bc7679eda4336da75d43 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 27 Aug 2021 10:52:02 +0900 Subject: Use C99-defined macros to classify a floating-point number --- random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'random.c') diff --git a/random.c b/random.c index 5663f87be2..232fe3e6f5 100644 --- a/random.c +++ b/random.c @@ -1348,7 +1348,7 @@ static inline double float_value(VALUE v) { double x = RFLOAT_VALUE(v); - if (isinf(x) || isnan(x)) { + if (!isfinite(x)) { domain_error(); } return x; -- cgit v1.2.1