\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5
\begin{array}{l}
\mathbf{if}\;w \cdot w \leq 4.29896508473143 \cdot 10^{+278}:\\
\;\;\;\;\frac{\frac{2}{r}}{r} - \mathsf{fma}\left(r, \left(w \cdot \left(w \cdot r\right)\right) \cdot \frac{\mathsf{fma}\left(v, -0.25, 0.375\right)}{1 - v}, 1.5\right)\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_0 := \sqrt{\mathsf{fma}\left(w \cdot \left(r \cdot r\right), \mathsf{fma}\left(v, -0.25, 0.375\right) \cdot \frac{w}{1 - v}, 1.5\right)}\\
\frac{2}{r \cdot r} - t_0 \cdot t_0
\end{array}\\
\end{array}
(FPCore (v w r) :precision binary64 (- (- (+ 3.0 (/ 2.0 (* r r))) (/ (* (* 0.125 (- 3.0 (* 2.0 v))) (* (* (* w w) r) r)) (- 1.0 v))) 4.5))
(FPCore (v w r)
:precision binary64
(if (<= (* w w) 4.29896508473143e+278)
(-
(/ (/ 2.0 r) r)
(fma r (* (* w (* w r)) (/ (fma v -0.25 0.375) (- 1.0 v))) 1.5))
(let* ((t_0
(sqrt
(fma (* w (* r r)) (* (fma v -0.25 0.375) (/ w (- 1.0 v))) 1.5))))
(- (/ 2.0 (* r r)) (* t_0 t_0)))))double code(double v, double w, double r) {
return ((3.0 + (2.0 / (r * r))) - (((0.125 * (3.0 - (2.0 * v))) * (((w * w) * r) * r)) / (1.0 - v))) - 4.5;
}
double code(double v, double w, double r) {
double tmp;
if ((w * w) <= 4.29896508473143e+278) {
tmp = ((2.0 / r) / r) - fma(r, ((w * (w * r)) * (fma(v, -0.25, 0.375) / (1.0 - v))), 1.5);
} else {
double t_0 = sqrt(fma((w * (r * r)), (fma(v, -0.25, 0.375) * (w / (1.0 - v))), 1.5));
tmp = (2.0 / (r * r)) - (t_0 * t_0);
}
return tmp;
}



Bits error versus v



Bits error versus w



Bits error versus r
if (*.f64 w w) < 4.29896508473143004e278Initial program 8.7
Simplified4.3
Applied associate-*r*_binary640.2
Applied associate-/r*_binary640.2
if 4.29896508473143004e278 < (*.f64 w w) Initial program 55.7
Simplified52.9
Applied associate-*r*_binary6424.9
Applied associate-*l*_binary6424.8
Applied add-sqr-sqrt_binary6424.9
Simplified24.8
Simplified0.5
Final simplification0.3
herbie shell --seed 2021275
(FPCore (v w r)
:name "Rosa's TurbineBenchmark"
:precision binary64
(- (- (+ 3.0 (/ 2.0 (* r r))) (/ (* (* 0.125 (- 3.0 (* 2.0 v))) (* (* (* w w) r) r)) (- 1.0 v))) 4.5))