Yukihiro "Matz" Matsumoto
73a012c808
Merge pull request #2561 from cubicdaiya/issues/space_EOL
...
Remove spaces in end-of-line.
2014-08-26 02:25:05 +09:00
Tatsuhiko Kubo
0e9f98c430
Fix Numeric#pow behavior.
...
* Before
2 ** -1 #=> 0
* After
2 ** -1 #=> 0.5
2014-08-25 17:17:37 +09:00
Tatsuhiko Kubo
6961317fb3
Remove spaces in end-of-line.
2014-08-25 16:49:15 +09:00
Yukihiro "Matz" Matsumoto
6496195d21
Merge pull request #2533 from suzukaze/fix-indents
...
Fix indents in numeric.c
2014-08-15 22:59:18 +09:00
Jun Hiroe
2ba257ccb4
Fix indents in numeric.c
2014-08-15 20:51:43 +09:00
Jun Hiroe
9b176207a4
Refactor flo_mod func in numeric.c
2014-08-15 20:50:20 +09:00
chasonr
f7389bb1e6
Remove some roundoff from mrb_flo_to_str
2014-08-13 23:31:22 -04:00
Yukihiro "Matz" Matsumoto
170ba511f2
remove unnecessary mrb_float casting; ref #2531
2014-08-13 21:58:52 +09:00
kkkkkt
a9b37bff4b
refactor mrb_hash_shift, num_pow, flo_eq, flo_finite_p method
2014-08-13 18:26:58 +09:00
Yukihiro "Matz" Matsumoto
206f89e209
add MRB_API modifiers to mruby API functions
2014-08-04 00:47:08 +09:00
Yukihiro "Matz" Matsumoto
61ce5892cc
remove spaces after open parens
2014-07-12 20:36:45 +09:00
David Turnbull
249f05e7d7
Clean up value.h and mrb_value boxing
2014-07-09 06:32:11 +09:00
take_cheeze
a50464fe01
Fix type checking in mrb_flo_to_fixnum.
2014-07-04 16:16:06 +09:00
yui-knk
76593ee0e7
Add comment to Fixnum Class.
2014-05-17 13:51:16 +09:00
Carson McDonald
01988e3be7
Make sure c is large enough if there is an overflow
2014-05-13 11:46:29 -04:00
Yukihiro "Matz" Matsumoto
c12f64271a
fix overflow error like #2244 on MRB_WORD_BOXING
2014-05-13 23:15:44 +09:00
Akira Kuroda
c445c6c7da
refactor fix_mod
...
fix unreachable condition
use b
2014-05-05 23:43:37 +09:00
cremno
cf8df563c0
add function for checked mrb_int subtraction
2014-05-05 15:28:26 +02:00
cremno
0f39304265
add function for checked mrb_int addition
2014-05-05 15:24:22 +02:00
cremno
86cfcd20d6
simply use isfinite
2014-05-04 01:50:17 +02:00
Jun Hiroe
129e5a6c21
Refactor rshift
2014-05-03 01:13:43 +09:00
Nobuyoshi Nakada
ab67c57f65
remove trailing spaces
2014-04-30 09:50:14 +09:00
Jun Hiroe
68ce209f7e
Refactor fix_xor()
2014-04-26 11:52:45 +09:00
Jun Hiroe
8916381dba
Refactor fix_or()
2014-04-26 11:52:45 +09:00
Jun Hiroe
c2d46a43b2
Refactor fix_and()
2014-04-26 11:52:45 +09:00
Jun Hiroe
1bf4633ced
Refactor flo_finite_p()
2014-04-26 11:52:45 +09:00
Jun Hiroe
cdb49ab608
Refactor fix_to_f in numeric.c
2014-04-16 13:42:40 +09:00
Jun Hiroe
212b3409ae
Refactor lshift in numeric.c
2014-04-16 13:42:40 +09:00
Jun Hiroe
0823b23623
Refactor fix_shift_get_width in numeric.c
2014-04-16 13:42:40 +09:00
Yukihiro "Matz" Matsumoto
5138f62d6b
resolve conflict
2014-04-15 10:55:46 +09:00
Yukihiro "Matz" Matsumoto
6c02935eb1
Merge branch 'master' of github.com:mruby/mruby
2014-04-13 17:34:27 +09:00
Yukihiro "Matz" Matsumoto
b631e0f8d5
avoid function style parens after "return"; ref #2055
2014-04-13 17:34:06 +09:00
Jun Hiroe
70e93da724
Fix indent in bit_coerce
2014-04-13 03:11:58 +09:00
Jun Hiroe
996343caa2
Refactor fix_rshift
2014-04-13 00:41:22 +09:00
Jun Hiroe
f8e1633c0d
Refactor fix_lshift
2014-04-13 00:37:55 +09:00
Jun Hiroe
8496f84b9b
Refactor fix_rev
2014-04-12 23:45:22 +09:00
Yukihiro "Matz" Matsumoto
bff93ba93f
simplify Fixnum#==
2014-04-12 16:38:28 +09:00
Yukihiro "Matz" Matsumoto
1ef77ab3ff
simplify Numeric#eql?
2014-04-12 16:30:45 +09:00
Yukihiro "Matz" Matsumoto
8321ad3f56
remove num_equal() that potentially cause infinite loop
2014-04-12 16:08:47 +09:00
Yukihiro "Matz" Matsumoto
b20d711c4d
Numeric#round takes optinal argument; close #2042
2014-04-11 14:22:48 +09:00
Yukihiro "Matz" Matsumoto
514cafe6c3
do not use "to_f" to retrieve floats in mrb_get_args(); close #1965
2014-03-28 11:04:15 +09:00
ksss
8891cea41c
Float#round fix bug for infinity and nan cases
2014-03-21 22:24:33 +09:00
Masaki Muranaka
1df355e300
Reduce implicit type casts.
2014-03-18 17:36:47 +09:00
Yukihiro "Matz" Matsumoto
e4ae3bf661
Merge pull request #1871 from ksss/numeric-plus
...
fix bug when `0 + other object`
2014-03-17 00:14:42 +09:00
Yukihiro "Matz" Matsumoto
5140e27b5a
Merge pull request #1872 from ksss/numeric-mul
...
fix bug when `0 * other object`
2014-03-17 00:14:16 +09:00
ksss
0fab9d557e
float + nil should be raise TypeError
2014-03-16 23:39:58 +09:00
ksss
9dcce29749
fix bug when 0 * other object
2014-03-16 23:08:31 +09:00
ksss
e9f3dca0f4
fix bug when 0 + other object
2014-03-16 22:52:25 +09:00
cremno
1b6a4fb5a2
add MRB_INT_BIT
2014-03-11 20:14:18 +01:00
cremno
f57b9d1576
use NAN and INFINITY
...
The macro str_to_mrb_float (strto[df]) converts a string to a number,
but these two macros can be used to directly get the special value.
The NAN macro requires quiet NaN support, but so does str_to_mrb_float.
This change also circumvents missing C99 support in Microsoft's C library.
Its (or ISO C90's) strtod doesn't parse "nan" or "inf".
2014-03-08 17:25:07 +01:00