Use C99-defined macros to classify a floating-point number

This commit is contained in:
Nobuyoshi Nakada 2021-08-27 10:52:02 +09:00
parent 3711467362
commit 04be8e84db
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
Notes: git 2021-08-27 15:41:07 +09:00
15 changed files with 11 additions and 205 deletions

View file

@ -875,7 +875,7 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
double fval;
fval = RFLOAT_VALUE(rb_Float(val));
if (isnan(fval) || isinf(fval)) {
if (!isfinite(fval)) {
const char *expr;
int need;
int elen;