-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
We have a PR (#19) that's been outstanding for while, which wants to add additional constants to Data.Number
. Technically it will be easy to resolve. We either:
- Put the relevant constants in Number.js and import them into Number.purs
- Hardcode the relevant constants in Number.purs
The current PR takes approach (1) but it would be very easy to change to (2). But the two approaches imply different things about what Number
means in Purescript (as opposed to Javascript).
- Means that
Number
is a floating point number of some kind but could be 64-bit or 32-bit or possibly other sizes. The compiler to Javascript chooses to implement that as 64-bit but other compilers can make other choices. All compilers must then specify things likemaxValue
for that compiler - Means that
Number
is a 64-bit floating point number across all compilers. The compiler needs to provide implementations of things likesin
but any constant can be hardcoded directly in Purescript
I don't really have an opinion on this since I only use the Javascript compiler.
For what it's worth, Wikipedia says that "In most implementations of PostScript, and some embedded systems, the only supported precision is single."
Metadata
Metadata
Assignees
Labels
No labels