diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-02-16 01:33:43 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-02-16 01:33:43 +0900 |
| commit | 41a77111eaeb1265114e47019ce85c98fe12627e (patch) | |
| tree | 63e66ef2c3f0adbed2a5d89798547e0dfe888950 | |
| parent | e29efb02bdaa47384eabd44031fac5ffd8ce30e0 (diff) | |
| parent | 0a48fb0407065d8ac47e7a97da1f6cce160d7c8d (diff) | |
| download | mruby-41a77111eaeb1265114e47019ce85c98fe12627e.tar.gz mruby-41a77111eaeb1265114e47019ce85c98fe12627e.zip | |
Merge pull request #1710 from takkaw/flo_to_str
modify mrb_to_str() in order to display big float number
| -rw-r--r-- | src/numeric.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/numeric.c b/src/numeric.c index 462faf686..29241d813 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -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; |
