\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}
t_0 := \frac{2}{r \cdot r}\\
t_1 := \frac{\mathsf{fma}\left(v, -0.25, 0.375\right)}{1 - v}\\
\mathbf{if}\;r \leq -2.485594501701809 \cdot 10^{-39}:\\
\;\;\;\;t_0 - \mathsf{fma}\left(r, \left(w \cdot \left(r \cdot w\right)\right) \cdot t_1, 1.5\right)\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_2 := w \cdot t_1\\
\mathbf{if}\;r \leq 1.3374143467488828 \cdot 10^{-73}:\\
\;\;\;\;\begin{array}{l}
t_3 := \sqrt{\mathsf{fma}\left(\left(r \cdot r\right) \cdot w, t_2, 1.5\right)}\\
t_0 - t_3 \cdot t_3
\end{array}\\
\mathbf{else}:\\
\;\;\;\;t_0 - \mathsf{fma}\left(r, \left(r \cdot w\right) \cdot t_2, 1.5\right)\\
\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
(let* ((t_0 (/ 2.0 (* r r))) (t_1 (/ (fma v -0.25 0.375) (- 1.0 v))))
(if (<= r -2.485594501701809e-39)
(- t_0 (fma r (* (* w (* r w)) t_1) 1.5))
(let* ((t_2 (* w t_1)))
(if (<= r 1.3374143467488828e-73)
(let* ((t_3 (sqrt (fma (* (* r r) w) t_2 1.5)))) (- t_0 (* t_3 t_3)))
(- t_0 (fma r (* (* r w) t_2) 1.5)))))))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 t_0 = 2.0 / (r * r);
double t_1 = fma(v, -0.25, 0.375) / (1.0 - v);
double tmp;
if (r <= -2.485594501701809e-39) {
tmp = t_0 - fma(r, ((w * (r * w)) * t_1), 1.5);
} else {
double t_2 = w * t_1;
double tmp_1;
if (r <= 1.3374143467488828e-73) {
double t_3_2 = sqrt(fma(((r * r) * w), t_2, 1.5));
tmp_1 = t_0 - (t_3_2 * t_3_2);
} else {
tmp_1 = t_0 - fma(r, ((r * w) * t_2), 1.5);
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus v



Bits error versus w



Bits error versus r
if r < -2.48559450170180914e-39Initial program 12.5
Simplified6.0
Applied associate-*r*_binary640.5
if -2.48559450170180914e-39 < r < 1.337414346748883e-73Initial program 12.7
Simplified11.7
Applied associate-*r*_binary646.2
Applied associate-*l*_binary646.2
Applied add-sqr-sqrt_binary646.2
Simplified6.2
Simplified0.3
if 1.337414346748883e-73 < r Initial program 13.7
Simplified7.6
Applied associate-*r*_binary640.9
Applied associate-*l*_binary640.9
Final simplification0.6
herbie shell --seed 2022121
(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))