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

Implement DoubleDouble #18

Open
Shimuuar opened this issue Oct 31, 2018 · 5 comments
Open

Implement DoubleDouble #18

Shimuuar opened this issue Oct 31, 2018 · 5 comments
Labels
help wanted Extra attention is needed R&D: library Research and (re-)design a library component

Comments

@Shimuuar
Copy link
Contributor

It's way for emulating not quite quad-precision number using two doubles. Algorithms is interesting by itself and could have few uses. But I think its main value is providing example of constant size approximation of real numbers which isn't IEEE754. It would be very useful for implementing type classes for working with low level representations of numbers. Without such examples it's all to easy to assume that only single and double IEEE754 numbers exist

Julia implementation and references could be found here https://github.com/JuliaMath/DoubleDouble.jl

@ocramz ocramz added R&D: library Research and (re-)design a library component help wanted Extra attention is needed labels Oct 31, 2018
@ocramz
Copy link
Member

ocramz commented Apr 7, 2019

@Shimuuar I am finding some packages that provide long double and arbitrary-precision operations:

@ocramz
Copy link
Member

ocramz commented Apr 7, 2019

there's a long-standing GHC ticket to add CLDouble support : https://gitlab.haskell.org/ghc/ghc/issues/3353

@Shimuuar
Copy link
Contributor Author

Shimuuar commented Apr 7, 2019

DoubleDouble (and triple double) is different approach. It's software emulation of something similar to quad precision.

  • Long double (80-bit) has 63-bit mantissa DoubleDouble has 2x (3x) of Double — 106 bit (162 bit). On other hand it doesn't have hardware support
  • Unlike arbitrary precision it has fixed size 128 (192) bit and thus could be easily unboxed/

Kahan's compensated summation is special case of this approach. I'm only aware of Julia's implementation of this algorithm

@ocramz
Copy link
Member

ocramz commented Apr 15, 2019

@Shimuuar is this something you know how to implement? In case, would you like to do it?

@Shimuuar
Copy link
Contributor Author

I have stack of papers on the subject, there's open source Julia implementation and no time to do anything :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed R&D: library Research and (re-)design a library component
Projects
None yet
Development

No branches or pull requests

2 participants