Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2

Percentage Accurate: 56.0% → 83.3%
Time: 22.1s
Alternatives: 16
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 16 alternatives:

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

Initial Program: 56.0% 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.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\ \mathbf{if}\;t\_1 \leq 10^{+289}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1
         (/
          (+
           (* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
           t)
          (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
   (if (<= t_1 1e+289) t_1 (+ x (- (/ z y) (* a (/ x y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
	double tmp;
	if (t_1 <= 1e+289) {
		tmp = t_1;
	} else {
		tmp = x + ((z / y) - (a * (x / y)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
    if (t_1 <= 1d+289) then
        tmp = t_1
    else
        tmp = x + ((z / y) - (a * (x / y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
	double tmp;
	if (t_1 <= 1e+289) {
		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 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
	tmp = 0
	if t_1 <= 1e+289:
		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(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i))
	tmp = 0.0
	if (t_1 <= 1e+289)
		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 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
	tmp = 0.0;
	if (t_1 <= 1e+289)
		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[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+289], 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{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{if}\;t\_1 \leq 10^{+289}:\\
\;\;\;\;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)) < 1.0000000000000001e289

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

    if 1.0000000000000001e289 < (/.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 3.4%

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

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

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

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

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

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

Alternative 2: 83.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.95 \cdot 10^{+50} \lor \neg \left(y \leq 1.1 \cdot 10^{+47}\right):\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{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 -2.95e+50) (not (<= y 1.1e+47)))
   (+ x (- (/ z y) (* a (/ x y))))
   (/
    (+ (* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616)) t)
    (+ 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 <= -2.95e+50) || !(y <= 1.1e+47)) {
		tmp = x + ((z / y) - (a * (x / y)));
	} else {
		tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (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 <= (-2.95d+50)) .or. (.not. (y <= 1.1d+47))) then
        tmp = x + ((z / y) - (a * (x / y)))
    else
        tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0)) + t) / (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 <= -2.95e+50) || !(y <= 1.1e+47)) {
		tmp = x + ((z / y) - (a * (x / y)));
	} else {
		tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * a))))));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (y <= -2.95e+50) or not (y <= 1.1e+47):
		tmp = x + ((z / y) - (a * (x / y)))
	else:
		tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * a))))))
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((y <= -2.95e+50) || !(y <= 1.1e+47))
		tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y))));
	else
		tmp = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / 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 <= -2.95e+50) || ~((y <= 1.1e+47)))
		tmp = x + ((z / y) - (a * (x / y)));
	else
		tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (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, -2.95e+50], N[Not[LessEqual[y, 1.1e+47]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(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 -2.95 \cdot 10^{+50} \lor \neg \left(y \leq 1.1 \cdot 10^{+47}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{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 < -2.9499999999999999e50 or 1.1e47 < y

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

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

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

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

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

    if -2.9499999999999999e50 < y < 1.1e47

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

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

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

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

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

Alternative 3: 79.9% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;y \leq 6.2 \cdot 10^{+104}:\\
\;\;\;\;y \cdot \left(\frac{z}{b} + \frac{x \cdot y}{b}\right) + 27464.7644705 \cdot \frac{1}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.5000000000000003e73 or 6.20000000000000033e104 < y

    1. Initial program 1.4%

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

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

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

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

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

    if -5.5000000000000003e73 < y < 1.15e26

    1. Initial program 96.1%

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

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

    if 1.15e26 < y < 6.20000000000000033e104

    1. Initial program 16.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 b around inf 9.9%

      \[\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)}{b \cdot {y}^{2}}} \]
    4. Taylor expanded in y around -inf 51.6%

      \[\leadsto \color{blue}{{y}^{2} \cdot \left(-1 \cdot \frac{-1 \cdot \frac{z}{b} - 27464.7644705 \cdot \frac{1}{b \cdot y}}{y} + \frac{x}{b}\right)} \]
    5. Taylor expanded in y around 0 49.7%

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

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

Alternative 4: 76.0% accurate, 0.9× 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 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \mathbf{if}\;y \leq -5.5 \cdot 10^{+73}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{-40}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{t\_1}\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+26}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{t\_1 + i}\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{+104}:\\ \;\;\;\;y \cdot \left(\frac{z}{b} + \frac{x \cdot y}{b}\right) + 27464.7644705 \cdot \frac{1}{b}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \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 (+ x (- (/ z y) (* a (/ x y))))))
   (if (<= y -5.5e+73)
     t_2
     (if (<= y -1.3e-40)
       (/ (+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))))) t_1)
       (if (<= y 1.1e+26)
         (/ (+ t (* y 230661.510616)) (+ t_1 i))
         (if (<= y 6.2e+104)
           (+ (* y (+ (/ z b) (/ (* x y) b))) (* 27464.7644705 (/ 1.0 b)))
           t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = y * ((y * ((y * (y + a)) + b)) + c);
	double t_2 = x + ((z / y) - (a * (x / y)));
	double tmp;
	if (y <= -5.5e+73) {
		tmp = t_2;
	} else if (y <= -1.3e-40) {
		tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1;
	} else if (y <= 1.1e+26) {
		tmp = (t + (y * 230661.510616)) / (t_1 + i);
	} else if (y <= 6.2e+104) {
		tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * ((y * ((y * (y + a)) + b)) + c)
    t_2 = x + ((z / y) - (a * (x / y)))
    if (y <= (-5.5d+73)) then
        tmp = t_2
    else if (y <= (-1.3d-40)) then
        tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / t_1
    else if (y <= 1.1d+26) then
        tmp = (t + (y * 230661.510616d0)) / (t_1 + i)
    else if (y <= 6.2d+104) then
        tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705d0 * (1.0d0 / b))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = y * ((y * ((y * (y + a)) + b)) + c);
	double t_2 = x + ((z / y) - (a * (x / y)));
	double tmp;
	if (y <= -5.5e+73) {
		tmp = t_2;
	} else if (y <= -1.3e-40) {
		tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1;
	} else if (y <= 1.1e+26) {
		tmp = (t + (y * 230661.510616)) / (t_1 + i);
	} else if (y <= 6.2e+104) {
		tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = y * ((y * ((y * (y + a)) + b)) + c)
	t_2 = x + ((z / y) - (a * (x / y)))
	tmp = 0
	if y <= -5.5e+73:
		tmp = t_2
	elif y <= -1.3e-40:
		tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1
	elif y <= 1.1e+26:
		tmp = (t + (y * 230661.510616)) / (t_1 + i)
	elif y <= 6.2e+104:
		tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b))
	else:
		tmp = t_2
	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(x + Float64(Float64(z / y) - Float64(a * Float64(x / y))))
	tmp = 0.0
	if (y <= -5.5e+73)
		tmp = t_2;
	elseif (y <= -1.3e-40)
		tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / t_1);
	elseif (y <= 1.1e+26)
		tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(t_1 + i));
	elseif (y <= 6.2e+104)
		tmp = Float64(Float64(y * Float64(Float64(z / b) + Float64(Float64(x * y) / b))) + Float64(27464.7644705 * Float64(1.0 / b)));
	else
		tmp = t_2;
	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 = x + ((z / y) - (a * (x / y)));
	tmp = 0.0;
	if (y <= -5.5e+73)
		tmp = t_2;
	elseif (y <= -1.3e-40)
		tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1;
	elseif (y <= 1.1e+26)
		tmp = (t + (y * 230661.510616)) / (t_1 + i);
	elseif (y <= 6.2e+104)
		tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b));
	else
		tmp = t_2;
	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[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e+73], t$95$2, If[LessEqual[y, -1.3e-40], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 1.1e+26], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e+104], N[(N[(y * N[(N[(z / b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(27464.7644705 * N[(1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\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 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+73}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y \leq 1.1 \cdot 10^{+26}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{t\_1 + i}\\

\mathbf{elif}\;y \leq 6.2 \cdot 10^{+104}:\\
\;\;\;\;y \cdot \left(\frac{z}{b} + \frac{x \cdot y}{b}\right) + 27464.7644705 \cdot \frac{1}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.5000000000000003e73 or 6.20000000000000033e104 < y

    1. Initial program 1.4%

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

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

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

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

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

    if -5.5000000000000003e73 < y < -1.3000000000000001e-40

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

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

      \[\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 -1.3000000000000001e-40 < y < 1.10000000000000004e26

    1. Initial program 99.0%

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

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

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

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

    if 1.10000000000000004e26 < y < 6.20000000000000033e104

    1. Initial program 16.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 b around inf 9.9%

      \[\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)}{b \cdot {y}^{2}}} \]
    4. Taylor expanded in y around -inf 51.6%

      \[\leadsto \color{blue}{{y}^{2} \cdot \left(-1 \cdot \frac{-1 \cdot \frac{z}{b} - 27464.7644705 \cdot \frac{1}{b \cdot y}}{y} + \frac{x}{b}\right)} \]
    5. Taylor expanded in y around 0 49.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{+73}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{-40}:\\ \;\;\;\;\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 1.1 \cdot 10^{+26}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{+104}:\\ \;\;\;\;y \cdot \left(\frac{z}{b} + \frac{x \cdot y}{b}\right) + 27464.7644705 \cdot \frac{1}{b}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 79.5% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq 7.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(c + y \cdot \left(b + y \cdot a\right)\right)}\\

\mathbf{elif}\;y \leq 6.2 \cdot 10^{+104}:\\
\;\;\;\;y \cdot \left(\frac{z}{b} + \frac{x \cdot y}{b}\right) + 27464.7644705 \cdot \frac{1}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.0000000000000003e47 or 6.20000000000000033e104 < y

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

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

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

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

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

    if -6.0000000000000003e47 < y < 7.49999999999999941e26

    1. Initial program 97.9%

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

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

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

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

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

    if 7.49999999999999941e26 < y < 6.20000000000000033e104

    1. Initial program 16.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 b around inf 9.9%

      \[\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)}{b \cdot {y}^{2}}} \]
    4. Taylor expanded in y around -inf 51.6%

      \[\leadsto \color{blue}{{y}^{2} \cdot \left(-1 \cdot \frac{-1 \cdot \frac{z}{b} - 27464.7644705 \cdot \frac{1}{b \cdot y}}{y} + \frac{x}{b}\right)} \]
    5. Taylor expanded in y around 0 49.7%

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

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

Alternative 6: 75.8% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;y \leq 6.2 \cdot 10^{+104}:\\
\;\;\;\;y \cdot \left(\frac{z}{b} + \frac{x \cdot y}{b}\right) + 27464.7644705 \cdot \frac{1}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.4e19 or 6.20000000000000033e104 < y

    1. Initial program 6.9%

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

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

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

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

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

    if -2.4e19 < y < 4.6000000000000001e26

    1. Initial program 99.1%

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

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

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

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

    if 4.6000000000000001e26 < y < 6.20000000000000033e104

    1. Initial program 16.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 b around inf 9.9%

      \[\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)}{b \cdot {y}^{2}}} \]
    4. Taylor expanded in y around -inf 51.6%

      \[\leadsto \color{blue}{{y}^{2} \cdot \left(-1 \cdot \frac{-1 \cdot \frac{z}{b} - 27464.7644705 \cdot \frac{1}{b \cdot y}}{y} + \frac{x}{b}\right)} \]
    5. Taylor expanded in y around 0 49.7%

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

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

Alternative 7: 75.3% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;y \leq 6.2 \cdot 10^{+104}:\\
\;\;\;\;y \cdot \left(\frac{z}{b} + \frac{x \cdot y}{b}\right) + 27464.7644705 \cdot \frac{1}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.4e19 or 6.20000000000000033e104 < y

    1. Initial program 6.9%

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

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

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

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

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

    if -2.4e19 < y < 2.40000000000000005e26

    1. Initial program 99.1%

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

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

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

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

    if 2.40000000000000005e26 < y < 6.20000000000000033e104

    1. Initial program 16.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 b around inf 9.9%

      \[\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)}{b \cdot {y}^{2}}} \]
    4. Taylor expanded in y around -inf 51.6%

      \[\leadsto \color{blue}{{y}^{2} \cdot \left(-1 \cdot \frac{-1 \cdot \frac{z}{b} - 27464.7644705 \cdot \frac{1}{b \cdot y}}{y} + \frac{x}{b}\right)} \]
    5. Taylor expanded in y around 0 49.7%

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

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

Alternative 8: 75.1% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;y \leq 6.2 \cdot 10^{+104}:\\
\;\;\;\;y \cdot \left(\frac{z}{b} + \frac{x \cdot y}{b}\right) + 27464.7644705 \cdot \frac{1}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.3e19 or 6.20000000000000033e104 < y

    1. Initial program 6.9%

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

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

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

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

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

    if -2.3e19 < y < 2.0000000000000001e26

    1. Initial program 99.1%

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

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

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

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

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

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

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

    if 2.0000000000000001e26 < y < 6.20000000000000033e104

    1. Initial program 16.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 b around inf 9.9%

      \[\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)}{b \cdot {y}^{2}}} \]
    4. Taylor expanded in y around -inf 51.6%

      \[\leadsto \color{blue}{{y}^{2} \cdot \left(-1 \cdot \frac{-1 \cdot \frac{z}{b} - 27464.7644705 \cdot \frac{1}{b \cdot y}}{y} + \frac{x}{b}\right)} \]
    5. Taylor expanded in y around 0 49.7%

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

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

Alternative 9: 73.3% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;y \leq 6.2 \cdot 10^{+104}:\\
\;\;\;\;y \cdot \left(\frac{z}{b} + \frac{x \cdot y}{b}\right) + 27464.7644705 \cdot \frac{1}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5e9 or 6.20000000000000033e104 < y

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

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

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

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

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

    if -5e9 < y < 1.25e26

    1. Initial program 99.1%

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

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

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

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

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

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

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

    if 1.25e26 < y < 6.20000000000000033e104

    1. Initial program 16.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 b around inf 9.9%

      \[\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)}{b \cdot {y}^{2}}} \]
    4. Taylor expanded in y around -inf 51.6%

      \[\leadsto \color{blue}{{y}^{2} \cdot \left(-1 \cdot \frac{-1 \cdot \frac{z}{b} - 27464.7644705 \cdot \frac{1}{b \cdot y}}{y} + \frac{x}{b}\right)} \]
    5. Taylor expanded in y around 0 49.7%

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

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

Alternative 10: 74.1% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5000000000 \lor \neg \left(y \leq 3.55 \cdot 10^{+21}\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 -5000000000.0) (not (<= y 3.55e+21)))
   (+ 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 <= -5000000000.0) || !(y <= 3.55e+21)) {
		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 <= (-5000000000.0d0)) .or. (.not. (y <= 3.55d+21))) 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 <= -5000000000.0) || !(y <= 3.55e+21)) {
		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 <= -5000000000.0) or not (y <= 3.55e+21):
		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 <= -5000000000.0) || !(y <= 3.55e+21))
		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 <= -5000000000.0) || ~((y <= 3.55e+21)))
		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, -5000000000.0], N[Not[LessEqual[y, 3.55e+21]], $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 -5000000000 \lor \neg \left(y \leq 3.55 \cdot 10^{+21}\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 < -5e9 or 3.55e21 < y

    1. Initial program 11.5%

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

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

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

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

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

    if -5e9 < y < 3.55e21

    1. Initial program 99.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5000000000 \lor \neg \left(y \leq 3.55 \cdot 10^{+21}\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 11: 69.0% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.35 \cdot 10^{+19} \lor \neg \left(y \leq 6.9 \cdot 10^{+25}\right):\\ \;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{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 -2.35e+19) (not (<= y 6.9e+25)))
   (+ x (- (/ z y) (* a (/ x y))))
   (/ t (+ 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 <= -2.35e+19) || !(y <= 6.9e+25)) {
		tmp = x + ((z / y) - (a * (x / y)));
	} else {
		tmp = t / (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 <= (-2.35d+19)) .or. (.not. (y <= 6.9d+25))) then
        tmp = x + ((z / y) - (a * (x / y)))
    else
        tmp = t / (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 <= -2.35e+19) || !(y <= 6.9e+25)) {
		tmp = x + ((z / y) - (a * (x / y)));
	} else {
		tmp = t / (i + (y * (c + (y * (b + (y * a))))));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (y <= -2.35e+19) or not (y <= 6.9e+25):
		tmp = x + ((z / y) - (a * (x / y)))
	else:
		tmp = t / (i + (y * (c + (y * (b + (y * a))))))
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((y <= -2.35e+19) || !(y <= 6.9e+25))
		tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y))));
	else
		tmp = Float64(t / 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 <= -2.35e+19) || ~((y <= 6.9e+25)))
		tmp = x + ((z / y) - (a * (x / y)));
	else
		tmp = t / (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, -2.35e+19], N[Not[LessEqual[y, 6.9e+25]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.35 \cdot 10^{+19} \lor \neg \left(y \leq 6.9 \cdot 10^{+25}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{t}{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 < -2.35e19 or 6.8999999999999998e25 < y

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

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

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

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

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

    if -2.35e19 < y < 6.8999999999999998e25

    1. Initial program 99.1%

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

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

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

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

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

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

Alternative 12: 67.7% accurate, 1.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.2e8 or 2.04999999999999983e25 < y

    1. Initial program 11.5%

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

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

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

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

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

    if -8.2e8 < y < 2.04999999999999983e25

    1. Initial program 99.1%

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

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

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

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

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

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

Alternative 13: 60.7% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{-5} \lor \neg \left(y \leq 30000000000000\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 -7.5e-5) (not (<= y 30000000000000.0)))
   (+ 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 <= -7.5e-5) || !(y <= 30000000000000.0)) {
		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 <= (-7.5d-5)) .or. (.not. (y <= 30000000000000.0d0))) 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 <= -7.5e-5) || !(y <= 30000000000000.0)) {
		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 <= -7.5e-5) or not (y <= 30000000000000.0):
		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 <= -7.5e-5) || !(y <= 30000000000000.0))
		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 <= -7.5e-5) || ~((y <= 30000000000000.0)))
		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, -7.5e-5], N[Not[LessEqual[y, 30000000000000.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] / i), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{-5} \lor \neg \left(y \leq 30000000000000\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 < -7.49999999999999934e-5 or 3e13 < y

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

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

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

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

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

    if -7.49999999999999934e-5 < y < 3e13

    1. Initial program 99.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{-5} \lor \neg \left(y \leq 30000000000000\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 14: 54.0% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.10000000000000019e-9 or 1.65e12 < y

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

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

    if -2.10000000000000019e-9 < y < 1.65e12

    1. Initial program 99.1%

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

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

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

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

Alternative 15: 50.9% accurate, 2.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.09999999999999988e-5 or 4.8e17 < y

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

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

    if -2.09999999999999988e-5 < y < 4.8e17

    1. Initial program 99.1%

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

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

Alternative 16: 25.7% 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 61.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 22.4%

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

Reproduce

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