Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2

Percentage Accurate: 56.9% → 82.7%
Time: 22.0s
Alternatives: 15
Speedup: 1.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 56.9% 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: 82.7% accurate, 0.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x + \frac{z - x \cdot a}{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)) < 4.99999999999999993e306

    1. Initial program 96.5%

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

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

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

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

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

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

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

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

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

    if 4.99999999999999993e306 < (/.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 1.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 55.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - a \cdot x}{y}} \]
    10. Simplified69.7%

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

Alternative 2: 82.6% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x + \frac{z - x \cdot a}{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)) < 4.99999999999999993e306

    1. Initial program 96.5%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative96.5%

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

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

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

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

    if 4.99999999999999993e306 < (/.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 1.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 55.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - a \cdot x}{y}} \]
    10. Simplified69.7%

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

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

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

\mathbf{else}:\\
\;\;\;\;x + \frac{z - x \cdot a}{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)) < 4.99999999999999993e306

    1. Initial program 96.5%

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

    if 4.99999999999999993e306 < (/.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 1.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 55.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - a \cdot x}{y}} \]
    10. Simplified69.7%

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

Alternative 4: 79.7% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.1999999999999999e52 or 1.85e28 < y

    1. Initial program 4.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. Step-by-step derivation
      1. fma-define4.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 55.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - a \cdot x}{y}} \]
    10. Simplified68.4%

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

    if -8.1999999999999999e52 < y < 1.85e28

    1. Initial program 98.3%

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

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

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

Alternative 5: 78.5% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -150 or 7.40000000000000017e34 < y

    1. Initial program 11.1%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 55.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - a \cdot x}{y}} \]
    10. Simplified66.6%

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

    if -150 < y < 7.40000000000000017e34

    1. Initial program 98.3%

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

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

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

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

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

Alternative 6: 77.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{+52} \lor \neg \left(y \leq 1.85 \cdot 10^{+28}\right):\\
\;\;\;\;x + \frac{z - x \cdot a}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.6e52 or 1.85e28 < y

    1. Initial program 4.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. Step-by-step derivation
      1. fma-define4.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 55.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - a \cdot x}{y}} \]
    10. Simplified68.4%

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

    if -4.6e52 < y < 1.85e28

    1. Initial program 98.3%

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

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

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

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

Alternative 7: 76.3% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -150 or 2.2e36 < y

    1. Initial program 11.1%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 56.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - a \cdot x}{y}} \]
    10. Simplified67.1%

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

    if -150 < y < 2.2e36

    1. Initial program 97.6%

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

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

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

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

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

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

Alternative 8: 74.8% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -130 or 5.5999999999999999e41 < y

    1. Initial program 11.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. Step-by-step derivation
      1. fma-define11.3%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 57.6%

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

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

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

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

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

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

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

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

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

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

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

    if -130 < y < 5.5999999999999999e41

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

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

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

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

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

Alternative 9: 73.1% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.7000000000000002 or 4.5999999999999997e41 < y

    1. Initial program 11.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. Step-by-step derivation
      1. fma-define11.3%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 57.6%

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

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

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

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

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

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

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

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

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

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

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

    if -2.7000000000000002 < y < 4.5999999999999997e41

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

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

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

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

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

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

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

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

Alternative 10: 55.8% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{z - x \cdot a}{y}\\ \mathbf{if}\;y \leq -5.5 \cdot 10^{-13}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -7.2 \cdot 10^{-113}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot c}\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{+25}:\\ \;\;\;\;\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 (/ (- z (* x a)) y))))
   (if (<= y -5.5e-13)
     t_1
     (if (<= y -7.2e-113)
       (/ (+ t (* y 230661.510616)) (* y c))
       (if (<= y 1.6e+25) (/ 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 + ((z - (x * a)) / y);
	double tmp;
	if (y <= -5.5e-13) {
		tmp = t_1;
	} else if (y <= -7.2e-113) {
		tmp = (t + (y * 230661.510616)) / (y * c);
	} else if (y <= 1.6e+25) {
		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 + ((z - (x * a)) / y)
    if (y <= (-5.5d-13)) then
        tmp = t_1
    else if (y <= (-7.2d-113)) then
        tmp = (t + (y * 230661.510616d0)) / (y * c)
    else if (y <= 1.6d+25) 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 + ((z - (x * a)) / y);
	double tmp;
	if (y <= -5.5e-13) {
		tmp = t_1;
	} else if (y <= -7.2e-113) {
		tmp = (t + (y * 230661.510616)) / (y * c);
	} else if (y <= 1.6e+25) {
		tmp = t / i;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = x + ((z - (x * a)) / y)
	tmp = 0
	if y <= -5.5e-13:
		tmp = t_1
	elif y <= -7.2e-113:
		tmp = (t + (y * 230661.510616)) / (y * c)
	elif y <= 1.6e+25:
		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(z - Float64(x * a)) / y))
	tmp = 0.0
	if (y <= -5.5e-13)
		tmp = t_1;
	elseif (y <= -7.2e-113)
		tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(y * c));
	elseif (y <= 1.6e+25)
		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 + ((z - (x * a)) / y);
	tmp = 0.0;
	if (y <= -5.5e-13)
		tmp = t_1;
	elseif (y <= -7.2e-113)
		tmp = (t + (y * 230661.510616)) / (y * c);
	elseif (y <= 1.6e+25)
		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[(z - N[(x * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e-13], t$95$1, If[LessEqual[y, -7.2e-113], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(y * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e+25], N[(t / i), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -7.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot c}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.49999999999999979e-13 or 1.6e25 < y

    1. Initial program 15.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. Step-by-step derivation
      1. fma-define15.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 52.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - a \cdot x}{y}} \]
    10. Simplified62.2%

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

    if -5.49999999999999979e-13 < y < -7.1999999999999995e-113

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in c around inf 38.2%

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

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

    if -7.1999999999999995e-113 < y < 1.6e25

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{z - x \cdot a}{y}\\ \mathbf{elif}\;y \leq -7.2 \cdot 10^{-113}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot c}\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{+25}:\\ \;\;\;\;\frac{t}{i}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - x \cdot a}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 66.7% accurate, 1.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -140 or 1.2999999999999999e24 < y

    1. Initial program 12.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. Step-by-step derivation
      1. fma-define12.4%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 54.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - a \cdot x}{y}} \]
    10. Simplified64.6%

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

    if -140 < y < 1.2999999999999999e24

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

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

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

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

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

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

Alternative 12: 50.5% accurate, 1.6× speedup?

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

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

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

\mathbf{elif}\;y \leq 2.9 \cdot 10^{+120}:\\
\;\;\;\;x \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -160 or 2.9000000000000001e120 < y

    1. Initial program 10.5%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 60.4%

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

    if -160 < y < 5.2e29

    1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

    if 5.2e29 < y < 2.9000000000000001e120

    1. Initial program 14.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. Step-by-step derivation
      1. fma-define14.7%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 26.4%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*39.6%

        \[\leadsto \color{blue}{x \cdot \frac{y}{a}} \]
    9. Simplified39.6%

      \[\leadsto \color{blue}{x \cdot \frac{y}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 13: 56.2% accurate, 1.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -48 or 1.35e25 < y

    1. Initial program 12.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. Step-by-step derivation
      1. fma-define12.4%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 54.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - a \cdot x}{y}} \]
    10. Simplified64.6%

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

    if -48 < y < 1.35e25

    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. Step-by-step derivation
      1. fma-define99.6%

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

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

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

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

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

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

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

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

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

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

Alternative 14: 50.6% accurate, 2.5× speedup?

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

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

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

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


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

    1. Initial program 16.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. Step-by-step derivation
      1. fma-define16.4%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 50.2%

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

    if -200 < y < 1.75000000000000008e-19

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

Alternative 15: 25.1% accurate, 33.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 57.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. Step-by-step derivation
    1. fma-define57.4%

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}} \]
  4. Add Preprocessing
  5. Taylor expanded in y around inf 27.4%

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

Reproduce

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