Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2

Percentage Accurate: 56.3% → 83.0%
Time: 25.4s
Alternatives: 13
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 13 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.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (/
  (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t)
  (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i):
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}

Alternative 1: 83.0% accurate, 0.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x - \frac{x \cdot a - z}{y}\\


\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 95.2%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Step-by-step derivation
      1. fma-define95.2%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
    4. 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 73.9%

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

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

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

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

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

Alternative 2: 83.0% 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 - \frac{x \cdot a - z}{y}\\ \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 (/ (- (* x a) z) 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 - (((x * a) - z) / 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 - (((x * a) - z) / 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 - (((x * a) - z) / 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(Float64(x * a) - z) / 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 - (((x * a) - z) / 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[(N[(x * a), $MachinePrecision] - z), $MachinePrecision] / y), $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 - \frac{x \cdot a - z}{y}\\


\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 95.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

    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 73.9%

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

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

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

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

    \[\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 - \frac{x \cdot a - z}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 79.3% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq 1.45 \cdot 10^{+38}:\\
\;\;\;\;\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{else}:\\
\;\;\;\;x - \frac{x \cdot a - z}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.1000000000000001e39

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

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

    if -1.1000000000000001e39 < y < 1.45000000000000003e38

    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 91.9%

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

      \[\leadsto \frac{\left(\left(y \cdot z + 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} \]

    if 1.45000000000000003e38 < y

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.1 \cdot 10^{+39}:\\ \;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{+38}:\\ \;\;\;\;\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{else}:\\ \;\;\;\;x - \frac{x \cdot a - z}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 76.7% accurate, 1.0× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;x - \frac{x \cdot a - z}{y}\\


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

    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 75.2%

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

    if -1.7e24 < y < 1.3000000000000001e36

    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.4%

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

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

    if 1.3000000000000001e36 < y

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

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

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

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

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

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

Alternative 5: 75.1% accurate, 1.1× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;x - \frac{x \cdot a - z}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.00000000000000034e36

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

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

    if -8.00000000000000034e36 < y < 2.45000000000000007e27

    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 y around 0 86.2%

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

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

      \[\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.45000000000000007e27 < y

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

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

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

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

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

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

Alternative 6: 73.1% accurate, 1.3× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;x - \frac{x \cdot a - z}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.99999999999999923e37

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

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

    if -8.99999999999999923e37 < y < 4.2e5

    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 88.4%

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

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

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

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

    if 4.2e5 < y

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

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

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

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

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

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

Alternative 7: 69.4% accurate, 1.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.20000000000000007e35 or 0.39000000000000001 < y

    1. Initial program 6.1%

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

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

    if -1.20000000000000007e35 < y < 0.39000000000000001

    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 88.4%

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

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

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

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

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

Alternative 8: 59.4% accurate, 1.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.20000000000000007e35 or 5.19999999999999998e-7 < y

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

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

    if -1.20000000000000007e35 < y < 5.19999999999999998e-7

    1. Initial program 99.0%

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

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

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

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

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

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

Alternative 9: 69.5% accurate, 1.6× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;x - \frac{x \cdot a - z}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.75e35

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

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

    if -1.75e35 < y < 4e5

    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 88.4%

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

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

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

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

    if 4e5 < y

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

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

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

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

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

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

Alternative 10: 54.4% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.6000000000000001e-14 or 4.79999999999999957e-7 < y

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

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

    if -5.6000000000000001e-14 < y < 4.79999999999999957e-7

    1. Initial program 99.7%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 92.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. *-commutative92.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. Simplified92.5%

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

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

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

Alternative 11: 50.9% accurate, 2.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.49999999999999991e-14 or 6.7999999999999997e-9 < y

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

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

    if -5.49999999999999991e-14 < y < 6.7999999999999997e-9

    1. Initial program 99.7%

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

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

Alternative 12: 27.9% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;y \leq 250000:\\
\;\;\;\;\frac{230661.510616}{c}\\

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


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

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

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

    if -6.8e12 < y < 2.5e5

    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 y around 0 90.3%

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

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

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

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

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

Alternative 13: 25.9% 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 56.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 27.3%

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

Reproduce

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