Commit 41a77111 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #1710 from takkaw/flo_to_str

modify mrb_to_str() in order to display big float number
parents e29efb02 0a48fb04
...@@ -187,7 +187,8 @@ mrb_flo_to_str(mrb_state *mrb, mrb_value flo, int max_digit) ...@@ -187,7 +187,8 @@ mrb_flo_to_str(mrb_state *mrb, mrb_value flo, int max_digit)
} }
if (exp >= 100) { if (exp >= 100) {
mrb_raise(mrb, E_RANGE_ERROR, "Too large exponent."); *(c++) = '0' + exp / 100;
exp -= exp / 100 * 100;
} }
*(c++) = '0' + exp / 10; *(c++) = '0' + exp / 10;
......
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