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:
[ ] Add tests for generalized bases
[ ] How to handle parsing/pretty printing (especially for mixed base cases like hexfloats with base 16 and powers of 2)
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