You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
probable currently uses the Double type to manipulate probability values, which precision is bounded (up to 64 bits, unless I am mistaken).
What do you think about using the Scientific type instead, from the scientific package ? It supports arbitrary precision values and claims to be space efficient.
The text was updated successfully, but these errors were encountered:
In the spirit of this comment, I suspect a better choice would be Log Double, but I haven't really measured how much the arbitrary precision and all the bells and whistles that come with Scientific cost in terms of performance. There's a performance/numerical stability/precision trade-off here. Perhaps in an ideal world (or patch :p) we could make that call at the use site and not in the library itself. Thoughts?
PS: haven't seen you in a long time before today, you should drop by #haskell-fr one of these days :-)
Haven't thought about it that much honestly, I just happen to be working on a project in which everything is stored as a Scientific, and I wish I could avoid losing precision when using probable, even though it's not that big a deal in my case.
I will try and write a couple of benchmarks, if/when time permits.
Well something useful would be to just abstract away the Double that we currently have into a type param. Then we could use Log Double, Scientific or just Double. Might require having a class that encompasses the operations we require on the "probability weight type".
probable
currently uses theDouble
type to manipulate probability values, which precision is bounded (up to 64 bits, unless I am mistaken).What do you think about using the
Scientific
type instead, from the scientific package ? It supports arbitrary precision values and claims to be space efficient.The text was updated successfully, but these errors were encountered: