Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2

Percentage Accurate: 56.4% → 84.0%
Time: 19.3s
Alternatives: 15
Speedup: 1.3×

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: 84.0% 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{x \cdot a - z}{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 (/ (- (* x a) z) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 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 - (((x * a) - z) / 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(Float64(x * a) - z) / 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[(N[(x * a), $MachinePrecision] - z), $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{x \cdot a - z}{y}\\


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

    1. Initial program 89.6%

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

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

      \[\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-sqrN/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}{{y}^{2} \cdot {y}^{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)} \cdot {y}^{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. 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{\left(y \cdot y\right) \cdot \color{blue}{\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) \]
      5. 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}{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. *-lowering-*.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}{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) \]
      7. *-lowering-*.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}{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) \]
      8. /-lowering-/.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, \left(y \cdot y\right) \cdot \color{blue}{\frac{y \cdot y}{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) \]
      9. *-lowering-*.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, \left(y \cdot y\right) \cdot \frac{\color{blue}{y \cdot y}}{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) \]
      10. accelerator-lowering-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, \left(y \cdot y\right) \cdot \frac{y \cdot y}{\color{blue}{\mathsf{fma}\left(y, y \cdot \left(y \cdot \left(y + a\right) + b\right) + c, 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) \]
      11. accelerator-lowering-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, \left(y \cdot y\right) \cdot \frac{y \cdot y}{\mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, y \cdot \left(y + a\right) + b, 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. accelerator-lowering-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, \left(y \cdot y\right) \cdot \frac{y \cdot y}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{\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. +-lowering-+.f6492.5

        \[\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 \frac{y \cdot y}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{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.5%

      \[\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. --lowering--.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. /-lowering-/.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 y around inf

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

        \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
      2. *-lowering-*.f6466.0

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

      \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification82.7%

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

Alternative 2: 66.8% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\\
t_2 := \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\_2 \leq -1 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 10^{-209}:\\
\;\;\;\;\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)}{i}\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x - \frac{x \cdot a - z}{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)) < -1.0000000000000001e-33 or 1e-209 < (/.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 88.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 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. /-lowering-/.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. accelerator-lowering-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. accelerator-lowering-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. accelerator-lowering-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. +-lowering-+.f6463.5

        \[\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. Simplified63.5%

      \[\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)}} \]

    if -1.0000000000000001e-33 < (/.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)) < 1e-209

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

      \[\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}} \]
    4. Step-by-step derivation
      1. /-lowering-/.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}} \]
      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} \]
      3. accelerator-lowering-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} \]
      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} \]
      5. accelerator-lowering-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} \]
      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} \]
      7. accelerator-lowering-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} \]
      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} \]
      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} \]
      10. accelerator-lowering-fma.f6461.7

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

      \[\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)}{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 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. --lowering--.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. /-lowering-/.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 y around inf

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

        \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
      2. *-lowering-*.f6466.0

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

      \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification64.0%

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

Alternative 3: 83.7% 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 \infty:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{1}{\frac{t\_1}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right)}}, \frac{t}{t\_1}\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x \cdot a - z}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (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
      (/ 1.0 (/ t_1 (fma y (fma y (fma y x z) 27464.7644705) 230661.510616)))
      (/ t t_1))
     (- x (/ (- (* x a) z) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 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, (1.0 / (t_1 / fma(y, fma(y, fma(y, x, z), 27464.7644705), 230661.510616))), (t / t_1));
	} else {
		tmp = x - (((x * a) - z) / 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(1.0 / Float64(t_1 / fma(y, fma(y, fma(y, x, z), 27464.7644705), 230661.510616))), Float64(t / t_1));
	else
		tmp = Float64(x - Float64(Float64(Float64(x * a) - z) / 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[(1.0 / N[(t$95$1 / N[(y * N[(y * N[(y * x + z), $MachinePrecision] + 27464.7644705), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(x * a), $MachinePrecision] - z), $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{1}{\frac{t\_1}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right)}}, \frac{t}{t\_1}\right)\\

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


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

    1. Initial program 89.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 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. accelerator-lowering-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.4%

      \[\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)} \]
    6. Step-by-step derivation
      1. clear-numN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, \frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(y, y \cdot x + z, \frac{54929528941}{2000000}\right)}, \frac{28832688827}{125000}\right)}}, \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\right) \]
      10. accelerator-lowering-fma.f6491.4

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

      \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\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 +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. --lowering--.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. /-lowering-/.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 y around inf

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

        \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
      2. *-lowering-*.f6466.0

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

      \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification82.0%

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

Alternative 4: 83.7% 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 \infty:\\ \;\;\;\;\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{x \cdot a - z}{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 (fma y x z) 27464.7644705) 230661.510616) t_1)
      (/ t t_1))
     (- x (/ (- (* x a) z) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 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, fma(y, x, z), 27464.7644705), 230661.510616) / t_1), (t / t_1));
	} else {
		tmp = x - (((x * a) - z) / 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, fma(y, x, z), 27464.7644705), 230661.510616) / t_1), Float64(t / t_1));
	else
		tmp = Float64(x - Float64(Float64(Float64(x * a) - z) / 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 * 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[(N[(x * a), $MachinePrecision] - z), $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, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right)}{t\_1}, \frac{t}{t\_1}\right)\\

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


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

    1. Initial program 89.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 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. accelerator-lowering-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.4%

      \[\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 +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. --lowering--.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. /-lowering-/.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 y around inf

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

        \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
      2. *-lowering-*.f6466.0

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

      \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification82.0%

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

Alternative 5: 83.2% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 89.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. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(\left(\frac{y}{\color{blue}{\frac{1}{x \cdot y + z}}} + \frac{54929528941}{2000000}\right) \cdot y + \frac{28832688827}{125000}\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      9. accelerator-lowering-fma.f6489.6

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

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

    if +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. --lowering--.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. /-lowering-/.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 y around inf

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

        \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
      2. *-lowering-*.f6466.0

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

      \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.9%

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

Alternative 6: 83.2% accurate, 0.5× speedup?

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

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

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


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

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

    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. --lowering--.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. /-lowering-/.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 y around inf

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

        \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
      2. *-lowering-*.f6466.0

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

      \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.9%

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

Alternative 7: 83.1% 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 \infty:\\ \;\;\;\;\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{x \cdot a - z}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<=
      (/
       (+
        (* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
        t)
       (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
      INFINITY)
   (*
    (fma 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 (/ (- (* x a) z) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)) <= ((double) INFINITY)) {
		tmp = fma(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 - (((x * a) - z) / y);
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)) <= Inf)
		tmp = Float64(fma(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(Float64(x * a) - z) / y));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(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[(N[(x * a), $MachinePrecision] - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i} \leq \infty:\\
\;\;\;\;\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{x \cdot a - z}{y}\\


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

    1. Initial program 89.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. Step-by-step derivation
      1. div-invN/A

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

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

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

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

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

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

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

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

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

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

      \[\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 +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. --lowering--.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. /-lowering-/.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 y around inf

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

        \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
      2. *-lowering-*.f6466.0

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

      \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.8%

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

Alternative 8: 79.5% 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 \infty:\\ \;\;\;\;\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{x \cdot a - z}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<=
      (/
       (+
        (* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
        t)
       (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
      INFINITY)
   (/
    (fma 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 (/ (- (* x a) z) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)) <= ((double) INFINITY)) {
		tmp = fma(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 - (((x * a) - z) / y);
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)) <= Inf)
		tmp = Float64(fma(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(Float64(x * a) - z) / y));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(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[(N[(x * a), $MachinePrecision] - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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


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

    1. Initial program 89.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 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. /-lowering-/.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. accelerator-lowering-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. accelerator-lowering-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. accelerator-lowering-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. accelerator-lowering-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. accelerator-lowering-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. accelerator-lowering-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. accelerator-lowering-fma.f6486.6

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

      \[\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 +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. --lowering--.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. /-lowering-/.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 y around inf

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

        \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
      2. *-lowering-*.f6466.0

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

      \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification78.9%

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

Alternative 9: 78.8% 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 \infty:\\ \;\;\;\;\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{x \cdot a - z}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<=
      (/
       (+
        (* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
        t)
       (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
      INFINITY)
   (/
    (fma y (fma y (fma y z 27464.7644705) 230661.510616) t)
    (fma y (fma y (fma y (+ y a) b) c) i))
   (- x (/ (- (* x a) z) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((((y * ((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) / fma(y, fma(y, fma(y, (y + a), b), c), i);
	} else {
		tmp = x - (((x * a) - z) / y);
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)) <= Inf)
		tmp = Float64(fma(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(Float64(x * a) - z) / y));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(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[(N[(x * a), $MachinePrecision] - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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


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

    1. Initial program 89.6%

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

      \[\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. /-lowering-/.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. accelerator-lowering-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. accelerator-lowering-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. accelerator-lowering-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. accelerator-lowering-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. accelerator-lowering-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. accelerator-lowering-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. +-lowering-+.f6481.3

        \[\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. Simplified81.3%

      \[\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 +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. --lowering--.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. /-lowering-/.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 y around inf

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

        \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
      2. *-lowering-*.f6466.0

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

      \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification75.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{\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{x \cdot a - z}{y}\\ \end{array} \]
  5. Add Preprocessing

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

\\
\begin{array}{l}
\mathbf{if}\;\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}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\\

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


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

    1. Initial program 89.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. /-lowering-/.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. accelerator-lowering-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. accelerator-lowering-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. accelerator-lowering-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. +-lowering-+.f6457.3

        \[\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. Simplified57.3%

      \[\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)}} \]

    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. --lowering--.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. /-lowering-/.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 y around inf

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

        \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
      2. *-lowering-*.f6466.0

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

      \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.5%

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

Alternative 11: 50.2% 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}:\\ \;\;\;\;x\\ \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)
   x))
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 = x;
	}
	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 = x;
	}
	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 = x
	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 = x;
	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 = x;
	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], x]
\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}:\\
\;\;\;\;x\\


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

    1. Initial program 89.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 \color{blue}{\frac{t}{i}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f6440.3

        \[\leadsto \color{blue}{\frac{t}{i}} \]
    5. Simplified40.3%

      \[\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 y around inf

      \[\leadsto \color{blue}{x} \]
    4. Step-by-step derivation
      1. Simplified51.5%

        \[\leadsto \color{blue}{x} \]
    5. Recombined 2 regimes into one program.
    6. Final simplification44.5%

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

    Alternative 12: 73.0% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{x \cdot a - z}{y}\\ \mathbf{if}\;y \leq -1.6 \cdot 10^{+98}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -550000:\\ \;\;\;\;\left(y \cdot y\right) \cdot \left(\frac{x}{b} + \frac{z}{y \cdot b}\right)\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{+38}:\\ \;\;\;\;\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 (/ (- (* x a) z) y))))
       (if (<= y -1.6e+98)
         t_1
         (if (<= y -550000.0)
           (* (* y y) (+ (/ x b) (/ z (* y b))))
           (if (<= y 2.7e+38)
             (/
              (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 - (((x * a) - z) / y);
    	double tmp;
    	if (y <= -1.6e+98) {
    		tmp = t_1;
    	} else if (y <= -550000.0) {
    		tmp = (y * y) * ((x / b) + (z / (y * b)));
    	} else if (y <= 2.7e+38) {
    		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(Float64(x * a) - z) / y))
    	tmp = 0.0
    	if (y <= -1.6e+98)
    		tmp = t_1;
    	elseif (y <= -550000.0)
    		tmp = Float64(Float64(y * y) * Float64(Float64(x / b) + Float64(z / Float64(y * b))));
    	elseif (y <= 2.7e+38)
    		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[(N[(x * a), $MachinePrecision] - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.6e+98], t$95$1, If[LessEqual[y, -550000.0], N[(N[(y * y), $MachinePrecision] * N[(N[(x / b), $MachinePrecision] + N[(z / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e+38], 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{x \cdot a - z}{y}\\
    \mathbf{if}\;y \leq -1.6 \cdot 10^{+98}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;y \leq -550000:\\
    \;\;\;\;\left(y \cdot y\right) \cdot \left(\frac{x}{b} + \frac{z}{y \cdot b}\right)\\
    
    \mathbf{elif}\;y \leq 2.7 \cdot 10^{+38}:\\
    \;\;\;\;\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 3 regimes
    2. if y < -1.6000000000000001e98 or 2.69999999999999996e38 < y

      1. Initial program 5.4%

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

        \[\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. --lowering--.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. /-lowering-/.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.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 y around inf

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

          \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
        2. *-lowering-*.f6466.3

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

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

      if -1.6000000000000001e98 < y < -5.5e5

      1. Initial program 37.7%

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

        \[\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)}{b \cdot {y}^{2}}} \]
      4. Step-by-step derivation
        1. /-lowering-/.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)}{b \cdot {y}^{2}}} \]
        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}}{b \cdot {y}^{2}} \]
        3. accelerator-lowering-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)}}{b \cdot {y}^{2}} \]
        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)}{b \cdot {y}^{2}} \]
        5. accelerator-lowering-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)}{b \cdot {y}^{2}} \]
        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)}{b \cdot {y}^{2}} \]
        7. accelerator-lowering-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)}{b \cdot {y}^{2}} \]
        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)}{b \cdot {y}^{2}} \]
        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)}{b \cdot {y}^{2}} \]
        10. accelerator-lowering-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)}{b \cdot {y}^{2}} \]
        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}^{2} \cdot b}} \]
        12. *-lowering-*.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}{{y}^{2} \cdot b}} \]
        13. 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)}{\color{blue}{\left(y \cdot y\right)} \cdot b} \]
        14. *-lowering-*.f6411.6

          \[\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)}{\color{blue}{\left(y \cdot y\right)} \cdot b} \]
      5. Simplified11.6%

        \[\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)}{\left(y \cdot y\right) \cdot b}} \]
      6. Taylor expanded in y around inf

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

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

          \[\leadsto \color{blue}{\left(y \cdot y\right)} \cdot \left(\frac{x}{b} + \frac{z}{b \cdot y}\right) \]
        3. *-lowering-*.f64N/A

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

          \[\leadsto \left(y \cdot y\right) \cdot \color{blue}{\left(\frac{x}{b} + \frac{z}{b \cdot y}\right)} \]
        5. /-lowering-/.f64N/A

          \[\leadsto \left(y \cdot y\right) \cdot \left(\color{blue}{\frac{x}{b}} + \frac{z}{b \cdot y}\right) \]
        6. /-lowering-/.f64N/A

          \[\leadsto \left(y \cdot y\right) \cdot \left(\frac{x}{b} + \color{blue}{\frac{z}{b \cdot y}}\right) \]
        7. *-commutativeN/A

          \[\leadsto \left(y \cdot y\right) \cdot \left(\frac{x}{b} + \frac{z}{\color{blue}{y \cdot b}}\right) \]
        8. *-lowering-*.f6437.7

          \[\leadsto \left(y \cdot y\right) \cdot \left(\frac{x}{b} + \frac{z}{\color{blue}{y \cdot b}}\right) \]
      8. Simplified37.7%

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

      if -5.5e5 < y < 2.69999999999999996e38

      1. Initial program 98.1%

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

        \[\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. accelerator-lowering-fma.f6483.9

          \[\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. Simplified83.9%

        \[\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 3 regimes into one program.
    4. Final simplification73.0%

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

    Alternative 13: 66.2% accurate, 1.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{x \cdot a - z}{y}\\ \mathbf{if}\;y \leq -1.6 \cdot 10^{+98}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -24500:\\ \;\;\;\;\left(y \cdot y\right) \cdot \left(\frac{x}{b} + \frac{z}{y \cdot b}\right)\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+38}:\\ \;\;\;\;\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 (/ (- (* x a) z) y))))
       (if (<= y -1.6e+98)
         t_1
         (if (<= y -24500.0)
           (* (* y y) (+ (/ x b) (/ z (* y b))))
           (if (<= y 1.7e+38) (/ 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 - (((x * a) - z) / y);
    	double tmp;
    	if (y <= -1.6e+98) {
    		tmp = t_1;
    	} else if (y <= -24500.0) {
    		tmp = (y * y) * ((x / b) + (z / (y * b)));
    	} else if (y <= 1.7e+38) {
    		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(Float64(x * a) - z) / y))
    	tmp = 0.0
    	if (y <= -1.6e+98)
    		tmp = t_1;
    	elseif (y <= -24500.0)
    		tmp = Float64(Float64(y * y) * Float64(Float64(x / b) + Float64(z / Float64(y * b))));
    	elseif (y <= 1.7e+38)
    		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[(N[(x * a), $MachinePrecision] - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.6e+98], t$95$1, If[LessEqual[y, -24500.0], N[(N[(y * y), $MachinePrecision] * N[(N[(x / b), $MachinePrecision] + N[(z / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e+38], 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{x \cdot a - z}{y}\\
    \mathbf{if}\;y \leq -1.6 \cdot 10^{+98}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;y \leq -24500:\\
    \;\;\;\;\left(y \cdot y\right) \cdot \left(\frac{x}{b} + \frac{z}{y \cdot b}\right)\\
    
    \mathbf{elif}\;y \leq 1.7 \cdot 10^{+38}:\\
    \;\;\;\;\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 3 regimes
    2. if y < -1.6000000000000001e98 or 1.69999999999999998e38 < y

      1. Initial program 5.4%

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

        \[\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. --lowering--.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. /-lowering-/.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.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 y around inf

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

          \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
        2. *-lowering-*.f6466.3

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

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

      if -1.6000000000000001e98 < y < -24500

      1. Initial program 37.7%

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

        \[\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)}{b \cdot {y}^{2}}} \]
      4. Step-by-step derivation
        1. /-lowering-/.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)}{b \cdot {y}^{2}}} \]
        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}}{b \cdot {y}^{2}} \]
        3. accelerator-lowering-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)}}{b \cdot {y}^{2}} \]
        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)}{b \cdot {y}^{2}} \]
        5. accelerator-lowering-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)}{b \cdot {y}^{2}} \]
        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)}{b \cdot {y}^{2}} \]
        7. accelerator-lowering-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)}{b \cdot {y}^{2}} \]
        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)}{b \cdot {y}^{2}} \]
        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)}{b \cdot {y}^{2}} \]
        10. accelerator-lowering-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)}{b \cdot {y}^{2}} \]
        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}^{2} \cdot b}} \]
        12. *-lowering-*.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}{{y}^{2} \cdot b}} \]
        13. 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)}{\color{blue}{\left(y \cdot y\right)} \cdot b} \]
        14. *-lowering-*.f6411.6

          \[\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)}{\color{blue}{\left(y \cdot y\right)} \cdot b} \]
      5. Simplified11.6%

        \[\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)}{\left(y \cdot y\right) \cdot b}} \]
      6. Taylor expanded in y around inf

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

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

          \[\leadsto \color{blue}{\left(y \cdot y\right)} \cdot \left(\frac{x}{b} + \frac{z}{b \cdot y}\right) \]
        3. *-lowering-*.f64N/A

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

          \[\leadsto \left(y \cdot y\right) \cdot \color{blue}{\left(\frac{x}{b} + \frac{z}{b \cdot y}\right)} \]
        5. /-lowering-/.f64N/A

          \[\leadsto \left(y \cdot y\right) \cdot \left(\color{blue}{\frac{x}{b}} + \frac{z}{b \cdot y}\right) \]
        6. /-lowering-/.f64N/A

          \[\leadsto \left(y \cdot y\right) \cdot \left(\frac{x}{b} + \color{blue}{\frac{z}{b \cdot y}}\right) \]
        7. *-commutativeN/A

          \[\leadsto \left(y \cdot y\right) \cdot \left(\frac{x}{b} + \frac{z}{\color{blue}{y \cdot b}}\right) \]
        8. *-lowering-*.f6437.7

          \[\leadsto \left(y \cdot y\right) \cdot \left(\frac{x}{b} + \frac{z}{\color{blue}{y \cdot b}}\right) \]
      8. Simplified37.7%

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

      if -24500 < y < 1.69999999999999998e38

      1. Initial program 98.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 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. /-lowering-/.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. accelerator-lowering-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. accelerator-lowering-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. accelerator-lowering-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. +-lowering-+.f6467.2

          \[\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. Simplified67.2%

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

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

    Alternative 14: 56.0% accurate, 2.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{x \cdot a - z}{y}\\ \mathbf{if}\;y \leq -9 \cdot 10^{-16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-5}:\\ \;\;\;\;\frac{t}{i}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b c i)
     :precision binary64
     (let* ((t_1 (- x (/ (- (* x a) z) y))))
       (if (<= y -9e-16) t_1 (if (<= y 8e-5) (/ t 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 - (((x * a) - z) / y);
    	double tmp;
    	if (y <= -9e-16) {
    		tmp = t_1;
    	} else if (y <= 8e-5) {
    		tmp = t / 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 - (((x * a) - z) / y)
        if (y <= (-9d-16)) then
            tmp = t_1
        else if (y <= 8d-5) then
            tmp = t / 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 - (((x * a) - z) / y);
    	double tmp;
    	if (y <= -9e-16) {
    		tmp = t_1;
    	} else if (y <= 8e-5) {
    		tmp = t / i;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b, c, i):
    	t_1 = x - (((x * a) - z) / y)
    	tmp = 0
    	if y <= -9e-16:
    		tmp = t_1
    	elif y <= 8e-5:
    		tmp = t / i
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a, b, c, i)
    	t_1 = Float64(x - Float64(Float64(Float64(x * a) - z) / y))
    	tmp = 0.0
    	if (y <= -9e-16)
    		tmp = t_1;
    	elseif (y <= 8e-5)
    		tmp = Float64(t / i);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b, c, i)
    	t_1 = x - (((x * a) - z) / y);
    	tmp = 0.0;
    	if (y <= -9e-16)
    		tmp = t_1;
    	elseif (y <= 8e-5)
    		tmp = t / 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[(N[(x * a), $MachinePrecision] - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9e-16], t$95$1, If[LessEqual[y, 8e-5], N[(t / i), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := x - \frac{x \cdot a - z}{y}\\
    \mathbf{if}\;y \leq -9 \cdot 10^{-16}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;y \leq 8 \cdot 10^{-5}:\\
    \;\;\;\;\frac{t}{i}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < -9.0000000000000003e-16 or 8.00000000000000065e-5 < y

      1. Initial program 19.4%

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

        \[\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. --lowering--.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. /-lowering-/.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. Simplified43.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. --lowering--.f64N/A

          \[\leadsto x - \frac{\color{blue}{a \cdot x - z}}{y} \]
        2. *-lowering-*.f6452.6

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

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

      if -9.0000000000000003e-16 < y < 8.00000000000000065e-5

      1. Initial program 99.6%

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

        \[\leadsto \color{blue}{\frac{t}{i}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f6453.2

          \[\leadsto \color{blue}{\frac{t}{i}} \]
      5. Simplified53.2%

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

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

    Alternative 15: 26.1% accurate, 71.0× speedup?

    \[\begin{array}{l} \\ x \end{array} \]
    (FPCore (x y z t a b c i) :precision binary64 x)
    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
    	return x;
    }
    
    real(8) function code(x, y, z, t, a, b, c, i)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        real(8), intent (in) :: i
        code = x
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
    	return x;
    }
    
    def code(x, y, z, t, a, b, c, i):
    	return x
    
    function code(x, y, z, t, a, b, c, i)
    	return x
    end
    
    function tmp = code(x, y, z, t, a, b, c, i)
    	tmp = x;
    end
    
    code[x_, y_, z_, t_, a_, b_, c_, i_] := x
    
    \begin{array}{l}
    
    \\
    x
    \end{array}
    
    Derivation
    1. Initial program 56.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} \]
    4. Step-by-step derivation
      1. Simplified22.7%

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

      Reproduce

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