From: "k0kubun (Takashi Kokubun) via ruby-core" Date: 2026-01-13T01:05:24+00:00 Subject: [ruby-core:124490] [Ruby Bug#21814] 0.pow(2,-9999999999999999990) should be zero Issue #21814 has been updated by k0kubun (Takashi Kokubun). Backport changed from 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED, 4.0: REQUIRED to 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED, 4.0: DONE ruby_4_0 commit:893dcb5f25cbb0574ae73aa8fc926fd26750a27f merged revision(s) commit:19e539c9ee1701b34189fa0c1feb942adeb0e326. ---------------------------------------- Bug #21814: 0.pow(2,-9999999999999999990) should be zero https://bugs.ruby-lang.org/issues/21814#change-116042 * Author: matz (Yukihiro Matsumoto) * Status: Closed * Target version: 4.0 * ruby -v: 4.1dev * Backport: 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED, 4.0: DONE ---------------------------------------- When I try `0.pow(2,-9999999999999999990)`, irb prints `-9999999999999999990`, but I think no matter what you divide zero by, the modulo should be zero. Matz. -- 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/lists/ruby-core.ml.ruby-lang.org/