Commit 23e88dba authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #427 from Constellation/canonicalize-nan-value

Canonicalize NaN value in NaN boxing environment
parents 2900b01a fe9939f7
...@@ -134,7 +134,12 @@ mrb_float_value(mrb_float f) ...@@ -134,7 +134,12 @@ mrb_float_value(mrb_float f)
{ {
mrb_value v; mrb_value v;
if (f != f) {
v.ttt = 0x7ff80000;
v.value.i = 0;
} else {
v.f = f; v.f = f;
}
return v; return v;
} }
#endif /* MRB_NAN_BOXING */ #endif /* MRB_NAN_BOXING */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment