Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2

Percentage Accurate: 56.4% → 85.7%
Time: 18.2s
Alternatives: 15
Speedup: 2.0×

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: 56.4% accurate, 1.0× speedup?

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

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

Alternative 1: 85.7% accurate, 0.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(1 - \frac{a}{y}\right)}{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 87.9%

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

      \[\leadsto \color{blue}{\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \left(\frac{x \cdot {y}^{4}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \frac{y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}\right)} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\frac{x \cdot {y}^{4}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \frac{y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}\right) + \frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\frac{y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \frac{x \cdot {y}^{4}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}\right)} + \frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      3. associate-+l+N/A

        \[\leadsto \color{blue}{\frac{y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \left(\frac{x \cdot {y}^{4}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}\right)} \]
    5. Simplified91.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, 27464.7644705\right), 230661.510616\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{{y}^{4}}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right)} \]
    6. Step-by-step derivation
      1. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{{y}^{\color{blue}{\left(2 \cdot 2\right)}}}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      2. pow-powN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{\color{blue}{{\left({y}^{2}\right)}^{2}}}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      3. pow2N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{{\color{blue}{\left(y \cdot y\right)}}^{2}}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{{\color{blue}{\left(y \cdot y\right)}}^{2}}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      5. pow2N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{\color{blue}{\left(y \cdot y\right) \cdot \left(y \cdot y\right)}}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      6. lift-+.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{\left(y \cdot y\right) \cdot \left(y \cdot y\right)}{y \cdot \left(y \cdot \left(y \cdot \color{blue}{\left(y + a\right)} + b\right) + c\right) + i}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{\left(y \cdot y\right) \cdot \left(y \cdot y\right)}{y \cdot \left(y \cdot \color{blue}{\left(b + y \cdot \left(y + a\right)\right)} + c\right) + i}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      8. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{\left(y \cdot y\right) \cdot \left(y \cdot y\right)}{y \cdot \left(y \cdot \color{blue}{\left(y \cdot \left(y + a\right) + b\right)} + c\right) + i}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      9. lift-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{\left(y \cdot y\right) \cdot \left(y \cdot y\right)}{y \cdot \left(y \cdot \color{blue}{\mathsf{fma}\left(y, y + a, b\right)} + c\right) + i}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      10. lift-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{\left(y \cdot y\right) \cdot \left(y \cdot y\right)}{y \cdot \color{blue}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right)} + i}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      11. lift-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{\left(y \cdot y\right) \cdot \left(y \cdot y\right)}{\color{blue}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      12. associate-/l*N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \color{blue}{\left(y \cdot y\right) \cdot \frac{y \cdot y}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \color{blue}{\left(y \cdot y\right) \cdot \frac{y \cdot y}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      14. lower-/.f6492.0

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

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

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

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}\right)\right)} \]
      2. unsub-negN/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      3. lower--.f64N/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      4. lower-/.f64N/A

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

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

      \[\leadsto x - \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x - \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]
      2. sub-negN/A

        \[\leadsto x - \frac{z \cdot \color{blue}{\left(\frac{a}{y} + \left(\mathsf{neg}\left(1\right)\right)\right)}}{y} \]
      3. metadata-evalN/A

        \[\leadsto x - \frac{z \cdot \left(\frac{a}{y} + \color{blue}{-1}\right)}{y} \]
      4. lower-+.f64N/A

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

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

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

    \[\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:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, 27464.7644705\right), 230661.510616\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \left(y \cdot y\right) \cdot \frac{y \cdot y}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot \left(1 - \frac{a}{y}\right)}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 85.0% accurate, 0.3× 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}\\ t_2 := \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)\\ t_3 := \frac{t}{t\_2}\\ \mathbf{if}\;t\_1 \leq 2 \cdot 10^{+139}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right)}{t\_2}, t\_3\right)\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{230661.510616}{i}, \mathsf{fma}\left(x, \left(y \cdot y\right) \cdot \frac{y \cdot y}{t\_2}, t\_3\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot \left(1 - \frac{a}{y}\right)}{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)))
        (t_2 (fma y (fma y (fma y (+ y a) b) c) i))
        (t_3 (/ t t_2)))
   (if (<= t_1 2e+139)
     (fma
      y
      (/ (fma y (fma y (fma y x z) 27464.7644705) 230661.510616) t_2)
      t_3)
     (if (<= t_1 INFINITY)
       (fma y (/ 230661.510616 i) (fma x (* (* y y) (/ (* y y) t_2)) t_3))
       (+ x (/ (* z (- 1.0 (/ a y))) 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 t_2 = fma(y, fma(y, fma(y, (y + a), b), c), i);
	double t_3 = t / t_2;
	double tmp;
	if (t_1 <= 2e+139) {
		tmp = fma(y, (fma(y, fma(y, fma(y, x, z), 27464.7644705), 230661.510616) / t_2), t_3);
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = fma(y, (230661.510616 / i), fma(x, ((y * y) * ((y * y) / t_2)), t_3));
	} else {
		tmp = x + ((z * (1.0 - (a / y))) / 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))
	t_2 = fma(y, fma(y, fma(y, Float64(y + a), b), c), i)
	t_3 = Float64(t / t_2)
	tmp = 0.0
	if (t_1 <= 2e+139)
		tmp = fma(y, Float64(fma(y, fma(y, fma(y, x, z), 27464.7644705), 230661.510616) / t_2), t_3);
	elseif (t_1 <= Inf)
		tmp = fma(y, Float64(230661.510616 / i), fma(x, Float64(Float64(y * y) * Float64(Float64(y * y) / t_2)), t_3));
	else
		tmp = Float64(x + Float64(Float64(z * Float64(1.0 - Float64(a / y))) / y));
	end
	return 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]}, Block[{t$95$2 = N[(y * N[(y * N[(y * N[(y + a), $MachinePrecision] + b), $MachinePrecision] + c), $MachinePrecision] + i), $MachinePrecision]}, Block[{t$95$3 = N[(t / t$95$2), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+139], N[(y * N[(N[(y * N[(y * N[(y * x + z), $MachinePrecision] + 27464.7644705), $MachinePrecision] + 230661.510616), $MachinePrecision] / t$95$2), $MachinePrecision] + t$95$3), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(y * N[(230661.510616 / i), $MachinePrecision] + N[(x * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(1.0 - N[(a / y), $MachinePrecision]), $MachinePrecision]), $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}\\
t_2 := \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)\\
t_3 := \frac{t}{t\_2}\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{+139}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right)}{t\_2}, t\_3\right)\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{230661.510616}{i}, \mathsf{fma}\left(x, \left(y \cdot y\right) \cdot \frac{y \cdot y}{t\_2}, t\_3\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 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)) < 2.00000000000000007e139

    1. Initial program 90.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 t around 0

      \[\leadsto \color{blue}{\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \frac{y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right)\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{\frac{y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right)\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
      2. associate-/l*N/A

        \[\leadsto \color{blue}{y \cdot \frac{\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} + \frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}, \frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}\right)} \]
    5. Simplified91.3%

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

    if 2.00000000000000007e139 < (/.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 53.9%

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

      \[\leadsto \color{blue}{\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \left(\frac{x \cdot {y}^{4}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \frac{y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}\right)} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\frac{x \cdot {y}^{4}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \frac{y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}\right) + \frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\frac{y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \frac{x \cdot {y}^{4}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}\right)} + \frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      3. associate-+l+N/A

        \[\leadsto \color{blue}{\frac{y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \left(\frac{x \cdot {y}^{4}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}\right)} \]
    5. Simplified84.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, 27464.7644705\right), 230661.510616\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{{y}^{4}}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right)} \]
    6. Step-by-step derivation
      1. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{{y}^{\color{blue}{\left(2 \cdot 2\right)}}}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      2. pow-powN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{\color{blue}{{\left({y}^{2}\right)}^{2}}}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      3. pow2N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{{\color{blue}{\left(y \cdot y\right)}}^{2}}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{{\color{blue}{\left(y \cdot y\right)}}^{2}}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      5. pow2N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{\color{blue}{\left(y \cdot y\right) \cdot \left(y \cdot y\right)}}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      6. lift-+.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{\left(y \cdot y\right) \cdot \left(y \cdot y\right)}{y \cdot \left(y \cdot \left(y \cdot \color{blue}{\left(y + a\right)} + b\right) + c\right) + i}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{\left(y \cdot y\right) \cdot \left(y \cdot y\right)}{y \cdot \left(y \cdot \color{blue}{\left(b + y \cdot \left(y + a\right)\right)} + c\right) + i}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      8. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{\left(y \cdot y\right) \cdot \left(y \cdot y\right)}{y \cdot \left(y \cdot \color{blue}{\left(y \cdot \left(y + a\right) + b\right)} + c\right) + i}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      9. lift-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{\left(y \cdot y\right) \cdot \left(y \cdot y\right)}{y \cdot \left(y \cdot \color{blue}{\mathsf{fma}\left(y, y + a, b\right)} + c\right) + i}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      10. lift-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{\left(y \cdot y\right) \cdot \left(y \cdot y\right)}{y \cdot \color{blue}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right)} + i}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      11. lift-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \frac{\left(y \cdot y\right) \cdot \left(y \cdot y\right)}{\color{blue}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      12. associate-/l*N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \color{blue}{\left(y \cdot y\right) \cdot \frac{y \cdot y}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \mathsf{fma}\left(x, \color{blue}{\left(y \cdot y\right) \cdot \frac{y \cdot y}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
      14. lower-/.f6484.3

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

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

      \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{\frac{28832688827}{125000}}{i}}, \mathsf{fma}\left(x, \left(y \cdot y\right) \cdot \frac{y \cdot y}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right) \]
    9. Step-by-step derivation
      1. lower-/.f6499.5

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

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

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

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}\right)\right)} \]
      2. unsub-negN/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      3. lower--.f64N/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      4. lower-/.f64N/A

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

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

      \[\leadsto x - \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x - \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]
      2. sub-negN/A

        \[\leadsto x - \frac{z \cdot \color{blue}{\left(\frac{a}{y} + \left(\mathsf{neg}\left(1\right)\right)\right)}}{y} \]
      3. metadata-evalN/A

        \[\leadsto x - \frac{z \cdot \left(\frac{a}{y} + \color{blue}{-1}\right)}{y} \]
      4. lower-+.f64N/A

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

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

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

    \[\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 2 \cdot 10^{+139}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\\ \mathbf{elif}\;\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:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{230661.510616}{i}, \mathsf{fma}\left(x, \left(y \cdot y\right) \cdot \frac{y \cdot y}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot \left(1 - \frac{a}{y}\right)}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 84.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)\\ \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 2 \cdot 10^{+263}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right)}{t\_1}, \frac{t}{t\_1}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot \left(1 - \frac{a}{y}\right)}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (fma y (fma y (fma y (+ y a) b) c) i)))
   (if (<=
        (/
         (+
          (* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
          t)
         (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
        2e+263)
     (fma
      y
      (/ (fma y (fma y (fma y x z) 27464.7644705) 230661.510616) t_1)
      (/ t t_1))
     (+ x (/ (* z (- 1.0 (/ a y))) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = fma(y, fma(y, fma(y, (y + a), b), c), i);
	double tmp;
	if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)) <= 2e+263) {
		tmp = fma(y, (fma(y, fma(y, fma(y, x, z), 27464.7644705), 230661.510616) / t_1), (t / t_1));
	} else {
		tmp = x + ((z * (1.0 - (a / y))) / y);
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = fma(y, fma(y, fma(y, Float64(y + 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)) <= 2e+263)
		tmp = fma(y, Float64(fma(y, fma(y, fma(y, x, z), 27464.7644705), 230661.510616) / t_1), Float64(t / t_1));
	else
		tmp = Float64(x + Float64(Float64(z * Float64(1.0 - Float64(a / y))) / y));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(y * N[(y * N[(y * N[(y + a), $MachinePrecision] + b), $MachinePrecision] + c), $MachinePrecision] + i), $MachinePrecision]}, 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], 2e+263], N[(y * N[(N[(y * N[(y * N[(y * x + z), $MachinePrecision] + 27464.7644705), $MachinePrecision] + 230661.510616), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(1.0 - N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)\\
\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 2 \cdot 10^{+263}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right)}{t\_1}, \frac{t}{t\_1}\right)\\

\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(1 - \frac{a}{y}\right)}{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)) < 2.00000000000000003e263

    1. Initial program 91.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 t around 0

      \[\leadsto \color{blue}{\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \frac{y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right)\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{\frac{y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right)\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
      2. associate-/l*N/A

        \[\leadsto \color{blue}{y \cdot \frac{\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} + \frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}, \frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}\right)} \]
    5. Simplified91.5%

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

    if 2.00000000000000003e263 < (/.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 2.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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}\right)\right)} \]
      2. unsub-negN/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      3. lower--.f64N/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      4. lower-/.f64N/A

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

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

      \[\leadsto x - \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x - \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]
      2. sub-negN/A

        \[\leadsto x - \frac{z \cdot \color{blue}{\left(\frac{a}{y} + \left(\mathsf{neg}\left(1\right)\right)\right)}}{y} \]
      3. metadata-evalN/A

        \[\leadsto x - \frac{z \cdot \left(\frac{a}{y} + \color{blue}{-1}\right)}{y} \]
      4. lower-+.f64N/A

        \[\leadsto x - \frac{z \cdot \color{blue}{\left(\frac{a}{y} + -1\right)}}{y} \]
      5. lower-/.f6474.7

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

      \[\leadsto x - \frac{\color{blue}{z \cdot \left(\frac{a}{y} + -1\right)}}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification84.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 2 \cdot 10^{+263}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot \left(1 - \frac{a}{y}\right)}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 83.8% 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 2 \cdot 10^{+263}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot \left(1 - \frac{a}{y}\right)}{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 2e+263) t_1 (+ x (/ (* z (- 1.0 (/ a y))) 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 <= 2e+263) {
		tmp = t_1;
	} else {
		tmp = x + ((z * (1.0 - (a / y))) / y);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
    if (t_1 <= 2d+263) then
        tmp = t_1
    else
        tmp = x + ((z * (1.0d0 - (a / y))) / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
	double tmp;
	if (t_1 <= 2e+263) {
		tmp = t_1;
	} else {
		tmp = x + ((z * (1.0 - (a / y))) / 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 <= 2e+263:
		tmp = t_1
	else:
		tmp = x + ((z * (1.0 - (a / y))) / 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 <= 2e+263)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(Float64(z * Float64(1.0 - Float64(a / y))) / 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 <= 2e+263)
		tmp = t_1;
	else
		tmp = x + ((z * (1.0 - (a / y))) / 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, 2e+263], t$95$1, N[(x + N[(N[(z * N[(1.0 - N[(a / y), $MachinePrecision]), $MachinePrecision]), $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 2 \cdot 10^{+263}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(1 - \frac{a}{y}\right)}{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)) < 2.00000000000000003e263

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

    if 2.00000000000000003e263 < (/.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 2.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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}\right)\right)} \]
      2. unsub-negN/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      3. lower--.f64N/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      4. lower-/.f64N/A

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

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

      \[\leadsto x - \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x - \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]
      2. sub-negN/A

        \[\leadsto x - \frac{z \cdot \color{blue}{\left(\frac{a}{y} + \left(\mathsf{neg}\left(1\right)\right)\right)}}{y} \]
      3. metadata-evalN/A

        \[\leadsto x - \frac{z \cdot \left(\frac{a}{y} + \color{blue}{-1}\right)}{y} \]
      4. lower-+.f64N/A

        \[\leadsto x - \frac{z \cdot \color{blue}{\left(\frac{a}{y} + -1\right)}}{y} \]
      5. lower-/.f6474.7

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

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

    \[\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 2 \cdot 10^{+263}:\\ \;\;\;\;\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{z \cdot \left(1 - \frac{a}{y}\right)}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 83.7% accurate, 0.5× 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 2 \cdot 10^{+263}:\\ \;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right), 230661.510616\right), t\right) \cdot \frac{1}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot \left(1 - \frac{a}{y}\right)}{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))
      2e+263)
   (*
    (fma y (fma y (fma y (fma x y z) 27464.7644705) 230661.510616) t)
    (/ 1.0 (fma y (fma y (fma y (+ y a) b) c) i)))
   (+ x (/ (* z (- 1.0 (/ a y))) 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)) <= 2e+263) {
		tmp = fma(y, fma(y, fma(y, fma(x, y, z), 27464.7644705), 230661.510616), t) * (1.0 / fma(y, fma(y, fma(y, (y + a), b), c), i));
	} else {
		tmp = x + ((z * (1.0 - (a / y))) / 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)) <= 2e+263)
		tmp = Float64(fma(y, fma(y, fma(y, fma(x, y, z), 27464.7644705), 230661.510616), t) * Float64(1.0 / fma(y, fma(y, fma(y, Float64(y + a), b), c), i)));
	else
		tmp = Float64(x + Float64(Float64(z * Float64(1.0 - Float64(a / y))) / 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], 2e+263], N[(N[(y * N[(y * N[(y * N[(x * y + z), $MachinePrecision] + 27464.7644705), $MachinePrecision] + 230661.510616), $MachinePrecision] + t), $MachinePrecision] * N[(1.0 / N[(y * N[(y * N[(y * N[(y + a), $MachinePrecision] + b), $MachinePrecision] + c), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(1.0 - N[(a / y), $MachinePrecision]), $MachinePrecision]), $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 2 \cdot 10^{+263}:\\
\;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right), 230661.510616\right), t\right) \cdot \frac{1}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(1 - \frac{a}{y}\right)}{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)) < 2.00000000000000003e263

    1. Initial program 91.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. Applied egg-rr90.8%

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

    if 2.00000000000000003e263 < (/.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 2.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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}\right)\right)} \]
      2. unsub-negN/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      3. lower--.f64N/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      4. lower-/.f64N/A

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

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

      \[\leadsto x - \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x - \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]
      2. sub-negN/A

        \[\leadsto x - \frac{z \cdot \color{blue}{\left(\frac{a}{y} + \left(\mathsf{neg}\left(1\right)\right)\right)}}{y} \]
      3. metadata-evalN/A

        \[\leadsto x - \frac{z \cdot \left(\frac{a}{y} + \color{blue}{-1}\right)}{y} \]
      4. lower-+.f64N/A

        \[\leadsto x - \frac{z \cdot \color{blue}{\left(\frac{a}{y} + -1\right)}}{y} \]
      5. lower-/.f6474.7

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

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

    \[\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 2 \cdot 10^{+263}:\\ \;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right), 230661.510616\right), t\right) \cdot \frac{1}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot \left(1 - \frac{a}{y}\right)}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 80.2% accurate, 0.5× 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 5 \cdot 10^{+259}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right), t\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y, b\right), c\right), i\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot \left(1 - \frac{a}{y}\right)}{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))
      5e+259)
   (/
    (fma y (fma y (fma y (fma y x z) 27464.7644705) 230661.510616) t)
    (fma y (fma y (fma y y b) c) i))
   (+ x (/ (* z (- 1.0 (/ a y))) 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)) <= 5e+259) {
		tmp = fma(y, fma(y, fma(y, fma(y, x, z), 27464.7644705), 230661.510616), t) / fma(y, fma(y, fma(y, y, b), c), i);
	} else {
		tmp = x + ((z * (1.0 - (a / y))) / 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)) <= 5e+259)
		tmp = Float64(fma(y, fma(y, fma(y, fma(y, x, z), 27464.7644705), 230661.510616), t) / fma(y, fma(y, fma(y, y, b), c), i));
	else
		tmp = Float64(x + Float64(Float64(z * Float64(1.0 - Float64(a / y))) / 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], 5e+259], N[(N[(y * N[(y * N[(y * N[(y * x + z), $MachinePrecision] + 27464.7644705), $MachinePrecision] + 230661.510616), $MachinePrecision] + t), $MachinePrecision] / N[(y * N[(y * N[(y * y + b), $MachinePrecision] + c), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(1.0 - N[(a / y), $MachinePrecision]), $MachinePrecision]), $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 5 \cdot 10^{+259}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right), t\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y, b\right), c\right), i\right)}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(1 - \frac{a}{y}\right)}{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)) < 5.00000000000000033e259

    1. Initial program 90.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 a around 0

      \[\leadsto \color{blue}{\frac{t + y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right)\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + {y}^{2}\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{t + y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right)\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + {y}^{2}\right)\right)}} \]
      2. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right)\right)\right) + t}}{i + y \cdot \left(c + y \cdot \left(b + {y}^{2}\right)\right)} \]
      3. lower-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right)\right), t\right)}}{i + y \cdot \left(c + y \cdot \left(b + {y}^{2}\right)\right)} \]
      4. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \color{blue}{y \cdot \left(\frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right)\right) + \frac{28832688827}{125000}}, t\right)}{i + y \cdot \left(c + y \cdot \left(b + {y}^{2}\right)\right)} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, \frac{54929528941}{2000000} + y \cdot \left(z + x \cdot y\right), \frac{28832688827}{125000}\right)}, t\right)}{i + y \cdot \left(c + y \cdot \left(b + {y}^{2}\right)\right)} \]
      6. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y \cdot \left(z + x \cdot y\right) + \frac{54929528941}{2000000}}, \frac{28832688827}{125000}\right), t\right)}{i + y \cdot \left(c + y \cdot \left(b + {y}^{2}\right)\right)} \]
      7. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, z + x \cdot y, \frac{54929528941}{2000000}\right)}, \frac{28832688827}{125000}\right), t\right)}{i + y \cdot \left(c + y \cdot \left(b + {y}^{2}\right)\right)} \]
      8. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{x \cdot y + z}, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right), t\right)}{i + y \cdot \left(c + y \cdot \left(b + {y}^{2}\right)\right)} \]
      9. *-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y \cdot x} + z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right), t\right)}{i + y \cdot \left(c + y \cdot \left(b + {y}^{2}\right)\right)} \]
      10. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, x, z\right)}, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right), t\right)}{i + y \cdot \left(c + y \cdot \left(b + {y}^{2}\right)\right)} \]
      11. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right), t\right)}{\color{blue}{y \cdot \left(c + y \cdot \left(b + {y}^{2}\right)\right) + i}} \]
      12. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right), t\right)}{\color{blue}{\mathsf{fma}\left(y, c + y \cdot \left(b + {y}^{2}\right), i\right)}} \]
      13. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right), t\right)}{\mathsf{fma}\left(y, \color{blue}{y \cdot \left(b + {y}^{2}\right) + c}, i\right)} \]
      14. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right), t\right)}{\mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, b + {y}^{2}, c\right)}, i\right)} \]
      15. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right), t\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{{y}^{2} + b}, c\right), i\right)} \]
      16. unpow2N/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right), t\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y \cdot y} + b, c\right), i\right)} \]
      17. lower-fma.f6488.9

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

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

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

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}\right)\right)} \]
      2. unsub-negN/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      3. lower--.f64N/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      4. lower-/.f64N/A

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

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

      \[\leadsto x - \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x - \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]
      2. sub-negN/A

        \[\leadsto x - \frac{z \cdot \color{blue}{\left(\frac{a}{y} + \left(\mathsf{neg}\left(1\right)\right)\right)}}{y} \]
      3. metadata-evalN/A

        \[\leadsto x - \frac{z \cdot \left(\frac{a}{y} + \color{blue}{-1}\right)}{y} \]
      4. lower-+.f64N/A

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

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

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

    \[\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 5 \cdot 10^{+259}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right), t\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y, b\right), c\right), i\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot \left(1 - \frac{a}{y}\right)}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 80.2% accurate, 0.6× 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 2 \cdot 10^{+263}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, z, 27464.7644705\right), 230661.510616\right), t\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot \left(1 - \frac{a}{y}\right)}{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))
      2e+263)
   (/
    (fma y (fma y (fma y z 27464.7644705) 230661.510616) t)
    (fma y (fma y (fma y (+ y a) b) c) i))
   (+ x (/ (* z (- 1.0 (/ a y))) 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)) <= 2e+263) {
		tmp = fma(y, fma(y, fma(y, z, 27464.7644705), 230661.510616), t) / fma(y, fma(y, fma(y, (y + a), b), c), i);
	} else {
		tmp = x + ((z * (1.0 - (a / y))) / 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)) <= 2e+263)
		tmp = Float64(fma(y, fma(y, fma(y, z, 27464.7644705), 230661.510616), t) / fma(y, fma(y, fma(y, Float64(y + a), b), c), i));
	else
		tmp = Float64(x + Float64(Float64(z * Float64(1.0 - Float64(a / y))) / 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], 2e+263], N[(N[(y * N[(y * N[(y * z + 27464.7644705), $MachinePrecision] + 230661.510616), $MachinePrecision] + t), $MachinePrecision] / N[(y * N[(y * N[(y * N[(y + a), $MachinePrecision] + b), $MachinePrecision] + c), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(1.0 - N[(a / y), $MachinePrecision]), $MachinePrecision]), $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 2 \cdot 10^{+263}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, z, 27464.7644705\right), 230661.510616\right), t\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(1 - \frac{a}{y}\right)}{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)) < 2.00000000000000003e263

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

      \[\leadsto \color{blue}{\frac{t + y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{t + y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
      2. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{y \cdot \left(\frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right)\right) + t}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      3. lower-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{28832688827}{125000} + y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right), t\right)}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      4. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \color{blue}{y \cdot \left(\frac{54929528941}{2000000} + y \cdot z\right) + \frac{28832688827}{125000}}, t\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, \frac{54929528941}{2000000} + y \cdot z, \frac{28832688827}{125000}\right)}, t\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      6. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y \cdot z + \frac{54929528941}{2000000}}, \frac{28832688827}{125000}\right), t\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      7. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right)}, \frac{28832688827}{125000}\right), t\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      8. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right), t\right)}{\color{blue}{y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) + i}} \]
      9. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right), t\right)}{\color{blue}{\mathsf{fma}\left(y, c + y \cdot \left(b + y \cdot \left(a + y\right)\right), i\right)}} \]
      10. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right), t\right)}{\mathsf{fma}\left(y, \color{blue}{y \cdot \left(b + y \cdot \left(a + y\right)\right) + c}, i\right)} \]
      11. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right), t\right)}{\mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, b + y \cdot \left(a + y\right), c\right)}, i\right)} \]
      12. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right), t\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y \cdot \left(a + y\right) + b}, c\right), i\right)} \]
      13. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right), t\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, a + y, b\right)}, c\right), i\right)} \]
      14. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, z, \frac{54929528941}{2000000}\right), \frac{28832688827}{125000}\right), t\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y + a}, b\right), c\right), i\right)} \]
      15. lower-+.f6486.4

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

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

    if 2.00000000000000003e263 < (/.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 2.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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}\right)\right)} \]
      2. unsub-negN/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      3. lower--.f64N/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      4. lower-/.f64N/A

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

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

      \[\leadsto x - \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x - \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]
      2. sub-negN/A

        \[\leadsto x - \frac{z \cdot \color{blue}{\left(\frac{a}{y} + \left(\mathsf{neg}\left(1\right)\right)\right)}}{y} \]
      3. metadata-evalN/A

        \[\leadsto x - \frac{z \cdot \left(\frac{a}{y} + \color{blue}{-1}\right)}{y} \]
      4. lower-+.f64N/A

        \[\leadsto x - \frac{z \cdot \color{blue}{\left(\frac{a}{y} + -1\right)}}{y} \]
      5. lower-/.f6474.7

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

      \[\leadsto x - \frac{\color{blue}{z \cdot \left(\frac{a}{y} + -1\right)}}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification81.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 2 \cdot 10^{+263}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, z, 27464.7644705\right), 230661.510616\right), t\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot \left(1 - \frac{a}{y}\right)}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 38.4% accurate, 0.7× 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{t + y \cdot 230661.510616}{i}\\ \mathbf{else}:\\ \;\;\;\;\frac{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)
   (/ (+ t (* y 230661.510616)) i)
   (/ 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 = (t + (y * 230661.510616)) / i;
	} else {
		tmp = 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 tmp;
	if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)) <= Double.POSITIVE_INFINITY) {
		tmp = (t + (y * 230661.510616)) / i;
	} else {
		tmp = z / y;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)) <= math.inf:
		tmp = (t + (y * 230661.510616)) / i
	else:
		tmp = 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(Float64(t + Float64(y * 230661.510616)) / i);
	else
		tmp = Float64(z / y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)) <= Inf)
		tmp = (t + (y * 230661.510616)) / i;
	else
		tmp = z / y;
	end
	tmp_2 = 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[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], N[(z / y), $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{t + y \cdot 230661.510616}{i}\\

\mathbf{else}:\\
\;\;\;\;\frac{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 87.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

      \[\leadsto \color{blue}{y \cdot \left(\frac{28832688827}{125000} \cdot \frac{1}{i} - \frac{c \cdot t}{{i}^{2}}\right) + \frac{t}{i}} \]
    4. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{28832688827}{125000} \cdot \frac{1}{i} - \frac{c \cdot t}{{i}^{2}}, \frac{t}{i}\right)} \]
      2. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{28832688827}{125000} \cdot \frac{1}{i} - \frac{c \cdot t}{{i}^{2}}}, \frac{t}{i}\right) \]
      3. associate-*r/N/A

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{\frac{28832688827}{125000} \cdot 1}{i}} - \frac{c \cdot t}{{i}^{2}}, \frac{t}{i}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\color{blue}{\frac{28832688827}{125000}}}{i} - \frac{c \cdot t}{{i}^{2}}, \frac{t}{i}\right) \]
      5. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{\frac{28832688827}{125000}}{i}} - \frac{c \cdot t}{{i}^{2}}, \frac{t}{i}\right) \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\frac{28832688827}{125000}}{i} - \color{blue}{c \cdot \frac{t}{{i}^{2}}}, \frac{t}{i}\right) \]
      7. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\frac{28832688827}{125000}}{i} - \color{blue}{c \cdot \frac{t}{{i}^{2}}}, \frac{t}{i}\right) \]
      8. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\frac{28832688827}{125000}}{i} - c \cdot \color{blue}{\frac{t}{{i}^{2}}}, \frac{t}{i}\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\frac{28832688827}{125000}}{i} - c \cdot \frac{t}{\color{blue}{i \cdot i}}, \frac{t}{i}\right) \]
      10. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\frac{28832688827}{125000}}{i} - c \cdot \frac{t}{\color{blue}{i \cdot i}}, \frac{t}{i}\right) \]
      11. lower-/.f6446.0

        \[\leadsto \mathsf{fma}\left(y, \frac{230661.510616}{i} - c \cdot \frac{t}{i \cdot i}, \color{blue}{\frac{t}{i}}\right) \]
    5. Simplified46.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{230661.510616}{i} - c \cdot \frac{t}{i \cdot i}, \frac{t}{i}\right)} \]
    6. Taylor expanded in i around inf

      \[\leadsto \color{blue}{\frac{t + \frac{28832688827}{125000} \cdot y}{i}} \]
    7. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{t + \frac{28832688827}{125000} \cdot y}{i}} \]
      2. lower-+.f64N/A

        \[\leadsto \frac{\color{blue}{t + \frac{28832688827}{125000} \cdot y}}{i} \]
      3. lower-*.f6449.0

        \[\leadsto \frac{t + \color{blue}{230661.510616 \cdot y}}{i} \]
    8. Simplified49.0%

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

    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 z around inf

      \[\leadsto \color{blue}{\frac{{y}^{3} \cdot z}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{{y}^{3} \cdot z}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{z \cdot {y}^{3}}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{z \cdot {y}^{3}}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      4. cube-multN/A

        \[\leadsto \frac{z \cdot \color{blue}{\left(y \cdot \left(y \cdot y\right)\right)}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      5. unpow2N/A

        \[\leadsto \frac{z \cdot \left(y \cdot \color{blue}{{y}^{2}}\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      6. lower-*.f64N/A

        \[\leadsto \frac{z \cdot \color{blue}{\left(y \cdot {y}^{2}\right)}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      7. unpow2N/A

        \[\leadsto \frac{z \cdot \left(y \cdot \color{blue}{\left(y \cdot y\right)}\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{z \cdot \left(y \cdot \color{blue}{\left(y \cdot y\right)}\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      9. +-commutativeN/A

        \[\leadsto \frac{z \cdot \left(y \cdot \left(y \cdot y\right)\right)}{\color{blue}{y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) + i}} \]
      10. lower-fma.f64N/A

        \[\leadsto \frac{z \cdot \left(y \cdot \left(y \cdot y\right)\right)}{\color{blue}{\mathsf{fma}\left(y, c + y \cdot \left(b + y \cdot \left(a + y\right)\right), i\right)}} \]
      11. +-commutativeN/A

        \[\leadsto \frac{z \cdot \left(y \cdot \left(y \cdot y\right)\right)}{\mathsf{fma}\left(y, \color{blue}{y \cdot \left(b + y \cdot \left(a + y\right)\right) + c}, i\right)} \]
      12. lower-fma.f64N/A

        \[\leadsto \frac{z \cdot \left(y \cdot \left(y \cdot y\right)\right)}{\mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, b + y \cdot \left(a + y\right), c\right)}, i\right)} \]
      13. +-commutativeN/A

        \[\leadsto \frac{z \cdot \left(y \cdot \left(y \cdot y\right)\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y \cdot \left(a + y\right) + b}, c\right), i\right)} \]
      14. lower-fma.f64N/A

        \[\leadsto \frac{z \cdot \left(y \cdot \left(y \cdot y\right)\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, a + y, b\right)}, c\right), i\right)} \]
      15. +-commutativeN/A

        \[\leadsto \frac{z \cdot \left(y \cdot \left(y \cdot y\right)\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y + a}, b\right), c\right), i\right)} \]
      16. lower-+.f640.0

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

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

      \[\leadsto \color{blue}{\frac{z}{y}} \]
    7. Step-by-step derivation
      1. lower-/.f6420.9

        \[\leadsto \color{blue}{\frac{z}{y}} \]
    8. Simplified20.9%

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

    \[\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{t + y \cdot 230661.510616}{i}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 34.9% accurate, 0.8× 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{t}{i}\\ \mathbf{else}:\\ \;\;\;\;\frac{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)
   (/ t i)
   (/ 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 = t / i;
	} else {
		tmp = 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 tmp;
	if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)) <= Double.POSITIVE_INFINITY) {
		tmp = t / i;
	} else {
		tmp = z / y;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)) <= math.inf:
		tmp = t / i
	else:
		tmp = 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(t / i);
	else
		tmp = Float64(z / y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)) <= Inf)
		tmp = t / i;
	else
		tmp = z / y;
	end
	tmp_2 = 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[(t / i), $MachinePrecision], N[(z / y), $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{t}{i}\\

\mathbf{else}:\\
\;\;\;\;\frac{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 87.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

      \[\leadsto \color{blue}{\frac{t}{i}} \]
    4. Step-by-step derivation
      1. lower-/.f6444.8

        \[\leadsto \color{blue}{\frac{t}{i}} \]
    5. Simplified44.8%

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

    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 z around inf

      \[\leadsto \color{blue}{\frac{{y}^{3} \cdot z}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{{y}^{3} \cdot z}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{z \cdot {y}^{3}}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{z \cdot {y}^{3}}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      4. cube-multN/A

        \[\leadsto \frac{z \cdot \color{blue}{\left(y \cdot \left(y \cdot y\right)\right)}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      5. unpow2N/A

        \[\leadsto \frac{z \cdot \left(y \cdot \color{blue}{{y}^{2}}\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      6. lower-*.f64N/A

        \[\leadsto \frac{z \cdot \color{blue}{\left(y \cdot {y}^{2}\right)}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      7. unpow2N/A

        \[\leadsto \frac{z \cdot \left(y \cdot \color{blue}{\left(y \cdot y\right)}\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{z \cdot \left(y \cdot \color{blue}{\left(y \cdot y\right)}\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      9. +-commutativeN/A

        \[\leadsto \frac{z \cdot \left(y \cdot \left(y \cdot y\right)\right)}{\color{blue}{y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) + i}} \]
      10. lower-fma.f64N/A

        \[\leadsto \frac{z \cdot \left(y \cdot \left(y \cdot y\right)\right)}{\color{blue}{\mathsf{fma}\left(y, c + y \cdot \left(b + y \cdot \left(a + y\right)\right), i\right)}} \]
      11. +-commutativeN/A

        \[\leadsto \frac{z \cdot \left(y \cdot \left(y \cdot y\right)\right)}{\mathsf{fma}\left(y, \color{blue}{y \cdot \left(b + y \cdot \left(a + y\right)\right) + c}, i\right)} \]
      12. lower-fma.f64N/A

        \[\leadsto \frac{z \cdot \left(y \cdot \left(y \cdot y\right)\right)}{\mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, b + y \cdot \left(a + y\right), c\right)}, i\right)} \]
      13. +-commutativeN/A

        \[\leadsto \frac{z \cdot \left(y \cdot \left(y \cdot y\right)\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y \cdot \left(a + y\right) + b}, c\right), i\right)} \]
      14. lower-fma.f64N/A

        \[\leadsto \frac{z \cdot \left(y \cdot \left(y \cdot y\right)\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, a + y, b\right)}, c\right), i\right)} \]
      15. +-commutativeN/A

        \[\leadsto \frac{z \cdot \left(y \cdot \left(y \cdot y\right)\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y + a}, b\right), c\right), i\right)} \]
      16. lower-+.f640.0

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

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

      \[\leadsto \color{blue}{\frac{z}{y}} \]
    7. Step-by-step derivation
      1. lower-/.f6420.9

        \[\leadsto \color{blue}{\frac{z}{y}} \]
    8. Simplified20.9%

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

    \[\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{t}{i}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 31.1% accurate, 0.8× 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{t}{i}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{a}\\ \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)
   (/ t i)
   (/ z a)))
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 = t / i;
	} else {
		tmp = z / a;
	}
	return tmp;
}
public static 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.POSITIVE_INFINITY) {
		tmp = t / i;
	} else {
		tmp = z / a;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)) <= math.inf:
		tmp = t / i
	else:
		tmp = z / a
	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(t / i);
	else
		tmp = Float64(z / a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)) <= Inf)
		tmp = t / i;
	else
		tmp = z / a;
	end
	tmp_2 = 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[(t / i), $MachinePrecision], N[(z / a), $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{t}{i}\\

\mathbf{else}:\\
\;\;\;\;\frac{z}{a}\\


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

      \[\leadsto \color{blue}{\frac{t}{i}} \]
    4. Step-by-step derivation
      1. lower-/.f6444.8

        \[\leadsto \color{blue}{\frac{t}{i}} \]
    5. Simplified44.8%

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

    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 z around inf

      \[\leadsto \color{blue}{\frac{{y}^{3} \cdot z}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{{y}^{3} \cdot z}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{z \cdot {y}^{3}}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{z \cdot {y}^{3}}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      4. cube-multN/A

        \[\leadsto \frac{z \cdot \color{blue}{\left(y \cdot \left(y \cdot y\right)\right)}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      5. unpow2N/A

        \[\leadsto \frac{z \cdot \left(y \cdot \color{blue}{{y}^{2}}\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      6. lower-*.f64N/A

        \[\leadsto \frac{z \cdot \color{blue}{\left(y \cdot {y}^{2}\right)}}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      7. unpow2N/A

        \[\leadsto \frac{z \cdot \left(y \cdot \color{blue}{\left(y \cdot y\right)}\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{z \cdot \left(y \cdot \color{blue}{\left(y \cdot y\right)}\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      9. +-commutativeN/A

        \[\leadsto \frac{z \cdot \left(y \cdot \left(y \cdot y\right)\right)}{\color{blue}{y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) + i}} \]
      10. lower-fma.f64N/A

        \[\leadsto \frac{z \cdot \left(y \cdot \left(y \cdot y\right)\right)}{\color{blue}{\mathsf{fma}\left(y, c + y \cdot \left(b + y \cdot \left(a + y\right)\right), i\right)}} \]
      11. +-commutativeN/A

        \[\leadsto \frac{z \cdot \left(y \cdot \left(y \cdot y\right)\right)}{\mathsf{fma}\left(y, \color{blue}{y \cdot \left(b + y \cdot \left(a + y\right)\right) + c}, i\right)} \]
      12. lower-fma.f64N/A

        \[\leadsto \frac{z \cdot \left(y \cdot \left(y \cdot y\right)\right)}{\mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, b + y \cdot \left(a + y\right), c\right)}, i\right)} \]
      13. +-commutativeN/A

        \[\leadsto \frac{z \cdot \left(y \cdot \left(y \cdot y\right)\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y \cdot \left(a + y\right) + b}, c\right), i\right)} \]
      14. lower-fma.f64N/A

        \[\leadsto \frac{z \cdot \left(y \cdot \left(y \cdot y\right)\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, a + y, b\right)}, c\right), i\right)} \]
      15. +-commutativeN/A

        \[\leadsto \frac{z \cdot \left(y \cdot \left(y \cdot y\right)\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y + a}, b\right), c\right), i\right)} \]
      16. lower-+.f640.0

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

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

      \[\leadsto \color{blue}{\frac{z}{a}} \]
    7. Step-by-step derivation
      1. lower-/.f6410.0

        \[\leadsto \color{blue}{\frac{z}{a}} \]
    8. Simplified10.0%

      \[\leadsto \color{blue}{\frac{z}{a}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification31.3%

    \[\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{t}{i}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 76.8% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{z \cdot \left(1 - \frac{a}{y}\right)}{y}\\ \mathbf{if}\;y \leq -8 \cdot 10^{+18}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{+30}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, 230661.510616, t\right)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ x (/ (* z (- 1.0 (/ a y))) y))))
   (if (<= y -8e+18)
     t_1
     (if (<= y 3.3e+30)
       (/ (fma y 230661.510616 t) (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
       t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = x + ((z * (1.0 - (a / y))) / y);
	double tmp;
	if (y <= -8e+18) {
		tmp = t_1;
	} else if (y <= 3.3e+30) {
		tmp = fma(y, 230661.510616, t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x + Float64(Float64(z * Float64(1.0 - Float64(a / y))) / y))
	tmp = 0.0
	if (y <= -8e+18)
		tmp = t_1;
	elseif (y <= 3.3e+30)
		tmp = Float64(fma(y, 230661.510616, t) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z * N[(1.0 - N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8e+18], t$95$1, If[LessEqual[y, 3.3e+30], N[(N[(y * 230661.510616 + 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], t$95$1]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 3.3 \cdot 10^{+30}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, 230661.510616, t\right)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8e18 or 3.30000000000000026e30 < y

    1. Initial program 5.1%

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}\right)\right)} \]
      2. unsub-negN/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      3. lower--.f64N/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      4. lower-/.f64N/A

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

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

      \[\leadsto x - \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x - \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]
      2. sub-negN/A

        \[\leadsto x - \frac{z \cdot \color{blue}{\left(\frac{a}{y} + \left(\mathsf{neg}\left(1\right)\right)\right)}}{y} \]
      3. metadata-evalN/A

        \[\leadsto x - \frac{z \cdot \left(\frac{a}{y} + \color{blue}{-1}\right)}{y} \]
      4. lower-+.f64N/A

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

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

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

    if -8e18 < y < 3.30000000000000026e30

    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

      \[\leadsto \frac{\color{blue}{t + \frac{28832688827}{125000} \cdot y}}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{28832688827}{125000} \cdot y + t}}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{y \cdot \frac{28832688827}{125000}} + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      3. lower-fma.f6487.4

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

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, 230661.510616, t\right)}}{\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.7%

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

Alternative 12: 69.5% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;y \leq 3.3 \cdot 10^{+30}:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8e18 or 3.30000000000000026e30 < y

    1. Initial program 5.1%

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}\right)\right)} \]
      2. unsub-negN/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      3. lower--.f64N/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      4. lower-/.f64N/A

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

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

      \[\leadsto x - \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x - \frac{\color{blue}{z \cdot \left(\frac{a}{y} - 1\right)}}{y} \]
      2. sub-negN/A

        \[\leadsto x - \frac{z \cdot \color{blue}{\left(\frac{a}{y} + \left(\mathsf{neg}\left(1\right)\right)\right)}}{y} \]
      3. metadata-evalN/A

        \[\leadsto x - \frac{z \cdot \left(\frac{a}{y} + \color{blue}{-1}\right)}{y} \]
      4. lower-+.f64N/A

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

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

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

    if -8e18 < y < 3.30000000000000026e30

    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 t around inf

      \[\leadsto \color{blue}{\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
      2. +-commutativeN/A

        \[\leadsto \frac{t}{\color{blue}{y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) + i}} \]
      3. lower-fma.f64N/A

        \[\leadsto \frac{t}{\color{blue}{\mathsf{fma}\left(y, c + y \cdot \left(b + y \cdot \left(a + y\right)\right), i\right)}} \]
      4. +-commutativeN/A

        \[\leadsto \frac{t}{\mathsf{fma}\left(y, \color{blue}{y \cdot \left(b + y \cdot \left(a + y\right)\right) + c}, i\right)} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{t}{\mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, b + y \cdot \left(a + y\right), c\right)}, i\right)} \]
      6. +-commutativeN/A

        \[\leadsto \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y \cdot \left(a + y\right) + b}, c\right), i\right)} \]
      7. lower-fma.f64N/A

        \[\leadsto \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, a + y, b\right)}, c\right), i\right)} \]
      8. +-commutativeN/A

        \[\leadsto \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y + a}, b\right), c\right), i\right)} \]
      9. lower-+.f6473.9

        \[\leadsto \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y + a}, b\right), c\right), i\right)} \]
    5. Simplified73.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{+18}:\\ \;\;\;\;x + \frac{z \cdot \left(1 - \frac{a}{y}\right)}{y}\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{+30}:\\ \;\;\;\;\frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot \left(1 - \frac{a}{y}\right)}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 67.7% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{z - x \cdot a}{y}\\
\mathbf{if}\;y \leq -8 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 3.3 \cdot 10^{+30}:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8e18 or 3.30000000000000026e30 < y

    1. Initial program 5.1%

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}\right)\right)} \]
      2. unsub-negN/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      3. lower--.f64N/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      4. lower-/.f64N/A

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

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

      \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
    7. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
      2. lower-*.f6460.9

        \[\leadsto x - \frac{\color{blue}{a \cdot x} - z}{y} \]
    8. Simplified60.9%

      \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]

    if -8e18 < y < 3.30000000000000026e30

    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 t around inf

      \[\leadsto \color{blue}{\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
      2. +-commutativeN/A

        \[\leadsto \frac{t}{\color{blue}{y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) + i}} \]
      3. lower-fma.f64N/A

        \[\leadsto \frac{t}{\color{blue}{\mathsf{fma}\left(y, c + y \cdot \left(b + y \cdot \left(a + y\right)\right), i\right)}} \]
      4. +-commutativeN/A

        \[\leadsto \frac{t}{\mathsf{fma}\left(y, \color{blue}{y \cdot \left(b + y \cdot \left(a + y\right)\right) + c}, i\right)} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{t}{\mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, b + y \cdot \left(a + y\right), c\right)}, i\right)} \]
      6. +-commutativeN/A

        \[\leadsto \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y \cdot \left(a + y\right) + b}, c\right), i\right)} \]
      7. lower-fma.f64N/A

        \[\leadsto \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, a + y, b\right)}, c\right), i\right)} \]
      8. +-commutativeN/A

        \[\leadsto \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y + a}, b\right), c\right), i\right)} \]
      9. lower-+.f6473.9

        \[\leadsto \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y + a}, b\right), c\right), i\right)} \]
    5. Simplified73.9%

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

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

Alternative 14: 59.8% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{z - x \cdot a}{y}\\
\mathbf{if}\;y \leq -8.2 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.2e16 or 3.1e5 < y

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}\right)\right)} \]
      2. unsub-negN/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      3. lower--.f64N/A

        \[\leadsto \color{blue}{x - \frac{\left(-1 \cdot z + -1 \cdot \frac{\frac{54929528941}{2000000} - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
      4. lower-/.f64N/A

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

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

      \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
    7. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
      2. lower-*.f6457.8

        \[\leadsto x - \frac{\color{blue}{a \cdot x} - z}{y} \]
    8. Simplified57.8%

      \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]

    if -8.2e16 < y < 3.1e5

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{28832688827}{125000} \cdot \frac{1}{i} - \frac{c \cdot t}{{i}^{2}}\right) + \frac{t}{i}} \]
    4. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{28832688827}{125000} \cdot \frac{1}{i} - \frac{c \cdot t}{{i}^{2}}, \frac{t}{i}\right)} \]
      2. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{28832688827}{125000} \cdot \frac{1}{i} - \frac{c \cdot t}{{i}^{2}}}, \frac{t}{i}\right) \]
      3. associate-*r/N/A

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{\frac{28832688827}{125000} \cdot 1}{i}} - \frac{c \cdot t}{{i}^{2}}, \frac{t}{i}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\color{blue}{\frac{28832688827}{125000}}}{i} - \frac{c \cdot t}{{i}^{2}}, \frac{t}{i}\right) \]
      5. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{\frac{28832688827}{125000}}{i}} - \frac{c \cdot t}{{i}^{2}}, \frac{t}{i}\right) \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\frac{28832688827}{125000}}{i} - \color{blue}{c \cdot \frac{t}{{i}^{2}}}, \frac{t}{i}\right) \]
      7. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\frac{28832688827}{125000}}{i} - \color{blue}{c \cdot \frac{t}{{i}^{2}}}, \frac{t}{i}\right) \]
      8. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\frac{28832688827}{125000}}{i} - c \cdot \color{blue}{\frac{t}{{i}^{2}}}, \frac{t}{i}\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\frac{28832688827}{125000}}{i} - c \cdot \frac{t}{\color{blue}{i \cdot i}}, \frac{t}{i}\right) \]
      10. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{\frac{28832688827}{125000}}{i} - c \cdot \frac{t}{\color{blue}{i \cdot i}}, \frac{t}{i}\right) \]
      11. lower-/.f6455.8

        \[\leadsto \mathsf{fma}\left(y, \frac{230661.510616}{i} - c \cdot \frac{t}{i \cdot i}, \color{blue}{\frac{t}{i}}\right) \]
    5. Simplified55.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{230661.510616}{i} - c \cdot \frac{t}{i \cdot i}, \frac{t}{i}\right)} \]
    6. Taylor expanded in i around inf

      \[\leadsto \color{blue}{\frac{t + \frac{28832688827}{125000} \cdot y}{i}} \]
    7. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{t + \frac{28832688827}{125000} \cdot y}{i}} \]
      2. lower-+.f64N/A

        \[\leadsto \frac{\color{blue}{t + \frac{28832688827}{125000} \cdot y}}{i} \]
      3. lower-*.f6459.4

        \[\leadsto \frac{t + \color{blue}{230661.510616 \cdot y}}{i} \]
    8. Simplified59.4%

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

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

Alternative 15: 29.0% accurate, 5.9× speedup?

\[\begin{array}{l} \\ \frac{t}{i} \end{array} \]
(FPCore (x y z t a b c i) :precision binary64 (/ t i))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return t / 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 = t / i
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return t / i;
}
def code(x, y, z, t, a, b, c, i):
	return t / i
function code(x, y, z, t, a, b, c, i)
	return Float64(t / i)
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = t / i;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(t / i), $MachinePrecision]
\begin{array}{l}

\\
\frac{t}{i}
\end{array}
Derivation
  1. Initial program 53.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

    \[\leadsto \color{blue}{\frac{t}{i}} \]
  4. Step-by-step derivation
    1. lower-/.f6429.0

      \[\leadsto \color{blue}{\frac{t}{i}} \]
  5. Simplified29.0%

    \[\leadsto \color{blue}{\frac{t}{i}} \]
  6. Add Preprocessing

Reproduce

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