\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}\\
\mathbf{if}\;r \leq -2.424091774928309 \cdot 10^{+34}:\\
\;\;\;\;t_0 - \mathsf{fma}\left(r, \left(r \cdot w\right) \cdot \left(\left(w \cdot \mathsf{fma}\left(v, -0.25, 0.375\right)\right) \cdot \frac{1}{1 - v}\right), 1.5\right)\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_1 := \frac{\mathsf{fma}\left(v, -0.25, 0.375\right)}{1 - v}\\
\mathbf{if}\;r \leq 5.256561651639415 \cdot 10^{-29}:\\
\;\;\;\;t_0 - \left(1.5 + \left(r \cdot \left(r \cdot w\right)\right) \cdot \left(w \cdot t_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{r}}{r} - \mathsf{fma}\left(r, t_1 \cdot \left(w \cdot \left(r \cdot w\right)\right), 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))))
(if (<= r -2.424091774928309e+34)
(-
t_0
(fma r (* (* r w) (* (* w (fma v -0.25 0.375)) (/ 1.0 (- 1.0 v)))) 1.5))
(let* ((t_1 (/ (fma v -0.25 0.375) (- 1.0 v))))
(if (<= r 5.256561651639415e-29)
(- t_0 (+ 1.5 (* (* r (* r w)) (* w t_1))))
(- (/ (/ 2.0 r) r) (fma r (* t_1 (* w (* r w))) 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 tmp;
if (r <= -2.424091774928309e+34) {
tmp = t_0 - fma(r, ((r * w) * ((w * fma(v, -0.25, 0.375)) * (1.0 / (1.0 - v)))), 1.5);
} else {
double t_1 = fma(v, -0.25, 0.375) / (1.0 - v);
double tmp_1;
if (r <= 5.256561651639415e-29) {
tmp_1 = t_0 - (1.5 + ((r * (r * w)) * (w * t_1)));
} else {
tmp_1 = ((2.0 / r) / r) - fma(r, (t_1 * (w * (r * w))), 1.5);
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus v



Bits error versus w



Bits error versus r
if r < -2.4240917749283089e34Initial program 16.0
Simplified8.6
Applied associate-*r*_binary640.2
Applied associate-*l*_binary640.2
Applied div-inv_binary640.2
Applied associate-*r*_binary640.6
if -2.4240917749283089e34 < r < 5.2565616516394145e-29Initial program 10.6
Simplified9.1
Applied associate-*r*_binary644.7
Applied associate-*l*_binary644.7
Applied fma-udef_binary644.7
Applied associate-*r*_binary640.3
if 5.2565616516394145e-29 < r Initial program 13.3
Simplified7.1
Applied associate-*r*_binary640.2
Applied associate-/r*_binary640.3
Final simplification0.3
herbie shell --seed 2022024
(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))