Skip to content

CS & BC: fix inconsistencies in divide-by-zero error messages#5529

Merged
mflatt merged 1 commit into
racket:masterfrom
usaoc:div-by-zero-err
Jun 8, 2026
Merged

CS & BC: fix inconsistencies in divide-by-zero error messages#5529
mflatt merged 1 commit into
racket:masterfrom
usaoc:div-by-zero-err

Conversation

@usaoc

@usaoc usaoc commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Checklist

  • Bugfix
  • tests included
  • documentation

Description of change

For /, say “division by zero”; for log, say either “undefined for 0” or “undefined for base 1”; for other functions, say “undefined for x (and y)”. Also, correct function names for atan and quotient/remainder on CS, and correct printing of -0.0 in quotient{,/remainder} on BC.

Update tests to include the error message strings, and add missing specs for raising of exn:fail:contract:divide-by-zero in docs.

The base-one error message in log on CS requires cisco/ChezScheme#1048.

Fix #5527.

For `/`, say "division by zero"; for `log`, say either "undefined for
0" or "undefined for base 1"; for other functions, say "undefined for
<x> (and <y>)".  Also, correct function names for `atan` and
`quotient/remainder` on CS, and correct printing of `-0.0` in
`quotient{,/remainder}` on BC.

Update tests to include the error message strings, and add missing
specs for raising of `exn:fail:contract:divide-by-zero` in docs.

The base-one error message in `log` on CS requires
cisco/ChezScheme#1048.

Fix racket#5527.
@mflatt mflatt merged commit dabda29 into racket:master Jun 8, 2026
5 of 8 checks passed
@mflatt

mflatt commented Jun 8, 2026

Copy link
Copy Markdown
Member

Thanks!

@usaoc usaoc deleted the div-by-zero-err branch June 9, 2026 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

quotient/remainder: bad error message in CS

2 participants