Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2

Percentage Accurate: 56.6% → 85.2%
Time: 29.7s
Alternatives: 11
Speedup: 1.7×

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 11 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.6% 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: 85.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \mathbf{if}\;y \leq -1.55 \cdot 10^{+141}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1 \cdot 10^{+61}:\\ \;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\ \mathbf{elif}\;y \leq 8.6 \cdot 10^{+58}:\\ \;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(z + y \cdot x\right) + 27464.7644705\right) + 230661.510616\right) + t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ x (- (/ z y) (* a (/ x y))))))
   (if (<= y -1.55e+141)
     t_1
     (if (<= y -1e+61)
       (/ 1.0 (/ (+ 1.0 (/ a y)) x))
       (if (<= y 8.6e+58)
         (/
          (+
           (* y (+ (* y (+ (* y (+ z (* y x))) 27464.7644705)) 230661.510616))
           t)
          (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
         t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = x + ((z / y) - (a * (x / y)));
	double tmp;
	if (y <= -1.55e+141) {
		tmp = t_1;
	} else if (y <= -1e+61) {
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	} else if (y <= 8.6e+58) {
		tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
	} else {
		tmp = t_1;
	}
	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 = x + ((z / y) - (a * (x / y)))
    if (y <= (-1.55d+141)) then
        tmp = t_1
    else if (y <= (-1d+61)) then
        tmp = 1.0d0 / ((1.0d0 + (a / y)) / x)
    else if (y <= 8.6d+58) then
        tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705d0)) + 230661.510616d0)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
    else
        tmp = t_1
    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 = x + ((z / y) - (a * (x / y)));
	double tmp;
	if (y <= -1.55e+141) {
		tmp = t_1;
	} else if (y <= -1e+61) {
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	} else if (y <= 8.6e+58) {
		tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = x + ((z / y) - (a * (x / y)))
	tmp = 0
	if y <= -1.55e+141:
		tmp = t_1
	elif y <= -1e+61:
		tmp = 1.0 / ((1.0 + (a / y)) / x)
	elif y <= 8.6e+58:
		tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y))))
	tmp = 0.0
	if (y <= -1.55e+141)
		tmp = t_1;
	elseif (y <= -1e+61)
		tmp = Float64(1.0 / Float64(Float64(1.0 + Float64(a / y)) / x));
	elseif (y <= 8.6e+58)
		tmp = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(z + Float64(y * x))) + 27464.7644705)) + 230661.510616)) + t) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = x + ((z / y) - (a * (x / y)));
	tmp = 0.0;
	if (y <= -1.55e+141)
		tmp = t_1;
	elseif (y <= -1e+61)
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	elseif (y <= 8.6e+58)
		tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.55e+141], t$95$1, If[LessEqual[y, -1e+61], N[(1.0 / N[(N[(1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.6e+58], N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -1.55 \cdot 10^{+141}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1 \cdot 10^{+61}:\\
\;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\

\mathbf{elif}\;y \leq 8.6 \cdot 10^{+58}:\\
\;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(z + y \cdot x\right) + 27464.7644705\right) + 230661.510616\right) + t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.55000000000000002e141 or 8.59999999999999982e58 < y

    1. Initial program 1.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 inf 76.8%

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

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

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

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

    if -1.55000000000000002e141 < y < -9.99999999999999949e60

    1. Initial program 6.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. Step-by-step derivation
      1. clear-num6.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}}} \]
      2. inv-pow6.7%

        \[\leadsto \color{blue}{{\left(\frac{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}\right)}^{-1}} \]
    4. Applied egg-rr6.7%

      \[\leadsto \color{blue}{{\left(\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right), 230661.510616\right), t\right)}\right)}^{-1}} \]
    5. Step-by-step derivation
      1. unpow-16.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right), 230661.510616\right), t\right)}}} \]
      2. fma-undefine6.7%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{x \cdot y + z}, 27464.7644705\right), 230661.510616\right), t\right)}} \]
      3. *-commutative6.7%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y \cdot x} + z, 27464.7644705\right), 230661.510616\right), t\right)}} \]
      4. fma-define6.7%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, x, z\right)}, 27464.7644705\right), 230661.510616\right), t\right)}} \]
    6. Simplified6.7%

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right), t\right)}}} \]
    7. Taylor expanded in y around inf 62.8%

      \[\leadsto \frac{1}{\color{blue}{\left(\frac{1}{x} + \frac{a}{x \cdot y}\right) - \frac{z}{{x}^{2} \cdot y}}} \]
    8. Step-by-step derivation
      1. *-commutative62.8%

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

        \[\leadsto \frac{1}{\left(\frac{1}{x} + \frac{a}{y \cdot x}\right) - \color{blue}{\frac{\frac{z}{{x}^{2}}}{y}}} \]
    9. Simplified62.8%

      \[\leadsto \frac{1}{\color{blue}{\left(\frac{1}{x} + \frac{a}{y \cdot x}\right) - \frac{\frac{z}{{x}^{2}}}{y}}} \]
    10. Taylor expanded in x around inf 73.4%

      \[\leadsto \frac{1}{\color{blue}{\frac{1 + \frac{a}{y}}{x}}} \]

    if -9.99999999999999949e60 < y < 8.59999999999999982e58

    1. Initial program 96.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. Recombined 3 regimes into one program.
  4. Final simplification89.2%

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

Alternative 2: 81.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \mathbf{if}\;y \leq -1.9 \cdot 10^{+142}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{+62}:\\ \;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{+58}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ x (- (/ z y) (* a (/ x y))))))
   (if (<= y -1.9e+142)
     t_1
     (if (<= y -1.2e+62)
       (/ 1.0 (/ (+ 1.0 (/ a y)) x))
       (if (<= y 7.8e+58)
         (/
          (+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
          (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
         t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = x + ((z / y) - (a * (x / y)));
	double tmp;
	if (y <= -1.9e+142) {
		tmp = t_1;
	} else if (y <= -1.2e+62) {
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	} else if (y <= 7.8e+58) {
		tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
	} else {
		tmp = t_1;
	}
	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 = x + ((z / y) - (a * (x / y)))
    if (y <= (-1.9d+142)) then
        tmp = t_1
    else if (y <= (-1.2d+62)) then
        tmp = 1.0d0 / ((1.0d0 + (a / y)) / x)
    else if (y <= 7.8d+58) then
        tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
    else
        tmp = t_1
    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 = x + ((z / y) - (a * (x / y)));
	double tmp;
	if (y <= -1.9e+142) {
		tmp = t_1;
	} else if (y <= -1.2e+62) {
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	} else if (y <= 7.8e+58) {
		tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = x + ((z / y) - (a * (x / y)))
	tmp = 0
	if y <= -1.9e+142:
		tmp = t_1
	elif y <= -1.2e+62:
		tmp = 1.0 / ((1.0 + (a / y)) / x)
	elif y <= 7.8e+58:
		tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y))))
	tmp = 0.0
	if (y <= -1.9e+142)
		tmp = t_1;
	elseif (y <= -1.2e+62)
		tmp = Float64(1.0 / Float64(Float64(1.0 + Float64(a / y)) / x));
	elseif (y <= 7.8e+58)
		tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = x + ((z / y) - (a * (x / y)));
	tmp = 0.0;
	if (y <= -1.9e+142)
		tmp = t_1;
	elseif (y <= -1.2e+62)
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	elseif (y <= 7.8e+58)
		tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.9e+142], t$95$1, If[LessEqual[y, -1.2e+62], N[(1.0 / N[(N[(1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.8e+58], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -1.9 \cdot 10^{+142}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1.2 \cdot 10^{+62}:\\
\;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.89999999999999995e142 or 7.8000000000000002e58 < y

    1. Initial program 1.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 inf 76.8%

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

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

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

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

    if -1.89999999999999995e142 < y < -1.2e62

    1. Initial program 6.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. Step-by-step derivation
      1. clear-num6.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}}} \]
      2. inv-pow6.7%

        \[\leadsto \color{blue}{{\left(\frac{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}\right)}^{-1}} \]
    4. Applied egg-rr6.7%

      \[\leadsto \color{blue}{{\left(\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right), 230661.510616\right), t\right)}\right)}^{-1}} \]
    5. Step-by-step derivation
      1. unpow-16.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right), 230661.510616\right), t\right)}}} \]
      2. fma-undefine6.7%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{x \cdot y + z}, 27464.7644705\right), 230661.510616\right), t\right)}} \]
      3. *-commutative6.7%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y \cdot x} + z, 27464.7644705\right), 230661.510616\right), t\right)}} \]
      4. fma-define6.7%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, x, z\right)}, 27464.7644705\right), 230661.510616\right), t\right)}} \]
    6. Simplified6.7%

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right), t\right)}}} \]
    7. Taylor expanded in y around inf 62.8%

      \[\leadsto \frac{1}{\color{blue}{\left(\frac{1}{x} + \frac{a}{x \cdot y}\right) - \frac{z}{{x}^{2} \cdot y}}} \]
    8. Step-by-step derivation
      1. *-commutative62.8%

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

        \[\leadsto \frac{1}{\left(\frac{1}{x} + \frac{a}{y \cdot x}\right) - \color{blue}{\frac{\frac{z}{{x}^{2}}}{y}}} \]
    9. Simplified62.8%

      \[\leadsto \frac{1}{\color{blue}{\left(\frac{1}{x} + \frac{a}{y \cdot x}\right) - \frac{\frac{z}{{x}^{2}}}{y}}} \]
    10. Taylor expanded in x around inf 73.4%

      \[\leadsto \frac{1}{\color{blue}{\frac{1 + \frac{a}{y}}{x}}} \]

    if -1.2e62 < y < 7.8000000000000002e58

    1. Initial program 96.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 x around 0 90.6%

      \[\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} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification85.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.9 \cdot 10^{+142}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{+62}:\\ \;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{+58}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 78.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \mathbf{if}\;y \leq -3 \cdot 10^{+142}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -9.8 \cdot 10^{+60}:\\ \;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+58}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot b\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ x (- (/ z y) (* a (/ x y))))))
   (if (<= y -3e+142)
     t_1
     (if (<= y -9.8e+60)
       (/ 1.0 (/ (+ 1.0 (/ a y)) x))
       (if (<= y 1.7e+58)
         (/
          (+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
          (+ i (* y (+ c (* y b)))))
         t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = x + ((z / y) - (a * (x / y)));
	double tmp;
	if (y <= -3e+142) {
		tmp = t_1;
	} else if (y <= -9.8e+60) {
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	} else if (y <= 1.7e+58) {
		tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b))));
	} else {
		tmp = t_1;
	}
	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 = x + ((z / y) - (a * (x / y)))
    if (y <= (-3d+142)) then
        tmp = t_1
    else if (y <= (-9.8d+60)) then
        tmp = 1.0d0 / ((1.0d0 + (a / y)) / x)
    else if (y <= 1.7d+58) then
        tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (y * b))))
    else
        tmp = t_1
    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 = x + ((z / y) - (a * (x / y)));
	double tmp;
	if (y <= -3e+142) {
		tmp = t_1;
	} else if (y <= -9.8e+60) {
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	} else if (y <= 1.7e+58) {
		tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = x + ((z / y) - (a * (x / y)))
	tmp = 0
	if y <= -3e+142:
		tmp = t_1
	elif y <= -9.8e+60:
		tmp = 1.0 / ((1.0 + (a / y)) / x)
	elif y <= 1.7e+58:
		tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b))))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y))))
	tmp = 0.0
	if (y <= -3e+142)
		tmp = t_1;
	elseif (y <= -9.8e+60)
		tmp = Float64(1.0 / Float64(Float64(1.0 + Float64(a / y)) / x));
	elseif (y <= 1.7e+58)
		tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(i + Float64(y * Float64(c + Float64(y * b)))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = x + ((z / y) - (a * (x / y)));
	tmp = 0.0;
	if (y <= -3e+142)
		tmp = t_1;
	elseif (y <= -9.8e+60)
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	elseif (y <= 1.7e+58)
		tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b))));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3e+142], t$95$1, If[LessEqual[y, -9.8e+60], N[(1.0 / N[(N[(1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e+58], 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 * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -3 \cdot 10^{+142}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -9.8 \cdot 10^{+60}:\\
\;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\

\mathbf{elif}\;y \leq 1.7 \cdot 10^{+58}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot b\right)}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.99999999999999975e142 or 1.7e58 < y

    1. Initial program 1.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 inf 76.8%

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

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

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

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

    if -2.99999999999999975e142 < y < -9.8000000000000005e60

    1. Initial program 6.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. Step-by-step derivation
      1. clear-num6.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}}} \]
      2. inv-pow6.7%

        \[\leadsto \color{blue}{{\left(\frac{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}\right)}^{-1}} \]
    4. Applied egg-rr6.7%

      \[\leadsto \color{blue}{{\left(\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right), 230661.510616\right), t\right)}\right)}^{-1}} \]
    5. Step-by-step derivation
      1. unpow-16.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right), 230661.510616\right), t\right)}}} \]
      2. fma-undefine6.7%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{x \cdot y + z}, 27464.7644705\right), 230661.510616\right), t\right)}} \]
      3. *-commutative6.7%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y \cdot x} + z, 27464.7644705\right), 230661.510616\right), t\right)}} \]
      4. fma-define6.7%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, x, z\right)}, 27464.7644705\right), 230661.510616\right), t\right)}} \]
    6. Simplified6.7%

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right), t\right)}}} \]
    7. Taylor expanded in y around inf 62.8%

      \[\leadsto \frac{1}{\color{blue}{\left(\frac{1}{x} + \frac{a}{x \cdot y}\right) - \frac{z}{{x}^{2} \cdot y}}} \]
    8. Step-by-step derivation
      1. *-commutative62.8%

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

        \[\leadsto \frac{1}{\left(\frac{1}{x} + \frac{a}{y \cdot x}\right) - \color{blue}{\frac{\frac{z}{{x}^{2}}}{y}}} \]
    9. Simplified62.8%

      \[\leadsto \frac{1}{\color{blue}{\left(\frac{1}{x} + \frac{a}{y \cdot x}\right) - \frac{\frac{z}{{x}^{2}}}{y}}} \]
    10. Taylor expanded in x around inf 73.4%

      \[\leadsto \frac{1}{\color{blue}{\frac{1 + \frac{a}{y}}{x}}} \]

    if -9.8000000000000005e60 < y < 1.7e58

    1. Initial program 96.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 x around 0 90.6%

      \[\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} \]
    4. Taylor expanded in y around 0 87.3%

      \[\leadsto \frac{\left(\left(y \cdot z + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\color{blue}{b \cdot y} + c\right) \cdot y + i} \]
    5. Step-by-step derivation
      1. *-commutative81.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{+142}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -9.8 \cdot 10^{+60}:\\ \;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+58}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{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 4: 76.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \mathbf{if}\;y \leq -1.42 \cdot 10^{+141}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -9.8 \cdot 10^{+60}:\\ \;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\ \mathbf{elif}\;y \leq 8.6 \cdot 10^{+25}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ x (- (/ z y) (* a (/ x y))))))
   (if (<= y -1.42e+141)
     t_1
     (if (<= y -9.8e+60)
       (/ 1.0 (/ (+ 1.0 (/ a y)) x))
       (if (<= y 8.6e+25)
         (/
          (+ t (* y 230661.510616))
          (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
         t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = x + ((z / y) - (a * (x / y)));
	double tmp;
	if (y <= -1.42e+141) {
		tmp = t_1;
	} else if (y <= -9.8e+60) {
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	} else if (y <= 8.6e+25) {
		tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
	} else {
		tmp = t_1;
	}
	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 = x + ((z / y) - (a * (x / y)))
    if (y <= (-1.42d+141)) then
        tmp = t_1
    else if (y <= (-9.8d+60)) then
        tmp = 1.0d0 / ((1.0d0 + (a / y)) / x)
    else if (y <= 8.6d+25) then
        tmp = (t + (y * 230661.510616d0)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
    else
        tmp = t_1
    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 = x + ((z / y) - (a * (x / y)));
	double tmp;
	if (y <= -1.42e+141) {
		tmp = t_1;
	} else if (y <= -9.8e+60) {
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	} else if (y <= 8.6e+25) {
		tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = x + ((z / y) - (a * (x / y)))
	tmp = 0
	if y <= -1.42e+141:
		tmp = t_1
	elif y <= -9.8e+60:
		tmp = 1.0 / ((1.0 + (a / y)) / x)
	elif y <= 8.6e+25:
		tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y))))
	tmp = 0.0
	if (y <= -1.42e+141)
		tmp = t_1;
	elseif (y <= -9.8e+60)
		tmp = Float64(1.0 / Float64(Float64(1.0 + Float64(a / y)) / x));
	elseif (y <= 8.6e+25)
		tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = x + ((z / y) - (a * (x / y)));
	tmp = 0.0;
	if (y <= -1.42e+141)
		tmp = t_1;
	elseif (y <= -9.8e+60)
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	elseif (y <= 8.6e+25)
		tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.42e+141], t$95$1, If[LessEqual[y, -9.8e+60], N[(1.0 / N[(N[(1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.6e+25], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -1.42 \cdot 10^{+141}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -9.8 \cdot 10^{+60}:\\
\;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.42000000000000005e141 or 8.59999999999999996e25 < y

    1. Initial program 4.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 73.5%

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

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

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

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

    if -1.42000000000000005e141 < y < -9.8000000000000005e60

    1. Initial program 6.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. Step-by-step derivation
      1. clear-num6.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}}} \]
      2. inv-pow6.7%

        \[\leadsto \color{blue}{{\left(\frac{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}\right)}^{-1}} \]
    4. Applied egg-rr6.7%

      \[\leadsto \color{blue}{{\left(\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right), 230661.510616\right), t\right)}\right)}^{-1}} \]
    5. Step-by-step derivation
      1. unpow-16.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right), 230661.510616\right), t\right)}}} \]
      2. fma-undefine6.7%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{x \cdot y + z}, 27464.7644705\right), 230661.510616\right), t\right)}} \]
      3. *-commutative6.7%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y \cdot x} + z, 27464.7644705\right), 230661.510616\right), t\right)}} \]
      4. fma-define6.7%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, x, z\right)}, 27464.7644705\right), 230661.510616\right), t\right)}} \]
    6. Simplified6.7%

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right), t\right)}}} \]
    7. Taylor expanded in y around inf 62.8%

      \[\leadsto \frac{1}{\color{blue}{\left(\frac{1}{x} + \frac{a}{x \cdot y}\right) - \frac{z}{{x}^{2} \cdot y}}} \]
    8. Step-by-step derivation
      1. *-commutative62.8%

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

        \[\leadsto \frac{1}{\left(\frac{1}{x} + \frac{a}{y \cdot x}\right) - \color{blue}{\frac{\frac{z}{{x}^{2}}}{y}}} \]
    9. Simplified62.8%

      \[\leadsto \frac{1}{\color{blue}{\left(\frac{1}{x} + \frac{a}{y \cdot x}\right) - \frac{\frac{z}{{x}^{2}}}{y}}} \]
    10. Taylor expanded in x around inf 73.4%

      \[\leadsto \frac{1}{\color{blue}{\frac{1 + \frac{a}{y}}{x}}} \]

    if -9.8000000000000005e60 < y < 8.59999999999999996e25

    1. Initial program 97.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 y around 0 86.8%

      \[\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. *-commutative86.8%

        \[\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. Simplified86.8%

      \[\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} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification82.0%

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

Alternative 5: 74.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \mathbf{if}\;y \leq -5.5 \cdot 10^{+141}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -9.8 \cdot 10^{+60}:\\ \;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\ \mathbf{elif}\;y \leq 2.05 \cdot 10^{+34}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ x (- (/ z y) (* a (/ x y))))))
   (if (<= y -5.5e+141)
     t_1
     (if (<= y -9.8e+60)
       (/ 1.0 (/ (+ 1.0 (/ a y)) x))
       (if (<= y 2.05e+34)
         (/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y b)))))
         t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = x + ((z / y) - (a * (x / y)));
	double tmp;
	if (y <= -5.5e+141) {
		tmp = t_1;
	} else if (y <= -9.8e+60) {
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	} else if (y <= 2.05e+34) {
		tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
	} else {
		tmp = t_1;
	}
	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 = x + ((z / y) - (a * (x / y)))
    if (y <= (-5.5d+141)) then
        tmp = t_1
    else if (y <= (-9.8d+60)) then
        tmp = 1.0d0 / ((1.0d0 + (a / y)) / x)
    else if (y <= 2.05d+34) then
        tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * b))))
    else
        tmp = t_1
    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 = x + ((z / y) - (a * (x / y)));
	double tmp;
	if (y <= -5.5e+141) {
		tmp = t_1;
	} else if (y <= -9.8e+60) {
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	} else if (y <= 2.05e+34) {
		tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = x + ((z / y) - (a * (x / y)))
	tmp = 0
	if y <= -5.5e+141:
		tmp = t_1
	elif y <= -9.8e+60:
		tmp = 1.0 / ((1.0 + (a / y)) / x)
	elif y <= 2.05e+34:
		tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y))))
	tmp = 0.0
	if (y <= -5.5e+141)
		tmp = t_1;
	elseif (y <= -9.8e+60)
		tmp = Float64(1.0 / Float64(Float64(1.0 + Float64(a / y)) / x));
	elseif (y <= 2.05e+34)
		tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * b)))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = x + ((z / y) - (a * (x / y)));
	tmp = 0.0;
	if (y <= -5.5e+141)
		tmp = t_1;
	elseif (y <= -9.8e+60)
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	elseif (y <= 2.05e+34)
		tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e+141], t$95$1, If[LessEqual[y, -9.8e+60], N[(1.0 / N[(N[(1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.05e+34], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+141}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -9.8 \cdot 10^{+60}:\\
\;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.49999999999999967e141 or 2.0499999999999999e34 < y

    1. Initial program 4.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 73.5%

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

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

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

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

    if -5.49999999999999967e141 < y < -9.8000000000000005e60

    1. Initial program 6.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. Step-by-step derivation
      1. clear-num6.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}}} \]
      2. inv-pow6.7%

        \[\leadsto \color{blue}{{\left(\frac{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}\right)}^{-1}} \]
    4. Applied egg-rr6.7%

      \[\leadsto \color{blue}{{\left(\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right), 230661.510616\right), t\right)}\right)}^{-1}} \]
    5. Step-by-step derivation
      1. unpow-16.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right), 230661.510616\right), t\right)}}} \]
      2. fma-undefine6.7%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{x \cdot y + z}, 27464.7644705\right), 230661.510616\right), t\right)}} \]
      3. *-commutative6.7%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y \cdot x} + z, 27464.7644705\right), 230661.510616\right), t\right)}} \]
      4. fma-define6.7%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, x, z\right)}, 27464.7644705\right), 230661.510616\right), t\right)}} \]
    6. Simplified6.7%

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right), t\right)}}} \]
    7. Taylor expanded in y around inf 62.8%

      \[\leadsto \frac{1}{\color{blue}{\left(\frac{1}{x} + \frac{a}{x \cdot y}\right) - \frac{z}{{x}^{2} \cdot y}}} \]
    8. Step-by-step derivation
      1. *-commutative62.8%

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

        \[\leadsto \frac{1}{\left(\frac{1}{x} + \frac{a}{y \cdot x}\right) - \color{blue}{\frac{\frac{z}{{x}^{2}}}{y}}} \]
    9. Simplified62.8%

      \[\leadsto \frac{1}{\color{blue}{\left(\frac{1}{x} + \frac{a}{y \cdot x}\right) - \frac{\frac{z}{{x}^{2}}}{y}}} \]
    10. Taylor expanded in x around inf 73.4%

      \[\leadsto \frac{1}{\color{blue}{\frac{1 + \frac{a}{y}}{x}}} \]

    if -9.8000000000000005e60 < y < 2.0499999999999999e34

    1. Initial program 97.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 y around 0 86.8%

      \[\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. *-commutative86.8%

        \[\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. Simplified86.8%

      \[\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} \]
    6. Taylor expanded in y around 0 83.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{+141}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -9.8 \cdot 10^{+60}:\\ \;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\ \mathbf{elif}\;y \leq 2.05 \cdot 10^{+34}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{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 6: 61.1% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \mathbf{if}\;y \leq -1.45 \cdot 10^{+141}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -920000:\\ \;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\ \mathbf{elif}\;y \leq 185000:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ x (- (/ z y) (* a (/ x y))))))
   (if (<= y -1.45e+141)
     t_1
     (if (<= y -920000.0)
       (/ 1.0 (/ (+ 1.0 (/ a y)) x))
       (if (<= y 185000.0) (/ (+ t (* y 230661.510616)) i) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = x + ((z / y) - (a * (x / y)));
	double tmp;
	if (y <= -1.45e+141) {
		tmp = t_1;
	} else if (y <= -920000.0) {
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	} else if (y <= 185000.0) {
		tmp = (t + (y * 230661.510616)) / i;
	} else {
		tmp = t_1;
	}
	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 = x + ((z / y) - (a * (x / y)))
    if (y <= (-1.45d+141)) then
        tmp = t_1
    else if (y <= (-920000.0d0)) then
        tmp = 1.0d0 / ((1.0d0 + (a / y)) / x)
    else if (y <= 185000.0d0) then
        tmp = (t + (y * 230661.510616d0)) / i
    else
        tmp = t_1
    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 = x + ((z / y) - (a * (x / y)));
	double tmp;
	if (y <= -1.45e+141) {
		tmp = t_1;
	} else if (y <= -920000.0) {
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	} else if (y <= 185000.0) {
		tmp = (t + (y * 230661.510616)) / i;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = x + ((z / y) - (a * (x / y)))
	tmp = 0
	if y <= -1.45e+141:
		tmp = t_1
	elif y <= -920000.0:
		tmp = 1.0 / ((1.0 + (a / y)) / x)
	elif y <= 185000.0:
		tmp = (t + (y * 230661.510616)) / i
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y))))
	tmp = 0.0
	if (y <= -1.45e+141)
		tmp = t_1;
	elseif (y <= -920000.0)
		tmp = Float64(1.0 / Float64(Float64(1.0 + Float64(a / y)) / x));
	elseif (y <= 185000.0)
		tmp = Float64(Float64(t + Float64(y * 230661.510616)) / i);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = x + ((z / y) - (a * (x / y)));
	tmp = 0.0;
	if (y <= -1.45e+141)
		tmp = t_1;
	elseif (y <= -920000.0)
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	elseif (y <= 185000.0)
		tmp = (t + (y * 230661.510616)) / i;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.45e+141], t$95$1, If[LessEqual[y, -920000.0], N[(1.0 / N[(N[(1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 185000.0], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -1.45 \cdot 10^{+141}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -920000:\\
\;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\

\mathbf{elif}\;y \leq 185000:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.45000000000000003e141 or 185000 < y

    1. Initial program 6.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 inf 71.9%

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

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

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

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

    if -1.45000000000000003e141 < y < -9.2e5

    1. Initial program 22.2%

      \[\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. Step-by-step derivation
      1. clear-num22.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}}} \]
      2. inv-pow22.2%

        \[\leadsto \color{blue}{{\left(\frac{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}\right)}^{-1}} \]
    4. Applied egg-rr22.2%

      \[\leadsto \color{blue}{{\left(\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right), 230661.510616\right), t\right)}\right)}^{-1}} \]
    5. Step-by-step derivation
      1. unpow-122.2%

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

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

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

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, x, z\right)}, 27464.7644705\right), 230661.510616\right), t\right)}} \]
    6. Simplified22.2%

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right), t\right)}}} \]
    7. Taylor expanded in y around inf 48.0%

      \[\leadsto \frac{1}{\color{blue}{\left(\frac{1}{x} + \frac{a}{x \cdot y}\right) - \frac{z}{{x}^{2} \cdot y}}} \]
    8. Step-by-step derivation
      1. *-commutative48.0%

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

        \[\leadsto \frac{1}{\left(\frac{1}{x} + \frac{a}{y \cdot x}\right) - \color{blue}{\frac{\frac{z}{{x}^{2}}}{y}}} \]
    9. Simplified48.0%

      \[\leadsto \frac{1}{\color{blue}{\left(\frac{1}{x} + \frac{a}{y \cdot x}\right) - \frac{\frac{z}{{x}^{2}}}{y}}} \]
    10. Taylor expanded in x around inf 56.1%

      \[\leadsto \frac{1}{\color{blue}{\frac{1 + \frac{a}{y}}{x}}} \]

    if -9.2e5 < y < 185000

    1. Initial program 99.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 0 89.5%

      \[\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.5%

        \[\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.5%

      \[\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} \]
    6. Taylor expanded in i around inf 65.4%

      \[\leadsto \color{blue}{\frac{t + 230661.510616 \cdot y}{i}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification67.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.45 \cdot 10^{+141}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -920000:\\ \;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\ \mathbf{elif}\;y \leq 185000:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 70.7% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \mathbf{if}\;y \leq -1.2 \cdot 10^{+142}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -9.8 \cdot 10^{+60}:\\ \;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{+28}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ x (- (/ z y) (* a (/ x y))))))
   (if (<= y -1.2e+142)
     t_1
     (if (<= y -9.8e+60)
       (/ 1.0 (/ (+ 1.0 (/ a y)) x))
       (if (<= y 4.8e+28) (/ (+ t (* y 230661.510616)) (+ i (* y c))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = x + ((z / y) - (a * (x / y)));
	double tmp;
	if (y <= -1.2e+142) {
		tmp = t_1;
	} else if (y <= -9.8e+60) {
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	} else if (y <= 4.8e+28) {
		tmp = (t + (y * 230661.510616)) / (i + (y * c));
	} else {
		tmp = t_1;
	}
	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 = x + ((z / y) - (a * (x / y)))
    if (y <= (-1.2d+142)) then
        tmp = t_1
    else if (y <= (-9.8d+60)) then
        tmp = 1.0d0 / ((1.0d0 + (a / y)) / x)
    else if (y <= 4.8d+28) then
        tmp = (t + (y * 230661.510616d0)) / (i + (y * c))
    else
        tmp = t_1
    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 = x + ((z / y) - (a * (x / y)));
	double tmp;
	if (y <= -1.2e+142) {
		tmp = t_1;
	} else if (y <= -9.8e+60) {
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	} else if (y <= 4.8e+28) {
		tmp = (t + (y * 230661.510616)) / (i + (y * c));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = x + ((z / y) - (a * (x / y)))
	tmp = 0
	if y <= -1.2e+142:
		tmp = t_1
	elif y <= -9.8e+60:
		tmp = 1.0 / ((1.0 + (a / y)) / x)
	elif y <= 4.8e+28:
		tmp = (t + (y * 230661.510616)) / (i + (y * c))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y))))
	tmp = 0.0
	if (y <= -1.2e+142)
		tmp = t_1;
	elseif (y <= -9.8e+60)
		tmp = Float64(1.0 / Float64(Float64(1.0 + Float64(a / y)) / x));
	elseif (y <= 4.8e+28)
		tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * c)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = x + ((z / y) - (a * (x / y)));
	tmp = 0.0;
	if (y <= -1.2e+142)
		tmp = t_1;
	elseif (y <= -9.8e+60)
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	elseif (y <= 4.8e+28)
		tmp = (t + (y * 230661.510616)) / (i + (y * c));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.2e+142], t$95$1, If[LessEqual[y, -9.8e+60], N[(1.0 / N[(N[(1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e+28], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -1.2 \cdot 10^{+142}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -9.8 \cdot 10^{+60}:\\
\;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\

\mathbf{elif}\;y \leq 4.8 \cdot 10^{+28}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot c}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.2e142 or 4.79999999999999962e28 < y

    1. Initial program 4.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 73.5%

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

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

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

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

    if -1.2e142 < y < -9.8000000000000005e60

    1. Initial program 6.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. Step-by-step derivation
      1. clear-num6.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}}} \]
      2. inv-pow6.7%

        \[\leadsto \color{blue}{{\left(\frac{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}\right)}^{-1}} \]
    4. Applied egg-rr6.7%

      \[\leadsto \color{blue}{{\left(\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right), 230661.510616\right), t\right)}\right)}^{-1}} \]
    5. Step-by-step derivation
      1. unpow-16.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right), 230661.510616\right), t\right)}}} \]
      2. fma-undefine6.7%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{x \cdot y + z}, 27464.7644705\right), 230661.510616\right), t\right)}} \]
      3. *-commutative6.7%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y \cdot x} + z, 27464.7644705\right), 230661.510616\right), t\right)}} \]
      4. fma-define6.7%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, x, z\right)}, 27464.7644705\right), 230661.510616\right), t\right)}} \]
    6. Simplified6.7%

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right), t\right)}}} \]
    7. Taylor expanded in y around inf 62.8%

      \[\leadsto \frac{1}{\color{blue}{\left(\frac{1}{x} + \frac{a}{x \cdot y}\right) - \frac{z}{{x}^{2} \cdot y}}} \]
    8. Step-by-step derivation
      1. *-commutative62.8%

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

        \[\leadsto \frac{1}{\left(\frac{1}{x} + \frac{a}{y \cdot x}\right) - \color{blue}{\frac{\frac{z}{{x}^{2}}}{y}}} \]
    9. Simplified62.8%

      \[\leadsto \frac{1}{\color{blue}{\left(\frac{1}{x} + \frac{a}{y \cdot x}\right) - \frac{\frac{z}{{x}^{2}}}{y}}} \]
    10. Taylor expanded in x around inf 73.4%

      \[\leadsto \frac{1}{\color{blue}{\frac{1 + \frac{a}{y}}{x}}} \]

    if -9.8000000000000005e60 < y < 4.79999999999999962e28

    1. Initial program 97.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 y around 0 86.8%

      \[\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. *-commutative86.8%

        \[\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. Simplified86.8%

      \[\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} \]
    6. Taylor expanded in y around 0 76.6%

      \[\leadsto \frac{y \cdot 230661.510616 + t}{\color{blue}{c \cdot y} + i} \]
    7. Step-by-step derivation
      1. *-commutative76.6%

        \[\leadsto \frac{y \cdot 230661.510616 + t}{\color{blue}{y \cdot c} + i} \]
    8. Simplified76.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{+142}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -9.8 \cdot 10^{+60}:\\ \;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{+28}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot c}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 60.0% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -600000 \lor \neg \left(y \leq 14600000000\right):\\ \;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (or (<= y -600000.0) (not (<= y 14600000000.0)))
   (/ 1.0 (/ (+ 1.0 (/ a y)) x))
   (/ (+ t (* y 230661.510616)) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((y <= -600000.0) || !(y <= 14600000000.0)) {
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	} else {
		tmp = (t + (y * 230661.510616)) / i;
	}
	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 <= (-600000.0d0)) .or. (.not. (y <= 14600000000.0d0))) then
        tmp = 1.0d0 / ((1.0d0 + (a / y)) / x)
    else
        tmp = (t + (y * 230661.510616d0)) / i
    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 <= -600000.0) || !(y <= 14600000000.0)) {
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	} else {
		tmp = (t + (y * 230661.510616)) / i;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (y <= -600000.0) or not (y <= 14600000000.0):
		tmp = 1.0 / ((1.0 + (a / y)) / x)
	else:
		tmp = (t + (y * 230661.510616)) / i
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((y <= -600000.0) || !(y <= 14600000000.0))
		tmp = Float64(1.0 / Float64(Float64(1.0 + Float64(a / y)) / x));
	else
		tmp = Float64(Float64(t + Float64(y * 230661.510616)) / i);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((y <= -600000.0) || ~((y <= 14600000000.0)))
		tmp = 1.0 / ((1.0 + (a / y)) / x);
	else
		tmp = (t + (y * 230661.510616)) / i;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -600000.0], N[Not[LessEqual[y, 14600000000.0]], $MachinePrecision]], N[(1.0 / N[(N[(1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -600000 \lor \neg \left(y \leq 14600000000\right):\\
\;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6e5 or 1.46e10 < y

    1. Initial program 9.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. Step-by-step derivation
      1. clear-num9.5%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}}} \]
      2. inv-pow9.5%

        \[\leadsto \color{blue}{{\left(\frac{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}\right)}^{-1}} \]
    4. Applied egg-rr9.5%

      \[\leadsto \color{blue}{{\left(\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right), 230661.510616\right), t\right)}\right)}^{-1}} \]
    5. Step-by-step derivation
      1. unpow-19.5%

        \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right), 230661.510616\right), t\right)}}} \]
      2. fma-undefine9.5%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{x \cdot y + z}, 27464.7644705\right), 230661.510616\right), t\right)}} \]
      3. *-commutative9.5%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y \cdot x} + z, 27464.7644705\right), 230661.510616\right), t\right)}} \]
      4. fma-define9.5%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, x, z\right)}, 27464.7644705\right), 230661.510616\right), t\right)}} \]
    6. Simplified9.5%

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right), t\right)}}} \]
    7. Taylor expanded in y around inf 48.4%

      \[\leadsto \frac{1}{\color{blue}{\left(\frac{1}{x} + \frac{a}{x \cdot y}\right) - \frac{z}{{x}^{2} \cdot y}}} \]
    8. Step-by-step derivation
      1. *-commutative48.4%

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

        \[\leadsto \frac{1}{\left(\frac{1}{x} + \frac{a}{y \cdot x}\right) - \color{blue}{\frac{\frac{z}{{x}^{2}}}{y}}} \]
    9. Simplified46.7%

      \[\leadsto \frac{1}{\color{blue}{\left(\frac{1}{x} + \frac{a}{y \cdot x}\right) - \frac{\frac{z}{{x}^{2}}}{y}}} \]
    10. Taylor expanded in x around inf 56.0%

      \[\leadsto \frac{1}{\color{blue}{\frac{1 + \frac{a}{y}}{x}}} \]

    if -6e5 < y < 1.46e10

    1. Initial program 99.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 0 89.5%

      \[\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.5%

        \[\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.5%

      \[\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} \]
    6. Taylor expanded in i around inf 65.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -600000 \lor \neg \left(y \leq 14600000000\right):\\ \;\;\;\;\frac{1}{\frac{1 + \frac{a}{y}}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 53.9% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2500000:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 7400000000000:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= y -2500000.0)
   x
   (if (<= y 7400000000000.0) (/ (+ t (* y 230661.510616)) i) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= -2500000.0) {
		tmp = x;
	} else if (y <= 7400000000000.0) {
		tmp = (t + (y * 230661.510616)) / 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 <= (-2500000.0d0)) then
        tmp = x
    else if (y <= 7400000000000.0d0) then
        tmp = (t + (y * 230661.510616d0)) / 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 <= -2500000.0) {
		tmp = x;
	} else if (y <= 7400000000000.0) {
		tmp = (t + (y * 230661.510616)) / i;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if y <= -2500000.0:
		tmp = x
	elif y <= 7400000000000.0:
		tmp = (t + (y * 230661.510616)) / i
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (y <= -2500000.0)
		tmp = x;
	elseif (y <= 7400000000000.0)
		tmp = Float64(Float64(t + Float64(y * 230661.510616)) / 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 <= -2500000.0)
		tmp = x;
	elseif (y <= 7400000000000.0)
		tmp = (t + (y * 230661.510616)) / i;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -2500000.0], x, If[LessEqual[y, 7400000000000.0], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2500000:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 7400000000000:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.5e6 or 7.4e12 < y

    1. Initial program 9.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 40.7%

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

    if -2.5e6 < y < 7.4e12

    1. Initial program 99.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 0 89.5%

      \[\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.5%

        \[\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.5%

      \[\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} \]
    6. Taylor expanded in i around inf 65.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2500000:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 7400000000000:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 50.4% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1700000:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 4.4 \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 -1700000.0) x (if (<= y 4.4e+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 <= -1700000.0) {
		tmp = x;
	} else if (y <= 4.4e+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 <= (-1700000.0d0)) then
        tmp = x
    else if (y <= 4.4d+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 <= -1700000.0) {
		tmp = x;
	} else if (y <= 4.4e+24) {
		tmp = t / i;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if y <= -1700000.0:
		tmp = x
	elif y <= 4.4e+24:
		tmp = t / i
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (y <= -1700000.0)
		tmp = x;
	elseif (y <= 4.4e+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 <= -1700000.0)
		tmp = x;
	elseif (y <= 4.4e+24)
		tmp = t / i;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1700000.0], x, If[LessEqual[y, 4.4e+24], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1700000:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.7e6 or 4.40000000000000003e24 < y

    1. Initial program 7.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 41.4%

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

    if -1.7e6 < y < 4.40000000000000003e24

    1. Initial program 99.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 0 55.4%

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

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

Alternative 11: 25.6% 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 59.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 inf 20.3%

    \[\leadsto \color{blue}{x} \]
  4. Final simplification20.3%

    \[\leadsto x \]
  5. Add Preprocessing

Reproduce

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