mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
canonicalize NaN value in NaN boxing environment
This commit is contained in:
@@ -134,7 +134,12 @@ mrb_float_value(mrb_float f)
|
||||
{
|
||||
mrb_value v;
|
||||
|
||||
v.f = f;
|
||||
if (f != f) {
|
||||
v.ttt = 0x7ff80000;
|
||||
v.value.i = 0;
|
||||
} else {
|
||||
v.f = f;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
#endif /* MRB_NAN_BOXING */
|
||||
|
||||
Reference in New Issue
Block a user