cartazio / numbers

Other
29 stars 13 forks source link

BigFloat doesn't have a Read instance #25

Open snap9 opened 7 years ago

snap9 commented 7 years ago

Is someone able to give BigFloat a Read instance?

snap9 commented 7 years ago

@jwiegley Hey, are you still actively maintaining this? Last update was in 2014. I'm wondering if any developers are working on this library anymore.

snap9 commented 7 years ago

@cartazio Hey, are you taking over the project? I saw your comments from January here: https://github.com/jwiegley/numbers/pull/10

jwiegley commented 7 years ago

I have not been maintaining it lately, and @cartazio I don't think has had the time. We are open to finding a new maintainer.

cartazio commented 7 years ago

@jwiegley im actually interested in helping with this (though i am pretty hosed)

@snap9 question: what semantics / meaning do you expect read to have in this case? in essence (in general) it'll wind up being equivalent to fmap fromRational . readMaybe or a read through the same style code as for the number rep in Scientific, but with truncation at the end see the docs for scientific here

snap9 commented 7 years ago

@cartazio Wow, it looks like fmap fromRational . readMaybe would work. Yet if the Scientific solution with truncation is substantially faster, we should probably go with that. I haven't benchmarked it.

snap9 commented 7 years ago

@cartazio also, could the method the standard library uses for Float and Double also work for BigFloat? I can't tell as I don't understand those Float and Double implementations of Read (they're quite involved).