Files
mercury/library
Nadia Yvette Chambers fa271a0ec8 Fix integer.mul_by_digit producing denormalized zeros. (#141)
mul_by_digit(0, Y) produced i(Len, [0, 0, ...]) instead of the
canonical integer.zero = i(0, []). Since is_zero/1 only matched
the canonical form, denormalized zeros were silently treated as
nonzero, causing incorrect results in rational.m (e.g., gcd_2
non-termination, division-by-zero crashes in big_quot_rem).

Three fixes applied:
- Guard mul_by_digit and printbase_mul_by_digit to return
  integer.zero when the digit is 0 (root cause fix).
- Make is_zero/1 recognize denormalized all-zero digit lists
  as defense in depth.
- Replace structural `= integer.zero` checks in rational.m
  with integer.is_zero/1 calls for robustness.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 09:35:20 +11:00
..
2026-02-19 15:24:59 +11:00
2026-02-19 15:24:59 +11:00
2026-02-19 15:24:59 +11:00
2026-01-22 21:22:38 +11:00
2026-02-19 15:24:59 +11:00
2026-02-19 15:24:59 +11:00
2026-02-19 15:24:59 +11:00
2026-02-19 15:24:59 +11:00
2026-02-19 15:24:59 +11:00
2026-02-25 22:06:42 +11:00
2026-02-19 15:24:59 +11:00
2026-02-19 15:24:59 +11:00
2026-02-19 15:24:59 +11:00
2026-03-14 01:59:56 +11:00
2026-01-22 21:22:38 +11:00
2026-02-19 15:24:59 +11:00
2026-01-22 21:22:38 +11:00
2026-01-23 19:53:58 +11:00
2026-02-28 00:15:22 +11:00
2026-02-28 00:15:22 +11:00
2026-01-22 21:22:38 +11:00
2026-03-08 02:04:04 +11:00
2026-03-07 00:32:26 +11:00
2026-03-13 12:44:54 +11:00
2026-03-03 13:01:00 +11:00
2026-02-18 15:08:23 +11:00
2026-01-23 19:53:58 +11:00
2026-01-22 21:22:38 +11:00
2026-02-20 23:57:09 +11:00
2026-02-20 21:05:08 +11:00
2026-02-20 13:40:40 +11:00
2025-12-07 14:17:02 +11:00
2026-01-23 19:53:58 +11:00
2026-02-20 23:57:09 +11:00
2026-02-20 14:42:38 +11:00
2026-02-20 14:42:38 +11:00
2026-02-20 14:42:38 +11:00
2026-02-20 14:42:38 +11:00
2026-02-20 14:42:38 +11:00
2026-02-18 21:05:36 +11:00
2026-02-20 14:42:38 +11:00
2026-02-20 14:42:38 +11:00
2026-03-13 14:47:28 +11:00
2026-02-20 23:57:09 +11:00
2026-02-20 16:03:18 +11:00
2026-02-20 16:20:42 +11:00
2026-02-20 16:20:42 +11:00
2026-01-22 21:22:38 +11:00
2026-02-16 14:18:33 +11:00
2026-02-16 14:30:14 +11:00
2026-02-20 21:05:08 +11:00
2026-02-19 15:24:59 +11:00
2026-01-22 21:22:38 +11:00
2026-02-20 21:05:08 +11:00