Average Error: 0.2 → 0.2
Time: 4.2s
Precision: binary64
\[0 < m \land 0 < v \land v < 0.25\]
\[\left(\frac{m \cdot \left(1 - m\right)}{v} - 1\right) \cdot m\]
\[\frac{m}{v} \cdot \left(m - m \cdot m\right) - m\]
\left(\frac{m \cdot \left(1 - m\right)}{v} - 1\right) \cdot m
\frac{m}{v} \cdot \left(m - m \cdot m\right) - m
(FPCore (m v) :precision binary64 (* (- (/ (* m (- 1.0 m)) v) 1.0) m))
(FPCore (m v) :precision binary64 (- (* (/ m v) (- m (* m m))) m))
double code(double m, double v) {
	return (((m * (1.0 - m)) / v) - 1.0) * m;
}
double code(double m, double v) {
	return ((m / v) * (m - (m * m))) - m;
}

Error

Bits error versus m

Bits error versus v

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

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 flip--_binary64_530.2

    \[\leadsto \left(\frac{m \cdot \color{blue}{\frac{1 \cdot 1 - m \cdot m}{1 + m}}}{v} - 1\right) \cdot m\]
  4. Applied associate-*r/_binary64_200.2

    \[\leadsto \left(\frac{\color{blue}{\frac{m \cdot \left(1 \cdot 1 - m \cdot m\right)}{1 + m}}}{v} - 1\right) \cdot m\]
  5. Applied associate-/l/_binary64_250.2

    \[\leadsto \left(\color{blue}{\frac{m \cdot \left(1 \cdot 1 - m \cdot m\right)}{v \cdot \left(1 + m\right)}} - 1\right) \cdot m\]
  6. Simplified0.2

    \[\leadsto \left(\frac{m \cdot \left(1 \cdot 1 - m \cdot m\right)}{\color{blue}{v \cdot \left(m + 1\right)}} - 1\right) \cdot m\]
  7. Taylor expanded around 0 6.9

    \[\leadsto \color{blue}{\frac{{m}^{2}}{v} - \left(\frac{{m}^{3}}{v} + m\right)}\]
  8. Simplified0.2

    \[\leadsto \color{blue}{\frac{m}{v} \cdot m - \left(m + \frac{{m}^{3}}{v}\right)}\]
  9. Taylor expanded around 0 6.9

    \[\leadsto \color{blue}{\frac{{m}^{2}}{v} - \left(\frac{{m}^{3}}{v} + m\right)}\]
  10. Simplified0.2

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

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

Reproduce

herbie shell --seed 2020354 
(FPCore (m v)
  :name "a parameter of renormalized beta distribution"
  :precision binary64
  :pre (and (< 0.0 m) (< 0.0 v) (< v 0.25))
  (* (- (/ (* m (- 1.0 m)) v) 1.0) m))