Skip to content

fix domain error message of 2-ary log#1048

Merged
mflatt merged 1 commit into
cisco:mainfrom
usaoc:log-base-1-err
Jun 8, 2026
Merged

fix domain error message of 2-ary log#1048
mflatt merged 1 commit into
cisco:mainfrom
usaoc:log-base-1-err

Conversation

@usaoc

@usaoc usaoc commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

When log is called with exact 1 as the second argument, it results in a division by zero, which was reported in /. Report this error in terms of log, instead.

Comment thread s/5_3.ss Outdated
When `log` is called with exact `1` as the second argument, it results
in a division by zero, which was reported in `/`.  Report this error
in terms of `log`, instead.
@usaoc usaoc force-pushed the log-base-1-err branch from 971b294 to 27d2796 Compare June 8, 2026 17:12
@mflatt mflatt merged commit 035e2e9 into cisco:main Jun 8, 2026
16 checks passed
@mflatt

mflatt commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Thanks!

mflatt pushed a commit to racket/racket that referenced this pull request Jun 8, 2026
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.
@usaoc usaoc deleted the log-base-1-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.

2 participants