basvandijk / scientific

Arbitrary-precision floating-point numbers represented using scientific notation
BSD 3-Clause "New" or "Revised" License
73 stars 40 forks source link

For discussion: Add Data.Scientific.Base #48

Closed minad closed 6 years ago

minad commented 7 years ago

Hi Bas,

just for discussion - here my first take at the generalization discusses in issue #47. This patch drops 7.6 compatibility but otherwise the API compatibility of Data.Scientific is retained. I don't expect you to merge it in this form.

I am not sure if this is the best approach or if the generalization to arbitrary bases is needed after all. For example for the hexadecimal floating point numbers the base is 2 and the digits are hexadecimal (like in this GHC proposal you mentioned). This means to support such hex numbers we would just have to add support for base 2 additional to base 10.

But please take a look at it.

Open questions/issues:

Daniel