Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing sleep to accept (Rational :a) types #1305

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Changing sleep to accept (Rational :a) types #1305

merged 1 commit into from
Oct 15, 2024

Conversation

Izaakwltn
Copy link
Collaborator

Fixes #1304

I chose to use type class Rational's best-approx instead of Real's real-approx because it handles the approximation without arbitrary precision.

This decision only blocks sleep from being called with CReal values.

If Real is preferred, we just need to pick a reasonable precision threshold.

library/system.lisp Outdated Show resolved Hide resolved
library/system.lisp Show resolved Hide resolved
library/system.lisp Outdated Show resolved Hide resolved
@stylewarning stylewarning merged commit 60d3e81 into main Oct 15, 2024
33 checks passed
@stylewarning stylewarning deleted the sleep-fix branch October 15, 2024 05:29
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.

Sleep should be able to take any nonnegative real
2 participants