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
Improve IEEE float decimal processing #45
Conversation
I like the goal of this ...
On the rendering side, have you seen the algorithmic that ranjit et al presented at popl 2016? |
Good question, I should use Actually current
Yes, but it turned out they did a false benchmark. We should use Grisu3. |
This article by BOS does a good job at explaining the motivation behind this PR. |
i'm still confused about what round is supposed to do... |
@siddhanathan Thanks for bringing that up ; ) @cartazio I have updated the comment of |
Oh. Rounding to nearest integer. Zooming out: what's the problem we are trying to solve in base libraries here? |
Currently in We can't really change I'm also considering to add |
One possible near term thing:: maybe this would make sense to add to the ieee754 package. It looks like @patperry (i think that's his handle or @patrickperry? ) has resumed maintaining that and it has a nice type class just for ieee floats and friends |
|
@alexanderkjeldaas Sadly there is no proper compact representation in base now. |
I also would like to hear @patperry 's thought on this proposal, it's better to have complete IEEE float processing tools in I don't know if this proposal is too urgent for 8.2 release, if that's the case i will modify the plan. |
The 8.2 merge window already closed. So in some respects showcasing this
proposal as a type class with all the suitable definitions already written
might help
…On Tue, Feb 28, 2017 at 1:01 AM winterland ***@***.***> wrote:
I also would like to hear @patperry <https://github.com/patperry> 's
thought on this proposal, it's better to have complete IEEE float
processing tools in base IMHO.
I don't know if this proposal is too urgent for 8.2 release, if that's the
case i will modify the plan.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#45 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAQwpb7eaeZveWf4mhr_vpvCBSurbpIks5rg7g9gaJpZM4MLG9L>
.
|
I don't have a strong opinion either way regarding whether this should be part of base. In the near-term, I'm happy to add this to ieee754 if you send me a pull request. |
(I'm also happy if you want to fork/take over the ieee754 package yourself--I don't really have time to actively maintain it. You may want to make some major changes to the typeclass, which I wouldn't object to as long as you retain the functionality. Just make sure you give the package authors and contributors appropriate credit.) |
@patperry I'm happy to take over the ieee754 package ; ), please add me to the maintainers. I have updated the proposal implementation plan, let me start improving IEEE float situation by improving ieee754 first. |
@winterland1989 sounds like a great plan. Please go ahead and fork https://github.com/patperry/hs-ieee754 , then add the functionality. I'll look over your changes, and give you feedback (likely pretty minimal). If you can address the feedback, then I'll add you as a maintainer. I'm really glad that you're taking the initiative to improve the float situation, and I look forward to seeing your changes. |
I just asked my labmate about this (he's the author), and he says that since the initial publication he's been able to improve performance to within 10% of Grisu3. Furthermore, someone sent him a patch that supposedly beats Grisu3 by 5%. He's working on incorporating the patch, so it might be worth investigating further. Especially given that his approach doesn't rely on a backup rendering algorithm, sounds like a nice code simplification. |
@winterland1989 @patperry Most of the relevant floating point operations are already here it seems https://github.com/ekmett/numeric-extras/blob/master/Numeric/Extras.hs |
Yep, one of this proposal's goals is to bring operations which standard c lib already provided. But I'm not sure if we can directly import them from |
Maybe this is off-topic, but if everybody is in agreement that APIs using For example a typeclass representing alternative future String implementations, or naming the function with some suffix like I guess this isn't as much a comment on this particular proposal as a question of how |
off topic and shouldn't be discussed on this proposal
…On Sat, Mar 18, 2017 at 5:48 PM, Alexander Kjeldaas < ***@***.***> wrote:
Maybe this is off-topic, but if everybody is in agreement that APIs using
String is bad, but it has to be used because nothing else is in base,
then shouldn't there be some future-proof way out of this situation?
For example a typeclass representing alternative future String
implementations, or naming the function with some suffix like
getFoobarAsString.
I guess this isn't as much a comment on this particular proposal as a
question of how base should prepare for a better String at some point in
the future.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#45 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAQwpAha__odFf1KeZH6IDbCBoQk2D9ks5rnFFKgaJpZM4MLG9L>
.
|
I get the impression that this is not really a GHC proposal, but rather a base library proposal, in which case it should be submitted to the Core Library Committee as described in https://wiki.haskell.org/Library_submissions. The proposal says that this code will be developed in a separate library first. This is a good approach! Adoption of such a library will be a strong argument in favor of accepting this proposal. |
Since nobody disagrees with my previous post, I am closing this as Out-Of-Scope. But please do pursue the problem, probably by implementing the library, getting users, and turning it into a library submission. |
Yes please, I'll come back to this when i get time ; ) |
Rendered proposal