Average Error: 0.2 → 0.2
Time: 25.6s
Precision: 64
Internal Precision: 128
\[\left(\frac{m \cdot \left(1 - m\right)}{v} - 1\right) \cdot m\]
\[\left(\left(m \cdot \left(1 - m\right)\right) \cdot \frac{1}{v} - 1\right) \cdot m\]

Error

Bits error versus m

Bits error versus v

Derivation

  1. Initial program 0.2

    \[\left(\frac{m \cdot \left(1 - m\right)}{v} - 1\right) \cdot m\]
  2. Using strategy rm
  3. Applied div-inv0.2

    \[\leadsto \left(\color{blue}{\left(m \cdot \left(1 - m\right)\right) \cdot \frac{1}{v}} - 1\right) \cdot m\]
  4. Final simplification0.2

    \[\leadsto \left(\left(m \cdot \left(1 - m\right)\right) \cdot \frac{1}{v} - 1\right) \cdot m\]

Reproduce

herbie shell --seed 2019050 +o rules:numerics
(FPCore (m v)
  :name "a parameter of renormalized beta distribution"
  :pre (and (< 0 m) (< 0 v) (< v 0.25))
  (* (- (/ (* m (- 1 m)) v) 1) m))