-
Notifications
You must be signed in to change notification settings - Fork 18
Added AEq instance and convenience wrappers around IEEE functions #149
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
Conversation
|
Sweet! I feel we should give Patrick Perry/ieee754 some credit in However, what do you think of instead proposing bjornbm/hs-ieee754#1 which I believe would allow us to newtype-derive IEEE? |
|
Yup, we should definitely give him credit. And also ask permission. I'll get in touch later today. My mistake. I originally thought we could just have an instance, which GND will let us do easily, but I found a problem with it. Perhaps if we also split On balance I think we are better off with this style of wrapper like we have around the |
|
I spoke with Patrick by email and he approved the plan of crediting him in the module comments. |
Added AEq instance and convenience wrappers around IEEE functions
|
I'm not sure I understood the problem with epsilon (other than documentation: I tried with GND but got error messages on the following form which I don't quite understand: In particular: Why would they not match?? This type of error occurs for all methods without arguments. |
|
I also couldn't seem to get |
|
My issue with epsilon is the The GND bit is the role signature thing biting us again. It's impossible to convince current GHC that the role signature of |
|
Re
|
|
I don't think it is the same, actually. I can't figure out how to document what |
|
My thinking is that the size (physically speaking) of the quantity ( I don’t feel strongly about this so if you do leave as it. We can always relax
|
|
I know what you are saying, all those values are linked and would be different quantities if we had picked a different unit, holding the representation type constant. I'm picking nits but I'm saying that both the value and the definition of the value are linked for DigressionAnother angle to my objection is that I still want my fixed-point branch to go through once I clear up some details, so I've been thinking in that frame of mind. (We wouldn't actually need or even want to adopt the following generalizations because scaled floating point quantities aren't something you really need unless you are talking about lots of This just works, with the scale factor merrily coming along (with no runtime representation) into the answer: This doesn't work, it doesn't do what the documentation says it does: (If it's not clear, the reason it doesn't is because |
|
I see your point. But it seems |
|
I think holding it at |
|
Ah, makes sense then! But should it be |
|
I'll switch it to |
Fixes #145.
This draft just outright takes the
ieee754dependency, because it seems stable, is on stackage, and only itself depends onbase, so it doesn't feel like it's worth the flag dance contemplated in #111 / #95.