Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2

Percentage Accurate: 55.7% → 84.1%
Time: 27.0s
Alternatives: 15
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 15 alternatives:

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

Initial Program: 55.7% 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: 84.1% accurate, 0.5× speedup?

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

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


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

    1. Initial program 91.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 +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i))

    1. Initial program 0.0%

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

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

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

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

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

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

Alternative 2: 81.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+44} \lor \neg \left(y \leq 4 \cdot 10^{+63}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.8000000000000002e44 or 4.00000000000000023e63 < y

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

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

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

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

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

    if -3.8000000000000002e44 < y < 4.00000000000000023e63

    1. Initial program 95.3%

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

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

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

Alternative 3: 80.0% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.65e15 or 6.00000000000000043e37 < y

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

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

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

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

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

    if -1.65e15 < y < 6.00000000000000043e37

    1. Initial program 98.3%

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

      \[\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 y around 0 92.3%

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

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

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

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

Alternative 4: 77.7% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.65e15 or 2.6e39 < y

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

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

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

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

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

    if -1.65e15 < y < 2.6e39

    1. Initial program 98.3%

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

      \[\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 y around 0 88.1%

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

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

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

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

Alternative 5: 66.1% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;y \leq -1.32 \cdot 10^{-289}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 3.1 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.1999999999999994e-6 or 3.10000000000000018e38 < y

    1. Initial program 10.3%

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

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

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

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

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

    if -8.1999999999999994e-6 < y < -1.31999999999999994e-289 or 2.8000000000000001e-136 < y < 3.10000000000000018e38

    1. Initial program 97.6%

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

      \[\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 y around 0 83.1%

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

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

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

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

    if -1.31999999999999994e-289 < y < 2.8000000000000001e-136

    1. Initial program 100.0%

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

      \[\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 y around 0 100.0%

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

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

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

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

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

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

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

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

Alternative 6: 75.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{-6} \lor \neg \left(y \leq 1.6 \cdot 10^{+35}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\

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


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

    1. Initial program 10.3%

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

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

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

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

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

    if -8.1999999999999994e-6 < y < 1.59999999999999991e35

    1. Initial program 98.3%

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

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

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

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

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

Alternative 7: 74.5% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.7e9 or 4.1000000000000003e38 < y

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

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

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

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

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

    if -2.7e9 < y < 4.1000000000000003e38

    1. Initial program 98.3%

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

      \[\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 y around 0 88.1%

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

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

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

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

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

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

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

Alternative 8: 73.5% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6e13 or 1.54999999999999993e35 < y

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

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

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

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

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

    if -6e13 < y < 1.54999999999999993e35

    1. Initial program 98.3%

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

      \[\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 y around 0 81.6%

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

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

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

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

Alternative 9: 62.3% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+14} \lor \neg \left(y \leq 8 \cdot 10^{+16}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.5e14 or 8e16 < y

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

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

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

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

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

    if -1.5e14 < y < 8e16

    1. Initial program 99.6%

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

      \[\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 inf 67.3%

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

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

Alternative 10: 74.0% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{-6} \lor \neg \left(y \leq 1.9 \cdot 10^{+35}\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 -6.5e-6) (not (<= y 1.9e+35)))
   (+ 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 <= -6.5e-6) || !(y <= 1.9e+35)) {
		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 <= (-6.5d-6)) .or. (.not. (y <= 1.9d+35))) 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 <= -6.5e-6) || !(y <= 1.9e+35)) {
		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 <= -6.5e-6) or not (y <= 1.9e+35):
		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 <= -6.5e-6) || !(y <= 1.9e+35))
		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 <= -6.5e-6) || ~((y <= 1.9e+35)))
		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, -6.5e-6], N[Not[LessEqual[y, 1.9e+35]], $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 -6.5 \cdot 10^{-6} \lor \neg \left(y \leq 1.9 \cdot 10^{+35}\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 < -6.4999999999999996e-6 or 1.9e35 < y

    1. Initial program 10.3%

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

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

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

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

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

    if -6.4999999999999996e-6 < y < 1.9e35

    1. Initial program 98.3%

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

      \[\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 y around 0 87.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{-6} \lor \neg \left(y \leq 1.9 \cdot 10^{+35}\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: 57.6% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{-8} \lor \neg \left(y \leq 1.1 \cdot 10^{+31}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{t}{i}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.99999999999999973e-8 or 1.10000000000000005e31 < y

    1. Initial program 11.1%

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

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

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

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

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

    if -2.99999999999999973e-8 < y < 1.10000000000000005e31

    1. Initial program 98.2%

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

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

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

Alternative 12: 67.5% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{-6} \lor \neg \left(y \leq 1.55 \cdot 10^{+35}\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 -8e-6) (not (<= y 1.55e+35)))
   (+ 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 <= -8e-6) || !(y <= 1.55e+35)) {
		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 <= (-8d-6)) .or. (.not. (y <= 1.55d+35))) 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 <= -8e-6) || !(y <= 1.55e+35)) {
		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 <= -8e-6) or not (y <= 1.55e+35):
		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 <= -8e-6) || !(y <= 1.55e+35))
		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 <= -8e-6) || ~((y <= 1.55e+35)))
		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, -8e-6], N[Not[LessEqual[y, 1.55e+35]], $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 -8 \cdot 10^{-6} \lor \neg \left(y \leq 1.55 \cdot 10^{+35}\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 < -7.99999999999999964e-6 or 1.54999999999999993e35 < y

    1. Initial program 10.3%

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

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

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

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

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

    if -7.99999999999999964e-6 < y < 1.54999999999999993e35

    1. Initial program 98.3%

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

      \[\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 y around 0 87.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{-6} \lor \neg \left(y \leq 1.55 \cdot 10^{+35}\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: 55.5% accurate, 1.7× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{t}{i}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.60000000000000013e-19 or 8.19999999999999967e26 < y

    1. Initial program 11.1%

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

      \[\leadsto \color{blue}{\left(x + \left(\frac{27464.7644705}{{y}^{2}} + \frac{z}{y}\right)\right) - \left(\frac{a \cdot x}{y} + \left(\frac{a \cdot \left(z - a \cdot x\right)}{{y}^{2}} + \frac{b \cdot x}{{y}^{2}}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-+r+51.2%

        \[\leadsto \left(x + \left(\frac{27464.7644705}{{y}^{2}} + \frac{z}{y}\right)\right) - \color{blue}{\left(\left(\frac{a \cdot x}{y} + \frac{a \cdot \left(z - a \cdot x\right)}{{y}^{2}}\right) + \frac{b \cdot x}{{y}^{2}}\right)} \]
      2. associate--r+51.2%

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

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

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

        \[\leadsto \left(x + \color{blue}{\left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right)}\right) - b \cdot \frac{x}{{y}^{2}} \]
      2. distribute-lft-out--64.0%

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{z - a \cdot x}{y}} \]
    10. Step-by-step derivation
      1. mul-1-neg63.7%

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

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

    if -2.60000000000000013e-19 < y < 8.19999999999999967e26

    1. Initial program 98.2%

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

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

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

Alternative 14: 50.4% accurate, 2.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.20000000000000029e-24 or 7.2e21 < y

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

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

    if -8.20000000000000029e-24 < y < 7.2e21

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

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

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

Alternative 15: 25.8% accurate, 33.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 59.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 26.5%

    \[\leadsto \color{blue}{x} \]
  4. Final simplification26.5%

    \[\leadsto x \]
  5. Add Preprocessing

Reproduce

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