dearblue
|
a215292b6a
|
Use nested assert
|
2019-06-29 11:54:17 +09:00 |
|
dearblue
|
64b3d452ec
|
Drop precisions for rational when big numbers
|
2019-06-05 23:25:28 +09:00 |
|
dearblue
|
5e69760d91
|
Fix build error if struct mrb_rational is bigger than RIStruct
In that case, to be switched implementation with `RData`.
It is based to "complex".
|
2019-06-05 23:25:23 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
855f2cdeea
|
Slightly simplify Rational#==; ref #4475
|
2019-05-29 11:49:21 +09:00 |
|
KOBAYASHI Shuji
|
902b2ce3c6
|
Fix Rational#==(Complex)
Consider a Numreic class like `Complex` that does not have `<=>` but `==`
works (`0i == 0r` is `true`).
|
2019-05-27 21:29:49 +09:00 |
|
KOBAYASHI Shuji
|
48903850e9
|
Freeze Rational and Complex objects
|
2019-05-23 13:40:49 +09:00 |
|
KOBAYASHI Shuji
|
8513abd404
|
Kernel#Rational requires numerator
|
2019-05-22 19:57:35 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
fccec8964a
|
Implements part of Complex class in C.
|
2019-05-21 21:08:26 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
b7f85b9df9
|
Should not refer Float class in case of MRB_WITHOUT_FLOAT.
This commit removes `Float` from `rational.c`.
|
2019-05-21 21:08:26 +09:00 |
|
KOBAYASHI Shuji
|
3b46831da8
|
Move **,/,quo,div and comparison methods to Integral from Numeric
Having these methods in Numeric can get in the way of creating subclasses of
Numeric because they only support Fixnum and Float.
|
2019-05-21 20:43:42 +09:00 |
|
KOBAYASHI Shuji
|
5d6c1794ad
|
Revert part of #4457
|
2019-05-21 09:31:06 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
70e754e6da
|
Merge pull request #4457 from shuujii/change-the-order-of-expected-and-actual-in-mruby-rational-test
Change the order of "expected" and "actual" in `mruby-rational` test
|
2019-05-21 07:56:21 +09:00 |
|
KOBAYASHI Shuji
|
3db5d7fe3d
|
Drop dependency from mruby-rational to mruby-object-ext
|
2019-05-20 18:36:13 +09:00 |
|
KOBAYASHI Shuji
|
97600ded8d
|
Change the order of "expected" and "actual" in mruby-rational test
|
2019-05-20 18:24:18 +09:00 |
|
KOBAYASHI Shuji
|
a6eb01837b
|
Fix Rational#<=>(Numeric)
Reported by Sergey Ukrainskiy: https://github.com/mruby/mruby/commit/f5fb1307b017fb972c12b4ec4b1866d789b0ca09#r33590698
|
2019-05-19 13:52:18 +09:00 |
|
KOBAYASHI Shuji
|
6c9c189e4b
|
Move Object#(Rational|Complex) to Kernel
|
2019-05-18 18:31:55 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
bd7328f5e6
|
Implement Rational._new in C.
|
2019-05-18 11:23:59 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
ace0d3949b
|
Support MRB_WITHOUT_FLOAT.
I assume there's no realistic usage of `Rational` with
`MRB_WITHOUT_FLOAT`. But just for consistency.
|
2019-05-18 08:38:45 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
eecac4f18b
|
Merge pull request #4442 from shuujii/drop-dependency-from-mruby-rational-to-mruby-numeric-ext
Drop dependency from `mruby-rational` to `mruby-numeric-ext`
|
2019-05-17 21:27:47 +09:00 |
|
KOBAYASHI Shuji
|
aa41a5c9af
|
Drop dependency from mruby-rational to mruby-numeric-ext
|
2019-05-17 20:44:48 +09:00 |
|
KOBAYASHI Shuji
|
eeb95e058a
|
Fix Numeric#to_r
|
2019-05-17 19:53:31 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
b6e9fab649
|
Implement part of Rational in C.
|
2019-05-17 16:37:34 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
cec92673ae
|
Avoid direct access to instance variables in rational.rb.
|
2019-05-17 16:22:23 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
912d23634d
|
Fixed wrong overloading.
`float op rational` should return `float`, since float is an inexact
value.
|
2019-05-17 16:18:46 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
0d61bcd823
|
Use div (integer divition) instead of / for rational numbers.
|
2019-05-17 11:27:52 +09:00 |
|
KOBAYASHI Shuji
|
f5fb1307b0
|
Fix Rational#==
|
2019-05-16 22:09:56 +09:00 |
|
Ukrainskiy Sergey
|
fa45cc4272
|
Fix dependencies
|
2019-05-15 16:57:21 +09:00 |
|
Ukrainskiy Sergey
|
d67d2ae8e8
|
Basic implementation of Complex and Rational classes
|
2019-05-15 16:57:21 +09:00 |
|
Ukrainskiy Sergey
|
8808219e6d
|
Initial suffix support
|
2019-05-15 16:57:21 +09:00 |
|