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

abs should add a case for (-> Fixnum Nonnegative-Fixnum) #1310

Open
LiberalArtist opened this issue Feb 15, 2023 · 2 comments
Open

abs should add a case for (-> Fixnum Nonnegative-Fixnum) #1310

LiberalArtist opened this issue Feb 15, 2023 · 2 comments

Comments

@LiberalArtist
Copy link
Contributor

See #1309 for a motivating example.

@sorawee
Copy link
Contributor

sorawee commented Feb 15, 2023

One thing that should be looked out for is that (most-positive-fixnum) is less than (abs (most-negative-fixnum)) by one.

@samth
Copy link
Sponsor Member

samth commented Feb 15, 2023

Yes, as @sorawee points out this is unfortunately not true:

> (fixnum? (abs (most-negative-fixnum)))
#f

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

No branches or pull requests

3 participants