Average Error: 0.1 → 0.1
Time: 1.8m
Precision: 64
Ground Truth: 128
\[\left(\frac{m \cdot \left(1 - m\right)}{v} - 1\right) \cdot \left(1 - m\right)\]
\[\left(\frac{m - {m}^2}{v} - 1\right) \cdot \left(1 - m\right)\]

Error

Bits error versus m

Bits error versus v

Derivation

  1. Initial program 0.1

    \[\left(\frac{m \cdot \left(1 - m\right)}{v} - 1\right) \cdot \left(1 - m\right)\]
  2. Applied taylor 0.1

    \[\leadsto \left(\frac{m - {m}^2}{v} - 1\right) \cdot \left(1 - m\right)\]
  3. Taylor expanded around 0 0.1

    \[\leadsto \left(\frac{\color{blue}{m - {m}^2}}{v} - 1\right) \cdot \left(1 - m\right)\]
  4. Removed slow pow expressions

Runtime

Total time: 1.8m Debug log

Please include this information when filing a bug report:

herbie --seed '#(2151212895 762856151 3271092982 78694672 3135315502 414136599)'
(FPCore (m v)
  :name "b parameter of renormalized beta distribution"
  :pre (and (< 0 m) (< 0 v) (< v 0.25))
  (* (- (/ (* m (- 1 m)) v) 1) (- 1 m)))