[ruby-core:114725] [Ruby master Bug#19878] Math.log is broken for bignum

Issue #19878 has been reported by mame (Yusuke Endoh). ---------------------------------------- Bug #19878: Math.log is broken for bignum https://bugs.ruby-lang.org/issues/19878 * Author: mame (Yusuke Endoh) * Status: Open * Priority: Normal * ruby -v: ruby 3.3.0dev (2023-09-04T01:35:26Z master 2ac3e9abe9) [x86_64-linux] * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- ```ruby p Math.log(2 ** 1020, 10) #=> 307.0505955772608 p Math.log(2 ** 1021, 10) #=> 307.35162557292483 p Math.log(2 ** 1022, 10) #=> 307.6526555685888 p Math.log(2 ** 1023, 10) #=> 688.6994720982339 <- WHAT!? p Math.log(2 ** 1024, 10) #=> 689.3926192787939 p Math.log(2 ** 1025, 10) #=> 690.0857664593537 ``` -- https://bugs.ruby-lang.org/

Issue #19878 has been updated by mame (Yusuke Endoh). https://github.com/ruby/ruby/pull/8429 ---------------------------------------- Bug #19878: Math.log is broken for bignum https://bugs.ruby-lang.org/issues/19878#change-104559 * Author: mame (Yusuke Endoh) * Status: Open * Priority: Normal * ruby -v: ruby 3.3.0dev (2023-09-04T01:35:26Z master 2ac3e9abe9) [x86_64-linux] * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- ```ruby p Math.log(2 ** 1020, 10) #=> 307.0505955772608 p Math.log(2 ** 1021, 10) #=> 307.35162557292483 p Math.log(2 ** 1022, 10) #=> 307.6526555685888 p Math.log(2 ** 1023, 10) #=> 688.6994720982339 <- WHAT!? p Math.log(2 ** 1024, 10) #=> 689.3926192787939 p Math.log(2 ** 1025, 10) #=> 690.0857664593537 ``` -- https://bugs.ruby-lang.org/

Issue #19878 has been updated by mame (Yusuke Endoh). Fortunately, this bug was introduced this year on commit:da39936ce165ea9462b9e192eb6b608485c94842 so no need to backport. ---------------------------------------- Bug #19878: Math.log is broken for bignum https://bugs.ruby-lang.org/issues/19878#change-104561 * Author: mame (Yusuke Endoh) * Status: Open * Priority: Normal * ruby -v: ruby 3.3.0dev (2023-09-04T01:35:26Z master 2ac3e9abe9) [x86_64-linux] * Backport: 3.0: DONTNEED, 3.1: DONTNEED, 3.2: DONTNEED ---------------------------------------- ```ruby p Math.log(2 ** 1020, 10) #=> 307.0505955772608 p Math.log(2 ** 1021, 10) #=> 307.35162557292483 p Math.log(2 ** 1022, 10) #=> 307.6526555685888 p Math.log(2 ** 1023, 10) #=> 688.6994720982339 <- WHAT!? p Math.log(2 ** 1024, 10) #=> 689.3926192787939 p Math.log(2 ** 1025, 10) #=> 690.0857664593537 ``` -- https://bugs.ruby-lang.org/
participants (1)
-
mame (Yusuke Endoh)