Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2

Percentage Accurate: 56.8% → 88.1%
Time: 33.4s
Alternatives: 14
Speedup: 1.9×

Specification

?
\[\begin{array}{l} \\ \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} \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)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i):
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\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}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 14 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 56.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \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} \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)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i):
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\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}
\end{array}

Alternative 1: 88.1% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b + y \cdot \left(y + a\right)\\ t_2 := \frac{{y}^{2}}{t\_1}\\ t_3 := x \cdot t\_1\\ t_4 := \frac{1}{t\_3}\\ t_5 := \frac{t}{x \cdot \left(t\_1 \cdot {y}^{2}\right)}\\ t_6 := y \cdot t\_1\\ t_7 := i + y \cdot \left(t\_6 + c\right)\\ t_8 := \frac{1}{x \cdot t\_6}\\ \mathbf{if}\;y \leq -1.65 \cdot 10^{+124}:\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{+17}:\\ \;\;\;\;x \cdot \left(230661.510616 \cdot t\_8 + \left(27464.7644705 \cdot t\_4 + \left(t\_5 + \left(\frac{y \cdot z}{t\_3} + t\_2\right)\right)\right)\right)\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{+15}:\\ \;\;\;\;\frac{t}{t\_7} + \left(\frac{x \cdot {y}^{4}}{t\_7} + \frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{t\_7}\right)\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+139}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(230661.510616, t\_8, \mathsf{fma}\left(27464.7644705, t\_4, t\_5 + \left(t\_2 + \frac{y}{x} \cdot \frac{z}{t\_1}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ b (* y (+ y a))))
        (t_2 (/ (pow y 2.0) t_1))
        (t_3 (* x t_1))
        (t_4 (/ 1.0 t_3))
        (t_5 (/ t (* x (* t_1 (pow y 2.0)))))
        (t_6 (* y t_1))
        (t_7 (+ i (* y (+ t_6 c))))
        (t_8 (/ 1.0 (* x t_6))))
   (if (<= y -1.65e+124)
     (- x (/ (* z (+ -1.0 (/ a y))) y))
     (if (<= y -1.6e+17)
       (*
        x
        (+
         (* 230661.510616 t_8)
         (+ (* 27464.7644705 t_4) (+ t_5 (+ (/ (* y z) t_3) t_2)))))
       (if (<= y 4.8e+15)
         (+
          (/ t t_7)
          (+
           (/ (* x (pow y 4.0)) t_7)
           (/ (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))) t_7)))
         (if (<= y 6.5e+139)
           (*
            x
            (fma
             230661.510616
             t_8
             (fma 27464.7644705 t_4 (+ t_5 (+ t_2 (* (/ y x) (/ z t_1)))))))
           (+ x (- (/ z y) (* a (/ x y))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = b + (y * (y + a));
	double t_2 = pow(y, 2.0) / t_1;
	double t_3 = x * t_1;
	double t_4 = 1.0 / t_3;
	double t_5 = t / (x * (t_1 * pow(y, 2.0)));
	double t_6 = y * t_1;
	double t_7 = i + (y * (t_6 + c));
	double t_8 = 1.0 / (x * t_6);
	double tmp;
	if (y <= -1.65e+124) {
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	} else if (y <= -1.6e+17) {
		tmp = x * ((230661.510616 * t_8) + ((27464.7644705 * t_4) + (t_5 + (((y * z) / t_3) + t_2))));
	} else if (y <= 4.8e+15) {
		tmp = (t / t_7) + (((x * pow(y, 4.0)) / t_7) + ((y * (230661.510616 + (y * (27464.7644705 + (y * z))))) / t_7));
	} else if (y <= 6.5e+139) {
		tmp = x * fma(230661.510616, t_8, fma(27464.7644705, t_4, (t_5 + (t_2 + ((y / x) * (z / t_1))))));
	} else {
		tmp = x + ((z / y) - (a * (x / y)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(b + Float64(y * Float64(y + a)))
	t_2 = Float64((y ^ 2.0) / t_1)
	t_3 = Float64(x * t_1)
	t_4 = Float64(1.0 / t_3)
	t_5 = Float64(t / Float64(x * Float64(t_1 * (y ^ 2.0))))
	t_6 = Float64(y * t_1)
	t_7 = Float64(i + Float64(y * Float64(t_6 + c)))
	t_8 = Float64(1.0 / Float64(x * t_6))
	tmp = 0.0
	if (y <= -1.65e+124)
		tmp = Float64(x - Float64(Float64(z * Float64(-1.0 + Float64(a / y))) / y));
	elseif (y <= -1.6e+17)
		tmp = Float64(x * Float64(Float64(230661.510616 * t_8) + Float64(Float64(27464.7644705 * t_4) + Float64(t_5 + Float64(Float64(Float64(y * z) / t_3) + t_2)))));
	elseif (y <= 4.8e+15)
		tmp = Float64(Float64(t / t_7) + Float64(Float64(Float64(x * (y ^ 4.0)) / t_7) + Float64(Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z))))) / t_7)));
	elseif (y <= 6.5e+139)
		tmp = Float64(x * fma(230661.510616, t_8, fma(27464.7644705, t_4, Float64(t_5 + Float64(t_2 + Float64(Float64(y / x) * Float64(z / t_1)))))));
	else
		tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[y, 2.0], $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x * t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(1.0 / t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(t / N[(x * N[(t$95$1 * N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(y * t$95$1), $MachinePrecision]}, Block[{t$95$7 = N[(i + N[(y * N[(t$95$6 + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(1.0 / N[(x * t$95$6), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.65e+124], N[(x - N[(N[(z * N[(-1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.6e+17], N[(x * N[(N[(230661.510616 * t$95$8), $MachinePrecision] + N[(N[(27464.7644705 * t$95$4), $MachinePrecision] + N[(t$95$5 + N[(N[(N[(y * z), $MachinePrecision] / t$95$3), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e+15], N[(N[(t / t$95$7), $MachinePrecision] + N[(N[(N[(x * N[Power[y, 4.0], $MachinePrecision]), $MachinePrecision] / t$95$7), $MachinePrecision] + N[(N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e+139], N[(x * N[(230661.510616 * t$95$8 + N[(27464.7644705 * t$95$4 + N[(t$95$5 + N[(t$95$2 + N[(N[(y / x), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b + y \cdot \left(y + a\right)\\
t_2 := \frac{{y}^{2}}{t\_1}\\
t_3 := x \cdot t\_1\\
t_4 := \frac{1}{t\_3}\\
t_5 := \frac{t}{x \cdot \left(t\_1 \cdot {y}^{2}\right)}\\
t_6 := y \cdot t\_1\\
t_7 := i + y \cdot \left(t\_6 + c\right)\\
t_8 := \frac{1}{x \cdot t\_6}\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+124}:\\
\;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\

\mathbf{elif}\;y \leq -1.6 \cdot 10^{+17}:\\
\;\;\;\;x \cdot \left(230661.510616 \cdot t\_8 + \left(27464.7644705 \cdot t\_4 + \left(t\_5 + \left(\frac{y \cdot z}{t\_3} + t\_2\right)\right)\right)\right)\\

\mathbf{elif}\;y \leq 4.8 \cdot 10^{+15}:\\
\;\;\;\;\frac{t}{t\_7} + \left(\frac{x \cdot {y}^{4}}{t\_7} + \frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{t\_7}\right)\\

\mathbf{elif}\;y \leq 6.5 \cdot 10^{+139}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(230661.510616, t\_8, \mathsf{fma}\left(27464.7644705, t\_4, t\_5 + \left(t\_2 + \frac{y}{x} \cdot \frac{z}{t\_1}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.65000000000000007e124

    1. Initial program 0.0%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 60.8%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{27464.7644705 - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Taylor expanded in z around inf 87.6%

      \[\leadsto x + -1 \cdot \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]

    if -1.65000000000000007e124 < y < -1.6e17

    1. Initial program 45.1%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 53.0%

      \[\leadsto \color{blue}{x \cdot \left(\frac{t}{x \cdot \left(i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)\right)} + \left(\frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{x \cdot \left(i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)\right)} + \frac{{y}^{4}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}\right)\right)} \]
    4. Taylor expanded in i around 0 63.3%

      \[\leadsto \color{blue}{x \cdot \left(230661.510616 \cdot \frac{1}{x \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \left(\frac{t}{x \cdot \left(y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)\right)} + \left(\frac{y \cdot \left(27464.7644705 + y \cdot z\right)}{x \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \frac{{y}^{3}}{c + y \cdot \left(b + y \cdot \left(a + y\right)\right)}\right)\right)\right)} \]
    5. Taylor expanded in c around 0 71.8%

      \[\leadsto \color{blue}{x \cdot \left(230661.510616 \cdot \frac{1}{x \cdot \left(y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \left(27464.7644705 \cdot \frac{1}{x \cdot \left(b + y \cdot \left(a + y\right)\right)} + \left(\frac{t}{x \cdot \left({y}^{2} \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \left(\frac{y \cdot z}{x \cdot \left(b + y \cdot \left(a + y\right)\right)} + \frac{{y}^{2}}{b + y \cdot \left(a + y\right)}\right)\right)\right)\right)} \]

    if -1.6e17 < y < 4.8e15

    1. Initial program 99.7%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 99.7%

      \[\leadsto \color{blue}{\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \left(\frac{x \cdot {y}^{4}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}\right)} \]

    if 4.8e15 < y < 6.5000000000000003e139

    1. Initial program 17.0%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 23.1%

      \[\leadsto \color{blue}{x \cdot \left(\frac{t}{x \cdot \left(i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)\right)} + \left(\frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{x \cdot \left(i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)\right)} + \frac{{y}^{4}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}\right)\right)} \]
    4. Taylor expanded in i around 0 30.9%

      \[\leadsto \color{blue}{x \cdot \left(230661.510616 \cdot \frac{1}{x \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \left(\frac{t}{x \cdot \left(y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)\right)} + \left(\frac{y \cdot \left(27464.7644705 + y \cdot z\right)}{x \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \frac{{y}^{3}}{c + y \cdot \left(b + y \cdot \left(a + y\right)\right)}\right)\right)\right)} \]
    5. Taylor expanded in c around 0 73.3%

      \[\leadsto \color{blue}{x \cdot \left(230661.510616 \cdot \frac{1}{x \cdot \left(y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \left(27464.7644705 \cdot \frac{1}{x \cdot \left(b + y \cdot \left(a + y\right)\right)} + \left(\frac{t}{x \cdot \left({y}^{2} \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \left(\frac{y \cdot z}{x \cdot \left(b + y \cdot \left(a + y\right)\right)} + \frac{{y}^{2}}{b + y \cdot \left(a + y\right)}\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. fma-define73.3%

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(230661.510616, \frac{1}{x \cdot \left(y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}, 27464.7644705 \cdot \frac{1}{x \cdot \left(b + y \cdot \left(a + y\right)\right)} + \left(\frac{t}{x \cdot \left({y}^{2} \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \left(\frac{y \cdot z}{x \cdot \left(b + y \cdot \left(a + y\right)\right)} + \frac{{y}^{2}}{b + y \cdot \left(a + y\right)}\right)\right)\right)} \]
      2. fma-define73.3%

        \[\leadsto x \cdot \mathsf{fma}\left(230661.510616, \frac{1}{x \cdot \left(y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}, \color{blue}{\mathsf{fma}\left(27464.7644705, \frac{1}{x \cdot \left(b + y \cdot \left(a + y\right)\right)}, \frac{t}{x \cdot \left({y}^{2} \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \left(\frac{y \cdot z}{x \cdot \left(b + y \cdot \left(a + y\right)\right)} + \frac{{y}^{2}}{b + y \cdot \left(a + y\right)}\right)\right)}\right) \]
    7. Simplified73.8%

      \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(230661.510616, \frac{1}{x \cdot \left(y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}, \mathsf{fma}\left(27464.7644705, \frac{1}{x \cdot \left(b + y \cdot \left(a + y\right)\right)}, \frac{t}{x \cdot \left({y}^{2} \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \left(\frac{y}{x} \cdot \frac{z}{b + y \cdot \left(a + y\right)} + \frac{{y}^{2}}{b + y \cdot \left(a + y\right)}\right)\right)\right)} \]

    if 6.5000000000000003e139 < y

    1. Initial program 0.0%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 89.3%

      \[\leadsto \color{blue}{\left(x + \frac{z}{y}\right) - \frac{a \cdot x}{y}} \]
    4. Step-by-step derivation
      1. associate--l+89.3%

        \[\leadsto \color{blue}{x + \left(\frac{z}{y} - \frac{a \cdot x}{y}\right)} \]
      2. associate-/l*92.6%

        \[\leadsto x + \left(\frac{z}{y} - \color{blue}{a \cdot \frac{x}{y}}\right) \]
    5. Simplified92.6%

      \[\leadsto \color{blue}{x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification91.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.65 \cdot 10^{+124}:\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{+17}:\\ \;\;\;\;x \cdot \left(230661.510616 \cdot \frac{1}{x \cdot \left(y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)} + \left(27464.7644705 \cdot \frac{1}{x \cdot \left(b + y \cdot \left(y + a\right)\right)} + \left(\frac{t}{x \cdot \left(\left(b + y \cdot \left(y + a\right)\right) \cdot {y}^{2}\right)} + \left(\frac{y \cdot z}{x \cdot \left(b + y \cdot \left(y + a\right)\right)} + \frac{{y}^{2}}{b + y \cdot \left(y + a\right)}\right)\right)\right)\right)\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{+15}:\\ \;\;\;\;\frac{t}{i + y \cdot \left(y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\right)} + \left(\frac{x \cdot {y}^{4}}{i + y \cdot \left(y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\right)} + \frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\right)}\right)\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+139}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(230661.510616, \frac{1}{x \cdot \left(y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}, \mathsf{fma}\left(27464.7644705, \frac{1}{x \cdot \left(b + y \cdot \left(y + a\right)\right)}, \frac{t}{x \cdot \left(\left(b + y \cdot \left(y + a\right)\right) \cdot {y}^{2}\right)} + \left(\frac{{y}^{2}}{b + y \cdot \left(y + a\right)} + \frac{y}{x} \cdot \frac{z}{b + y \cdot \left(y + a\right)}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 87.8% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b + y \cdot \left(y + a\right)\\ t_2 := y \cdot t\_1\\ t_3 := i + y \cdot \left(t\_2 + c\right)\\ t_4 := x \cdot t\_1\\ t_5 := x \cdot \left(230661.510616 \cdot \frac{1}{x \cdot t\_2} + \left(27464.7644705 \cdot \frac{1}{t\_4} + \left(\frac{t}{x \cdot \left(t\_1 \cdot {y}^{2}\right)} + \left(\frac{y \cdot z}{t\_4} + \frac{{y}^{2}}{t\_1}\right)\right)\right)\right)\\ \mathbf{if}\;y \leq -6.4 \cdot 10^{+123}:\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{+17}:\\ \;\;\;\;t\_5\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{+18}:\\ \;\;\;\;\frac{t}{t\_3} + \left(\frac{x \cdot {y}^{4}}{t\_3} + \frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{t\_3}\right)\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+139}:\\ \;\;\;\;t\_5\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ b (* y (+ y a))))
        (t_2 (* y t_1))
        (t_3 (+ i (* y (+ t_2 c))))
        (t_4 (* x t_1))
        (t_5
         (*
          x
          (+
           (* 230661.510616 (/ 1.0 (* x t_2)))
           (+
            (* 27464.7644705 (/ 1.0 t_4))
            (+
             (/ t (* x (* t_1 (pow y 2.0))))
             (+ (/ (* y z) t_4) (/ (pow y 2.0) t_1))))))))
   (if (<= y -6.4e+123)
     (- x (/ (* z (+ -1.0 (/ a y))) y))
     (if (<= y -1.6e+17)
       t_5
       (if (<= y 8.5e+18)
         (+
          (/ t t_3)
          (+
           (/ (* x (pow y 4.0)) t_3)
           (/ (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))) t_3)))
         (if (<= y 9e+139) t_5 (+ x (- (/ z y) (* a (/ x y))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = b + (y * (y + a));
	double t_2 = y * t_1;
	double t_3 = i + (y * (t_2 + c));
	double t_4 = x * t_1;
	double t_5 = x * ((230661.510616 * (1.0 / (x * t_2))) + ((27464.7644705 * (1.0 / t_4)) + ((t / (x * (t_1 * pow(y, 2.0)))) + (((y * z) / t_4) + (pow(y, 2.0) / t_1)))));
	double tmp;
	if (y <= -6.4e+123) {
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	} else if (y <= -1.6e+17) {
		tmp = t_5;
	} else if (y <= 8.5e+18) {
		tmp = (t / t_3) + (((x * pow(y, 4.0)) / t_3) + ((y * (230661.510616 + (y * (27464.7644705 + (y * z))))) / t_3));
	} else if (y <= 9e+139) {
		tmp = t_5;
	} else {
		tmp = x + ((z / y) - (a * (x / y)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: t_5
    real(8) :: tmp
    t_1 = b + (y * (y + a))
    t_2 = y * t_1
    t_3 = i + (y * (t_2 + c))
    t_4 = x * t_1
    t_5 = x * ((230661.510616d0 * (1.0d0 / (x * t_2))) + ((27464.7644705d0 * (1.0d0 / t_4)) + ((t / (x * (t_1 * (y ** 2.0d0)))) + (((y * z) / t_4) + ((y ** 2.0d0) / t_1)))))
    if (y <= (-6.4d+123)) then
        tmp = x - ((z * ((-1.0d0) + (a / y))) / y)
    else if (y <= (-1.6d+17)) then
        tmp = t_5
    else if (y <= 8.5d+18) then
        tmp = (t / t_3) + (((x * (y ** 4.0d0)) / t_3) + ((y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z))))) / t_3))
    else if (y <= 9d+139) then
        tmp = t_5
    else
        tmp = x + ((z / y) - (a * (x / y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = b + (y * (y + a));
	double t_2 = y * t_1;
	double t_3 = i + (y * (t_2 + c));
	double t_4 = x * t_1;
	double t_5 = x * ((230661.510616 * (1.0 / (x * t_2))) + ((27464.7644705 * (1.0 / t_4)) + ((t / (x * (t_1 * Math.pow(y, 2.0)))) + (((y * z) / t_4) + (Math.pow(y, 2.0) / t_1)))));
	double tmp;
	if (y <= -6.4e+123) {
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	} else if (y <= -1.6e+17) {
		tmp = t_5;
	} else if (y <= 8.5e+18) {
		tmp = (t / t_3) + (((x * Math.pow(y, 4.0)) / t_3) + ((y * (230661.510616 + (y * (27464.7644705 + (y * z))))) / t_3));
	} else if (y <= 9e+139) {
		tmp = t_5;
	} else {
		tmp = x + ((z / y) - (a * (x / y)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = b + (y * (y + a))
	t_2 = y * t_1
	t_3 = i + (y * (t_2 + c))
	t_4 = x * t_1
	t_5 = x * ((230661.510616 * (1.0 / (x * t_2))) + ((27464.7644705 * (1.0 / t_4)) + ((t / (x * (t_1 * math.pow(y, 2.0)))) + (((y * z) / t_4) + (math.pow(y, 2.0) / t_1)))))
	tmp = 0
	if y <= -6.4e+123:
		tmp = x - ((z * (-1.0 + (a / y))) / y)
	elif y <= -1.6e+17:
		tmp = t_5
	elif y <= 8.5e+18:
		tmp = (t / t_3) + (((x * math.pow(y, 4.0)) / t_3) + ((y * (230661.510616 + (y * (27464.7644705 + (y * z))))) / t_3))
	elif y <= 9e+139:
		tmp = t_5
	else:
		tmp = x + ((z / y) - (a * (x / y)))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(b + Float64(y * Float64(y + a)))
	t_2 = Float64(y * t_1)
	t_3 = Float64(i + Float64(y * Float64(t_2 + c)))
	t_4 = Float64(x * t_1)
	t_5 = Float64(x * Float64(Float64(230661.510616 * Float64(1.0 / Float64(x * t_2))) + Float64(Float64(27464.7644705 * Float64(1.0 / t_4)) + Float64(Float64(t / Float64(x * Float64(t_1 * (y ^ 2.0)))) + Float64(Float64(Float64(y * z) / t_4) + Float64((y ^ 2.0) / t_1))))))
	tmp = 0.0
	if (y <= -6.4e+123)
		tmp = Float64(x - Float64(Float64(z * Float64(-1.0 + Float64(a / y))) / y));
	elseif (y <= -1.6e+17)
		tmp = t_5;
	elseif (y <= 8.5e+18)
		tmp = Float64(Float64(t / t_3) + Float64(Float64(Float64(x * (y ^ 4.0)) / t_3) + Float64(Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z))))) / t_3)));
	elseif (y <= 9e+139)
		tmp = t_5;
	else
		tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = b + (y * (y + a));
	t_2 = y * t_1;
	t_3 = i + (y * (t_2 + c));
	t_4 = x * t_1;
	t_5 = x * ((230661.510616 * (1.0 / (x * t_2))) + ((27464.7644705 * (1.0 / t_4)) + ((t / (x * (t_1 * (y ^ 2.0)))) + (((y * z) / t_4) + ((y ^ 2.0) / t_1)))));
	tmp = 0.0;
	if (y <= -6.4e+123)
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	elseif (y <= -1.6e+17)
		tmp = t_5;
	elseif (y <= 8.5e+18)
		tmp = (t / t_3) + (((x * (y ^ 4.0)) / t_3) + ((y * (230661.510616 + (y * (27464.7644705 + (y * z))))) / t_3));
	elseif (y <= 9e+139)
		tmp = t_5;
	else
		tmp = x + ((z / y) - (a * (x / y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(i + N[(y * N[(t$95$2 + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x * t$95$1), $MachinePrecision]}, Block[{t$95$5 = N[(x * N[(N[(230661.510616 * N[(1.0 / N[(x * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(27464.7644705 * N[(1.0 / t$95$4), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(x * N[(t$95$1 * N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y * z), $MachinePrecision] / t$95$4), $MachinePrecision] + N[(N[Power[y, 2.0], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.4e+123], N[(x - N[(N[(z * N[(-1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.6e+17], t$95$5, If[LessEqual[y, 8.5e+18], N[(N[(t / t$95$3), $MachinePrecision] + N[(N[(N[(x * N[Power[y, 4.0], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision] + N[(N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e+139], t$95$5, N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b + y \cdot \left(y + a\right)\\
t_2 := y \cdot t\_1\\
t_3 := i + y \cdot \left(t\_2 + c\right)\\
t_4 := x \cdot t\_1\\
t_5 := x \cdot \left(230661.510616 \cdot \frac{1}{x \cdot t\_2} + \left(27464.7644705 \cdot \frac{1}{t\_4} + \left(\frac{t}{x \cdot \left(t\_1 \cdot {y}^{2}\right)} + \left(\frac{y \cdot z}{t\_4} + \frac{{y}^{2}}{t\_1}\right)\right)\right)\right)\\
\mathbf{if}\;y \leq -6.4 \cdot 10^{+123}:\\
\;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\

\mathbf{elif}\;y \leq -1.6 \cdot 10^{+17}:\\
\;\;\;\;t\_5\\

\mathbf{elif}\;y \leq 8.5 \cdot 10^{+18}:\\
\;\;\;\;\frac{t}{t\_3} + \left(\frac{x \cdot {y}^{4}}{t\_3} + \frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{t\_3}\right)\\

\mathbf{elif}\;y \leq 9 \cdot 10^{+139}:\\
\;\;\;\;t\_5\\

\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.40000000000000009e123

    1. Initial program 0.0%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 60.8%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{27464.7644705 - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Taylor expanded in z around inf 87.6%

      \[\leadsto x + -1 \cdot \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]

    if -6.40000000000000009e123 < y < -1.6e17 or 8.5e18 < y < 8.9999999999999999e139

    1. Initial program 29.7%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 36.6%

      \[\leadsto \color{blue}{x \cdot \left(\frac{t}{x \cdot \left(i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)\right)} + \left(\frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{x \cdot \left(i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)\right)} + \frac{{y}^{4}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}\right)\right)} \]
    4. Taylor expanded in i around 0 45.6%

      \[\leadsto \color{blue}{x \cdot \left(230661.510616 \cdot \frac{1}{x \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \left(\frac{t}{x \cdot \left(y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)\right)} + \left(\frac{y \cdot \left(27464.7644705 + y \cdot z\right)}{x \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \frac{{y}^{3}}{c + y \cdot \left(b + y \cdot \left(a + y\right)\right)}\right)\right)\right)} \]
    5. Taylor expanded in c around 0 72.6%

      \[\leadsto \color{blue}{x \cdot \left(230661.510616 \cdot \frac{1}{x \cdot \left(y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \left(27464.7644705 \cdot \frac{1}{x \cdot \left(b + y \cdot \left(a + y\right)\right)} + \left(\frac{t}{x \cdot \left({y}^{2} \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \left(\frac{y \cdot z}{x \cdot \left(b + y \cdot \left(a + y\right)\right)} + \frac{{y}^{2}}{b + y \cdot \left(a + y\right)}\right)\right)\right)\right)} \]

    if -1.6e17 < y < 8.5e18

    1. Initial program 99.7%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 99.7%

      \[\leadsto \color{blue}{\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \left(\frac{x \cdot {y}^{4}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}\right)} \]

    if 8.9999999999999999e139 < y

    1. Initial program 0.0%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 89.3%

      \[\leadsto \color{blue}{\left(x + \frac{z}{y}\right) - \frac{a \cdot x}{y}} \]
    4. Step-by-step derivation
      1. associate--l+89.3%

        \[\leadsto \color{blue}{x + \left(\frac{z}{y} - \frac{a \cdot x}{y}\right)} \]
      2. associate-/l*92.6%

        \[\leadsto x + \left(\frac{z}{y} - \color{blue}{a \cdot \frac{x}{y}}\right) \]
    5. Simplified92.6%

      \[\leadsto \color{blue}{x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification91.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.4 \cdot 10^{+123}:\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{+17}:\\ \;\;\;\;x \cdot \left(230661.510616 \cdot \frac{1}{x \cdot \left(y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)} + \left(27464.7644705 \cdot \frac{1}{x \cdot \left(b + y \cdot \left(y + a\right)\right)} + \left(\frac{t}{x \cdot \left(\left(b + y \cdot \left(y + a\right)\right) \cdot {y}^{2}\right)} + \left(\frac{y \cdot z}{x \cdot \left(b + y \cdot \left(y + a\right)\right)} + \frac{{y}^{2}}{b + y \cdot \left(y + a\right)}\right)\right)\right)\right)\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{+18}:\\ \;\;\;\;\frac{t}{i + y \cdot \left(y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\right)} + \left(\frac{x \cdot {y}^{4}}{i + y \cdot \left(y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\right)} + \frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\right)}\right)\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+139}:\\ \;\;\;\;x \cdot \left(230661.510616 \cdot \frac{1}{x \cdot \left(y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)} + \left(27464.7644705 \cdot \frac{1}{x \cdot \left(b + y \cdot \left(y + a\right)\right)} + \left(\frac{t}{x \cdot \left(\left(b + y \cdot \left(y + a\right)\right) \cdot {y}^{2}\right)} + \left(\frac{y \cdot z}{x \cdot \left(b + y \cdot \left(y + a\right)\right)} + \frac{{y}^{2}}{b + y \cdot \left(y + a\right)}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 84.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \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(y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\right)}\\ \mathbf{if}\;t\_1 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1
         (/
          (+
           t
           (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x))))))))
          (+ i (* y (+ (* y (+ b (* y (+ y a)))) c))))))
   (if (<= t_1 INFINITY) t_1 (+ x (- (/ z y) (* a (/ x y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * ((y * (b + (y * (y + a)))) + c)));
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = x + ((z / y) - (a * (x / y)));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * ((y * (b + (y * (y + a)))) + c)));
	double tmp;
	if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else {
		tmp = x + ((z / y) - (a * (x / y)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * ((y * (b + (y * (y + a)))) + c)))
	tmp = 0
	if t_1 <= math.inf:
		tmp = t_1
	else:
		tmp = x + ((z / y) - (a * (x / y)))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(z + Float64(y * x)))))))) / Float64(i + Float64(y * Float64(Float64(y * Float64(b + Float64(y * Float64(y + a)))) + c))))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * ((y * (b + (y * (y + a)))) + c)));
	tmp = 0.0;
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = x + ((z / y) - (a * (x / y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \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(y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\right)}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0

    1. Initial program 88.6%

      \[\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} \]
    2. Add Preprocessing

    if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i))

    1. Initial program 0.0%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 75.8%

      \[\leadsto \color{blue}{\left(x + \frac{z}{y}\right) - \frac{a \cdot x}{y}} \]
    4. Step-by-step derivation
      1. associate--l+75.8%

        \[\leadsto \color{blue}{x + \left(\frac{z}{y} - \frac{a \cdot x}{y}\right)} \]
      2. associate-/l*82.6%

        \[\leadsto x + \left(\frac{z}{y} - \color{blue}{a \cdot \frac{x}{y}}\right) \]
    5. Simplified82.6%

      \[\leadsto \color{blue}{x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification86.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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(y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\right)} \leq \infty:\\ \;\;\;\;\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(y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 78.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\\ t_2 := \frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)}{t\_1}\\ \mathbf{if}\;y \leq -4.6 \cdot 10^{+71}:\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{+16}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{-17}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i + y \cdot t\_1}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+64}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* y (+ b (* y (+ y a)))) c))
        (t_2
         (/
          (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x))))))
          t_1)))
   (if (<= y -4.6e+71)
     (- x (/ (* z (+ -1.0 (/ a y))) y))
     (if (<= y -1.7e+16)
       t_2
       (if (<= y 1.12e-17)
         (/ (+ t (* y (+ 230661.510616 (* y 27464.7644705)))) (+ i (* y t_1)))
         (if (<= y 1.15e+64) t_2 (+ x (- (/ z y) (* a (/ x y))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (y * (b + (y * (y + a)))) + c;
	double t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1;
	double tmp;
	if (y <= -4.6e+71) {
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	} else if (y <= -1.7e+16) {
		tmp = t_2;
	} else if (y <= 1.12e-17) {
		tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * t_1));
	} else if (y <= 1.15e+64) {
		tmp = t_2;
	} else {
		tmp = x + ((z / y) - (a * (x / y)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (y * (b + (y * (y + a)))) + c
    t_2 = (230661.510616d0 + (y * (27464.7644705d0 + (y * (z + (y * x)))))) / t_1
    if (y <= (-4.6d+71)) then
        tmp = x - ((z * ((-1.0d0) + (a / y))) / y)
    else if (y <= (-1.7d+16)) then
        tmp = t_2
    else if (y <= 1.12d-17) then
        tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / (i + (y * t_1))
    else if (y <= 1.15d+64) then
        tmp = t_2
    else
        tmp = x + ((z / y) - (a * (x / y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (y * (b + (y * (y + a)))) + c;
	double t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1;
	double tmp;
	if (y <= -4.6e+71) {
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	} else if (y <= -1.7e+16) {
		tmp = t_2;
	} else if (y <= 1.12e-17) {
		tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * t_1));
	} else if (y <= 1.15e+64) {
		tmp = t_2;
	} else {
		tmp = x + ((z / y) - (a * (x / y)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (y * (b + (y * (y + a)))) + c
	t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1
	tmp = 0
	if y <= -4.6e+71:
		tmp = x - ((z * (-1.0 + (a / y))) / y)
	elif y <= -1.7e+16:
		tmp = t_2
	elif y <= 1.12e-17:
		tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * t_1))
	elif y <= 1.15e+64:
		tmp = t_2
	else:
		tmp = x + ((z / y) - (a * (x / y)))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(y * Float64(b + Float64(y * Float64(y + a)))) + c)
	t_2 = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(z + Float64(y * x)))))) / t_1)
	tmp = 0.0
	if (y <= -4.6e+71)
		tmp = Float64(x - Float64(Float64(z * Float64(-1.0 + Float64(a / y))) / y));
	elseif (y <= -1.7e+16)
		tmp = t_2;
	elseif (y <= 1.12e-17)
		tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(i + Float64(y * t_1)));
	elseif (y <= 1.15e+64)
		tmp = t_2;
	else
		tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (y * (b + (y * (y + a)))) + c;
	t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1;
	tmp = 0.0;
	if (y <= -4.6e+71)
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	elseif (y <= -1.7e+16)
		tmp = t_2;
	elseif (y <= 1.12e-17)
		tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * t_1));
	elseif (y <= 1.15e+64)
		tmp = t_2;
	else
		tmp = x + ((z / y) - (a * (x / y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]}, Block[{t$95$2 = N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[y, -4.6e+71], N[(x - N[(N[(z * N[(-1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.7e+16], t$95$2, If[LessEqual[y, 1.12e-17], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e+64], t$95$2, N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\\
t_2 := \frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)}{t\_1}\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+71}:\\
\;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\

\mathbf{elif}\;y \leq -1.7 \cdot 10^{+16}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 1.12 \cdot 10^{-17}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i + y \cdot t\_1}\\

\mathbf{elif}\;y \leq 1.15 \cdot 10^{+64}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.6000000000000005e71

    1. Initial program 4.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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 58.8%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{27464.7644705 - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Taylor expanded in z around inf 80.4%

      \[\leadsto x + -1 \cdot \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]

    if -4.6000000000000005e71 < y < -1.7e16 or 1.12000000000000005e-17 < y < 1.15e64

    1. Initial program 56.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} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 53.9%

      \[\leadsto \color{blue}{\frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + x \cdot y\right)\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    4. Simplified56.7%

      \[\leadsto \color{blue}{y \cdot \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}} \]
    5. Taylor expanded in i around 0 64.9%

      \[\leadsto \color{blue}{\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + x \cdot y\right)\right)}{c + y \cdot \left(b + y \cdot \left(a + y\right)\right)}} \]

    if -1.7e16 < y < 1.12000000000000005e-17

    1. Initial program 99.7%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 90.2%

      \[\leadsto \frac{\left(\color{blue}{27464.7644705 \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} \]
    4. Step-by-step derivation
      1. *-commutative90.2%

        \[\leadsto \frac{\left(\color{blue}{y \cdot 27464.7644705} + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    5. Simplified90.2%

      \[\leadsto \frac{\left(\color{blue}{y \cdot 27464.7644705} + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]

    if 1.15e64 < y

    1. Initial program 2.6%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 76.4%

      \[\leadsto \color{blue}{\left(x + \frac{z}{y}\right) - \frac{a \cdot x}{y}} \]
    4. Step-by-step derivation
      1. associate--l+76.4%

        \[\leadsto \color{blue}{x + \left(\frac{z}{y} - \frac{a \cdot x}{y}\right)} \]
      2. associate-/l*78.5%

        \[\leadsto x + \left(\frac{z}{y} - \color{blue}{a \cdot \frac{x}{y}}\right) \]
    5. Simplified78.5%

      \[\leadsto \color{blue}{x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification83.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.6 \cdot 10^{+71}:\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{+16}:\\ \;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)}{y \cdot \left(b + y \cdot \left(y + a\right)\right) + c}\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{-17}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i + y \cdot \left(y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\right)}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+64}:\\ \;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)}{y \cdot \left(b + y \cdot \left(y + a\right)\right) + c}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 78.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\\ t_2 := \frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)}{t\_1}\\ \mathbf{if}\;y \leq -3.6 \cdot 10^{+70}:\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\ \mathbf{elif}\;y \leq -1.45 \cdot 10^{+16}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-19}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot t\_1}\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{+63}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* y (+ b (* y (+ y a)))) c))
        (t_2
         (/
          (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x))))))
          t_1)))
   (if (<= y -3.6e+70)
     (- x (/ (* z (+ -1.0 (/ a y))) y))
     (if (<= y -1.45e+16)
       t_2
       (if (<= y 2e-19)
         (/ (+ t (* y 230661.510616)) (+ i (* y t_1)))
         (if (<= y 2.6e+63) t_2 (+ x (- (/ z y) (* a (/ x y))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (y * (b + (y * (y + a)))) + c;
	double t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1;
	double tmp;
	if (y <= -3.6e+70) {
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	} else if (y <= -1.45e+16) {
		tmp = t_2;
	} else if (y <= 2e-19) {
		tmp = (t + (y * 230661.510616)) / (i + (y * t_1));
	} else if (y <= 2.6e+63) {
		tmp = t_2;
	} else {
		tmp = x + ((z / y) - (a * (x / y)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (y * (b + (y * (y + a)))) + c
    t_2 = (230661.510616d0 + (y * (27464.7644705d0 + (y * (z + (y * x)))))) / t_1
    if (y <= (-3.6d+70)) then
        tmp = x - ((z * ((-1.0d0) + (a / y))) / y)
    else if (y <= (-1.45d+16)) then
        tmp = t_2
    else if (y <= 2d-19) then
        tmp = (t + (y * 230661.510616d0)) / (i + (y * t_1))
    else if (y <= 2.6d+63) then
        tmp = t_2
    else
        tmp = x + ((z / y) - (a * (x / y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (y * (b + (y * (y + a)))) + c;
	double t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1;
	double tmp;
	if (y <= -3.6e+70) {
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	} else if (y <= -1.45e+16) {
		tmp = t_2;
	} else if (y <= 2e-19) {
		tmp = (t + (y * 230661.510616)) / (i + (y * t_1));
	} else if (y <= 2.6e+63) {
		tmp = t_2;
	} else {
		tmp = x + ((z / y) - (a * (x / y)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (y * (b + (y * (y + a)))) + c
	t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1
	tmp = 0
	if y <= -3.6e+70:
		tmp = x - ((z * (-1.0 + (a / y))) / y)
	elif y <= -1.45e+16:
		tmp = t_2
	elif y <= 2e-19:
		tmp = (t + (y * 230661.510616)) / (i + (y * t_1))
	elif y <= 2.6e+63:
		tmp = t_2
	else:
		tmp = x + ((z / y) - (a * (x / y)))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(y * Float64(b + Float64(y * Float64(y + a)))) + c)
	t_2 = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(z + Float64(y * x)))))) / t_1)
	tmp = 0.0
	if (y <= -3.6e+70)
		tmp = Float64(x - Float64(Float64(z * Float64(-1.0 + Float64(a / y))) / y));
	elseif (y <= -1.45e+16)
		tmp = t_2;
	elseif (y <= 2e-19)
		tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * t_1)));
	elseif (y <= 2.6e+63)
		tmp = t_2;
	else
		tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (y * (b + (y * (y + a)))) + c;
	t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1;
	tmp = 0.0;
	if (y <= -3.6e+70)
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	elseif (y <= -1.45e+16)
		tmp = t_2;
	elseif (y <= 2e-19)
		tmp = (t + (y * 230661.510616)) / (i + (y * t_1));
	elseif (y <= 2.6e+63)
		tmp = t_2;
	else
		tmp = x + ((z / y) - (a * (x / y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]}, Block[{t$95$2 = N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[y, -3.6e+70], N[(x - N[(N[(z * N[(-1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.45e+16], t$95$2, If[LessEqual[y, 2e-19], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e+63], t$95$2, N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\\
t_2 := \frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)}{t\_1}\\
\mathbf{if}\;y \leq -3.6 \cdot 10^{+70}:\\
\;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\

\mathbf{elif}\;y \leq -1.45 \cdot 10^{+16}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 2 \cdot 10^{-19}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot t\_1}\\

\mathbf{elif}\;y \leq 2.6 \cdot 10^{+63}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.6e70

    1. Initial program 4.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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 58.8%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{27464.7644705 - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Taylor expanded in z around inf 80.4%

      \[\leadsto x + -1 \cdot \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]

    if -3.6e70 < y < -1.45e16 or 2e-19 < y < 2.6000000000000001e63

    1. Initial program 56.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} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 53.9%

      \[\leadsto \color{blue}{\frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + x \cdot y\right)\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    4. Simplified56.7%

      \[\leadsto \color{blue}{y \cdot \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}} \]
    5. Taylor expanded in i around 0 64.9%

      \[\leadsto \color{blue}{\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + x \cdot y\right)\right)}{c + y \cdot \left(b + y \cdot \left(a + y\right)\right)}} \]

    if -1.45e16 < y < 2e-19

    1. Initial program 99.7%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 89.6%

      \[\leadsto \frac{\color{blue}{230661.510616 \cdot y} + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    4. Step-by-step derivation
      1. *-commutative89.6%

        \[\leadsto \frac{\color{blue}{y \cdot 230661.510616} + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    5. Simplified89.6%

      \[\leadsto \frac{\color{blue}{y \cdot 230661.510616} + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]

    if 2.6000000000000001e63 < y

    1. Initial program 2.6%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 76.4%

      \[\leadsto \color{blue}{\left(x + \frac{z}{y}\right) - \frac{a \cdot x}{y}} \]
    4. Step-by-step derivation
      1. associate--l+76.4%

        \[\leadsto \color{blue}{x + \left(\frac{z}{y} - \frac{a \cdot x}{y}\right)} \]
      2. associate-/l*78.5%

        \[\leadsto x + \left(\frac{z}{y} - \color{blue}{a \cdot \frac{x}{y}}\right) \]
    5. Simplified78.5%

      \[\leadsto \color{blue}{x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification82.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.6 \cdot 10^{+70}:\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\ \mathbf{elif}\;y \leq -1.45 \cdot 10^{+16}:\\ \;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)}{y \cdot \left(b + y \cdot \left(y + a\right)\right) + c}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-19}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\right)}\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{+63}:\\ \;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)}{y \cdot \left(b + y \cdot \left(y + a\right)\right) + c}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 81.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\\ \mathbf{if}\;y \leq -2.8 \cdot 10^{+70}:\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\ \mathbf{elif}\;y \leq -2.9 \cdot 10^{+16}:\\ \;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)}{t\_1}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+27}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot t\_1}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* y (+ b (* y (+ y a)))) c)))
   (if (<= y -2.8e+70)
     (- x (/ (* z (+ -1.0 (/ a y))) y))
     (if (<= y -2.9e+16)
       (/ (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x)))))) t_1)
       (if (<= y 4e+27)
         (/
          (+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
          (+ i (* y t_1)))
         (+ x (- (/ z y) (* a (/ x y)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (y * (b + (y * (y + a)))) + c;
	double tmp;
	if (y <= -2.8e+70) {
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	} else if (y <= -2.9e+16) {
		tmp = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1;
	} else if (y <= 4e+27) {
		tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * t_1));
	} else {
		tmp = x + ((z / y) - (a * (x / y)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y * (b + (y * (y + a)))) + c
    if (y <= (-2.8d+70)) then
        tmp = x - ((z * ((-1.0d0) + (a / y))) / y)
    else if (y <= (-2.9d+16)) then
        tmp = (230661.510616d0 + (y * (27464.7644705d0 + (y * (z + (y * x)))))) / t_1
    else if (y <= 4d+27) then
        tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * t_1))
    else
        tmp = x + ((z / y) - (a * (x / y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (y * (b + (y * (y + a)))) + c;
	double tmp;
	if (y <= -2.8e+70) {
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	} else if (y <= -2.9e+16) {
		tmp = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1;
	} else if (y <= 4e+27) {
		tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * t_1));
	} else {
		tmp = x + ((z / y) - (a * (x / y)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (y * (b + (y * (y + a)))) + c
	tmp = 0
	if y <= -2.8e+70:
		tmp = x - ((z * (-1.0 + (a / y))) / y)
	elif y <= -2.9e+16:
		tmp = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1
	elif y <= 4e+27:
		tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * t_1))
	else:
		tmp = x + ((z / y) - (a * (x / y)))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(y * Float64(b + Float64(y * Float64(y + a)))) + c)
	tmp = 0.0
	if (y <= -2.8e+70)
		tmp = Float64(x - Float64(Float64(z * Float64(-1.0 + Float64(a / y))) / y));
	elseif (y <= -2.9e+16)
		tmp = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(z + Float64(y * x)))))) / t_1);
	elseif (y <= 4e+27)
		tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(i + Float64(y * t_1)));
	else
		tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (y * (b + (y * (y + a)))) + c;
	tmp = 0.0;
	if (y <= -2.8e+70)
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	elseif (y <= -2.9e+16)
		tmp = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1;
	elseif (y <= 4e+27)
		tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * t_1));
	else
		tmp = x + ((z / y) - (a * (x / y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]}, If[LessEqual[y, -2.8e+70], N[(x - N[(N[(z * N[(-1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.9e+16], N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 4e+27], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{+70}:\\
\;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\

\mathbf{elif}\;y \leq -2.9 \cdot 10^{+16}:\\
\;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)}{t\_1}\\

\mathbf{elif}\;y \leq 4 \cdot 10^{+27}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot t\_1}\\

\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.7999999999999999e70

    1. Initial program 4.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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 58.8%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{27464.7644705 - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Taylor expanded in z around inf 80.4%

      \[\leadsto x + -1 \cdot \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]

    if -2.7999999999999999e70 < y < -2.9e16

    1. Initial program 57.8%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 57.8%

      \[\leadsto \color{blue}{\frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + x \cdot y\right)\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    4. Simplified63.6%

      \[\leadsto \color{blue}{y \cdot \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}} \]
    5. Taylor expanded in i around 0 74.2%

      \[\leadsto \color{blue}{\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + x \cdot y\right)\right)}{c + y \cdot \left(b + y \cdot \left(a + y\right)\right)}} \]

    if -2.9e16 < y < 4.0000000000000001e27

    1. Initial program 99.1%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 94.2%

      \[\leadsto \frac{\left(\left(\color{blue}{y \cdot z} + 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} \]

    if 4.0000000000000001e27 < y

    1. Initial program 8.0%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 68.6%

      \[\leadsto \color{blue}{\left(x + \frac{z}{y}\right) - \frac{a \cdot x}{y}} \]
    4. Step-by-step derivation
      1. associate--l+68.6%

        \[\leadsto \color{blue}{x + \left(\frac{z}{y} - \frac{a \cdot x}{y}\right)} \]
      2. associate-/l*70.3%

        \[\leadsto x + \left(\frac{z}{y} - \color{blue}{a \cdot \frac{x}{y}}\right) \]
    5. Simplified70.3%

      \[\leadsto \color{blue}{x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification85.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.8 \cdot 10^{+70}:\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\ \mathbf{elif}\;y \leq -2.9 \cdot 10^{+16}:\\ \;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)}{y \cdot \left(b + y \cdot \left(y + a\right)\right) + c}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+27}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 76.4% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.7 \cdot 10^{+26}:\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+27}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= y -3.7e+26)
   (- x (/ (* z (+ -1.0 (/ a y))) y))
   (if (<= y 4e+27)
     (/ (+ t (* y 230661.510616)) (+ i (* y (+ (* y (+ b (* y (+ y a)))) c))))
     (+ x (- (/ z y) (* a (/ x y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= -3.7e+26) {
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	} else if (y <= 4e+27) {
		tmp = (t + (y * 230661.510616)) / (i + (y * ((y * (b + (y * (y + a)))) + c)));
	} else {
		tmp = x + ((z / y) - (a * (x / y)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if (y <= (-3.7d+26)) then
        tmp = x - ((z * ((-1.0d0) + (a / y))) / y)
    else if (y <= 4d+27) then
        tmp = (t + (y * 230661.510616d0)) / (i + (y * ((y * (b + (y * (y + a)))) + c)))
    else
        tmp = x + ((z / y) - (a * (x / y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= -3.7e+26) {
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	} else if (y <= 4e+27) {
		tmp = (t + (y * 230661.510616)) / (i + (y * ((y * (b + (y * (y + a)))) + c)));
	} else {
		tmp = x + ((z / y) - (a * (x / y)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if y <= -3.7e+26:
		tmp = x - ((z * (-1.0 + (a / y))) / y)
	elif y <= 4e+27:
		tmp = (t + (y * 230661.510616)) / (i + (y * ((y * (b + (y * (y + a)))) + c)))
	else:
		tmp = x + ((z / y) - (a * (x / y)))
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (y <= -3.7e+26)
		tmp = Float64(x - Float64(Float64(z * Float64(-1.0 + Float64(a / y))) / y));
	elseif (y <= 4e+27)
		tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(Float64(y * Float64(b + Float64(y * Float64(y + a)))) + c))));
	else
		tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (y <= -3.7e+26)
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	elseif (y <= 4e+27)
		tmp = (t + (y * 230661.510616)) / (i + (y * ((y * (b + (y * (y + a)))) + c)));
	else
		tmp = x + ((z / y) - (a * (x / y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -3.7e+26], N[(x - N[(N[(z * N[(-1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e+27], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.7 \cdot 10^{+26}:\\
\;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\

\mathbf{elif}\;y \leq 4 \cdot 10^{+27}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\right)}\\

\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.69999999999999988e26

    1. Initial program 15.5%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 56.0%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{27464.7644705 - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Taylor expanded in z around inf 73.0%

      \[\leadsto x + -1 \cdot \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]

    if -3.69999999999999988e26 < y < 4.0000000000000001e27

    1. Initial program 97.7%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 83.7%

      \[\leadsto \frac{\color{blue}{230661.510616 \cdot y} + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    4. Step-by-step derivation
      1. *-commutative83.7%

        \[\leadsto \frac{\color{blue}{y \cdot 230661.510616} + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    5. Simplified83.7%

      \[\leadsto \frac{\color{blue}{y \cdot 230661.510616} + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]

    if 4.0000000000000001e27 < y

    1. Initial program 8.0%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 68.6%

      \[\leadsto \color{blue}{\left(x + \frac{z}{y}\right) - \frac{a \cdot x}{y}} \]
    4. Step-by-step derivation
      1. associate--l+68.6%

        \[\leadsto \color{blue}{x + \left(\frac{z}{y} - \frac{a \cdot x}{y}\right)} \]
      2. associate-/l*70.3%

        \[\leadsto x + \left(\frac{z}{y} - \color{blue}{a \cdot \frac{x}{y}}\right) \]
    5. Simplified70.3%

      \[\leadsto \color{blue}{x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification78.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.7 \cdot 10^{+26}:\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+27}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 69.2% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{+25}:\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+23}:\\ \;\;\;\;\frac{t}{i + y \cdot \left(y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= y -1.8e+25)
   (- x (/ (* z (+ -1.0 (/ a y))) y))
   (if (<= y 1.7e+23)
     (/ t (+ i (* y (+ (* y (+ b (* y (+ y a)))) c))))
     (+ x (- (/ z y) (* a (/ x y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= -1.8e+25) {
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	} else if (y <= 1.7e+23) {
		tmp = t / (i + (y * ((y * (b + (y * (y + a)))) + c)));
	} else {
		tmp = x + ((z / y) - (a * (x / y)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if (y <= (-1.8d+25)) then
        tmp = x - ((z * ((-1.0d0) + (a / y))) / y)
    else if (y <= 1.7d+23) then
        tmp = t / (i + (y * ((y * (b + (y * (y + a)))) + c)))
    else
        tmp = x + ((z / y) - (a * (x / y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= -1.8e+25) {
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	} else if (y <= 1.7e+23) {
		tmp = t / (i + (y * ((y * (b + (y * (y + a)))) + c)));
	} else {
		tmp = x + ((z / y) - (a * (x / y)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if y <= -1.8e+25:
		tmp = x - ((z * (-1.0 + (a / y))) / y)
	elif y <= 1.7e+23:
		tmp = t / (i + (y * ((y * (b + (y * (y + a)))) + c)))
	else:
		tmp = x + ((z / y) - (a * (x / y)))
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (y <= -1.8e+25)
		tmp = Float64(x - Float64(Float64(z * Float64(-1.0 + Float64(a / y))) / y));
	elseif (y <= 1.7e+23)
		tmp = Float64(t / Float64(i + Float64(y * Float64(Float64(y * Float64(b + Float64(y * Float64(y + a)))) + c))));
	else
		tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (y <= -1.8e+25)
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	elseif (y <= 1.7e+23)
		tmp = t / (i + (y * ((y * (b + (y * (y + a)))) + c)));
	else
		tmp = x + ((z / y) - (a * (x / y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.8e+25], N[(x - N[(N[(z * N[(-1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e+23], N[(t / N[(i + N[(y * N[(N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+25}:\\
\;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\

\mathbf{elif}\;y \leq 1.7 \cdot 10^{+23}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\right)}\\

\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.80000000000000008e25

    1. Initial program 15.5%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 56.0%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{27464.7644705 - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Taylor expanded in z around inf 73.0%

      \[\leadsto x + -1 \cdot \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]

    if -1.80000000000000008e25 < y < 1.69999999999999996e23

    1. Initial program 97.7%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 72.2%

      \[\leadsto \color{blue}{\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]

    if 1.69999999999999996e23 < y

    1. Initial program 8.0%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 68.6%

      \[\leadsto \color{blue}{\left(x + \frac{z}{y}\right) - \frac{a \cdot x}{y}} \]
    4. Step-by-step derivation
      1. associate--l+68.6%

        \[\leadsto \color{blue}{x + \left(\frac{z}{y} - \frac{a \cdot x}{y}\right)} \]
      2. associate-/l*70.3%

        \[\leadsto x + \left(\frac{z}{y} - \color{blue}{a \cdot \frac{x}{y}}\right) \]
    5. Simplified70.3%

      \[\leadsto \color{blue}{x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification71.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{+25}:\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+23}:\\ \;\;\;\;\frac{t}{i + y \cdot \left(y \cdot \left(b + y \cdot \left(y + a\right)\right) + c\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 67.8% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.9 \cdot 10^{+29} \lor \neg \left(y \leq 1.36 \cdot 10^{+23}\right):\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (or (<= y -3.9e+29) (not (<= y 1.36e+23)))
   (+ x (- (/ z y) (* a (/ x y))))
   (/ t (+ i (* y (+ c (* y b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((y <= -3.9e+29) || !(y <= 1.36e+23)) {
		tmp = x + ((z / y) - (a * (x / y)));
	} else {
		tmp = t / (i + (y * (c + (y * b))));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if ((y <= (-3.9d+29)) .or. (.not. (y <= 1.36d+23))) then
        tmp = x + ((z / y) - (a * (x / y)))
    else
        tmp = t / (i + (y * (c + (y * b))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((y <= -3.9e+29) || !(y <= 1.36e+23)) {
		tmp = x + ((z / y) - (a * (x / y)));
	} else {
		tmp = t / (i + (y * (c + (y * b))));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (y <= -3.9e+29) or not (y <= 1.36e+23):
		tmp = x + ((z / y) - (a * (x / y)))
	else:
		tmp = t / (i + (y * (c + (y * b))))
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((y <= -3.9e+29) || !(y <= 1.36e+23))
		tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y))));
	else
		tmp = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * b)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((y <= -3.9e+29) || ~((y <= 1.36e+23)))
		tmp = x + ((z / y) - (a * (x / y)));
	else
		tmp = t / (i + (y * (c + (y * b))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -3.9e+29], N[Not[LessEqual[y, 1.36e+23]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{+29} \lor \neg \left(y \leq 1.36 \cdot 10^{+23}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.89999999999999968e29 or 1.36e23 < y

    1. Initial program 11.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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 67.1%

      \[\leadsto \color{blue}{\left(x + \frac{z}{y}\right) - \frac{a \cdot x}{y}} \]
    4. Step-by-step derivation
      1. associate--l+67.1%

        \[\leadsto \color{blue}{x + \left(\frac{z}{y} - \frac{a \cdot x}{y}\right)} \]
      2. associate-/l*72.2%

        \[\leadsto x + \left(\frac{z}{y} - \color{blue}{a \cdot \frac{x}{y}}\right) \]
    5. Simplified72.2%

      \[\leadsto \color{blue}{x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)} \]

    if -3.89999999999999968e29 < y < 1.36e23

    1. Initial program 97.1%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 71.7%

      \[\leadsto \color{blue}{\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    4. Taylor expanded in b around inf 70.3%

      \[\leadsto \frac{t}{i + y \cdot \left(c + y \cdot \color{blue}{b}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification71.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.9 \cdot 10^{+29} \lor \neg \left(y \leq 1.36 \cdot 10^{+23}\right):\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 65.5% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.45 \cdot 10^{+27} \lor \neg \left(y \leq 1.15 \cdot 10^{+27}\right):\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{i + y \cdot c}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (or (<= y -1.45e+27) (not (<= y 1.15e+27)))
   (+ x (- (/ z y) (* a (/ x y))))
   (/ t (+ i (* y c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((y <= -1.45e+27) || !(y <= 1.15e+27)) {
		tmp = x + ((z / y) - (a * (x / y)));
	} else {
		tmp = t / (i + (y * c));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if ((y <= (-1.45d+27)) .or. (.not. (y <= 1.15d+27))) then
        tmp = x + ((z / y) - (a * (x / y)))
    else
        tmp = t / (i + (y * c))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((y <= -1.45e+27) || !(y <= 1.15e+27)) {
		tmp = x + ((z / y) - (a * (x / y)));
	} else {
		tmp = t / (i + (y * c));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (y <= -1.45e+27) or not (y <= 1.15e+27):
		tmp = x + ((z / y) - (a * (x / y)))
	else:
		tmp = t / (i + (y * c))
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((y <= -1.45e+27) || !(y <= 1.15e+27))
		tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y))));
	else
		tmp = Float64(t / Float64(i + Float64(y * c)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((y <= -1.45e+27) || ~((y <= 1.15e+27)))
		tmp = x + ((z / y) - (a * (x / y)));
	else
		tmp = t / (i + (y * c));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.45e+27], N[Not[LessEqual[y, 1.15e+27]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+27} \lor \neg \left(y \leq 1.15 \cdot 10^{+27}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.4500000000000001e27 or 1.15e27 < y

    1. Initial program 11.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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 67.1%

      \[\leadsto \color{blue}{\left(x + \frac{z}{y}\right) - \frac{a \cdot x}{y}} \]
    4. Step-by-step derivation
      1. associate--l+67.1%

        \[\leadsto \color{blue}{x + \left(\frac{z}{y} - \frac{a \cdot x}{y}\right)} \]
      2. associate-/l*72.2%

        \[\leadsto x + \left(\frac{z}{y} - \color{blue}{a \cdot \frac{x}{y}}\right) \]
    5. Simplified72.2%

      \[\leadsto \color{blue}{x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)} \]

    if -1.4500000000000001e27 < y < 1.15e27

    1. Initial program 97.1%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 71.7%

      \[\leadsto \color{blue}{\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    4. Taylor expanded in y around 0 66.2%

      \[\leadsto \frac{t}{i + \color{blue}{c \cdot y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification68.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.45 \cdot 10^{+27} \lor \neg \left(y \leq 1.15 \cdot 10^{+27}\right):\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{i + y \cdot c}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 67.9% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.75 \cdot 10^{+24}:\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{+22}:\\ \;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= y -4.75e+24)
   (- x (/ (* z (+ -1.0 (/ a y))) y))
   (if (<= y 5.4e+22)
     (/ t (+ i (* y (+ c (* y b)))))
     (+ x (- (/ z y) (* a (/ x y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= -4.75e+24) {
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	} else if (y <= 5.4e+22) {
		tmp = t / (i + (y * (c + (y * b))));
	} else {
		tmp = x + ((z / y) - (a * (x / y)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if (y <= (-4.75d+24)) then
        tmp = x - ((z * ((-1.0d0) + (a / y))) / y)
    else if (y <= 5.4d+22) then
        tmp = t / (i + (y * (c + (y * b))))
    else
        tmp = x + ((z / y) - (a * (x / y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= -4.75e+24) {
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	} else if (y <= 5.4e+22) {
		tmp = t / (i + (y * (c + (y * b))));
	} else {
		tmp = x + ((z / y) - (a * (x / y)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if y <= -4.75e+24:
		tmp = x - ((z * (-1.0 + (a / y))) / y)
	elif y <= 5.4e+22:
		tmp = t / (i + (y * (c + (y * b))))
	else:
		tmp = x + ((z / y) - (a * (x / y)))
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (y <= -4.75e+24)
		tmp = Float64(x - Float64(Float64(z * Float64(-1.0 + Float64(a / y))) / y));
	elseif (y <= 5.4e+22)
		tmp = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * b)))));
	else
		tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (y <= -4.75e+24)
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	elseif (y <= 5.4e+22)
		tmp = t / (i + (y * (c + (y * b))));
	else
		tmp = x + ((z / y) - (a * (x / y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -4.75e+24], N[(x - N[(N[(z * N[(-1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.4e+22], N[(t / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.75 \cdot 10^{+24}:\\
\;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\

\mathbf{elif}\;y \leq 5.4 \cdot 10^{+22}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\

\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.7500000000000001e24

    1. Initial program 15.5%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 56.0%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{27464.7644705 - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Taylor expanded in z around inf 73.0%

      \[\leadsto x + -1 \cdot \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]

    if -4.7500000000000001e24 < y < 5.4000000000000004e22

    1. Initial program 97.7%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 72.2%

      \[\leadsto \color{blue}{\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    4. Taylor expanded in b around inf 70.8%

      \[\leadsto \frac{t}{i + y \cdot \left(c + y \cdot \color{blue}{b}\right)} \]

    if 5.4000000000000004e22 < y

    1. Initial program 8.0%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 68.6%

      \[\leadsto \color{blue}{\left(x + \frac{z}{y}\right) - \frac{a \cdot x}{y}} \]
    4. Step-by-step derivation
      1. associate--l+68.6%

        \[\leadsto \color{blue}{x + \left(\frac{z}{y} - \frac{a \cdot x}{y}\right)} \]
      2. associate-/l*70.3%

        \[\leadsto x + \left(\frac{z}{y} - \color{blue}{a \cdot \frac{x}{y}}\right) \]
    5. Simplified70.3%

      \[\leadsto \color{blue}{x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification71.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.75 \cdot 10^{+24}:\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{+22}:\\ \;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 58.8% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{+26}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{+26}:\\ \;\;\;\;\frac{t}{i + y \cdot c}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= y -4.8e+26) x (if (<= y 2.9e+26) (/ t (+ i (* y c))) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= -4.8e+26) {
		tmp = x;
	} else if (y <= 2.9e+26) {
		tmp = t / (i + (y * c));
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if (y <= (-4.8d+26)) then
        tmp = x
    else if (y <= 2.9d+26) then
        tmp = t / (i + (y * c))
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= -4.8e+26) {
		tmp = x;
	} else if (y <= 2.9e+26) {
		tmp = t / (i + (y * c));
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if y <= -4.8e+26:
		tmp = x
	elif y <= 2.9e+26:
		tmp = t / (i + (y * c))
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (y <= -4.8e+26)
		tmp = x;
	elseif (y <= 2.9e+26)
		tmp = Float64(t / Float64(i + Float64(y * c)));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (y <= -4.8e+26)
		tmp = x;
	elseif (y <= 2.9e+26)
		tmp = t / (i + (y * c));
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -4.8e+26], x, If[LessEqual[y, 2.9e+26], N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+26}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 2.9 \cdot 10^{+26}:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.80000000000000009e26 or 2.9e26 < y

    1. Initial program 11.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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 54.3%

      \[\leadsto \color{blue}{x} \]

    if -4.80000000000000009e26 < y < 2.9e26

    1. Initial program 97.1%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 71.7%

      \[\leadsto \color{blue}{\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    4. Taylor expanded in y around 0 66.2%

      \[\leadsto \frac{t}{i + \color{blue}{c \cdot y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{+26}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{+26}:\\ \;\;\;\;\frac{t}{i + y \cdot c}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 51.2% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.9 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+24}:\\ \;\;\;\;\frac{t}{i}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= y -4.9e+28) x (if (<= y 2.3e+24) (/ t i) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= -4.9e+28) {
		tmp = x;
	} else if (y <= 2.3e+24) {
		tmp = t / i;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if (y <= (-4.9d+28)) then
        tmp = x
    else if (y <= 2.3d+24) then
        tmp = t / i
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= -4.9e+28) {
		tmp = x;
	} else if (y <= 2.3e+24) {
		tmp = t / i;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if y <= -4.9e+28:
		tmp = x
	elif y <= 2.3e+24:
		tmp = t / i
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (y <= -4.9e+28)
		tmp = x;
	elseif (y <= 2.3e+24)
		tmp = Float64(t / i);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (y <= -4.9e+28)
		tmp = x;
	elseif (y <= 2.3e+24)
		tmp = t / i;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -4.9e+28], x, If[LessEqual[y, 2.3e+24], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.9 \cdot 10^{+28}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 2.3 \cdot 10^{+24}:\\
\;\;\;\;\frac{t}{i}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.8999999999999996e28 or 2.2999999999999999e24 < y

    1. Initial program 11.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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 54.3%

      \[\leadsto \color{blue}{x} \]

    if -4.8999999999999996e28 < y < 2.2999999999999999e24

    1. Initial program 97.1%

      \[\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} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 50.5%

      \[\leadsto \color{blue}{\frac{t}{i}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 14: 25.5% accurate, 33.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a b c i) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return x;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    code = x
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return x;
}
def code(x, y, z, t, a, b, c, i):
	return x
function code(x, y, z, t, a, b, c, i)
	return x
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = x;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 58.5%

    \[\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} \]
  2. Add Preprocessing
  3. Taylor expanded in y around inf 26.7%

    \[\leadsto \color{blue}{x} \]
  4. Add Preprocessing

Reproduce

?
herbie shell --seed 2024091 
(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)))