mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Use C99-defined macros to classify a floating-point number
This commit is contained in:
parent
3711467362
commit
04be8e84db
Notes:
git
2021-08-27 15:41:07 +09:00
15 changed files with 11 additions and 205 deletions
2
random.c
2
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue