<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/ruby/test_numeric.rb, branch v3_4_9</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>merge revision(s) 19e539c9ee1701b34189fa0c1feb942adeb0e326: [Backport #21814]</title>
<updated>2026-01-25T08:41:02+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2026-01-25T08:41:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8fa17ea3b2c857369c808a4384ff7ff8174d69f8'/>
<id>8fa17ea3b2c857369c808a4384ff7ff8174d69f8</id>
<content type='text'>
	[PATCH] [Bug #21814] Fix negative bignum modulo

	If modulo is zero, do not  apply bias even if the divisor is zero.
	`BIGNUM_POSITIVE_P` is true even on bignum zero.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[PATCH] [Bug #21814] Fix negative bignum modulo

	If modulo is zero, do not  apply bias even if the divisor is zero.
	`BIGNUM_POSITIVE_P` is true even on bignum zero.
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug#19445] Fix keyword splat in enumerator</title>
<updated>2023-02-17T01:57:22+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-02-17T01:57:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=dd28c55a7cd6780dad637b4d6a20507fbfc6af4a'/>
<id>dd28c55a7cd6780dad637b4d6a20507fbfc6af4a</id>
<content type='text'>
Extracted arguments do not have keyword hash to splat.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Extracted arguments do not have keyword hash to splat.</pre>
</div>
</content>
</entry>
<entry>
<title>Remove Numeric#ceildiv</title>
<updated>2022-08-12T06:57:52+00:00</updated>
<author>
<name>Kouhei Yanagita</name>
<email>yanagi@shakenbu.org</email>
</author>
<published>2022-07-21T09:57:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=24e33b84b5adb29d1d2f541acfba65e225b91b55'/>
<id>24e33b84b5adb29d1d2f541acfba65e225b91b55</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add Numeric#ceildiv and Integer#ceildiv</title>
<updated>2022-08-12T06:57:52+00:00</updated>
<author>
<name>Kouhei Yanagita</name>
<email>yanagi@shakenbu.org</email>
</author>
<published>2022-05-27T06:46:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4165fd0e763439421296fbc95d754ad53e6ae84f'/>
<id>4165fd0e763439421296fbc95d754ad53e6ae84f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use Rational for Float#round with ndigits &gt; 14</title>
<updated>2021-08-06T22:03:51+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2021-07-26T18:20:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d16b68cb2204eeb5af8bd39149202b630374c67f'/>
<id>d16b68cb2204eeb5af8bd39149202b630374c67f</id>
<content type='text'>
ndigits higher than 14 can result in values that are slightly too
large due to floating point limitations.  Converting to rational
for the calculation and then back to float fixes these issues.

Fixes [Bug #14635]
Fixes [Bug #17183]

Co-authored by: Yusuke Endoh &lt;mame@ruby-lang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ndigits higher than 14 can result in values that are slightly too
large due to floating point limitations.  Converting to rational
for the calculation and then back to float fixes these issues.

Fixes [Bug #14635]
Fixes [Bug #17183]

Co-authored by: Yusuke Endoh &lt;mame@ruby-lang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Make Float#floor with ndigits argument handle error</title>
<updated>2021-07-27T18:00:45+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2021-07-26T17:45:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=35e467080ca35a9a129e95f802f102c3bc0a81b3'/>
<id>35e467080ca35a9a129e95f802f102c3bc0a81b3</id>
<content type='text'>
The previous implementation could result in a returned
float that is 1/(10**ndigits) too low.  First try adding
one before dividing, and if that results in a value that is
greater than the initial number, then try the original
calculation.

Spec added for ciel, but the issue doesn't appear to affect
ciel, at least not for the same number.  If the issue does
effect ciel, a similar fix could probably work for it.

Fixes [Bug #18018]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous implementation could result in a returned
float that is 1/(10**ndigits) too low.  First try adding
one before dividing, and if that results in a value that is
greater than the initial number, then try the original
calculation.

Spec added for ciel, but the issue doesn't appear to affect
ciel, at least not for the same number.  If the issue does
effect ciel, a similar fix could probably work for it.

Fixes [Bug #18018]
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix integer/float remainder with infinity argument of opposite sign</title>
<updated>2021-03-12T15:35:18+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2021-03-10T21:15:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=aaab3b1de943c3317e115d623ffc7908b4c96578'/>
<id>aaab3b1de943c3317e115d623ffc7908b4c96578</id>
<content type='text'>
Previously, the result was incorrect:

4.remainder(-Float::INFINITY)
Before: =&gt; NaN
After: =&gt; 4

4.2.remainder(-Float::INFINITY)
Before: =&gt; NaN
After: =&gt; 4.2

Fixes [Bug #6120]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, the result was incorrect:

4.remainder(-Float::INFINITY)
Before: =&gt; NaN
After: =&gt; 4

4.2.remainder(-Float::INFINITY)
Before: =&gt; NaN
After: =&gt; 4.2

Fixes [Bug #6120]
</pre>
</div>
</content>
</entry>
<entry>
<title>numeric.c, range.c: prohibit zero step</title>
<updated>2020-10-23T06:26:51+00:00</updated>
<author>
<name>Kenta Murata</name>
<email>mrkn@users.noreply.github.com</email>
</author>
<published>2020-10-23T06:26:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f754b422855131111092c0c147d744775cc4793f'/>
<id>f754b422855131111092c0c147d744775cc4793f</id>
<content type='text'>
* numeric.c: prohibit zero step in Numeric#step

* range.c: prohibit zero step in Range#step

* Fix ruby-spec

[Feature #15573]</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* numeric.c: prohibit zero step in Numeric#step

* range.c: prohibit zero step in Range#step

* Fix ruby-spec

[Feature #15573]</pre>
</div>
</content>
</entry>
<entry>
<title>bignum.c (rb_int_powm): Integer#pow(0, 1) should return 0</title>
<updated>2020-10-12T04:42:48+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2020-10-12T04:42:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8a39e6d6539bd37100cbbfb88916b853f444f771'/>
<id>8a39e6d6539bd37100cbbfb88916b853f444f771</id>
<content type='text'>
... instead of 1 because it requires "modulo 1".  [Bug #17257]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
... instead of 1 because it requires "modulo 1".  [Bug #17257]
</pre>
</div>
</content>
</entry>
<entry>
<title>Update tests for full keyword argument separation</title>
<updated>2020-01-03T02:40:45+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2019-10-04T22:41:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ff96565686c05919bcae3ea77831879e95f67457'/>
<id>ff96565686c05919bcae3ea77831879e95f67457</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
