| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2019-11-11 | Fix argument specs to `Integer` | KOBAYASHI Shuji | |
| 2019-09-26 | Use type predicate macros instead of `mrb_type` if possible | KOBAYASHI Shuji | |
| For efficiency with `MRB_WORD_BOXING` (implement type predicate macros for all `enum mrb_vtype`). | |||
| 2019-09-18 | Remove `mrb_get_args(mrb, "")`; ref 30f37872 | KOBAYASHI Shuji | |
| 2019-09-17 | Fix `Fixnum#(to_s|inspect)` argument specs | KOBAYASHI Shuji | |
| Before this patch: $ bin/mruby -e 'p 3.to_s(2)' trace (most recent call last): [0] -e:1 -e:1: 'to_s': wrong number of arguments (1 for 0) (ArgumentError) After this patch: $ bin/mruby -e 'p 3.to_s(2)' "11" | |||
| 2019-09-14 | Remove `mrb_funcall` from `<=>` operations. | Yukihiro "Matz" Matsumoto | |
| 2019-09-07 | Revert part of #4225 | Yukihiro "Matz" Matsumoto | |
| Since in mruby, Integer and Float interchange frequently (mostly on overflow), so adding explicit `.0` can cause problems sometimes. For example: https://github.com/mattn/mruby-json/pull/40 https://github.com/pepabo/mruby-msd/pull/13 https://github.com/mattn/mruby-json/pull/42 | |||
| 2019-08-06 | Add `mrb_noreturn` to `cmperr()` in `src/numeric.c` | KOBAYASHI Shuji | |
| 2019-08-05 | Use new specifiers/modifiers of `mrb_vfromat()` | KOBAYASHI Shuji | |
| The binary sizes (gems are only `mruby-bin-mruby`) are reduced slightly in my environment than before the introduction of new specifiers/modifiers (5116789a) with this change. ------------+-------------------+-------------------+-------- BINARY | BEFORE (5116789a) | AFTER (This PR) | RATIO ------------+-------------------+-------------------+-------- mruby | 593416 bytes | 593208 bytes | -0.04% libmruby.a | 769048 bytes | 767264 bytes | -0.23% ------------+-------------------+-------------------+-------- BTW, I accidentally changed `tasks/toolchains/visualcpp.rake` at #4613, so I put it back. | |||
| 2019-07-31 | Avoid `MRB_INT_MIN` to apply `fixdivmod`. | Yukihiro "Matz" Matsumoto | |
| `MRB_INT_MIN` is the only integer value that has no corresponding positive integer value (i.e. `-MRB_INT_MIN` = `MRB_INT_MIN`). | |||
| 2019-07-31 | Normalize floating point negative zero to positive zero in `flodivmod'. | Yukihiro "Matz" Matsumoto | |
| 2019-07-31 | Should return +/- infinity for float division by zero. | Yukihiro "Matz" Matsumoto | |
| 2019-07-31 | Use `NULL` instead of `0` for null pointers. | Yukihiro "Matz" Matsumoto | |
| 2019-07-30 | Fixed integer overflow in `lshift`. | Yukihiro "Matz" Matsumoto | |
| 2019-07-22 | No rounding needed if 'ndigits` is bigger than `DBL_DIG+2`; fix #4566 | Yukihiro "Matz" Matsumoto | |
| 2019-07-13 | Avoid `mrb_funcall()` if possible using `mrb_Float()`; ref #4555 | Yukihiro "Matz" Matsumoto | |
| 2019-05-30 | Fix inverted compilation condition; fix #4478 | Yukihiro "Matz" Matsumoto | |
| 2019-05-21 | Update ISO section number for some Numeric methods. | Yukihiro "Matz" Matsumoto | |
| 2019-05-21 | Export `mrb_int_value` that converts `mrb_float` to `Fixnum`. | Yukihiro "Matz" Matsumoto | |
| Or `Float` if `mrb_float` value is too big (or too small) to fit in `mrb_int`. The `_int_` in `mrb_int_value` means `Integral` module, which represents integer-like values in mruby. | |||
| 2019-05-21 | Silence the return value warnings from gcc; ref 237a57b | Yukihiro "Matz" Matsumoto | |
| 2019-05-21 | Move `**`,`/`,`quo`,`div` and comparison methods to Integral from Numeric | KOBAYASHI Shuji | |
| Having these methods in Numeric can get in the way of creating subclasses of Numeric because they only support Fixnum and Float. | |||
| 2019-05-20 | Add new functions for numerical operation; ref 237a57b | Yukihiro "Matz" Matsumoto | |
| New functions: * mrb_num_plus(mrb, x, y) * mrb_num_minus(mrb, x, y) * num_num_mul(mrb, x, y) | |||
| 2019-05-18 | Move `Numeric#__coerce_step_counter` to `Integral` | KOBAYASHI Shuji | |
| This method is only used in `Integral#step` | |||
| 2019-05-17 | Make unused functions private. | Yukihiro "Matz" Matsumoto | |
| * mrb_fixnum_plus() * mrb_fixnum_minus() * mrb_fixnum_mul() | |||
| 2019-05-17 | Remove unused `mrb_num_div()` function. | Yukihiro "Matz" Matsumoto | |
| 2019-05-17 | Move `Numeric#div` to the core. | Yukihiro "Matz" Matsumoto | |
| 2019-05-17 | Make `flo_rount` to return `Integeral`. | Yukihiro "Matz" Matsumoto | |
| 2019-05-17 | Change the `num.divmod(float)` to return `[int,num]`. | Yukihiro "Matz" Matsumoto | |
| 2019-05-17 | Add a new function `mrb_int_value`. | Yukihiro "Matz" Matsumoto | |
| This function returns `Fixnum` if the value fits in `mrb_int`, otherwise it returns `Float` value (mruby behavior of handling integers). | |||
| 2019-05-17 | Use `int64_t` instead of `mrb_int` in `int64_value`. | Yukihiro "Matz" Matsumoto | |
| 2019-05-16 | Terminate float right shift if shift value is too big. | Yukihiro "Matz" Matsumoto | |
| 2019-05-02 | Unify overflow error class for conversion to integer to `RangeError` | KOBAYASHI Shuji | |
| 2019-04-15 | Fixed wrong function names; fix #4380 | Yukihiro "Matz" Matsumoto | |
| 2019-04-08 | Fix C99 style inline declaration; fix #4365 | Yukihiro "Matz" Matsumoto | |
| 2019-03-21 | Fix `Float#eql?` | KOBAYASHI Shuji | |
| 2019-01-16 | Avoid runtime evaluation for `MRB_WITHOUT_FLOAT` | KOBAYASHI Shuji | |
| 2019-01-13 | Improve compatibility to CRuby for `Float#to_s` | KOBAYASHI Shuji | |
| Bfore: Float::INFINITY.to_s #=> "inf" 50.0.to_s #=> "50" 1e20.to_s #=> "1e+20" After / CRuby: Float::INFINITY.to_s #=> "Infinity" 50.0.to_s #=> "50.0" 1e20.to_s #=> "1.0e+20" | |||
| 2019-01-10 | Remove duplicate code in numeric.c | KOBAYASHI Shuji | |
| 2019-01-04 | Integrate mrblib/float.rb into src/numeric.c | KOBAYASHI Shuji | |
| - Avoid hack for `MRB_WITHOUT_FLOAT` in build scripts - Avoid runtime dispatch for `MRB_WITHOUT_FLOAT` | |||
| 2018-12-17 | Recover `#to_int`; ref #4177 | Yukihiro "Matz" Matsumoto | |
| We have removed implicit conversion to strings using `to_int`. But some users still using `to_int` as a typical integer method, i.e. they do string check by code like: `obj.respond_to?(:to_int)`. So we have recovered the method. | |||
| 2018-11-19 | Remove implicit conversion using `to_int` method. | Yukihiro "Matz" Matsumoto | |
| The ISO standard does not include implicit type conversion using `to_int`. This implicit conversion often causes vulnerability. There will be no more attacks like #4120. In addition, we have added internal convenience method `__to_int` which does type check and conversion (from floats). | |||
| 2018-09-07 | Clear terminated space | dearblue | |
| 2018-08-06 | Small refactoring of `flodivmod()`. | Yukihiro "Matz" Matsumoto | |
| 2018-05-01 | Update `MRB_FLO_TO_STR_FMT` to "%.16g"; fix #4016 | Yukihiro "Matz" Matsumoto | |
| 2017-11-22 | Provide shortcut comparison methods for numbers for performance. | Yukihiro "Matz" Matsumoto | |
| 2017-11-04 | Merge branch 'master' of github.com:mruby/mruby | YAMAMOTO Masaya | |
| 2017-10-17 | Add `Numeric#{finite?,infinite?}`; CRuby2.4 | Yukihiro "Matz" Matsumoto | |
| 2017-10-11 | Add MRB_WITHOUT_FLOAT | YAMAMOTO Masaya | |
| 2017-09-27 | fix: src\numeric.c(1215): warning C4244: 'function': conversion from ↵ | Tomasz Dąbrowski | |
| 'mrb_int' to 'int', possible loss of data | |||
| 2017-09-27 | fix: src\numeric.c(954): warning C4334: '<<': result of 32-bit shift ↵ | Tomasz Dąbrowski | |
| implicitly converted to 64 bits (was 64-bit shift intended?) | |||
| 2017-09-27 | fix: src\numeric.c(897): warning C4244: 'function': conversion from ↵ | Tomasz Dąbrowski | |
| 'mrb_int' to 'mrb_float', possible loss of data | |||
