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

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. Simplified0.2

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

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

Reproduce

herbie shell --seed 2019030 +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))