Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2

Percentage Accurate: 56.1% → 85.2%
Time: 8.1s
Alternatives: 20
Speedup: 3.2×

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);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
    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}

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 20 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.1% 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);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

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

Alternative 1: 85.2% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)\\
\mathbf{if}\;y \leq -7 \cdot 10^{+53}:\\
\;\;\;\;\left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x\\

\mathbf{elif}\;y \leq 2.05 \cdot 10^{+61}:\\
\;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(230661.510616, \frac{1}{t\_1}, \frac{\mathsf{fma}\left(y, 27464.7644705 + x \cdot \left(y \cdot y\right), \left(y \cdot y\right) \cdot z\right)}{t\_1}\right), \frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\right)\\

\mathbf{else}:\\
\;\;\;\;x + \frac{z}{y}\\


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

    1. Initial program 3.0%

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

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

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

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

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

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

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

        \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
      3. lower-/.f6472.0

        \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
    7. Applied rewrites72.0%

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

    if -7.00000000000000038e53 < y < 2.04999999999999986e61

    1. Initial program 93.0%

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

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

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

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

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

    if 2.04999999999999986e61 < y

    1. Initial program 1.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. Taylor expanded in a around 0

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

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

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

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

        \[\leadsto x + \frac{z}{\color{blue}{y}} \]
      2. lower-/.f6473.6

        \[\leadsto x + \frac{z}{y} \]
    7. Applied rewrites73.6%

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

Alternative 2: 85.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)\\
\mathbf{if}\;y \leq -7 \cdot 10^{+53}:\\
\;\;\;\;\left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x\\

\mathbf{elif}\;y \leq 2.05 \cdot 10^{+61}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right), y, 230661.510616\right)}{t\_1}, \frac{t}{t\_1}\right)\\

\mathbf{else}:\\
\;\;\;\;x + \frac{z}{y}\\


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

    1. Initial program 3.0%

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

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

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

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

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

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

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

        \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
      3. lower-/.f6472.0

        \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
    7. Applied rewrites72.0%

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

    if -7.00000000000000038e53 < y < 2.04999999999999986e61

    1. Initial program 93.0%

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

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

    if 2.04999999999999986e61 < y

    1. Initial program 1.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. Taylor expanded in a around 0

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

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

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

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

        \[\leadsto x + \frac{z}{\color{blue}{y}} \]
      2. lower-/.f6473.6

        \[\leadsto x + \frac{z}{y} \]
    7. Applied rewrites73.6%

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

Alternative 3: 84.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq 4.8 \cdot 10^{+56}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right), x, \mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right) \cdot y\right) + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{z}{y}\\


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

    1. Initial program 3.0%

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

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

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

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

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

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

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

        \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
      3. lower-/.f6471.9

        \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
    7. Applied rewrites71.9%

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

    if -5.49999999999999975e53 < y < 4.80000000000000027e56

    1. Initial program 93.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. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right), x, \mathsf{fma}\left(z \cdot y + \frac{54929528941}{2000000}, y, \frac{28832688827}{125000}\right) \cdot y\right) + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      18. lower-fma.f6493.4

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

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

    if 4.80000000000000027e56 < y

    1. Initial program 1.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. Taylor expanded in a around 0

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

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

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

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

        \[\leadsto x + \frac{z}{\color{blue}{y}} \]
      2. lower-/.f6472.9

        \[\leadsto x + \frac{z}{y} \]
    7. Applied rewrites72.9%

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

Alternative 4: 84.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq 4.8 \cdot 10^{+56}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, 230661.510616, \left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right) \cdot y\right) \cdot y\right) + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{z}{y}\\


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

    1. Initial program 3.0%

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

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

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

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

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

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

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

        \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
      3. lower-/.f6471.9

        \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
    7. Applied rewrites71.9%

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

    if -5.49999999999999975e53 < y < 4.80000000000000027e56

    1. Initial program 93.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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.80000000000000027e56 < y

    1. Initial program 1.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. Taylor expanded in a around 0

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

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

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

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

        \[\leadsto x + \frac{z}{\color{blue}{y}} \]
      2. lower-/.f6472.9

        \[\leadsto x + \frac{z}{y} \]
    7. Applied rewrites72.9%

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

Alternative 5: 84.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{+53}:\\ \;\;\;\;\left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{+56}:\\ \;\;\;\;\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}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= y -5.5e+53)
   (+ (- (/ (* z (- (/ a y) 1.0)) y)) x)
   (if (<= y 4.8e+56)
     (/
      (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t)
      (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
     (+ x (/ z y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= -5.5e+53) {
		tmp = -((z * ((a / y) - 1.0)) / y) + x;
	} else if (y <= 4.8e+56) {
		tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
	} else {
		tmp = x + (z / y);
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if (y <= (-5.5d+53)) then
        tmp = -((z * ((a / y) - 1.0d0)) / y) + x
    else if (y <= 4.8d+56) then
        tmp = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
    else
        tmp = x + (z / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= -5.5e+53) {
		tmp = -((z * ((a / y) - 1.0)) / y) + x;
	} else if (y <= 4.8e+56) {
		tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
	} else {
		tmp = x + (z / y);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if y <= -5.5e+53:
		tmp = -((z * ((a / y) - 1.0)) / y) + x
	elif y <= 4.8e+56:
		tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
	else:
		tmp = x + (z / y)
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (y <= -5.5e+53)
		tmp = Float64(Float64(-Float64(Float64(z * Float64(Float64(a / y) - 1.0)) / y)) + x);
	elseif (y <= 4.8e+56)
		tmp = 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));
	else
		tmp = Float64(x + Float64(z / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (y <= -5.5e+53)
		tmp = -((z * ((a / y) - 1.0)) / y) + x;
	elseif (y <= 4.8e+56)
		tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
	else
		tmp = x + (z / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -5.5e+53], N[((-N[(N[(z * N[(N[(a / y), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision], If[LessEqual[y, 4.8e+56], 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], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 4.8 \cdot 10^{+56}:\\
\;\;\;\;\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}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{z}{y}\\


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

    1. Initial program 3.0%

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

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

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

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

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

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

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

        \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
      3. lower-/.f6471.9

        \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
    7. Applied rewrites71.9%

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

    if -5.49999999999999975e53 < y < 4.80000000000000027e56

    1. Initial program 93.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} \]

    if 4.80000000000000027e56 < y

    1. Initial program 1.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. Taylor expanded in a around 0

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

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

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

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

        \[\leadsto x + \frac{z}{\color{blue}{y}} \]
      2. lower-/.f6472.9

        \[\leadsto x + \frac{z}{y} \]
    7. Applied rewrites72.9%

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

Alternative 6: 81.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq 2.8 \cdot 10^{+56}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, y, b\right), y, c\right), y, i\right)}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{z}{y}\\


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

    1. Initial program 3.0%

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

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

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

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

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

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

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

        \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
      3. lower-/.f6471.9

        \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
    7. Applied rewrites71.9%

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

    if -4.8e53 < y < 2.80000000000000008e56

    1. Initial program 93.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. Taylor expanded in a around 0

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

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

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

    if 2.80000000000000008e56 < y

    1. Initial program 1.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. Taylor expanded in a around 0

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

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

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

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

        \[\leadsto x + \frac{z}{\color{blue}{y}} \]
      2. lower-/.f6472.8

        \[\leadsto x + \frac{z}{y} \]
    7. Applied rewrites72.8%

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

Alternative 7: 81.2% accurate, 1.1× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;x + \frac{z}{y}\\


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

    1. Initial program 3.6%

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

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

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

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

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

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

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

        \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
      3. lower-/.f6470.6

        \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
    7. Applied rewrites70.6%

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

    if -4.70000000000000002e45 < y < 4e46

    1. Initial program 95.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4e46 < y

    1. Initial program 2.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. Taylor expanded in a around 0

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

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

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

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

        \[\leadsto x + \frac{z}{\color{blue}{y}} \]
      2. lower-/.f6470.6

        \[\leadsto x + \frac{z}{y} \]
    7. Applied rewrites70.6%

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

Alternative 8: 76.6% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y \leq 1.12 \cdot 10^{+32}:\\
\;\;\;\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{z}{y}\\


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

    1. Initial program 3.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. Taylor expanded in y around -inf

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

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

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

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

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

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

        \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
      3. lower-/.f6471.6

        \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
    7. Applied rewrites71.6%

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

    if -4.5e52 < y < 1.12000000000000007e32

    1. Initial program 95.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. Taylor expanded in y around 0

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

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

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

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

    if 1.12000000000000007e32 < y

    1. Initial program 4.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. Taylor expanded in a around 0

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

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

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

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

        \[\leadsto x + \frac{z}{\color{blue}{y}} \]
      2. lower-/.f6468.0

        \[\leadsto x + \frac{z}{y} \]
    7. Applied rewrites68.0%

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

Alternative 9: 76.6% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{+43}:\\ \;\;\;\;\left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{+44}:\\ \;\;\;\;\frac{230661.510616 \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= y -3.2e+43)
   (+ (- (/ (* z (- (/ a y) 1.0)) y)) x)
   (if (<= y 2.7e+44)
     (/ (+ (* 230661.510616 y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
     (+ x (/ z y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= -3.2e+43) {
		tmp = -((z * ((a / y) - 1.0)) / y) + x;
	} else if (y <= 2.7e+44) {
		tmp = ((230661.510616 * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
	} else {
		tmp = x + (z / y);
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if (y <= (-3.2d+43)) then
        tmp = -((z * ((a / y) - 1.0d0)) / y) + x
    else if (y <= 2.7d+44) then
        tmp = ((230661.510616d0 * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
    else
        tmp = x + (z / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= -3.2e+43) {
		tmp = -((z * ((a / y) - 1.0)) / y) + x;
	} else if (y <= 2.7e+44) {
		tmp = ((230661.510616 * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
	} else {
		tmp = x + (z / y);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if y <= -3.2e+43:
		tmp = -((z * ((a / y) - 1.0)) / y) + x
	elif y <= 2.7e+44:
		tmp = ((230661.510616 * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
	else:
		tmp = x + (z / y)
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (y <= -3.2e+43)
		tmp = Float64(Float64(-Float64(Float64(z * Float64(Float64(a / y) - 1.0)) / y)) + x);
	elseif (y <= 2.7e+44)
		tmp = Float64(Float64(Float64(230661.510616 * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i));
	else
		tmp = Float64(x + Float64(z / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (y <= -3.2e+43)
		tmp = -((z * ((a / y) - 1.0)) / y) + x;
	elseif (y <= 2.7e+44)
		tmp = ((230661.510616 * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
	else
		tmp = x + (z / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -3.2e+43], N[((-N[(N[(z * N[(N[(a / y), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision], If[LessEqual[y, 2.7e+44], N[(N[(N[(230661.510616 * 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], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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

\mathbf{else}:\\
\;\;\;\;x + \frac{z}{y}\\


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

    1. Initial program 4.0%

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

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

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

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

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

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

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

        \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
      3. lower-/.f6470.1

        \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
    7. Applied rewrites70.1%

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

    if -3.20000000000000014e43 < y < 2.7e44

    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. Taylor expanded in y around 0

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

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

      if 2.7e44 < y

      1. Initial program 3.0%

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

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

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

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

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

          \[\leadsto x + \frac{z}{\color{blue}{y}} \]
        2. lower-/.f6470.1

          \[\leadsto x + \frac{z}{y} \]
      7. Applied rewrites70.1%

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

    Alternative 10: 74.6% accurate, 1.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{+43}:\\ \;\;\;\;\left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{+44}:\\ \;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{y}\\ \end{array} \end{array} \]
    (FPCore (x y z t a b c i)
     :precision binary64
     (if (<= y -3.2e+43)
       (+ (- (/ (* z (- (/ a y) 1.0)) y)) x)
       (if (<= y 2.7e+44)
         (/ (fma 230661.510616 y t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
         (+ x (/ z y)))))
    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
    	double tmp;
    	if (y <= -3.2e+43) {
    		tmp = -((z * ((a / y) - 1.0)) / y) + x;
    	} else if (y <= 2.7e+44) {
    		tmp = fma(230661.510616, y, t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
    	} else {
    		tmp = x + (z / y);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b, c, i)
    	tmp = 0.0
    	if (y <= -3.2e+43)
    		tmp = Float64(Float64(-Float64(Float64(z * Float64(Float64(a / y) - 1.0)) / y)) + x);
    	elseif (y <= 2.7e+44)
    		tmp = Float64(fma(230661.510616, y, t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i));
    	else
    		tmp = Float64(x + Float64(z / y));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -3.2e+43], N[((-N[(N[(z * N[(N[(a / y), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision], If[LessEqual[y, 2.7e+44], N[(N[(230661.510616 * y + 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], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y \leq -3.2 \cdot 10^{+43}:\\
    \;\;\;\;\left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x\\
    
    \mathbf{elif}\;y \leq 2.7 \cdot 10^{+44}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\
    
    \mathbf{else}:\\
    \;\;\;\;x + \frac{z}{y}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < -3.20000000000000014e43

      1. Initial program 4.0%

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

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

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

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

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

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

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

          \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
        3. lower-/.f6470.1

          \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
      7. Applied rewrites70.1%

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

      if -3.20000000000000014e43 < y < 2.7e44

      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. Taylor expanded in y around 0

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

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

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

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

      if 2.7e44 < y

      1. Initial program 3.0%

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

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

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

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

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

          \[\leadsto x + \frac{z}{\color{blue}{y}} \]
        2. lower-/.f6470.1

          \[\leadsto x + \frac{z}{y} \]
      7. Applied rewrites70.1%

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

    Alternative 11: 73.0% accurate, 1.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.15 \cdot 10^{+45}:\\ \;\;\;\;\left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+31}:\\ \;\;\;\;\frac{\left(\left(y \cdot z\right) \cdot y + 230661.510616\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{y}\\ \end{array} \end{array} \]
    (FPCore (x y z t a b c i)
     :precision binary64
     (if (<= y -1.15e+45)
       (+ (- (/ (* z (- (/ a y) 1.0)) y)) x)
       (if (<= y 3.5e+31)
         (/ (+ (* (+ (* (* y z) y) 230661.510616) y) t) (fma c y i))
         (+ x (/ z y)))))
    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
    	double tmp;
    	if (y <= -1.15e+45) {
    		tmp = -((z * ((a / y) - 1.0)) / y) + x;
    	} else if (y <= 3.5e+31) {
    		tmp = (((((y * z) * y) + 230661.510616) * y) + t) / fma(c, y, i);
    	} else {
    		tmp = x + (z / y);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b, c, i)
    	tmp = 0.0
    	if (y <= -1.15e+45)
    		tmp = Float64(Float64(-Float64(Float64(z * Float64(Float64(a / y) - 1.0)) / y)) + x);
    	elseif (y <= 3.5e+31)
    		tmp = Float64(Float64(Float64(Float64(Float64(Float64(y * z) * y) + 230661.510616) * y) + t) / fma(c, y, i));
    	else
    		tmp = Float64(x + Float64(z / y));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.15e+45], N[((-N[(N[(z * N[(N[(a / y), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision], If[LessEqual[y, 3.5e+31], N[(N[(N[(N[(N[(N[(y * z), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(c * y + i), $MachinePrecision]), $MachinePrecision], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y \leq -1.15 \cdot 10^{+45}:\\
    \;\;\;\;\left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x\\
    
    \mathbf{elif}\;y \leq 3.5 \cdot 10^{+31}:\\
    \;\;\;\;\frac{\left(\left(y \cdot z\right) \cdot y + 230661.510616\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;x + \frac{z}{y}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < -1.15000000000000006e45

      1. Initial program 3.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. Taylor expanded in y around -inf

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

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

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

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

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

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

          \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
        3. lower-/.f6470.6

          \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
      7. Applied rewrites70.6%

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

      if -1.15000000000000006e45 < y < 3.5e31

      1. Initial program 96.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. Taylor expanded in y around 0

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

          \[\leadsto \frac{\left(\left(\left(x \cdot y + z\right) \cdot y + \frac{54929528941}{2000000}\right) \cdot y + \frac{28832688827}{125000}\right) \cdot y + t}{c \cdot y + \color{blue}{i}} \]
        2. lower-fma.f6479.0

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

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

        \[\leadsto \frac{\left(\color{blue}{\left(y \cdot z\right)} \cdot y + \frac{28832688827}{125000}\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\right)} \]
      6. Step-by-step derivation
        1. lower-*.f6476.0

          \[\leadsto \frac{\left(\left(y \cdot \color{blue}{z}\right) \cdot y + 230661.510616\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\right)} \]
      7. Applied rewrites76.0%

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

      if 3.5e31 < y

      1. Initial program 5.0%

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

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

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

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

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

          \[\leadsto x + \frac{z}{\color{blue}{y}} \]
        2. lower-/.f6467.8

          \[\leadsto x + \frac{z}{y} \]
      7. Applied rewrites67.8%

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

    Alternative 12: 71.1% accurate, 1.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.6 \cdot 10^{+43}:\\ \;\;\;\;\left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{-94}:\\ \;\;\;\;\frac{\left(27464.7644705 \cdot y + 230661.510616\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+31}:\\ \;\;\;\;\frac{\left(\left(y \cdot y\right) \cdot z\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{y}\\ \end{array} \end{array} \]
    (FPCore (x y z t a b c i)
     :precision binary64
     (if (<= y -3.6e+43)
       (+ (- (/ (* z (- (/ a y) 1.0)) y)) x)
       (if (<= y 7.2e-94)
         (/ (+ (* (+ (* 27464.7644705 y) 230661.510616) y) t) (fma c y i))
         (if (<= y 3.5e+31)
           (/ (+ (* (* (* y y) z) y) t) (fma c y i))
           (+ x (/ z y))))))
    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
    	double tmp;
    	if (y <= -3.6e+43) {
    		tmp = -((z * ((a / y) - 1.0)) / y) + x;
    	} else if (y <= 7.2e-94) {
    		tmp = ((((27464.7644705 * y) + 230661.510616) * y) + t) / fma(c, y, i);
    	} else if (y <= 3.5e+31) {
    		tmp = ((((y * y) * z) * y) + t) / fma(c, y, i);
    	} else {
    		tmp = x + (z / y);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b, c, i)
    	tmp = 0.0
    	if (y <= -3.6e+43)
    		tmp = Float64(Float64(-Float64(Float64(z * Float64(Float64(a / y) - 1.0)) / y)) + x);
    	elseif (y <= 7.2e-94)
    		tmp = Float64(Float64(Float64(Float64(Float64(27464.7644705 * y) + 230661.510616) * y) + t) / fma(c, y, i));
    	elseif (y <= 3.5e+31)
    		tmp = Float64(Float64(Float64(Float64(Float64(y * y) * z) * y) + t) / fma(c, y, i));
    	else
    		tmp = Float64(x + Float64(z / y));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -3.6e+43], N[((-N[(N[(z * N[(N[(a / y), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision], If[LessEqual[y, 7.2e-94], N[(N[(N[(N[(N[(27464.7644705 * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(c * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e+31], N[(N[(N[(N[(N[(y * y), $MachinePrecision] * z), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(c * y + i), $MachinePrecision]), $MachinePrecision], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y \leq -3.6 \cdot 10^{+43}:\\
    \;\;\;\;\left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x\\
    
    \mathbf{elif}\;y \leq 7.2 \cdot 10^{-94}:\\
    \;\;\;\;\frac{\left(27464.7644705 \cdot y + 230661.510616\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\
    
    \mathbf{elif}\;y \leq 3.5 \cdot 10^{+31}:\\
    \;\;\;\;\frac{\left(\left(y \cdot y\right) \cdot z\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;x + \frac{z}{y}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if y < -3.6000000000000001e43

      1. Initial program 4.0%

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

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

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

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

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

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

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

          \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
        3. lower-/.f6470.1

          \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
      7. Applied rewrites70.1%

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

      if -3.6000000000000001e43 < y < 7.2e-94

      1. Initial program 97.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. Taylor expanded in y around 0

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

          \[\leadsto \frac{\left(\left(\left(x \cdot y + z\right) \cdot y + \frac{54929528941}{2000000}\right) \cdot y + \frac{28832688827}{125000}\right) \cdot y + t}{c \cdot y + \color{blue}{i}} \]
        2. lower-fma.f6484.1

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

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

        \[\leadsto \frac{\left(\color{blue}{\frac{54929528941}{2000000}} \cdot y + \frac{28832688827}{125000}\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\right)} \]
      6. Step-by-step derivation
        1. Applied rewrites80.1%

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

        if 7.2e-94 < y < 3.5e31

        1. Initial program 92.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. Taylor expanded in y around 0

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

            \[\leadsto \frac{\left(\left(\left(x \cdot y + z\right) \cdot y + \frac{54929528941}{2000000}\right) \cdot y + \frac{28832688827}{125000}\right) \cdot y + t}{c \cdot y + \color{blue}{i}} \]
          2. lower-fma.f6456.5

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

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

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

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

            \[\leadsto \frac{\left(\left(y \cdot y\right) \cdot z\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\right)} \]
          3. lower-*.f6438.9

            \[\leadsto \frac{\left(\left(y \cdot y\right) \cdot z\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\right)} \]
        7. Applied rewrites38.9%

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

        if 3.5e31 < y

        1. Initial program 5.0%

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

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

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

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

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

            \[\leadsto x + \frac{z}{\color{blue}{y}} \]
          2. lower-/.f6467.8

            \[\leadsto x + \frac{z}{y} \]
        7. Applied rewrites67.8%

          \[\leadsto x + \color{blue}{\frac{z}{y}} \]
      7. Recombined 4 regimes into one program.
      8. Add Preprocessing

      Alternative 13: 70.8% accurate, 1.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.6 \cdot 10^{+43}:\\ \;\;\;\;\left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x\\ \mathbf{elif}\;y \leq 0.0048:\\ \;\;\;\;\frac{\left(27464.7644705 \cdot y + 230661.510616\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{y}\\ \end{array} \end{array} \]
      (FPCore (x y z t a b c i)
       :precision binary64
       (if (<= y -3.6e+43)
         (+ (- (/ (* z (- (/ a y) 1.0)) y)) x)
         (if (<= y 0.0048)
           (/ (+ (* (+ (* 27464.7644705 y) 230661.510616) y) t) (fma c y i))
           (+ x (/ z y)))))
      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
      	double tmp;
      	if (y <= -3.6e+43) {
      		tmp = -((z * ((a / y) - 1.0)) / y) + x;
      	} else if (y <= 0.0048) {
      		tmp = ((((27464.7644705 * y) + 230661.510616) * y) + t) / fma(c, y, i);
      	} else {
      		tmp = x + (z / y);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b, c, i)
      	tmp = 0.0
      	if (y <= -3.6e+43)
      		tmp = Float64(Float64(-Float64(Float64(z * Float64(Float64(a / y) - 1.0)) / y)) + x);
      	elseif (y <= 0.0048)
      		tmp = Float64(Float64(Float64(Float64(Float64(27464.7644705 * y) + 230661.510616) * y) + t) / fma(c, y, i));
      	else
      		tmp = Float64(x + Float64(z / y));
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -3.6e+43], N[((-N[(N[(z * N[(N[(a / y), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision], If[LessEqual[y, 0.0048], N[(N[(N[(N[(N[(27464.7644705 * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(c * y + i), $MachinePrecision]), $MachinePrecision], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq -3.6 \cdot 10^{+43}:\\
      \;\;\;\;\left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x\\
      
      \mathbf{elif}\;y \leq 0.0048:\\
      \;\;\;\;\frac{\left(27464.7644705 \cdot y + 230661.510616\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;x + \frac{z}{y}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y < -3.6000000000000001e43

        1. Initial program 4.0%

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

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

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

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

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

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

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

            \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
          3. lower-/.f6470.1

            \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
        7. Applied rewrites70.1%

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

        if -3.6000000000000001e43 < y < 0.00479999999999999958

        1. Initial program 97.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. Taylor expanded in y around 0

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

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

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

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

          \[\leadsto \frac{\left(\color{blue}{\frac{54929528941}{2000000}} \cdot y + \frac{28832688827}{125000}\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\right)} \]
        6. Step-by-step derivation
          1. Applied rewrites75.0%

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

          if 0.00479999999999999958 < y

          1. Initial program 11.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. Taylor expanded in a around 0

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

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

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

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

              \[\leadsto x + \frac{z}{\color{blue}{y}} \]
            2. lower-/.f6462.1

              \[\leadsto x + \frac{z}{y} \]
          7. Applied rewrites62.1%

            \[\leadsto x + \color{blue}{\frac{z}{y}} \]
        7. Recombined 3 regimes into one program.
        8. Add Preprocessing

        Alternative 14: 70.7% accurate, 2.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{+43}:\\ \;\;\;\;\left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x\\ \mathbf{elif}\;y \leq 0.0048:\\ \;\;\;\;\frac{230661.510616 \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{y}\\ \end{array} \end{array} \]
        (FPCore (x y z t a b c i)
         :precision binary64
         (if (<= y -3.2e+43)
           (+ (- (/ (* z (- (/ a y) 1.0)) y)) x)
           (if (<= y 0.0048) (/ (+ (* 230661.510616 y) t) (fma c y i)) (+ x (/ z y)))))
        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
        	double tmp;
        	if (y <= -3.2e+43) {
        		tmp = -((z * ((a / y) - 1.0)) / y) + x;
        	} else if (y <= 0.0048) {
        		tmp = ((230661.510616 * y) + t) / fma(c, y, i);
        	} else {
        		tmp = x + (z / y);
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b, c, i)
        	tmp = 0.0
        	if (y <= -3.2e+43)
        		tmp = Float64(Float64(-Float64(Float64(z * Float64(Float64(a / y) - 1.0)) / y)) + x);
        	elseif (y <= 0.0048)
        		tmp = Float64(Float64(Float64(230661.510616 * y) + t) / fma(c, y, i));
        	else
        		tmp = Float64(x + Float64(z / y));
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -3.2e+43], N[((-N[(N[(z * N[(N[(a / y), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision], If[LessEqual[y, 0.0048], N[(N[(N[(230661.510616 * y), $MachinePrecision] + t), $MachinePrecision] / N[(c * y + i), $MachinePrecision]), $MachinePrecision], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;y \leq -3.2 \cdot 10^{+43}:\\
        \;\;\;\;\left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x\\
        
        \mathbf{elif}\;y \leq 0.0048:\\
        \;\;\;\;\frac{230661.510616 \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\
        
        \mathbf{else}:\\
        \;\;\;\;x + \frac{z}{y}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if y < -3.20000000000000014e43

          1. Initial program 4.0%

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

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

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

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

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

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

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

              \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
            3. lower-/.f6470.1

              \[\leadsto \left(-\frac{z \cdot \left(\frac{a}{y} - 1\right)}{y}\right) + x \]
          7. Applied rewrites70.1%

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

          if -3.20000000000000014e43 < y < 0.00479999999999999958

          1. Initial program 97.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. Taylor expanded in y around 0

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

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

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

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

            \[\leadsto \frac{\color{blue}{\frac{28832688827}{125000}} \cdot y + t}{\mathsf{fma}\left(c, y, i\right)} \]
          6. Step-by-step derivation
            1. Applied rewrites74.9%

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

            if 0.00479999999999999958 < y

            1. Initial program 11.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. Taylor expanded in a around 0

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

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

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

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

                \[\leadsto x + \frac{z}{\color{blue}{y}} \]
              2. lower-/.f6462.1

                \[\leadsto x + \frac{z}{y} \]
            7. Applied rewrites62.1%

              \[\leadsto x + \color{blue}{\frac{z}{y}} \]
          7. Recombined 3 regimes into one program.
          8. Add Preprocessing

          Alternative 15: 70.7% accurate, 2.1× speedup?

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

            1. Initial program 8.0%

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

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

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

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

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

                \[\leadsto x + \frac{z}{\color{blue}{y}} \]
              2. lower-/.f6466.0

                \[\leadsto x + \frac{z}{y} \]
            7. Applied rewrites66.0%

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

            if -3.20000000000000014e43 < y < 0.00479999999999999958

            1. Initial program 97.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. Taylor expanded in y around 0

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

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

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

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

              \[\leadsto \frac{\color{blue}{\frac{28832688827}{125000}} \cdot y + t}{\mathsf{fma}\left(c, y, i\right)} \]
            6. Step-by-step derivation
              1. Applied rewrites74.9%

                \[\leadsto \frac{\color{blue}{230661.510616} \cdot y + t}{\mathsf{fma}\left(c, y, i\right)} \]
            7. Recombined 2 regimes into one program.
            8. Add Preprocessing

            Alternative 16: 64.4% accurate, 2.3× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{z}{y}\\ \mathbf{if}\;y \leq -3.2 \cdot 10^{+43}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.45 \cdot 10^{-163}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{230661.510616}{i}, \frac{t}{i}\right)\\ \mathbf{elif}\;y \leq 0.0048:\\ \;\;\;\;\frac{t}{\mathsf{fma}\left(c, y, i\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (x y z t a b c i)
             :precision binary64
             (let* ((t_1 (+ x (/ z y))))
               (if (<= y -3.2e+43)
                 t_1
                 (if (<= y -2.45e-163)
                   (fma y (/ 230661.510616 i) (/ t i))
                   (if (<= y 0.0048) (/ t (fma c y 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 / y);
            	double tmp;
            	if (y <= -3.2e+43) {
            		tmp = t_1;
            	} else if (y <= -2.45e-163) {
            		tmp = fma(y, (230661.510616 / i), (t / i));
            	} else if (y <= 0.0048) {
            		tmp = t / fma(c, y, i);
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a, b, c, i)
            	t_1 = Float64(x + Float64(z / y))
            	tmp = 0.0
            	if (y <= -3.2e+43)
            		tmp = t_1;
            	elseif (y <= -2.45e-163)
            		tmp = fma(y, Float64(230661.510616 / i), Float64(t / i));
            	elseif (y <= 0.0048)
            		tmp = Float64(t / fma(c, y, i));
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.2e+43], t$95$1, If[LessEqual[y, -2.45e-163], N[(y * N[(230661.510616 / i), $MachinePrecision] + N[(t / i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.0048], N[(t / N[(c * y + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := x + \frac{z}{y}\\
            \mathbf{if}\;y \leq -3.2 \cdot 10^{+43}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;y \leq -2.45 \cdot 10^{-163}:\\
            \;\;\;\;\mathsf{fma}\left(y, \frac{230661.510616}{i}, \frac{t}{i}\right)\\
            
            \mathbf{elif}\;y \leq 0.0048:\\
            \;\;\;\;\frac{t}{\mathsf{fma}\left(c, y, i\right)}\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if y < -3.20000000000000014e43 or 0.00479999999999999958 < y

              1. Initial program 8.0%

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

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

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

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

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

                  \[\leadsto x + \frac{z}{\color{blue}{y}} \]
                2. lower-/.f6466.0

                  \[\leadsto x + \frac{z}{y} \]
              7. Applied rewrites66.0%

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

              if -3.20000000000000014e43 < y < -2.4500000000000001e-163

              1. Initial program 92.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. Applied rewrites93.1%

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

                \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{\frac{28832688827}{125000}}{i}}, \frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\right) \]
              4. Step-by-step derivation
                1. lift-/.f6446.8

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

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

                \[\leadsto \mathsf{fma}\left(y, \frac{\frac{28832688827}{125000}}{i}, \frac{t}{\color{blue}{i}}\right) \]
              7. Step-by-step derivation
                1. Applied rewrites35.5%

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

                if -2.4500000000000001e-163 < y < 0.00479999999999999958

                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. Taylor expanded in y around 0

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

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

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

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

                  \[\leadsto \frac{\color{blue}{t}}{\mathsf{fma}\left(c, y, i\right)} \]
                6. Step-by-step derivation
                  1. Applied rewrites73.1%

                    \[\leadsto \frac{\color{blue}{t}}{\mathsf{fma}\left(c, y, i\right)} \]
                7. Recombined 3 regimes into one program.
                8. Add Preprocessing

                Alternative 17: 63.6% accurate, 2.8× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{z}{y}\\ \mathbf{if}\;y \leq -1.16 \cdot 10^{+42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 0.0048:\\ \;\;\;\;\frac{t}{\mathsf{fma}\left(c, y, i\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                (FPCore (x y z t a b c i)
                 :precision binary64
                 (let* ((t_1 (+ x (/ z y))))
                   (if (<= y -1.16e+42) t_1 (if (<= y 0.0048) (/ t (fma c y 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 / y);
                	double tmp;
                	if (y <= -1.16e+42) {
                		tmp = t_1;
                	} else if (y <= 0.0048) {
                		tmp = t / fma(c, y, i);
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                function code(x, y, z, t, a, b, c, i)
                	t_1 = Float64(x + Float64(z / y))
                	tmp = 0.0
                	if (y <= -1.16e+42)
                		tmp = t_1;
                	elseif (y <= 0.0048)
                		tmp = Float64(t / fma(c, y, i));
                	else
                		tmp = t_1;
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.16e+42], t$95$1, If[LessEqual[y, 0.0048], N[(t / N[(c * y + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := x + \frac{z}{y}\\
                \mathbf{if}\;y \leq -1.16 \cdot 10^{+42}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;y \leq 0.0048:\\
                \;\;\;\;\frac{t}{\mathsf{fma}\left(c, y, i\right)}\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if y < -1.15999999999999995e42 or 0.00479999999999999958 < y

                  1. Initial program 8.1%

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

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

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

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

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

                      \[\leadsto x + \frac{z}{\color{blue}{y}} \]
                    2. lower-/.f6465.9

                      \[\leadsto x + \frac{z}{y} \]
                  7. Applied rewrites65.9%

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

                  if -1.15999999999999995e42 < y < 0.00479999999999999958

                  1. Initial program 97.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. Taylor expanded in y around 0

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

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

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

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

                    \[\leadsto \frac{\color{blue}{t}}{\mathsf{fma}\left(c, y, i\right)} \]
                  6. Step-by-step derivation
                    1. Applied rewrites63.0%

                      \[\leadsto \frac{\color{blue}{t}}{\mathsf{fma}\left(c, y, i\right)} \]
                  7. Recombined 2 regimes into one program.
                  8. Add Preprocessing

                  Alternative 18: 56.9% accurate, 3.2× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{z}{y}\\ \mathbf{if}\;y \leq -3.2 \cdot 10^{+43}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 0.00135:\\ \;\;\;\;\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 y))))
                     (if (<= y -3.2e+43) t_1 (if (<= y 0.00135) (/ 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 / y);
                  	double tmp;
                  	if (y <= -3.2e+43) {
                  		tmp = t_1;
                  	} else if (y <= 0.00135) {
                  		tmp = t / i;
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z, t, a, b, c, i)
                  use fmin_fmax_functions
                      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 / y)
                      if (y <= (-3.2d+43)) then
                          tmp = t_1
                      else if (y <= 0.00135d0) 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 / y);
                  	double tmp;
                  	if (y <= -3.2e+43) {
                  		tmp = t_1;
                  	} else if (y <= 0.00135) {
                  		tmp = t / i;
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a, b, c, i):
                  	t_1 = x + (z / y)
                  	tmp = 0
                  	if y <= -3.2e+43:
                  		tmp = t_1
                  	elif y <= 0.00135:
                  		tmp = t / i
                  	else:
                  		tmp = t_1
                  	return tmp
                  
                  function code(x, y, z, t, a, b, c, i)
                  	t_1 = Float64(x + Float64(z / y))
                  	tmp = 0.0
                  	if (y <= -3.2e+43)
                  		tmp = t_1;
                  	elseif (y <= 0.00135)
                  		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 / y);
                  	tmp = 0.0;
                  	if (y <= -3.2e+43)
                  		tmp = t_1;
                  	elseif (y <= 0.00135)
                  		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[(z / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.2e+43], t$95$1, If[LessEqual[y, 0.00135], N[(t / i), $MachinePrecision], t$95$1]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := x + \frac{z}{y}\\
                  \mathbf{if}\;y \leq -3.2 \cdot 10^{+43}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;y \leq 0.00135:\\
                  \;\;\;\;\frac{t}{i}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if y < -3.20000000000000014e43 or 0.0013500000000000001 < y

                    1. Initial program 8.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. Taylor expanded in a around 0

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

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

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

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

                        \[\leadsto x + \frac{z}{\color{blue}{y}} \]
                      2. lower-/.f6465.9

                        \[\leadsto x + \frac{z}{y} \]
                    7. Applied rewrites65.9%

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

                    if -3.20000000000000014e43 < y < 0.0013500000000000001

                    1. Initial program 97.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. Taylor expanded in y around 0

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

                        \[\leadsto \frac{t}{\color{blue}{i}} \]
                    4. Applied rewrites49.1%

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

                  Alternative 19: 48.5% accurate, 0.9× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\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} \leq \infty:\\ \;\;\;\;\frac{t}{i}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b c i)
                   :precision binary64
                   (if (<=
                        (/
                         (+
                          (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
                          t)
                         (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
                        INFINITY)
                     (/ t i)
                     x))
                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	double tmp;
                  	if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
                  		tmp = t / i;
                  	} else {
                  		tmp = x;
                  	}
                  	return tmp;
                  }
                  
                  public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	double tmp;
                  	if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= Double.POSITIVE_INFINITY) {
                  		tmp = t / i;
                  	} else {
                  		tmp = x;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a, b, c, i):
                  	tmp = 0
                  	if (((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= math.inf:
                  		tmp = t / i
                  	else:
                  		tmp = x
                  	return tmp
                  
                  function code(x, y, z, t, a, b, c, i)
                  	tmp = 0.0
                  	if (Float64(Float64(Float64(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)) <= Inf)
                  		tmp = Float64(t / i);
                  	else
                  		tmp = x;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t, a, b, c, i)
                  	tmp = 0.0;
                  	if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= Inf)
                  		tmp = t / i;
                  	else
                  		tmp = x;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(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], Infinity], N[(t / i), $MachinePrecision], x]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;\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} \leq \infty:\\
                  \;\;\;\;\frac{t}{i}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;x\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0

                    1. Initial program 90.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. Taylor expanded in y around 0

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

                        \[\leadsto \frac{t}{\color{blue}{i}} \]
                    4. Applied rewrites43.1%

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

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

                    1. Initial program 0.0%

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

                      \[\leadsto \color{blue}{x} \]
                    3. Step-by-step derivation
                      1. Applied rewrites57.6%

                        \[\leadsto \color{blue}{x} \]
                    4. Recombined 2 regimes into one program.
                    5. Add Preprocessing

                    Alternative 20: 25.2% accurate, 46.9× 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;
                    }
                    
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(x, y, z, t, a, b, c, i)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8), intent (in) :: a
                        real(8), intent (in) :: b
                        real(8), intent (in) :: c
                        real(8), intent (in) :: i
                        code = x
                    end function
                    
                    public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	return x;
                    }
                    
                    def code(x, y, z, t, a, b, c, i):
                    	return x
                    
                    function code(x, y, z, t, a, b, c, i)
                    	return x
                    end
                    
                    function tmp = code(x, y, z, t, a, b, c, i)
                    	tmp = x;
                    end
                    
                    code[x_, y_, z_, t_, a_, b_, c_, i_] := x
                    
                    \begin{array}{l}
                    
                    \\
                    x
                    \end{array}
                    
                    Derivation
                    1. Initial program 56.1%

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

                      \[\leadsto \color{blue}{x} \]
                    3. Step-by-step derivation
                      1. Applied rewrites25.2%

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

                      Reproduce

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