From: "mame (Yusuke Endoh) via ruby-core" Date: 2023-09-13T09:54:31+00:00 Subject: [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/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/