Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2

Percentage Accurate: 57.1% → 85.1%
Time: 20.6s
Alternatives: 18
Speedup: 2.2×

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 18 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: 57.1% 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.1% accurate, 0.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\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} \leq \infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<=
      (/
       (+
        (* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
        t)
       (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
      INFINITY)
   (/
    (fma (fma (fma (fma x y z) y 27464.7644705) y 230661.510616) y t)
    (fma (fma (fma (+ y a) y b) y c) y i))
   (+ x (- (/ z y) (/ a (/ y x))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)) <= ((double) INFINITY)) {
		tmp = fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma((y + a), y, b), y, c), y, i);
	} else {
		tmp = x + ((z / y) - (a / (y / x)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)) <= Inf)
		tmp = Float64(fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(Float64(y + a), y, b), y, c), y, i));
	else
		tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $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], Infinity], N[(N[(N[(N[(N[(x * y + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(N[(y + a), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\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} \leq \infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}\\

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


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

    1. Initial program 96.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. Step-by-step derivation
      1. fma-def96.2%

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Taylor expanded in y around inf 68.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\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} \leq \infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \end{array} \]

Alternative 2: 85.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\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{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 96.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} \]

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

    1. Initial program 0.0%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Taylor expanded in y around inf 68.4%

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

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

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

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

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

Alternative 3: 81.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ t_2 := y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i\\ \mathbf{if}\;y \leq -4.3 \cdot 10^{+43}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{-5}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + z \cdot \left(y \cdot y\right)\right)}{t_2}\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+66}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + x \cdot \left(y \cdot y\right)\right)\right)}{t_2}\\ \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 (/ y x)))))
        (t_2 (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i)))
   (if (<= y -4.3e+43)
     t_1
     (if (<= y 5.5e-5)
       (/ (+ t (* y (+ 230661.510616 (* z (* y y))))) t_2)
       (if (<= y 2.4e+66)
         (/
          (+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* x (* y y)))))))
          t_2)
         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 / (y / x)));
	double t_2 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
	double tmp;
	if (y <= -4.3e+43) {
		tmp = t_1;
	} else if (y <= 5.5e-5) {
		tmp = (t + (y * (230661.510616 + (z * (y * y))))) / t_2;
	} else if (y <= 2.4e+66) {
		tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (x * (y * y))))))) / t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = x + ((z / y) - (a / (y / x)))
    t_2 = (y * ((y * ((y * (y + a)) + b)) + c)) + i
    if (y <= (-4.3d+43)) then
        tmp = t_1
    else if (y <= 5.5d-5) then
        tmp = (t + (y * (230661.510616d0 + (z * (y * y))))) / t_2
    else if (y <= 2.4d+66) then
        tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (x * (y * y))))))) / t_2
    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 / (y / x)));
	double t_2 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
	double tmp;
	if (y <= -4.3e+43) {
		tmp = t_1;
	} else if (y <= 5.5e-5) {
		tmp = (t + (y * (230661.510616 + (z * (y * y))))) / t_2;
	} else if (y <= 2.4e+66) {
		tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (x * (y * y))))))) / t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = x + ((z / y) - (a / (y / x)))
	t_2 = (y * ((y * ((y * (y + a)) + b)) + c)) + i
	tmp = 0
	if y <= -4.3e+43:
		tmp = t_1
	elif y <= 5.5e-5:
		tmp = (t + (y * (230661.510616 + (z * (y * y))))) / t_2
	elif y <= 2.4e+66:
		tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (x * (y * y))))))) / t_2
	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(y / x))))
	t_2 = Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)
	tmp = 0.0
	if (y <= -4.3e+43)
		tmp = t_1;
	elseif (y <= 5.5e-5)
		tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(z * Float64(y * y))))) / t_2);
	elseif (y <= 2.4e+66)
		tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(x * Float64(y * y))))))) / t_2);
	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 / (y / x)));
	t_2 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
	tmp = 0.0;
	if (y <= -4.3e+43)
		tmp = t_1;
	elseif (y <= 5.5e-5)
		tmp = (t + (y * (230661.510616 + (z * (y * y))))) / t_2;
	elseif (y <= 2.4e+66)
		tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (x * (y * y))))))) / t_2;
	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[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]}, If[LessEqual[y, -4.3e+43], t$95$1, If[LessEqual[y, 5.5e-5], N[(N[(t + N[(y * N[(230661.510616 + N[(z * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, 2.4e+66], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 5.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + z \cdot \left(y \cdot y\right)\right)}{t_2}\\

\mathbf{elif}\;y \leq 2.4 \cdot 10^{+66}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + x \cdot \left(y \cdot y\right)\right)\right)}{t_2}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.3e43 or 2.4000000000000002e66 < y

    1. Initial program 4.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. Taylor expanded in y around inf 69.1%

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

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

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

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

    if -4.3e43 < y < 5.5000000000000002e-5

    1. Initial program 97.7%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Taylor expanded in z around inf 94.9%

      \[\leadsto \frac{\left(\color{blue}{{y}^{2} \cdot z} + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    3. Step-by-step derivation
      1. *-commutative94.9%

        \[\leadsto \frac{\left(\color{blue}{z \cdot {y}^{2}} + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      2. unpow294.9%

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

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

    if 5.5000000000000002e-5 < y < 2.4000000000000002e66

    1. Initial program 81.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. Taylor expanded in x around inf 81.5%

      \[\leadsto \frac{\left(\left(\color{blue}{x \cdot {y}^{2}} + 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. Step-by-step derivation
      1. unpow281.5%

        \[\leadsto \frac{\left(\left(x \cdot \color{blue}{\left(y \cdot y\right)} + 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. Simplified81.5%

      \[\leadsto \frac{\left(\left(\color{blue}{x \cdot \left(y \cdot y\right)} + 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 simplification84.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.3 \cdot 10^{+43}:\\ \;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{-5}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + z \cdot \left(y \cdot y\right)\right)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+66}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + x \cdot \left(y \cdot y\right)\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} - \frac{a}{\frac{y}{x}}\right)\\ \end{array} \]

Alternative 4: 76.5% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;y \leq -7200000:\\
\;\;\;\;\frac{y \cdot z}{t_1}\\

\mathbf{elif}\;y \leq 1.9 \cdot 10^{+38}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{y \cdot \left(y \cdot t_1 + c\right) + i}\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.99999999999999977e101 or 1.8999999999999999e38 < y

    1. Initial program 3.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. Taylor expanded in y around inf 75.1%

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

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

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

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

    if -9.99999999999999977e101 < y < -7.2e6

    1. Initial program 30.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. Taylor expanded in z around inf 18.6%

      \[\leadsto \color{blue}{\frac{{y}^{3} \cdot z}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    3. Taylor expanded in c around 0 18.5%

      \[\leadsto \color{blue}{\frac{{y}^{3} \cdot z}{i + {y}^{2} \cdot \left(b + y \cdot \left(a + y\right)\right)}} \]
    4. Step-by-step derivation
      1. associate-/l*27.5%

        \[\leadsto \color{blue}{\frac{{y}^{3}}{\frac{i + {y}^{2} \cdot \left(b + y \cdot \left(a + y\right)\right)}{z}}} \]
      2. unpow227.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \color{blue}{\left(y \cdot y\right)} \cdot \left(b + y \cdot \left(a + y\right)\right)}{z}} \]
      3. +-commutative27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \color{blue}{\left(y \cdot \left(a + y\right) + b\right)}}{z}} \]
      4. +-commutative27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \left(y \cdot \color{blue}{\left(y + a\right)} + b\right)}{z}} \]
      5. *-commutative27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \left(\color{blue}{\left(y + a\right) \cdot y} + b\right)}{z}} \]
      6. fma-udef27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \color{blue}{\mathsf{fma}\left(y + a, y, b\right)}}{z}} \]
    5. Simplified27.5%

      \[\leadsto \color{blue}{\frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \mathsf{fma}\left(y + a, y, b\right)}{z}}} \]
    6. Taylor expanded in i around 0 49.3%

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

    if -7.2e6 < y < 1.8999999999999999e38

    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. Taylor expanded in y around 0 85.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{+102}:\\ \;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \mathbf{elif}\;y \leq -7200000:\\ \;\;\;\;\frac{y \cdot z}{y \cdot \left(y + a\right) + b}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+38}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\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} - \frac{a}{\frac{y}{x}}\right)\\ \end{array} \]

Alternative 5: 80.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{+45} \lor \neg \left(y \leq 1.56 \cdot 10^{+38}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.75000000000000011e45 or 1.5599999999999999e38 < y

    1. Initial program 5.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. Taylor expanded in y around inf 68.2%

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

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

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

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

    if -1.75000000000000011e45 < y < 1.5599999999999999e38

    1. Initial program 97.1%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Taylor expanded in z around inf 91.3%

      \[\leadsto \frac{\left(\color{blue}{{y}^{2} \cdot z} + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    3. Step-by-step derivation
      1. *-commutative91.3%

        \[\leadsto \frac{\left(\color{blue}{z \cdot {y}^{2}} + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      2. unpow291.3%

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

      \[\leadsto \frac{\left(\color{blue}{z \cdot \left(y \cdot y\right)} + 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 2 regimes into one program.
  4. Final simplification82.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.75 \cdot 10^{+45} \lor \neg \left(y \leq 1.56 \cdot 10^{+38}\right):\\ \;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + z \cdot \left(y \cdot y\right)\right)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\ \end{array} \]

Alternative 6: 75.9% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y \leq -6300000:\\
\;\;\;\;\frac{y \cdot z}{t_1}\\

\mathbf{elif}\;y \leq 1.35 \cdot 10^{+36}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot \left(y \cdot t_1 + c\right) + i}\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.2000000000000001e101 or 1.35e36 < y

    1. Initial program 3.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. Taylor expanded in y around inf 75.1%

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

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

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

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

    if -2.2000000000000001e101 < y < -6.3e6

    1. Initial program 30.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. Taylor expanded in z around inf 18.6%

      \[\leadsto \color{blue}{\frac{{y}^{3} \cdot z}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    3. Taylor expanded in c around 0 18.5%

      \[\leadsto \color{blue}{\frac{{y}^{3} \cdot z}{i + {y}^{2} \cdot \left(b + y \cdot \left(a + y\right)\right)}} \]
    4. Step-by-step derivation
      1. associate-/l*27.5%

        \[\leadsto \color{blue}{\frac{{y}^{3}}{\frac{i + {y}^{2} \cdot \left(b + y \cdot \left(a + y\right)\right)}{z}}} \]
      2. unpow227.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \color{blue}{\left(y \cdot y\right)} \cdot \left(b + y \cdot \left(a + y\right)\right)}{z}} \]
      3. +-commutative27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \color{blue}{\left(y \cdot \left(a + y\right) + b\right)}}{z}} \]
      4. +-commutative27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \left(y \cdot \color{blue}{\left(y + a\right)} + b\right)}{z}} \]
      5. *-commutative27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \left(\color{blue}{\left(y + a\right) \cdot y} + b\right)}{z}} \]
      6. fma-udef27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \color{blue}{\mathsf{fma}\left(y + a, y, b\right)}}{z}} \]
    5. Simplified27.5%

      \[\leadsto \color{blue}{\frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \mathsf{fma}\left(y + a, y, b\right)}{z}}} \]
    6. Taylor expanded in i around 0 49.3%

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

    if -6.3e6 < y < 1.35e36

    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. Taylor expanded in y around 0 85.0%

      \[\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} \]
    3. Step-by-step derivation
      1. *-commutative85.0%

        \[\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} \]
    4. Simplified85.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{+101}:\\ \;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \mathbf{elif}\;y \leq -6300000:\\ \;\;\;\;\frac{y \cdot z}{y \cdot \left(y + a\right) + b}\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{+36}:\\ \;\;\;\;\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} - \frac{a}{\frac{y}{x}}\right)\\ \end{array} \]

Alternative 7: 74.0% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \mathbf{if}\;y \leq -2.2 \cdot 10^{+101}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -62000:\\ \;\;\;\;\frac{y \cdot z}{y \cdot \left(y + a\right) + b}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+24}:\\ \;\;\;\;\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 (/ y x))))))
   (if (<= y -2.2e+101)
     t_1
     (if (<= y -62000.0)
       (/ (* y z) (+ (* y (+ y a)) b))
       (if (<= y 1.15e+24)
         (/ (+ 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 / (y / x)));
	double tmp;
	if (y <= -2.2e+101) {
		tmp = t_1;
	} else if (y <= -62000.0) {
		tmp = (y * z) / ((y * (y + a)) + b);
	} else if (y <= 1.15e+24) {
		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 / (y / x)))
    if (y <= (-2.2d+101)) then
        tmp = t_1
    else if (y <= (-62000.0d0)) then
        tmp = (y * z) / ((y * (y + a)) + b)
    else if (y <= 1.15d+24) 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 / (y / x)));
	double tmp;
	if (y <= -2.2e+101) {
		tmp = t_1;
	} else if (y <= -62000.0) {
		tmp = (y * z) / ((y * (y + a)) + b);
	} else if (y <= 1.15e+24) {
		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 / (y / x)))
	tmp = 0
	if y <= -2.2e+101:
		tmp = t_1
	elif y <= -62000.0:
		tmp = (y * z) / ((y * (y + a)) + b)
	elif y <= 1.15e+24:
		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(y / x))))
	tmp = 0.0
	if (y <= -2.2e+101)
		tmp = t_1;
	elseif (y <= -62000.0)
		tmp = Float64(Float64(y * z) / Float64(Float64(y * Float64(y + a)) + b));
	elseif (y <= 1.15e+24)
		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 / (y / x)));
	tmp = 0.0;
	if (y <= -2.2e+101)
		tmp = t_1;
	elseif (y <= -62000.0)
		tmp = (y * z) / ((y * (y + a)) + b);
	elseif (y <= 1.15e+24)
		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[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.2e+101], t$95$1, If[LessEqual[y, -62000.0], N[(N[(y * z), $MachinePrecision] / N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e+24], 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} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -2.2 \cdot 10^{+101}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -62000:\\
\;\;\;\;\frac{y \cdot z}{y \cdot \left(y + a\right) + b}\\

\mathbf{elif}\;y \leq 1.15 \cdot 10^{+24}:\\
\;\;\;\;\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 < -2.2000000000000001e101 or 1.15e24 < y

    1. Initial program 3.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. Taylor expanded in y around inf 75.1%

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

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

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

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

    if -2.2000000000000001e101 < y < -62000

    1. Initial program 30.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. Taylor expanded in z around inf 18.6%

      \[\leadsto \color{blue}{\frac{{y}^{3} \cdot z}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    3. Taylor expanded in c around 0 18.5%

      \[\leadsto \color{blue}{\frac{{y}^{3} \cdot z}{i + {y}^{2} \cdot \left(b + y \cdot \left(a + y\right)\right)}} \]
    4. Step-by-step derivation
      1. associate-/l*27.5%

        \[\leadsto \color{blue}{\frac{{y}^{3}}{\frac{i + {y}^{2} \cdot \left(b + y \cdot \left(a + y\right)\right)}{z}}} \]
      2. unpow227.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \color{blue}{\left(y \cdot y\right)} \cdot \left(b + y \cdot \left(a + y\right)\right)}{z}} \]
      3. +-commutative27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \color{blue}{\left(y \cdot \left(a + y\right) + b\right)}}{z}} \]
      4. +-commutative27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \left(y \cdot \color{blue}{\left(y + a\right)} + b\right)}{z}} \]
      5. *-commutative27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \left(\color{blue}{\left(y + a\right) \cdot y} + b\right)}{z}} \]
      6. fma-udef27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \color{blue}{\mathsf{fma}\left(y + a, y, b\right)}}{z}} \]
    5. Simplified27.5%

      \[\leadsto \color{blue}{\frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \mathsf{fma}\left(y + a, y, b\right)}{z}}} \]
    6. Taylor expanded in i around 0 49.3%

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

    if -62000 < y < 1.15e24

    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. Taylor expanded in y around 0 85.0%

      \[\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} \]
    3. Step-by-step derivation
      1. *-commutative85.0%

        \[\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} \]
    4. Simplified85.0%

      \[\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. Taylor expanded in y around 0 80.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{+101}:\\ \;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \mathbf{elif}\;y \leq -62000:\\ \;\;\;\;\frac{y \cdot z}{y \cdot \left(y + a\right) + b}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+24}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \end{array} \]

Alternative 8: 58.3% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{i + b \cdot \left(y \cdot y\right)}\\ t_2 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \mathbf{if}\;y \leq -9.2 \cdot 10^{+37}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 4.25 \cdot 10^{-162}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{-128}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot c}\\ \mathbf{elif}\;y \leq 1.36 \cdot 10^{+32}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (/ t (+ i (* b (* y y))))) (t_2 (+ x (- (/ z y) (/ a (/ y x))))))
   (if (<= y -9.2e+37)
     t_2
     (if (<= y 4.25e-162)
       t_1
       (if (<= y 6.6e-128)
         (/ (+ t (* y 230661.510616)) (* y c))
         (if (<= y 1.36e+32) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = t / (i + (b * (y * y)));
	double t_2 = x + ((z / y) - (a / (y / x)));
	double tmp;
	if (y <= -9.2e+37) {
		tmp = t_2;
	} else if (y <= 4.25e-162) {
		tmp = t_1;
	} else if (y <= 6.6e-128) {
		tmp = (t + (y * 230661.510616)) / (y * c);
	} else if (y <= 1.36e+32) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t / (i + (b * (y * y)))
    t_2 = x + ((z / y) - (a / (y / x)))
    if (y <= (-9.2d+37)) then
        tmp = t_2
    else if (y <= 4.25d-162) then
        tmp = t_1
    else if (y <= 6.6d-128) then
        tmp = (t + (y * 230661.510616d0)) / (y * c)
    else if (y <= 1.36d+32) then
        tmp = t_1
    else
        tmp = t_2
    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 = t / (i + (b * (y * y)));
	double t_2 = x + ((z / y) - (a / (y / x)));
	double tmp;
	if (y <= -9.2e+37) {
		tmp = t_2;
	} else if (y <= 4.25e-162) {
		tmp = t_1;
	} else if (y <= 6.6e-128) {
		tmp = (t + (y * 230661.510616)) / (y * c);
	} else if (y <= 1.36e+32) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = t / (i + (b * (y * y)))
	t_2 = x + ((z / y) - (a / (y / x)))
	tmp = 0
	if y <= -9.2e+37:
		tmp = t_2
	elif y <= 4.25e-162:
		tmp = t_1
	elif y <= 6.6e-128:
		tmp = (t + (y * 230661.510616)) / (y * c)
	elif y <= 1.36e+32:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(t / Float64(i + Float64(b * Float64(y * y))))
	t_2 = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x))))
	tmp = 0.0
	if (y <= -9.2e+37)
		tmp = t_2;
	elseif (y <= 4.25e-162)
		tmp = t_1;
	elseif (y <= 6.6e-128)
		tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(y * c));
	elseif (y <= 1.36e+32)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = t / (i + (b * (y * y)));
	t_2 = x + ((z / y) - (a / (y / x)));
	tmp = 0.0;
	if (y <= -9.2e+37)
		tmp = t_2;
	elseif (y <= 4.25e-162)
		tmp = t_1;
	elseif (y <= 6.6e-128)
		tmp = (t + (y * 230661.510616)) / (y * c);
	elseif (y <= 1.36e+32)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(t / N[(i + N[(b * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.2e+37], t$95$2, If[LessEqual[y, 4.25e-162], t$95$1, If[LessEqual[y, 6.6e-128], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(y * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.36e+32], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t}{i + b \cdot \left(y \cdot y\right)}\\
t_2 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -9.2 \cdot 10^{+37}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 4.25 \cdot 10^{-162}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 6.6 \cdot 10^{-128}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot c}\\

\mathbf{elif}\;y \leq 1.36 \cdot 10^{+32}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.2000000000000001e37 or 1.3599999999999999e32 < y

    1. Initial program 5.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. Taylor expanded in y around inf 68.2%

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

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

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

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

    if -9.2000000000000001e37 < y < 4.24999999999999977e-162 or 6.6e-128 < y < 1.3599999999999999e32

    1. Initial program 96.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. Taylor expanded in y around 0 80.6%

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

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

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

      \[\leadsto \frac{y \cdot 230661.510616 + t}{\color{blue}{b \cdot {y}^{2}} + i} \]
    6. Step-by-step derivation
      1. *-commutative61.1%

        \[\leadsto \frac{y \cdot 230661.510616 + t}{\color{blue}{{y}^{2} \cdot b} + i} \]
      2. unpow261.1%

        \[\leadsto \frac{y \cdot 230661.510616 + t}{\color{blue}{\left(y \cdot y\right)} \cdot b + i} \]
    7. Simplified61.1%

      \[\leadsto \frac{y \cdot 230661.510616 + t}{\color{blue}{\left(y \cdot y\right) \cdot b} + i} \]
    8. Taylor expanded in y around 0 57.3%

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

    if 4.24999999999999977e-162 < y < 6.6e-128

    1. Initial program 99.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. Taylor expanded in y around 0 99.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} \]
    3. Step-by-step derivation
      1. *-commutative99.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} \]
    4. Simplified99.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. Taylor expanded in c around inf 70.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.2 \cdot 10^{+37}:\\ \;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \mathbf{elif}\;y \leq 4.25 \cdot 10^{-162}:\\ \;\;\;\;\frac{t}{i + b \cdot \left(y \cdot y\right)}\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{-128}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot c}\\ \mathbf{elif}\;y \leq 1.36 \cdot 10^{+32}:\\ \;\;\;\;\frac{t}{i + b \cdot \left(y \cdot y\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \end{array} \]

Alternative 9: 69.7% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \mathbf{if}\;y \leq -2.2 \cdot 10^{+101}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -470:\\ \;\;\;\;\frac{y \cdot z}{y \cdot \left(y + a\right) + b}\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{-63}:\\ \;\;\;\;\frac{t}{i + b \cdot \left(y \cdot y\right)}\\ \mathbf{elif}\;y \leq 1.1 \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 (/ y x))))))
   (if (<= y -2.2e+101)
     t_1
     (if (<= y -470.0)
       (/ (* y z) (+ (* y (+ y a)) b))
       (if (<= y -1.6e-63)
         (/ t (+ i (* b (* y y))))
         (if (<= y 1.1e+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 / (y / x)));
	double tmp;
	if (y <= -2.2e+101) {
		tmp = t_1;
	} else if (y <= -470.0) {
		tmp = (y * z) / ((y * (y + a)) + b);
	} else if (y <= -1.6e-63) {
		tmp = t / (i + (b * (y * y)));
	} else if (y <= 1.1e+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 / (y / x)))
    if (y <= (-2.2d+101)) then
        tmp = t_1
    else if (y <= (-470.0d0)) then
        tmp = (y * z) / ((y * (y + a)) + b)
    else if (y <= (-1.6d-63)) then
        tmp = t / (i + (b * (y * y)))
    else if (y <= 1.1d+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 / (y / x)));
	double tmp;
	if (y <= -2.2e+101) {
		tmp = t_1;
	} else if (y <= -470.0) {
		tmp = (y * z) / ((y * (y + a)) + b);
	} else if (y <= -1.6e-63) {
		tmp = t / (i + (b * (y * y)));
	} else if (y <= 1.1e+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 / (y / x)))
	tmp = 0
	if y <= -2.2e+101:
		tmp = t_1
	elif y <= -470.0:
		tmp = (y * z) / ((y * (y + a)) + b)
	elif y <= -1.6e-63:
		tmp = t / (i + (b * (y * y)))
	elif y <= 1.1e+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(y / x))))
	tmp = 0.0
	if (y <= -2.2e+101)
		tmp = t_1;
	elseif (y <= -470.0)
		tmp = Float64(Float64(y * z) / Float64(Float64(y * Float64(y + a)) + b));
	elseif (y <= -1.6e-63)
		tmp = Float64(t / Float64(i + Float64(b * Float64(y * y))));
	elseif (y <= 1.1e+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 / (y / x)));
	tmp = 0.0;
	if (y <= -2.2e+101)
		tmp = t_1;
	elseif (y <= -470.0)
		tmp = (y * z) / ((y * (y + a)) + b);
	elseif (y <= -1.6e-63)
		tmp = t / (i + (b * (y * y)));
	elseif (y <= 1.1e+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[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.2e+101], t$95$1, If[LessEqual[y, -470.0], N[(N[(y * z), $MachinePrecision] / N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.6e-63], N[(t / N[(i + N[(b * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e+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} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -2.2 \cdot 10^{+101}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -470:\\
\;\;\;\;\frac{y \cdot z}{y \cdot \left(y + a\right) + b}\\

\mathbf{elif}\;y \leq -1.6 \cdot 10^{-63}:\\
\;\;\;\;\frac{t}{i + b \cdot \left(y \cdot y\right)}\\

\mathbf{elif}\;y \leq 1.1 \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 4 regimes
  2. if y < -2.2000000000000001e101 or 1.09999999999999993e28 < y

    1. Initial program 3.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. Taylor expanded in y around inf 75.1%

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

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

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

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

    if -2.2000000000000001e101 < y < -470

    1. Initial program 30.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. Taylor expanded in z around inf 18.6%

      \[\leadsto \color{blue}{\frac{{y}^{3} \cdot z}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    3. Taylor expanded in c around 0 18.5%

      \[\leadsto \color{blue}{\frac{{y}^{3} \cdot z}{i + {y}^{2} \cdot \left(b + y \cdot \left(a + y\right)\right)}} \]
    4. Step-by-step derivation
      1. associate-/l*27.5%

        \[\leadsto \color{blue}{\frac{{y}^{3}}{\frac{i + {y}^{2} \cdot \left(b + y \cdot \left(a + y\right)\right)}{z}}} \]
      2. unpow227.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \color{blue}{\left(y \cdot y\right)} \cdot \left(b + y \cdot \left(a + y\right)\right)}{z}} \]
      3. +-commutative27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \color{blue}{\left(y \cdot \left(a + y\right) + b\right)}}{z}} \]
      4. +-commutative27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \left(y \cdot \color{blue}{\left(y + a\right)} + b\right)}{z}} \]
      5. *-commutative27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \left(\color{blue}{\left(y + a\right) \cdot y} + b\right)}{z}} \]
      6. fma-udef27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \color{blue}{\mathsf{fma}\left(y + a, y, b\right)}}{z}} \]
    5. Simplified27.5%

      \[\leadsto \color{blue}{\frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \mathsf{fma}\left(y + a, y, b\right)}{z}}} \]
    6. Taylor expanded in i around 0 49.3%

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

    if -470 < y < -1.59999999999999994e-63

    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. Taylor expanded in y around 0 54.9%

      \[\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} \]
    3. Step-by-step derivation
      1. *-commutative54.9%

        \[\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} \]
    4. Simplified54.9%

      \[\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. Taylor expanded in b around inf 48.3%

      \[\leadsto \frac{y \cdot 230661.510616 + t}{\color{blue}{b \cdot {y}^{2}} + i} \]
    6. Step-by-step derivation
      1. *-commutative48.3%

        \[\leadsto \frac{y \cdot 230661.510616 + t}{\color{blue}{{y}^{2} \cdot b} + i} \]
      2. unpow248.3%

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

      \[\leadsto \frac{y \cdot 230661.510616 + t}{\color{blue}{\left(y \cdot y\right) \cdot b} + i} \]
    8. Taylor expanded in y around 0 44.2%

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

    if -1.59999999999999994e-63 < y < 1.09999999999999993e28

    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. Taylor expanded in y around 0 88.3%

      \[\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} \]
    3. Step-by-step derivation
      1. *-commutative88.3%

        \[\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} \]
    4. Simplified88.3%

      \[\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. Taylor expanded in y around 0 78.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{+101}:\\ \;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \mathbf{elif}\;y \leq -470:\\ \;\;\;\;\frac{y \cdot z}{y \cdot \left(y + a\right) + b}\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{-63}:\\ \;\;\;\;\frac{t}{i + b \cdot \left(y \cdot y\right)}\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+28}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot c}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \end{array} \]

Alternative 10: 70.1% accurate, 1.7× speedup?

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

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

\mathbf{elif}\;y \leq -360:\\
\;\;\;\;\frac{y \cdot z}{y \cdot \left(y + a\right) + b}\\

\mathbf{elif}\;y \leq -1.45 \cdot 10^{-49}:\\
\;\;\;\;\frac{t_1}{i + b \cdot \left(y \cdot y\right)}\\

\mathbf{elif}\;y \leq 1.15 \cdot 10^{+25}:\\
\;\;\;\;\frac{t_1}{i + y \cdot c}\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.2000000000000001e101 or 1.1499999999999999e25 < y

    1. Initial program 3.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. Taylor expanded in y around inf 75.1%

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

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

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

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

    if -2.2000000000000001e101 < y < -360

    1. Initial program 30.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. Taylor expanded in z around inf 18.6%

      \[\leadsto \color{blue}{\frac{{y}^{3} \cdot z}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    3. Taylor expanded in c around 0 18.5%

      \[\leadsto \color{blue}{\frac{{y}^{3} \cdot z}{i + {y}^{2} \cdot \left(b + y \cdot \left(a + y\right)\right)}} \]
    4. Step-by-step derivation
      1. associate-/l*27.5%

        \[\leadsto \color{blue}{\frac{{y}^{3}}{\frac{i + {y}^{2} \cdot \left(b + y \cdot \left(a + y\right)\right)}{z}}} \]
      2. unpow227.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \color{blue}{\left(y \cdot y\right)} \cdot \left(b + y \cdot \left(a + y\right)\right)}{z}} \]
      3. +-commutative27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \color{blue}{\left(y \cdot \left(a + y\right) + b\right)}}{z}} \]
      4. +-commutative27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \left(y \cdot \color{blue}{\left(y + a\right)} + b\right)}{z}} \]
      5. *-commutative27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \left(\color{blue}{\left(y + a\right) \cdot y} + b\right)}{z}} \]
      6. fma-udef27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \color{blue}{\mathsf{fma}\left(y + a, y, b\right)}}{z}} \]
    5. Simplified27.5%

      \[\leadsto \color{blue}{\frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \mathsf{fma}\left(y + a, y, b\right)}{z}}} \]
    6. Taylor expanded in i around 0 49.3%

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

    if -360 < y < -1.45e-49

    1. Initial program 99.1%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Taylor expanded in y around 0 58.9%

      \[\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} \]
    3. Step-by-step derivation
      1. *-commutative58.9%

        \[\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} \]
    4. Simplified58.9%

      \[\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. Taylor expanded in b around inf 51.8%

      \[\leadsto \frac{y \cdot 230661.510616 + t}{\color{blue}{b \cdot {y}^{2}} + i} \]
    6. Step-by-step derivation
      1. *-commutative51.8%

        \[\leadsto \frac{y \cdot 230661.510616 + t}{\color{blue}{{y}^{2} \cdot b} + i} \]
      2. unpow251.8%

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

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

    if -1.45e-49 < y < 1.1499999999999999e25

    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. Taylor expanded in y around 0 87.6%

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

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

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

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

        \[\leadsto \frac{y \cdot 230661.510616 + t}{\color{blue}{y \cdot c} + i} \]
    7. Simplified78.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{+101}:\\ \;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \mathbf{elif}\;y \leq -360:\\ \;\;\;\;\frac{y \cdot z}{y \cdot \left(y + a\right) + b}\\ \mathbf{elif}\;y \leq -1.45 \cdot 10^{-49}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i + b \cdot \left(y \cdot y\right)}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+25}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot c}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \end{array} \]

Alternative 11: 54.1% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t}{i + b \cdot \left(y \cdot y\right)}\\
\mathbf{if}\;y \leq -1.95 \cdot 10^{+39}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq -7 \cdot 10^{-82}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 4.7 \cdot 10^{-123}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\

\mathbf{elif}\;y \leq 4.5 \cdot 10^{+35}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.95e39 or 4.4999999999999997e35 < y

    1. Initial program 5.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. Taylor expanded in y around inf 52.4%

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

    if -1.95e39 < y < -6.9999999999999997e-82 or 4.7000000000000002e-123 < y < 4.4999999999999997e35

    1. Initial program 93.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. Taylor expanded in y around 0 58.7%

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

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

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

      \[\leadsto \frac{y \cdot 230661.510616 + t}{\color{blue}{b \cdot {y}^{2}} + i} \]
    6. Step-by-step derivation
      1. *-commutative37.5%

        \[\leadsto \frac{y \cdot 230661.510616 + t}{\color{blue}{{y}^{2} \cdot b} + i} \]
      2. unpow237.5%

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

      \[\leadsto \frac{y \cdot 230661.510616 + t}{\color{blue}{\left(y \cdot y\right) \cdot b} + i} \]
    8. Taylor expanded in y around 0 33.4%

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

    if -6.9999999999999997e-82 < y < 4.7000000000000002e-123

    1. Initial program 99.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. Taylor expanded in y around 0 98.0%

      \[\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} \]
    3. Step-by-step derivation
      1. *-commutative98.0%

        \[\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} \]
    4. Simplified98.0%

      \[\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. Taylor expanded in i around inf 74.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.95 \cdot 10^{+39}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-82}:\\ \;\;\;\;\frac{t}{i + b \cdot \left(y \cdot y\right)}\\ \mathbf{elif}\;y \leq 4.7 \cdot 10^{-123}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{+35}:\\ \;\;\;\;\frac{t}{i + b \cdot \left(y \cdot y\right)}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 12: 51.6% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t}{i + b \cdot \left(y \cdot y\right)}\\
\mathbf{if}\;y \leq -9.2 \cdot 10^{+39}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 4.2 \cdot 10^{-162}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 7.6 \cdot 10^{-132}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot c}\\

\mathbf{elif}\;y \leq 1.26 \cdot 10^{+29}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.20000000000000047e39 or 1.26e29 < y

    1. Initial program 5.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. Taylor expanded in y around inf 52.4%

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

    if -9.20000000000000047e39 < y < 4.2e-162 or 7.5999999999999994e-132 < y < 1.26e29

    1. Initial program 96.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. Taylor expanded in y around 0 80.6%

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

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

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

      \[\leadsto \frac{y \cdot 230661.510616 + t}{\color{blue}{b \cdot {y}^{2}} + i} \]
    6. Step-by-step derivation
      1. *-commutative61.1%

        \[\leadsto \frac{y \cdot 230661.510616 + t}{\color{blue}{{y}^{2} \cdot b} + i} \]
      2. unpow261.1%

        \[\leadsto \frac{y \cdot 230661.510616 + t}{\color{blue}{\left(y \cdot y\right)} \cdot b + i} \]
    7. Simplified61.1%

      \[\leadsto \frac{y \cdot 230661.510616 + t}{\color{blue}{\left(y \cdot y\right) \cdot b} + i} \]
    8. Taylor expanded in y around 0 57.3%

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

    if 4.2e-162 < y < 7.5999999999999994e-132

    1. Initial program 99.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. Taylor expanded in y around 0 99.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} \]
    3. Step-by-step derivation
      1. *-commutative99.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} \]
    4. Simplified99.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. Taylor expanded in c around inf 70.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.2 \cdot 10^{+39}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{-162}:\\ \;\;\;\;\frac{t}{i + b \cdot \left(y \cdot y\right)}\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{-132}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot c}\\ \mathbf{elif}\;y \leq 1.26 \cdot 10^{+29}:\\ \;\;\;\;\frac{t}{i + b \cdot \left(y \cdot y\right)}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 13: 67.1% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \mathbf{if}\;y \leq -2.2 \cdot 10^{+101}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -95000:\\ \;\;\;\;\frac{y \cdot z}{y \cdot \left(y + a\right) + b}\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{+34}:\\ \;\;\;\;\frac{t}{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 (/ y x))))))
   (if (<= y -2.2e+101)
     t_1
     (if (<= y -95000.0)
       (/ (* y z) (+ (* y (+ y a)) b))
       (if (<= y 1.02e+34) (/ t (+ 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 / (y / x)));
	double tmp;
	if (y <= -2.2e+101) {
		tmp = t_1;
	} else if (y <= -95000.0) {
		tmp = (y * z) / ((y * (y + a)) + b);
	} else if (y <= 1.02e+34) {
		tmp = t / (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 / (y / x)))
    if (y <= (-2.2d+101)) then
        tmp = t_1
    else if (y <= (-95000.0d0)) then
        tmp = (y * z) / ((y * (y + a)) + b)
    else if (y <= 1.02d+34) then
        tmp = t / (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 / (y / x)));
	double tmp;
	if (y <= -2.2e+101) {
		tmp = t_1;
	} else if (y <= -95000.0) {
		tmp = (y * z) / ((y * (y + a)) + b);
	} else if (y <= 1.02e+34) {
		tmp = t / (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 / (y / x)))
	tmp = 0
	if y <= -2.2e+101:
		tmp = t_1
	elif y <= -95000.0:
		tmp = (y * z) / ((y * (y + a)) + b)
	elif y <= 1.02e+34:
		tmp = t / (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(y / x))))
	tmp = 0.0
	if (y <= -2.2e+101)
		tmp = t_1;
	elseif (y <= -95000.0)
		tmp = Float64(Float64(y * z) / Float64(Float64(y * Float64(y + a)) + b));
	elseif (y <= 1.02e+34)
		tmp = Float64(t / 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 / (y / x)));
	tmp = 0.0;
	if (y <= -2.2e+101)
		tmp = t_1;
	elseif (y <= -95000.0)
		tmp = (y * z) / ((y * (y + a)) + b);
	elseif (y <= 1.02e+34)
		tmp = t / (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[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.2e+101], t$95$1, If[LessEqual[y, -95000.0], N[(N[(y * z), $MachinePrecision] / N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.02e+34], N[(t / 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} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -2.2 \cdot 10^{+101}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -95000:\\
\;\;\;\;\frac{y \cdot z}{y \cdot \left(y + a\right) + b}\\

\mathbf{elif}\;y \leq 1.02 \cdot 10^{+34}:\\
\;\;\;\;\frac{t}{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.2000000000000001e101 or 1.02e34 < y

    1. Initial program 3.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. Taylor expanded in y around inf 75.1%

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

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

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

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

    if -2.2000000000000001e101 < y < -95000

    1. Initial program 30.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. Taylor expanded in z around inf 18.6%

      \[\leadsto \color{blue}{\frac{{y}^{3} \cdot z}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    3. Taylor expanded in c around 0 18.5%

      \[\leadsto \color{blue}{\frac{{y}^{3} \cdot z}{i + {y}^{2} \cdot \left(b + y \cdot \left(a + y\right)\right)}} \]
    4. Step-by-step derivation
      1. associate-/l*27.5%

        \[\leadsto \color{blue}{\frac{{y}^{3}}{\frac{i + {y}^{2} \cdot \left(b + y \cdot \left(a + y\right)\right)}{z}}} \]
      2. unpow227.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \color{blue}{\left(y \cdot y\right)} \cdot \left(b + y \cdot \left(a + y\right)\right)}{z}} \]
      3. +-commutative27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \color{blue}{\left(y \cdot \left(a + y\right) + b\right)}}{z}} \]
      4. +-commutative27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \left(y \cdot \color{blue}{\left(y + a\right)} + b\right)}{z}} \]
      5. *-commutative27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \left(\color{blue}{\left(y + a\right) \cdot y} + b\right)}{z}} \]
      6. fma-udef27.5%

        \[\leadsto \frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \color{blue}{\mathsf{fma}\left(y + a, y, b\right)}}{z}} \]
    5. Simplified27.5%

      \[\leadsto \color{blue}{\frac{{y}^{3}}{\frac{i + \left(y \cdot y\right) \cdot \mathsf{fma}\left(y + a, y, b\right)}{z}}} \]
    6. Taylor expanded in i around 0 49.3%

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

    if -95000 < y < 1.02e34

    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. Taylor expanded in y around 0 85.0%

      \[\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} \]
    3. Step-by-step derivation
      1. *-commutative85.0%

        \[\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} \]
    4. Simplified85.0%

      \[\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. Taylor expanded in y around 0 80.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{+101}:\\ \;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \mathbf{elif}\;y \leq -95000:\\ \;\;\;\;\frac{y \cdot z}{y \cdot \left(y + a\right) + b}\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{+34}:\\ \;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \end{array} \]

Alternative 14: 67.3% accurate, 2.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.4e40 or 4.1000000000000002e27 < y

    1. Initial program 5.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. Taylor expanded in y around inf 68.2%

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

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

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

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

    if -7.4e40 < y < 4.1000000000000002e27

    1. Initial program 97.1%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Taylor expanded in y around 0 81.9%

      \[\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} \]
    3. Step-by-step derivation
      1. *-commutative81.9%

        \[\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} \]
    4. Simplified81.9%

      \[\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. Taylor expanded in y around 0 77.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.4 \cdot 10^{+40} \lor \neg \left(y \leq 4.1 \cdot 10^{+27}\right):\\ \;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\ \end{array} \]

Alternative 15: 53.4% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;y \leq 1.2 \cdot 10^{-6}:\\
\;\;\;\;230661.510616 \cdot \frac{y}{i} + \frac{t}{i}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.15e6 or 1.1999999999999999e-6 < y

    1. Initial program 15.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. Taylor expanded in y around inf 45.8%

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

    if -3.15e6 < y < 1.1999999999999999e-6

    1. Initial program 99.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. Taylor expanded in y around 0 89.0%

      \[\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} \]
    3. Step-by-step derivation
      1. *-commutative89.0%

        \[\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} \]
    4. Simplified89.0%

      \[\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. Taylor expanded in b around inf 64.7%

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

        \[\leadsto \frac{y \cdot 230661.510616 + t}{\color{blue}{{y}^{2} \cdot b} + i} \]
      2. unpow264.7%

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

      \[\leadsto \frac{y \cdot 230661.510616 + t}{\color{blue}{\left(y \cdot y\right) \cdot b} + i} \]
    8. Taylor expanded in y around 0 57.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3150000:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-6}:\\ \;\;\;\;230661.510616 \cdot \frac{y}{i} + \frac{t}{i}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 16: 53.5% accurate, 3.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6500:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-6}:\\ \;\;\;\;\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 -6500.0) x (if (<= y 1.2e-6) (/ (+ 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 <= -6500.0) {
		tmp = x;
	} else if (y <= 1.2e-6) {
		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 <= (-6500.0d0)) then
        tmp = x
    else if (y <= 1.2d-6) 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 <= -6500.0) {
		tmp = x;
	} else if (y <= 1.2e-6) {
		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 <= -6500.0:
		tmp = x
	elif y <= 1.2e-6:
		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 <= -6500.0)
		tmp = x;
	elseif (y <= 1.2e-6)
		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 <= -6500.0)
		tmp = x;
	elseif (y <= 1.2e-6)
		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, -6500.0], x, If[LessEqual[y, 1.2e-6], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], x]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 1.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6500 or 1.1999999999999999e-6 < y

    1. Initial program 15.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. Taylor expanded in y around inf 45.8%

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

    if -6500 < y < 1.1999999999999999e-6

    1. Initial program 99.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. Taylor expanded in y around 0 89.0%

      \[\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} \]
    3. Step-by-step derivation
      1. *-commutative89.0%

        \[\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} \]
    4. Simplified89.0%

      \[\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. Taylor expanded in i around inf 57.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6500:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-6}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 17: 49.1% accurate, 4.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.5 \cdot 10^{-30}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-65}:\\ \;\;\;\;\frac{t}{i}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= y -3.5e-30) x (if (<= y 1.4e-65) (/ 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 <= -3.5e-30) {
		tmp = x;
	} else if (y <= 1.4e-65) {
		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 <= (-3.5d-30)) then
        tmp = x
    else if (y <= 1.4d-65) 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 <= -3.5e-30) {
		tmp = x;
	} else if (y <= 1.4e-65) {
		tmp = t / i;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if y <= -3.5e-30:
		tmp = x
	elif y <= 1.4e-65:
		tmp = t / i
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (y <= -3.5e-30)
		tmp = x;
	elseif (y <= 1.4e-65)
		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 <= -3.5e-30)
		tmp = x;
	elseif (y <= 1.4e-65)
		tmp = t / i;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -3.5e-30], x, If[LessEqual[y, 1.4e-65], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{-30}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.4 \cdot 10^{-65}:\\
\;\;\;\;\frac{t}{i}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.5000000000000003e-30 or 1.4e-65 < y

    1. Initial program 28.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. Taylor expanded in y around inf 39.5%

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

    if -3.5000000000000003e-30 < y < 1.4e-65

    1. Initial program 99.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. Taylor expanded in y around 0 62.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.5 \cdot 10^{-30}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-65}:\\ \;\;\;\;\frac{t}{i}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 18: 25.3% 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.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. Taylor expanded in y around inf 23.5%

    \[\leadsto \color{blue}{x} \]
  3. Final simplification23.5%

    \[\leadsto x \]

Reproduce

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