<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/numeric.c, 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) f4f728b319086eea3db6e9909fb9c849c276f813: [Backport #21680]</title>
<updated>2025-12-08T22:44:48+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-12-08T22:44:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fe8221af30768cbd15409d4cc52b2bb18e91667e'/>
<id>fe8221af30768cbd15409d4cc52b2bb18e91667e</id>
<content type='text'>
	[PATCH] [Bug #21680] Fix (base**power_of_two).digits(base) bug (#15144)

	Fix wrong condition in base multiplying loop.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[PATCH] [Bug #21680] Fix (base**power_of_two).digits(base) bug (#15144)

	Fix wrong condition in base multiplying loop.
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 3a7b9ca93b91dcc086b9ac8b9957e59268f9493b: [Backport #21217]</title>
<updated>2025-04-14T07:21:51+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-04-14T07:21:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9abd48df705c37f69ec9fd954f84cbbbd65db624'/>
<id>9abd48df705c37f69ec9fd954f84cbbbd65db624</id>
<content type='text'>
	Fix `Integer.sqrt` to never exceed actual value

	`Integer.sqrt` uses `sqrt(3)` from libm for small values.
	This method must return a value less than or equal to the actual integer
	square root, but libm's sqrt does not always guarantee that.

	This change corrects that by decrementing the result if necessary.

	Fixes [Bug #21217]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Fix `Integer.sqrt` to never exceed actual value

	`Integer.sqrt` uses `sqrt(3)` from libm for small values.
	This method must return a value less than or equal to the actual integer
	square root, but libm's sqrt does not always guarantee that.

	This change corrects that by decrementing the result if necessary.

	Fixes [Bug #21217]
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Fix example in Numeric#to_int</title>
<updated>2024-12-17T18:01:39+00:00</updated>
<author>
<name>BurdetteLamar</name>
<email>burdettelamar@yahoo.com</email>
</author>
<published>2024-12-17T16:34:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9715131c32fa9753da6a616c9ad3891e27bcff5b'/>
<id>9715131c32fa9753da6a616c9ad3891e27bcff5b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Correct order of listed methods</title>
<updated>2024-12-02T20:28:53+00:00</updated>
<author>
<name>BurdetteLamar</name>
<email>burdettelamar@yahoo.com</email>
</author>
<published>2024-12-01T22:56:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d588a1c880c5aadb3a802358df73b0c6e1fcf1a1'/>
<id>d588a1c880c5aadb3a802358df73b0c6e1fcf1a1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rewrite Numeric#dup and Numeric#+@ in Ruby (#11933)</title>
<updated>2024-10-22T18:01:29+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-10-22T18:01:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0f3723c644c8ba52bc98f2bdadda0f0ba291452a'/>
<id>0f3723c644c8ba52bc98f2bdadda0f0ba291452a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Move each `Float#to_s` example item by item</title>
<updated>2024-10-07T09:22:19+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-10-07T08:57:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=66b69d4ea553485306b683d7f965181dffca5205'/>
<id>66b69d4ea553485306b683d7f965181dffca5205</id>
<content type='text'>
Like as +half+ option in Float#round.

If the body of the preceding list items and the following code block
are indented at the same position, the code block is parsed as a list
continuation.

[Fixes GH-11683]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Like as +half+ option in Float#round.

If the body of the preceding list items and the following code block
are indented at the same position, the code block is parsed as a list
continuation.

[Fixes GH-11683]
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Fix links</title>
<updated>2024-09-10T18:04:41+00:00</updated>
<author>
<name>BurdetteLamar</name>
<email>burdettelamar@yahoo.com</email>
</author>
<published>2024-09-01T16:22:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5df574d26e6c97281678414a3eecf80544d7f494'/>
<id>5df574d26e6c97281678414a3eecf80544d7f494</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix ceil when ndigits is large</title>
<updated>2024-07-30T12:21:28+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-07-26T15:10:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a7167d0ceecc8eea7bdf87e66be16d16b0f417e7'/>
<id>a7167d0ceecc8eea7bdf87e66be16d16b0f417e7</id>
<content type='text'>
[Bug #20654]

This commit fixes Integer#ceil and Float#ceil when the number is
negative and ndigits is large such that 10**ndigits is a bignum.

Previously, it would return 0 in such cases. However, this would cause
unexpected behaviour such as:

    puts 1.ceil(-5) # =&gt; 100000
    puts 1.ceil(-10) # =&gt; 10000000000
    puts 1.ceil(-20) # =&gt; 0

This commit changes the last result so that it will return
100000000000000000000.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #20654]

This commit fixes Integer#ceil and Float#ceil when the number is
negative and ndigits is large such that 10**ndigits is a bignum.

Previously, it would return 0 in such cases. However, this would cause
unexpected behaviour such as:

    puts 1.ceil(-5) # =&gt; 100000
    puts 1.ceil(-10) # =&gt; 10000000000
    puts 1.ceil(-20) # =&gt; 0

This commit changes the last result so that it will return
100000000000000000000.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix floor when ndigits is large</title>
<updated>2024-07-30T12:21:28+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-07-26T15:10:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3af2a7fbe12e11bac7b26bd991d3d02349f47295'/>
<id>3af2a7fbe12e11bac7b26bd991d3d02349f47295</id>
<content type='text'>
[Bug #20654]

This commit fixes Integer#floor and Float#floor when the number is
negative and ndigits is large such that 10**ndigits is a bignum.

Previously, it would return 0 in such cases. However, this would cause
unexpected behaviour such as:

    puts -1.floor(-5) # =&gt; -100000
    puts -1.floor(-10) # =&gt; -10000000000
    puts -1.floor(-20) # =&gt; 0

This commit changes the last result so that it will return
-100000000000000000000.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #20654]

This commit fixes Integer#floor and Float#floor when the number is
negative and ndigits is large such that 10**ndigits is a bignum.

Previously, it would return 0 in such cases. However, this would cause
unexpected behaviour such as:

    puts -1.floor(-5) # =&gt; -100000
    puts -1.floor(-10) # =&gt; -10000000000
    puts -1.floor(-20) # =&gt; 0

This commit changes the last result so that it will return
-100000000000000000000.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert moving things to Ruby</title>
<updated>2024-07-29T21:18:11+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2024-07-29T20:28:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2c1655314a0700a90b7ed12bf8c920ad2d78654f'/>
<id>2c1655314a0700a90b7ed12bf8c920ad2d78654f</id>
<content type='text'>
This is slowing down benchmarks on x86, so lets revert it for now.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is slowing down benchmarks on x86, so lets revert it for now.
</pre>
</div>
</content>
</entry>
</feed>
