Average Error: 0.1 → 0.6
Time: 3.3s
Precision: binary64
\[0 < m \land 0 < v \land v < 0.25\]
\[\left(\frac{m \cdot \left(1 - m\right)}{v} - 1\right) \cdot \left(1 - m\right)\]
\[\left(\frac{m \cdot \left({1}^{3} - {m}^{3}\right)}{v \cdot \left(m \cdot m + 1 \cdot \left(m + 1\right)\right)} - 1\right) \cdot \left(1 - m\right)\]
\left(\frac{m \cdot \left(1 - m\right)}{v} - 1\right) \cdot \left(1 - m\right)
\left(\frac{m \cdot \left({1}^{3} - {m}^{3}\right)}{v \cdot \left(m \cdot m + 1 \cdot \left(m + 1\right)\right)} - 1\right) \cdot \left(1 - m\right)
(FPCore (m v) :precision binary64 (* (- (/ (* m (- 1.0 m)) v) 1.0) (- 1.0 m)))
(FPCore (m v)
 :precision binary64
 (*
  (-
   (/ (* m (- (pow 1.0 3.0) (pow m 3.0))) (* v (+ (* m m) (* 1.0 (+ m 1.0)))))
   1.0)
  (- 1.0 m)))
double code(double m, double v) {
	return ((double) (((double) ((((double) (m * ((double) (1.0 - m)))) / v) - 1.0)) * ((double) (1.0 - m))));
}
double code(double m, double v) {
	return ((double) (((double) ((((double) (m * ((double) (((double) pow(1.0, 3.0)) - ((double) pow(m, 3.0)))))) / ((double) (v * ((double) (((double) (m * m)) + ((double) (1.0 * ((double) (m + 1.0))))))))) - 1.0)) * ((double) (1.0 - 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.1

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

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

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

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

    \[\leadsto \left(\frac{m \cdot \left({1}^{3} - {m}^{3}\right)}{\color{blue}{v \cdot \left(m \cdot m + 1 \cdot \left(m + 1\right)\right)}} - 1\right) \cdot \left(1 - m\right)\]
  7. Final simplification0.6

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

Reproduce

herbie shell --seed 2020205 
(FPCore (m v)
  :name "b 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) (- 1.0 m)))