\[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\]
↓
\[\begin{array}{l}
\mathbf{if}\;y \leq -6.4 \cdot 10^{+35} \lor \neg \left(y \leq 4.4 \cdot 10^{+48}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot \left(y \cdot \left(y + a\right) + b\right)\right)} + y \cdot \frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \mathsf{fma}\left(y, x, z\right)\right)}{\mathsf{fma}\left(y, c + y \cdot \mathsf{fma}\left(y + a, y, b\right), i\right)}\\
\end{array}
\]
(FPCore (x y z t a b c i)
:precision binary64
(/
(+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
↓
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -6.4e+35) (not (<= y 4.4e+48)))
(+ x (- (/ z y) (* x (/ a y))))
(+
(/ t (+ i (* y (+ c (* y (+ (* y (+ y a)) b))))))
(*
y
(/
(+ 230661.510616 (* y (+ 27464.7644705 (* y (fma y x z)))))
(fma y (+ c (* y (fma (+ y a) y b))) i))))))
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
↓
\begin{array}{l}
\mathbf{if}\;y \leq -6.4 \cdot 10^{+35} \lor \neg \left(y \leq 4.4 \cdot 10^{+48}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot \left(y \cdot \left(y + a\right) + b\right)\right)} + y \cdot \frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \mathsf{fma}\left(y, x, z\right)\right)}{\mathsf{fma}\left(y, c + y \cdot \mathsf{fma}\left(y + a, y, b\right), i\right)}\\
\end{array}
Error
Derivation
Split input into 2 regimes
if y < -6.39999999999999965e35 or 4.3999999999999999e48 < y
Initial program 61.4
\[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\]
Taylor expanded in x around 0 61.8
\[\leadsto \frac{\color{blue}{\left(y \cdot \left(230661.510616 + y \cdot \left(y \cdot z + 27464.7644705\right)\right) + {y}^{4} \cdot x\right)} + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\]
\[ x + \left(\frac{z}{y} - \color{blue}{\frac{a}{\frac{y}{x}}}\right)
\]
associate-/r/ [=>]19.0
\[ x + \left(\frac{z}{y} - \color{blue}{\frac{a}{y} \cdot x}\right)
\]
if -6.39999999999999965e35 < y < 4.3999999999999999e48
Initial program 2.9
\[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\]
Taylor expanded in t around inf 2.9
\[\leadsto \color{blue}{\frac{t}{y \cdot \left(c + y \cdot \left(\left(y + a\right) \cdot y + b\right)\right) + i} + \frac{\left(230661.510616 + y \cdot \left(27464.7644705 + \left(y \cdot x + z\right) \cdot y\right)\right) \cdot y}{y \cdot \left(c + y \cdot \left(\left(y + a\right) \cdot y + b\right)\right) + i}}
\]
Applied egg-rr2.8
\[\leadsto \frac{t}{y \cdot \left(c + y \cdot \left(\left(y + a\right) \cdot y + b\right)\right) + i} + \color{blue}{\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \mathsf{fma}\left(y, x, z\right)\right)}{\mathsf{fma}\left(y, c + y \cdot \mathsf{fma}\left(y + a, y, b\right), i\right)} \cdot y}
\]
Recombined 2 regimes into one program.
Final simplification10.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;y \leq -6.4 \cdot 10^{+35} \lor \neg \left(y \leq 4.4 \cdot 10^{+48}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot \left(y \cdot \left(y + a\right) + b\right)\right)} + y \cdot \frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \mathsf{fma}\left(y, x, z\right)\right)}{\mathsf{fma}\left(y, c + y \cdot \mathsf{fma}\left(y + a, y, b\right), i\right)}\\
\end{array}
\]
Alternatives
Alternative 1
Error
10.2
Cost
8841
\[\begin{array}{l}
\mathbf{if}\;y \leq -6.4 \cdot 10^{+35} \lor \neg \left(y \leq 6.1 \cdot 10^{+41}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + \left(y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right) + x \cdot {y}^{4}\right)}{i + y \cdot \left(c + y \cdot \left(y \cdot \left(y + a\right) + b\right)\right)}\\
\end{array}
\]
Alternative 2
Error
10.1
Cost
2377
\[\begin{array}{l}
\mathbf{if}\;y \leq -6.4 \cdot 10^{+35} \lor \neg \left(y \leq 9 \cdot 10^{+41}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)\right)}{i + y \cdot \left(c + y \cdot \left(y \cdot \left(y + a\right) + b\right)\right)}\\
\end{array}
\]
Alternative 3
Error
12.3
Cost
2252
\[\begin{array}{l}
t_1 := i + y \cdot \left(c + y \cdot \left(y \cdot \left(y + a\right) + b\right)\right)\\
t_2 := x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\
\mathbf{if}\;y \leq -6 \cdot 10^{+35}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -7.2 \cdot 10^{-36}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + x \cdot \left(y \cdot y\right)\right)\right)}{t_1}\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{+42}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{t_1}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 4
Error
12.5
Cost
2121
\[\begin{array}{l}
\mathbf{if}\;y \leq -6.4 \cdot 10^{+35} \lor \neg \left(y \leq 5.2 \cdot 10^{+42}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(y \cdot \left(y + a\right) + b\right)\right)}\\
\end{array}
\]
Alternative 5
Error
13.0
Cost
1993
\[\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+19} \lor \neg \left(y \leq 4.9 \cdot 10^{+42}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + z \cdot \left(y \cdot y\right)\right)}{i + y \cdot \left(c + y \cdot \left(y \cdot \left(y + a\right) + b\right)\right)}\\
\end{array}
\]
Alternative 6
Error
15.2
Cost
1865
\[\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+60} \lor \neg \left(y \leq 2.2 \cdot 10^{+42}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i + y \cdot \left(c + y \cdot \left(y \cdot \left(y + a\right) + b\right)\right)}\\
\end{array}
\]
Alternative 7
Error
16.2
Cost
1737
\[\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+35} \lor \neg \left(y \leq 7.2 \cdot 10^{+32}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)\right)}{i + y \cdot c}\\
\end{array}
\]
herbie shell --seed 2022364
(FPCore (x y z t a b c i)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2"
:precision binary64
(/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))