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

flsgn inconsistency for -0.0 and +nan.0 #95

Open
LiberalArtist opened this issue Oct 20, 2024 · 0 comments
Open

flsgn inconsistency for -0.0 and +nan.0 #95

LiberalArtist opened this issue Oct 20, 2024 · 0 comments

Comments

@LiberalArtist
Copy link
Contributor

The docs claim that flsgn is “like sgn … but restricted to flonum input.” However, the two functions behave differently for -0.0 and +nan.0:

#lang racket
(require math/flonum)

(flsgn -0.0);-> 0.0
(sgn -0.0)  ;-> -0.0

(flsgn +nan.0);-> 0.0
(sgn +nan.0)  ;-> +nan.0
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

1 participant