stripe / rainier

Bayesian inference in Scala.
https://rainier.fit
Apache License 2.0
432 stars 51 forks source link

Use Decimal inside Placeholder #439

Closed avibryant closed 4 years ago

avibryant commented 4 years ago

The big win here is that we can have special int vs double constructors for Fn, which means we can use Real(1) semantics instead of Real(1.0) for data.

Doing this exposed a weakness in FractionDecimal where you can overflow Long too easily; we switched to Double for the numerator and denominator so that you just lose precision vs overflow when this happens.