\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{\frac{2}{r}}{r}\\
t_1 := \frac{\mathsf{fma}\left(v, -0.25, 0.375\right)}{1 - v}\\
\mathbf{if}\;r \leq -3.797359757468544 \cdot 10^{-126}:\\
\;\;\;\;t_0 - \mathsf{fma}\left(r, \left(w \cdot \left(r \cdot w\right)\right) \cdot t_1, 1.5\right)\\
\mathbf{elif}\;r \leq 7.915067883874499 \cdot 10^{-92}:\\
\;\;\;\;\frac{2}{r \cdot r} - 1.5\\
\mathbf{else}:\\
\;\;\;\;t_0 - \mathsf{fma}\left(r, w \cdot \left(\left(r \cdot w\right) \cdot t_1\right), 1.5\right)\\
\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 -3.797359757468544e-126)
(- t_0 (fma r (* (* w (* r w)) t_1) 1.5))
(if (<= r 7.915067883874499e-92)
(- (/ 2.0 (* r r)) 1.5)
(- t_0 (fma r (* w (* (* r w) t_1)) 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 <= -3.797359757468544e-126) {
tmp = t_0 - fma(r, ((w * (r * w)) * t_1), 1.5);
} else if (r <= 7.915067883874499e-92) {
tmp = (2.0 / (r * r)) - 1.5;
} else {
tmp = t_0 - fma(r, (w * ((r * w) * t_1)), 1.5);
}
return tmp;
}



Bits error versus v



Bits error versus w



Bits error versus r
if r < -3.797359757468544e-126Initial program 12.3
Simplified7.3
Applied associate-*r*_binary641.6
Applied associate-/r*_binary641.6
Applied *-commutative_binary641.6
if -3.797359757468544e-126 < r < 7.91506788387449927e-92Initial program 14.9
Simplified14.9
Taylor expanded in r around 0 3.6
if 7.91506788387449927e-92 < r Initial program 12.1
Simplified6.6
Applied associate-*r*_binary640.9
Applied associate-/r*_binary640.9
Applied pow1_binary640.9
Applied pow1_binary640.9
Applied pow1_binary640.9
Applied pow1_binary640.9
Applied pow-prod-down_binary640.9
Applied pow-prod-down_binary640.9
Applied pow-prod-down_binary640.9
Simplified0.9
Final simplification1.7
herbie shell --seed 2022020
(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))