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

Disallow infinite Rat instances #62

Merged
merged 2 commits into from
Jul 20, 2024
Merged

Disallow infinite Rat instances #62

merged 2 commits into from
Jul 20, 2024

Conversation

qntm
Copy link
Owner

@qntm qntm commented Jul 20, 2024

Preparatory work for #61.

  • Second's constructor now accepts a single Rat instead of a combination of a numerator and a denominator.
  • Replace Second.END_OF_TIME with a symbol, not new Second(Rat.INFINITY).
  • Eliminate the Rat.INFINITY constant.
  • Stop allowing the denominator in a Rat to be 0n. This did work but its behaviour was very delicate and subtle. It makes more sense to disallow this completely. Replace this with special-case logic for Second.END_OF_TIME.

@qntm qntm self-assigned this Jul 20, 2024
@qntm qntm merged commit 86e00d0 into main Jul 20, 2024
3 checks passed
@qntm qntm deleted the no-inf-rats branch July 20, 2024 01:11
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.

1 participant