Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2

Percentage Accurate: 55.3% → 83.7%
Time: 43.6s
Alternatives: 17
Speedup: 1.6×

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 17 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: 55.3% 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: 83.7% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
t_1 := i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)\\
\mathbf{if}\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right)}{t\_1} \leq \infty:\\
\;\;\;\;\frac{t}{t\_1} + \frac{\mathsf{fma}\left(y, 230661.510616, y \cdot \left(y \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right)\right)\right)}{t\_1}\\

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


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

    1. Initial program 89.5%

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

      \[\leadsto \color{blue}{\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + x \cdot y\right)\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    4. Step-by-step derivation
      1. distribute-lft-in89.5%

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right)}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)} \leq \infty:\\ \;\;\;\;\frac{t}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)} + \frac{\mathsf{fma}\left(y, 230661.510616, y \cdot \left(y \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right)\right)\right)}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 83.7% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)\\
t_2 := y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right)\\
\mathbf{if}\;\frac{t + t\_2}{t\_1} \leq \infty:\\
\;\;\;\;\frac{t}{t\_1} + \frac{t\_2}{t\_1}\\

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


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

    1. Initial program 89.5%

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right)}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)} \leq \infty:\\ \;\;\;\;\frac{t}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)} + \frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right)}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 83.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right)}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 89.5%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing

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

    1. Initial program 0.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right)}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)} \leq \infty:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right)}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 81.1% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq 1.5 \cdot 10^{-26}:\\
\;\;\;\;t\_2\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.1e58 or 5.7999999999999999e63 < y

    1. Initial program 2.7%

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

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

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

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

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

    if -4.1e58 < y < 1.50000000000000006e-26 or 3.09999999999999971e23 < y < 5.7999999999999999e63

    1. Initial program 89.5%

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

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

    if 1.50000000000000006e-26 < y < 3.09999999999999971e23

    1. Initial program 79.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.1 \cdot 10^{+58}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{-26}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{+23}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{+63}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 78.3% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -4.6 \cdot 10^{-34}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y \leq 3.9 \cdot 10^{+61}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.2499999999999999e58 or 3.89999999999999987e61 < y

    1. Initial program 2.7%

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

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

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

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

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

    if -2.2499999999999999e58 < y < -4.60000000000000022e-34 or 8.4999999999999996e-23 < y < 3.89999999999999987e61

    1. Initial program 61.9%

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

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

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

    if -4.60000000000000022e-34 < y < 8.4999999999999996e-23

    1. Initial program 99.7%

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

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

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

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

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

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

Alternative 6: 81.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{+59} \lor \neg \left(y \leq 1.9 \cdot 10^{+65}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.4000000000000002e59 or 1.90000000000000006e65 < y

    1. Initial program 2.7%

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

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

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

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

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

    if -2.4000000000000002e59 < y < 1.90000000000000006e65

    1. Initial program 88.5%

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

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

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

Alternative 7: 76.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+58} \lor \neg \left(y \leq 5.8 \cdot 10^{+65}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.2000000000000001e58 or 5.8000000000000001e65 < y

    1. Initial program 2.7%

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

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

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

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

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

    if -2.2000000000000001e58 < y < 5.8000000000000001e65

    1. Initial program 88.5%

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

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

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

      \[\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 2 regimes into one program.
  4. Final simplification77.7%

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

Alternative 8: 77.8% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.00000000000000004e36 or 7.19999999999999966e24 < y

    1. Initial program 7.1%

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

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

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

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

    if -1.00000000000000004e36 < y < 7.19999999999999966e24

    1. Initial program 94.2%

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

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

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

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

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

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

Alternative 9: 75.6% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.8e45 or 18.5 < y

    1. Initial program 9.7%

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

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

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

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

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

    if -6.8e45 < y < 18.5

    1. Initial program 96.4%

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

      \[\leadsto \frac{\color{blue}{230661.510616 \cdot y} + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    4. Step-by-step derivation
      1. *-commutative85.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. Simplified85.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} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.9%

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

Alternative 10: 75.5% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.34999999999999993e37 or 14.5 < y

    1. Initial program 9.7%

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

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

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

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

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

    if -1.34999999999999993e37 < y < 14.5

    1. Initial program 96.4%

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

      \[\leadsto \frac{\color{blue}{230661.510616 \cdot y} + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    4. Step-by-step derivation
      1. *-commutative85.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. Simplified85.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} \]
    6. Taylor expanded in y around 0 84.8%

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

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

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

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

Alternative 11: 74.0% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.4e32 or 37 < y

    1. Initial program 9.6%

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

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

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

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

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

    if -1.4e32 < y < 37

    1. Initial program 97.2%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 86.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} \]
    4. Step-by-step derivation
      1. *-commutative86.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. Simplified86.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} \]
    6. Taylor expanded in y around 0 80.8%

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

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

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

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

Alternative 12: 60.8% accurate, 1.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.25e9 or 1.6499999999999999e-26 < y

    1. Initial program 15.3%

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

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

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

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

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

    if -1.25e9 < y < 1.6499999999999999e-26

    1. Initial program 99.7%

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

      \[\leadsto \frac{\color{blue}{230661.510616 \cdot y} + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    4. Step-by-step derivation
      1. *-commutative92.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. Simplified92.8%

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

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

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

Alternative 13: 70.5% accurate, 1.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.74999999999999999e34 or 7.20000000000000018 < y

    1. Initial program 9.7%

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

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

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

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

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

    if -1.74999999999999999e34 < y < 7.20000000000000018

    1. Initial program 96.4%

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

      \[\leadsto \frac{\color{blue}{230661.510616 \cdot y} + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    4. Step-by-step derivation
      1. *-commutative85.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. Simplified85.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} \]
    6. Taylor expanded in y around 0 73.7%

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

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

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

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

Alternative 14: 50.0% accurate, 1.8× speedup?

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

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

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

\mathbf{elif}\;y \leq 2.9 \cdot 10^{+84}:\\
\;\;\;\;\frac{z}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.2e8 or 2.89999999999999989e84 < y

    1. Initial program 5.1%

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

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

    if -9.2e8 < y < 9.5e-20

    1. Initial program 99.7%

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

      \[\leadsto \color{blue}{\frac{t}{i}} \]

    if 9.5e-20 < y < 2.89999999999999989e84

    1. Initial program 52.9%

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

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

      \[\leadsto \color{blue}{\frac{z}{y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification54.1%

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

Alternative 15: 53.5% accurate, 1.8× speedup?

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

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

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

\mathbf{elif}\;y \leq 2.9 \cdot 10^{+84}:\\
\;\;\;\;\frac{z}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.6e8 or 2.89999999999999989e84 < y

    1. Initial program 5.1%

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

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

    if -6.6e8 < y < 6.19999999999999999e-20

    1. Initial program 99.7%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 91.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} \]
    4. Step-by-step derivation
      1. *-commutative91.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. Simplified91.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} \]
    6. Taylor expanded in i around inf 65.4%

      \[\leadsto \color{blue}{\frac{t + 230661.510616 \cdot y}{i}} \]

    if 6.19999999999999999e-20 < y < 2.89999999999999989e84

    1. Initial program 52.9%

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

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

      \[\leadsto \color{blue}{\frac{z}{y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -660000000:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-20}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{+84}:\\ \;\;\;\;\frac{z}{y}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 50.2% accurate, 2.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.12e9 or 9.1999999999999997e-20 < y

    1. Initial program 14.8%

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

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

    if -2.12e9 < y < 9.1999999999999997e-20

    1. Initial program 99.7%

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

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

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

Alternative 17: 25.4% 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 49.0%

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification30.9%

    \[\leadsto x \]
  5. Add Preprocessing

Reproduce

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