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

Why is Double Used to Represent Price? #24

Open
dogatkeyboard opened this issue Apr 8, 2022 · 0 comments
Open

Why is Double Used to Represent Price? #24

dogatkeyboard opened this issue Apr 8, 2022 · 0 comments

Comments

@dogatkeyboard
Copy link

dogatkeyboard commented Apr 8, 2022

There wasn't a discussion section, so I didn't know where to ask this.

Has using Double as your representation ever given you issues? Supposedly it can be detrimental. Is this kind of potential downfall of double/float price representation applicable to Haskell?

Relevant Article 1: https://www.fpcomplete.com/blog/safe-decimal-right-on-the-money/
Relevant Article 2: https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
Codebase Reference: https://github.com/mdunnio/coinbase-pro/blob/master/src/lib/CoinbasePro/Types.hs#L113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant