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

Double IEEE constants: infinity, NaN, epsilon ... where are they? #29

Closed
edwinb opened this issue May 20, 2020 · 6 comments · Fixed by #3116
Closed

Double IEEE constants: infinity, NaN, epsilon ... where are they? #29

edwinb opened this issue May 20, 2020 · 6 comments · Fixed by #3116

Comments

@edwinb
Copy link
Collaborator

edwinb commented May 20, 2020

Issue by nicolabotta
Tuesday Oct 29, 2019 at 07:48 GMT
Originally opened as edwinb/Idris2-boot#146


Is there a way of accessing these values in Idris 2? Something like Numeric.IEEEin Haskell? At lest epsilon, infinity and NaN are badly needed, e.g., to implement interval arithmetics! Thanks, Nicola

@edwinb
Copy link
Collaborator Author

edwinb commented May 20, 2020

Comment by edwinb
Saturday Dec 07, 2019 at 15:13 GMT


I've labelled this with "Feature request" - we ought to have them really. If anyone wants pointers on where to start implementing it, please let me know.

@mr-infty
Copy link
Contributor

@edwinb I'd like to start contributing to Idris 2 and I find this issue interesting. Could you give me a hint on where to start?

@ohad
Copy link
Collaborator

ohad commented Aug 22, 2020

I think the right places to start would be:

libs/prelude/Prelude/Num.idr

where you'll need to add binding for the primitive constants, and also the places where the primitives are defined, e.g.

support/chez/support.ss

where you'll need to define primitive Scheme / Racket primitives to bind to.

@melted
Copy link
Collaborator

melted commented Aug 22, 2020

The primitives should be defined in support/chez/support.ss (and racket and gambit), if needed (they might not need anything but what's put out in codegen). The bootstrap files shouldn't have to be updated by hand.

@ohad
Copy link
Collaborator

ohad commented Aug 22, 2020

Ah, sorry for misleading. I've removed my incorrect text.

@mr-infty
Copy link
Contributor

@ohad @melted Thanks for your help!

alexhumphreys pushed a commit to alexhumphreys/idrall that referenced this issue Dec 27, 2020
Only parsing for NaN, looks like doing anything useful with it will have
to wait for [this issue](idris-lang/Idris2#29)

Signed-off-by: Alex Humphreys <alex.humphreys@here.com>
alexhumphreys pushed a commit to alexhumphreys/idrall that referenced this issue Dec 27, 2020
Only parsing for NaN, looks like doing anything useful with it will have
to wait for [this issue](idris-lang/Idris2#29)

Signed-off-by: Alex Humphreys <alex.humphreys@here.com>
alexhumphreys pushed a commit to alexhumphreys/idrall that referenced this issue Dec 27, 2020
Only parsing for NaN, looks like doing anything useful with it will have
to wait for [this issue](idris-lang/Idris2#29)

Signed-off-by: Alex Humphreys <alex.humphreys@here.com>
CodingCellist added a commit to CodingCellist/Idris2 that referenced this issue Oct 23, 2023
Combined, the IEEE-related commits close idris-lang#29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants