mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
modify mrb_to_str() in order to display big float number
This commit is contained in:
+2
-1
@@ -187,7 +187,8 @@ mrb_flo_to_str(mrb_state *mrb, mrb_value flo, int max_digit)
|
||||
}
|
||||
|
||||
if (exp >= 100) {
|
||||
mrb_raise(mrb, E_RANGE_ERROR, "Too large exponent.");
|
||||
*(c++) = '0' + exp / 100;
|
||||
exp -= exp / 100 * 100;
|
||||
}
|
||||
|
||||
*(c++) = '0' + exp / 10;
|
||||
|
||||
Reference in New Issue
Block a user