diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-12-15 22:30:38 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-12-15 22:30:38 +0900 |
| commit | 2f177dcd7232f8b8d1d1dd2c4ed3d71583139afe (patch) | |
| tree | 5161a88ea84758ea3dca9b5271745207964015e0 /mrbgems/mruby-rational | |
| parent | e9fe337b952731226449027a4c34471af27b23e6 (diff) | |
| parent | 4fa3359d44471cf301fe6755dd281a87304d5d01 (diff) | |
| download | mruby-2f177dcd7232f8b8d1d1dd2c4ed3d71583139afe.tar.gz mruby-2f177dcd7232f8b8d1d1dd2c4ed3d71583139afe.zip | |
Merge pull request #5222 from jbampton/remove-trailing-whitespace
refactor: remove trailing whitespace from C, Header, Ruby and YAML files
Diffstat (limited to 'mrbgems/mruby-rational')
| -rw-r--r-- | mrbgems/mruby-rational/src/rational.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mrbgems/mruby-rational/src/rational.c b/mrbgems/mruby-rational/src/rational.c index 23d70fc04..6d94cb21f 100644 --- a/mrbgems/mruby-rational/src/rational.c +++ b/mrbgems/mruby-rational/src/rational.c @@ -96,7 +96,7 @@ rational_new(mrb_state *mrb, mrb_int numerator, mrb_int denominator) * md: max denominator value. Note that machine floating point number * has a finite resolution (10e-16 ish for 64 bit double), so specifying * a "best match with minimal error" is often wrong, because one can - * always just retrieve the significand and return that divided by + * always just retrieve the significand and return that divided by * 2**52, which is in a sense accurate, but generally not very useful: * 1.0/7.0 would be "2573485501354569/18014398509481984", for example. */ @@ -122,7 +122,7 @@ rational_new_f(mrb_state *mrb, mrb_float f0) mrb_raise(mrb, E_RANGE_ERROR, "integer overflow in rational"); } d = (mrb_int)f; - + /* continued fraction and check denominator each step */ for (i = 0; i < 64; i++) { a = (mrb_int)(n ? d / n : 0); |
