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-03-13 14:50:15 +11:00
2026-03-13 22:14:57 +11:00
2026-02-28 20:01:06 +11:00
2026-02-04 04:17:41 +11:00
2026-03-13 14:50:15 +11:00
2026-03-14 05:08:41 +11:00
2026-03-13 14:50:15 +11:00
2026-02-07 15:56:32 +11:00
2025-11-01 16:50:02 +11:00
2026-01-16 02:45:19 +11:00
2025-12-18 19:28:44 +11:00
2026-01-01 19:56:20 +11:00
2026-03-12 07:46:17 +11:00
2026-01-13 17:30:27 +11:00
2025-12-26 16:28:05 +11:00

Mercury

Mercury is a logic/functional programming language which combines the clarity and the expressiveness of declarative programming with advanced static analysis and error detection features.

More information is available on the website's about pages, in other README files in the source code repository, and in the documentation.

Small sample programs written in Mercury can be found in the samples and extras directories of the source code repository.

README files

The Mercury compiler has two different backends and works on different operating systems. Specific information is contained in individual README files in the Documentation directory:

Other information

See the current release notes for the latest stable release. The news file lists any recent changes. The files in the Documentation directory whose names start with NEWS are relevant if you want to find out more about the past development of Mercury. The limitations file lists some ways in which the Mercury implementation does not yet meet its goals.

Information for developers

If you are considering contributing to the Mercury project, the website contains some documents that may be helpful. These include a document about contributions in general and specific information about contributing such as coding styles.

Contact

See our contact page.

Description
No description provided
Readme MIT 145 MiB
Languages
Mercury 85.4%
C 8.7%
Shell 1.4%
Makefile 1%
JavaScript 1%
Other 2%