Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2

Percentage Accurate: 56.2% → 83.1%
Time: 10.0s
Alternatives: 14
Speedup: 2.0×

Specification

?
\[\begin{array}{l} \\ \frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (/
  (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t)
  (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
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 14 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.2% 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: 83.1% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t\\
t_2 := \frac{t\_1}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\
t_3 := \mathsf{fma}\left(a + y, y, b\right)\\
t_4 := \mathsf{fma}\left(\mathsf{fma}\left(t\_3, y, c\right), y, i\right)\\
\mathbf{if}\;t\_2 \leq 2 \cdot 10^{+294}:\\
\;\;\;\;\frac{t\_1}{\mathsf{fma}\left(y, c, \left(t\_3 \cdot y\right) \cdot y\right) + i}\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\left(-x\right) \cdot \left(\frac{-\left(y \cdot y\right) \cdot \left(y \cdot y\right)}{t\_4} + \left(-\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{t\_4}}{x}\right)\right)\\

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


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

    1. Initial program 92.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. Step-by-step derivation
      1. lift-*.f64N/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}{\color{blue}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y} + i} \]
      2. lift-+.f64N/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}{\color{blue}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right)} \cdot y + i} \]
      3. lift-*.f64N/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}{\left(\color{blue}{\left(\left(y + a\right) \cdot y + b\right) \cdot y} + c\right) \cdot y + i} \]
      4. lift-+.f64N/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}{\left(\color{blue}{\left(\left(y + a\right) \cdot y + b\right)} \cdot y + c\right) \cdot y + i} \]
      5. lift-*.f64N/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}{\left(\left(\color{blue}{\left(y + a\right) \cdot y} + b\right) \cdot y + c\right) \cdot y + i} \]
      6. lift-+.f64N/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}{\left(\left(\color{blue}{\left(y + a\right)} \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      7. +-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}{\left(\color{blue}{\left(b + \left(y + a\right) \cdot y\right)} \cdot y + c\right) \cdot y + i} \]
      8. *-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}{\left(\left(b + \color{blue}{y \cdot \left(y + a\right)}\right) \cdot y + c\right) \cdot y + i} \]
      9. +-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}{\left(\left(b + y \cdot \color{blue}{\left(a + y\right)}\right) \cdot y + c\right) \cdot y + i} \]
      10. *-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}{\left(\color{blue}{y \cdot \left(b + y \cdot \left(a + y\right)\right)} + c\right) \cdot y + i} \]
      11. +-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}{\color{blue}{\left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \cdot y + i} \]
      12. *-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}{\color{blue}{y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + i} \]
      13. distribute-rgt-inN/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}{\color{blue}{\left(c \cdot y + \left(y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) \cdot y\right)} + i} \]
      14. *-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}{\left(\color{blue}{y \cdot c} + \left(y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) \cdot y\right) + i} \]
      15. lower-fma.f64N/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}{\color{blue}{\mathsf{fma}\left(y, c, \left(y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) \cdot y\right)} + i} \]
    3. Applied rewrites92.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(y, c, \left(\mathsf{fma}\left(a + y, y, b\right) \cdot y\right) \cdot y\right)} + i} \]

    if 2.00000000000000013e294 < (/.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 55.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 -inf

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

      \[\leadsto \color{blue}{\left(-x\right) \cdot \left(\frac{-\left(y \cdot y\right) \cdot \left(y \cdot y\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)} + \left(-\frac{\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)}}{x}\right)\right)} \]

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

        \[\leadsto \left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right) + x \]
      7. mul-1-negN/A

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

        \[\leadsto \left(-\frac{\left(-z\right) - -1 \cdot \left(a \cdot x\right)}{y}\right) + x \]
      9. associate-*r*N/A

        \[\leadsto \left(-\frac{\left(-z\right) - \left(-1 \cdot a\right) \cdot x}{y}\right) + x \]
      10. mul-1-negN/A

        \[\leadsto \left(-\frac{\left(-z\right) - \left(\mathsf{neg}\left(a\right)\right) \cdot x}{y}\right) + x \]
      11. lower-*.f64N/A

        \[\leadsto \left(-\frac{\left(-z\right) - \left(\mathsf{neg}\left(a\right)\right) \cdot x}{y}\right) + x \]
      12. lower-neg.f6469.6

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

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

Alternative 2: 82.4% accurate, 0.5× speedup?

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

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

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

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Step-by-step derivation
      1. lift-*.f64N/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}{\color{blue}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y} + i} \]
      2. lift-+.f64N/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}{\color{blue}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right)} \cdot y + i} \]
      3. lift-*.f64N/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}{\left(\color{blue}{\left(\left(y + a\right) \cdot y + b\right) \cdot y} + c\right) \cdot y + i} \]
      4. lift-+.f64N/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}{\left(\color{blue}{\left(\left(y + a\right) \cdot y + b\right)} \cdot y + c\right) \cdot y + i} \]
      5. lift-*.f64N/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}{\left(\left(\color{blue}{\left(y + a\right) \cdot y} + b\right) \cdot y + c\right) \cdot y + i} \]
      6. lift-+.f64N/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}{\left(\left(\color{blue}{\left(y + a\right)} \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      7. +-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}{\left(\color{blue}{\left(b + \left(y + a\right) \cdot y\right)} \cdot y + c\right) \cdot y + i} \]
      8. *-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}{\left(\left(b + \color{blue}{y \cdot \left(y + a\right)}\right) \cdot y + c\right) \cdot y + i} \]
      9. +-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}{\left(\left(b + y \cdot \color{blue}{\left(a + y\right)}\right) \cdot y + c\right) \cdot y + i} \]
      10. *-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}{\left(\color{blue}{y \cdot \left(b + y \cdot \left(a + y\right)\right)} + c\right) \cdot y + i} \]
      11. +-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}{\color{blue}{\left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \cdot y + i} \]
      12. *-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}{\color{blue}{y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + i} \]
      13. distribute-rgt-inN/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}{\color{blue}{\left(c \cdot y + \left(y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) \cdot y\right)} + i} \]
      14. *-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}{\left(\color{blue}{y \cdot c} + \left(y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) \cdot y\right) + i} \]
      15. lower-fma.f64N/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}{\color{blue}{\mathsf{fma}\left(y, c, \left(y \cdot \left(b + y \cdot \left(a + y\right)\right)\right) \cdot y\right)} + i} \]
    3. Applied rewrites90.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(y, c, \left(\mathsf{fma}\left(a + y, y, b\right) \cdot y\right) \cdot y\right)} + i} \]

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

        \[\leadsto \left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right) + x \]
      7. mul-1-negN/A

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

        \[\leadsto \left(-\frac{\left(-z\right) - -1 \cdot \left(a \cdot x\right)}{y}\right) + x \]
      9. associate-*r*N/A

        \[\leadsto \left(-\frac{\left(-z\right) - \left(-1 \cdot a\right) \cdot x}{y}\right) + x \]
      10. mul-1-negN/A

        \[\leadsto \left(-\frac{\left(-z\right) - \left(\mathsf{neg}\left(a\right)\right) \cdot x}{y}\right) + x \]
      11. lower-*.f64N/A

        \[\leadsto \left(-\frac{\left(-z\right) - \left(\mathsf{neg}\left(a\right)\right) \cdot x}{y}\right) + x \]
      12. lower-neg.f6469.6

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

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

Alternative 3: 82.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_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}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\

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

    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 + -1 \cdot \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

        \[\leadsto \left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right) + x \]
      7. mul-1-negN/A

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

        \[\leadsto \left(-\frac{\left(-z\right) - -1 \cdot \left(a \cdot x\right)}{y}\right) + x \]
      9. associate-*r*N/A

        \[\leadsto \left(-\frac{\left(-z\right) - \left(-1 \cdot a\right) \cdot x}{y}\right) + x \]
      10. mul-1-negN/A

        \[\leadsto \left(-\frac{\left(-z\right) - \left(\mathsf{neg}\left(a\right)\right) \cdot x}{y}\right) + x \]
      11. lower-*.f64N/A

        \[\leadsto \left(-\frac{\left(-z\right) - \left(\mathsf{neg}\left(a\right)\right) \cdot x}{y}\right) + x \]
      12. lower-neg.f6469.6

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

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

Alternative 4: 75.0% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x\\ \mathbf{if}\;y \leq -1.05 \cdot 10^{+56}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+57}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(27464.7644705, y, 230661.510616\right), y, t\right)}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (- (/ (- (- z) (* (- a) x)) y)) x)))
   (if (<= y -1.05e+56)
     t_1
     (if (<= y 1.9e+57)
       (/
        (fma (fma 27464.7644705 y 230661.510616) y t)
        (+ (* (+ (* (+ (* (+ y a) y) b) y) 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 = -((-z - (-a * x)) / y) + x;
	double tmp;
	if (y <= -1.05e+56) {
		tmp = t_1;
	} else if (y <= 1.9e+57) {
		tmp = fma(fma(27464.7644705, y, 230661.510616), y, t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(-Float64(Float64(Float64(-z) - Float64(Float64(-a) * x)) / y)) + x)
	tmp = 0.0
	if (y <= -1.05e+56)
		tmp = t_1;
	elseif (y <= 1.9e+57)
		tmp = Float64(fma(fma(27464.7644705, y, 230661.510616), y, t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + 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[((-N[(N[((-z) - N[((-a) * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision]}, If[LessEqual[y, -1.05e+56], t$95$1, If[LessEqual[y, 1.9e+57], N[(N[(N[(27464.7644705 * y + 230661.510616), $MachinePrecision] * 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], t$95$1]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.05000000000000009e56 or 1.8999999999999999e57 < y

    1. Initial program 1.9%

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

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

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

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

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

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

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

        \[\leadsto \left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right) + x \]
      7. mul-1-negN/A

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

        \[\leadsto \left(-\frac{\left(-z\right) - -1 \cdot \left(a \cdot x\right)}{y}\right) + x \]
      9. associate-*r*N/A

        \[\leadsto \left(-\frac{\left(-z\right) - \left(-1 \cdot a\right) \cdot x}{y}\right) + x \]
      10. mul-1-negN/A

        \[\leadsto \left(-\frac{\left(-z\right) - \left(\mathsf{neg}\left(a\right)\right) \cdot x}{y}\right) + x \]
      11. lower-*.f64N/A

        \[\leadsto \left(-\frac{\left(-z\right) - \left(\mathsf{neg}\left(a\right)\right) \cdot x}{y}\right) + x \]
      12. lower-neg.f6468.4

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

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

    if -1.05000000000000009e56 < y < 1.8999999999999999e57

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

      \[\leadsto \frac{\color{blue}{t + y \cdot \left(\frac{28832688827}{125000} + \frac{54929528941}{2000000} \cdot y\right)}}{\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{y \cdot \left(\frac{28832688827}{125000} + \frac{54929528941}{2000000} \cdot y\right) + \color{blue}{t}}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      2. *-commutativeN/A

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

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

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

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

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

Alternative 5: 74.2% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.19999999999999962e55 or 3.30000000000000002e56 < y

    1. Initial program 2.0%

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

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

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

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

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

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

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

        \[\leadsto \left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right) + x \]
      7. mul-1-negN/A

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

        \[\leadsto \left(-\frac{\left(-z\right) - -1 \cdot \left(a \cdot x\right)}{y}\right) + x \]
      9. associate-*r*N/A

        \[\leadsto \left(-\frac{\left(-z\right) - \left(-1 \cdot a\right) \cdot x}{y}\right) + x \]
      10. mul-1-negN/A

        \[\leadsto \left(-\frac{\left(-z\right) - \left(\mathsf{neg}\left(a\right)\right) \cdot x}{y}\right) + x \]
      11. lower-*.f64N/A

        \[\leadsto \left(-\frac{\left(-z\right) - \left(\mathsf{neg}\left(a\right)\right) \cdot x}{y}\right) + x \]
      12. lower-neg.f6468.2

        \[\leadsto \left(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x \]
    4. Applied rewrites68.2%

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

    if -8.19999999999999962e55 < y < 3.30000000000000002e56

    1. Initial program 93.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 \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.f6478.3

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

      \[\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} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 6: 67.1% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x\\ \mathbf{if}\;y \leq -8.2 \cdot 10^{+55}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{+56}:\\ \;\;\;\;\frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), 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 (+ (- (/ (- (- z) (* (- a) x)) y)) x)))
   (if (<= y -8.2e+55)
     t_1
     (if (<= y 3.3e+56) (/ t (fma (fma (fma (+ a y) y b) y 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 = -((-z - (-a * x)) / y) + x;
	double tmp;
	if (y <= -8.2e+55) {
		tmp = t_1;
	} else if (y <= 3.3e+56) {
		tmp = t / fma(fma(fma((a + y), y, b), y, c), y, i);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(-Float64(Float64(Float64(-z) - Float64(Float64(-a) * x)) / y)) + x)
	tmp = 0.0
	if (y <= -8.2e+55)
		tmp = t_1;
	elseif (y <= 3.3e+56)
		tmp = Float64(t / fma(fma(fma(Float64(a + y), y, b), y, 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[((-N[(N[((-z) - N[((-a) * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision]}, If[LessEqual[y, -8.2e+55], t$95$1, If[LessEqual[y, 3.3e+56], N[(t / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.19999999999999962e55 or 3.30000000000000002e56 < y

    1. Initial program 2.0%

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

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

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

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

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

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

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

        \[\leadsto \left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right) + x \]
      7. mul-1-negN/A

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

        \[\leadsto \left(-\frac{\left(-z\right) - -1 \cdot \left(a \cdot x\right)}{y}\right) + x \]
      9. associate-*r*N/A

        \[\leadsto \left(-\frac{\left(-z\right) - \left(-1 \cdot a\right) \cdot x}{y}\right) + x \]
      10. mul-1-negN/A

        \[\leadsto \left(-\frac{\left(-z\right) - \left(\mathsf{neg}\left(a\right)\right) \cdot x}{y}\right) + x \]
      11. lower-*.f64N/A

        \[\leadsto \left(-\frac{\left(-z\right) - \left(\mathsf{neg}\left(a\right)\right) \cdot x}{y}\right) + x \]
      12. lower-neg.f6468.2

        \[\leadsto \left(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x \]
    4. Applied rewrites68.2%

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

    if -8.19999999999999962e55 < y < 3.30000000000000002e56

    1. Initial program 93.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 t around inf

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)} \]
      13. lower-+.f6466.4

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

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

Alternative 7: 64.4% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;y \leq 0.0048:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{230661.510616}{i}, \frac{t}{\mathsf{fma}\left(c, y, i\right)}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.9e50 or 0.00479999999999999958 < y

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

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

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

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

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

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

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

        \[\leadsto \left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right) + x \]
      7. mul-1-negN/A

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

        \[\leadsto \left(-\frac{\left(-z\right) - -1 \cdot \left(a \cdot x\right)}{y}\right) + x \]
      9. associate-*r*N/A

        \[\leadsto \left(-\frac{\left(-z\right) - \left(-1 \cdot a\right) \cdot x}{y}\right) + x \]
      10. mul-1-negN/A

        \[\leadsto \left(-\frac{\left(-z\right) - \left(\mathsf{neg}\left(a\right)\right) \cdot x}{y}\right) + x \]
      11. lower-*.f64N/A

        \[\leadsto \left(-\frac{\left(-z\right) - \left(\mathsf{neg}\left(a\right)\right) \cdot x}{y}\right) + x \]
      12. lower-neg.f6461.8

        \[\leadsto \left(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x \]
    4. Applied rewrites61.8%

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

    if -2.9e50 < y < 0.00479999999999999958

    1. Initial program 96.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. Applied rewrites96.9%

      \[\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. lower-/.f6470.2

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

      \[\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}{\mathsf{fma}\left(\color{blue}{c}, y, i\right)}\right) \]
    7. Step-by-step derivation
      1. Applied rewrites66.6%

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

    Alternative 8: 59.6% accurate, 1.9× speedup?

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

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

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

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

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

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

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

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

          \[\leadsto \left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right) + x \]
        7. mul-1-negN/A

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

          \[\leadsto \left(-\frac{\left(-z\right) - -1 \cdot \left(a \cdot x\right)}{y}\right) + x \]
        9. associate-*r*N/A

          \[\leadsto \left(-\frac{\left(-z\right) - \left(-1 \cdot a\right) \cdot x}{y}\right) + x \]
        10. mul-1-negN/A

          \[\leadsto \left(-\frac{\left(-z\right) - \left(\mathsf{neg}\left(a\right)\right) \cdot x}{y}\right) + x \]
        11. lower-*.f64N/A

          \[\leadsto \left(-\frac{\left(-z\right) - \left(\mathsf{neg}\left(a\right)\right) \cdot x}{y}\right) + x \]
        12. lower-neg.f6467.5

          \[\leadsto \left(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x \]
      4. Applied rewrites67.5%

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

      if -1.4e55 < y < 1.2e49

      1. Initial program 93.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 c 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}^{2} \cdot \left(b + y \cdot \left(a + y\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}^{2} \cdot \left(b + y \cdot \left(a + y\right)\right)}} \]
      4. Applied rewrites72.9%

        \[\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(y \cdot y, \mathsf{fma}\left(a + y, y, b\right), i\right)}} \]
      5. Taylor expanded in y around 0

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

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

          \[\leadsto \frac{t}{\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(a, y, b\right), i\right)} \]
        3. Step-by-step derivation
          1. Applied rewrites53.6%

            \[\leadsto \frac{t}{\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(a, y, b\right), i\right)} \]
        4. Recombined 2 regimes into one program.
        5. Add Preprocessing

        Alternative 9: 59.3% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

              \[\leadsto \left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right) + x \]
            7. mul-1-negN/A

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

              \[\leadsto \left(-\frac{\left(-z\right) - -1 \cdot \left(a \cdot x\right)}{y}\right) + x \]
            9. associate-*r*N/A

              \[\leadsto \left(-\frac{\left(-z\right) - \left(-1 \cdot a\right) \cdot x}{y}\right) + x \]
            10. mul-1-negN/A

              \[\leadsto \left(-\frac{\left(-z\right) - \left(\mathsf{neg}\left(a\right)\right) \cdot x}{y}\right) + x \]
            11. lower-*.f64N/A

              \[\leadsto \left(-\frac{\left(-z\right) - \left(\mathsf{neg}\left(a\right)\right) \cdot x}{y}\right) + x \]
            12. lower-neg.f6461.8

              \[\leadsto \left(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x \]
          4. Applied rewrites61.8%

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

          if -2.9e50 < y < 0.00479999999999999958

          1. Initial program 96.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. Applied rewrites96.9%

            \[\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. lower-/.f6470.2

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

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

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

          Alternative 10: 54.9% accurate, 2.3× speedup?

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

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

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

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

              if -2650 < 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. Applied rewrites99.5%

                \[\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. lower-/.f6474.9

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

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

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

              Alternative 11: 54.8% accurate, 2.3× speedup?

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

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

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

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

                  if -2650 < 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 c 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}^{2} \cdot \left(b + y \cdot \left(a + y\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}^{2} \cdot \left(b + y \cdot \left(a + y\right)\right)}} \]
                  4. Applied rewrites77.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(y \cdot y, \mathsf{fma}\left(a + y, y, b\right), i\right)}} \]
                  5. Taylor expanded in y around 0

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{28832688827}{125000}, \frac{y}{i}, \frac{t}{i}\right) \]
                    3. lower-/.f6461.8

                      \[\leadsto \mathsf{fma}\left(230661.510616, \frac{y}{i}, \frac{t}{i}\right) \]
                  7. Applied rewrites61.8%

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

                Alternative 12: 53.1% accurate, 2.4× speedup?

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

                  1. Initial program 1.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} \]
                  3. Step-by-step derivation
                    1. Applied rewrites57.1%

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

                    if -3.40000000000000001e56 < y < 6.50000000000000007e64

                    1. Initial program 92.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 c 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}^{2} \cdot \left(b + y \cdot \left(a + y\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}^{2} \cdot \left(b + y \cdot \left(a + y\right)\right)}} \]
                    4. Applied rewrites71.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(y \cdot y, \mathsf{fma}\left(a + y, y, b\right), i\right)}} \]
                    5. Taylor expanded in y around 0

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

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

                        \[\leadsto \frac{t}{\mathsf{fma}\left(y \cdot y, b, i\right)} \]
                      3. Step-by-step derivation
                        1. Applied rewrites50.5%

                          \[\leadsto \frac{t}{\mathsf{fma}\left(y \cdot y, b, i\right)} \]
                      4. Recombined 2 regimes into one program.
                      5. Add Preprocessing

                      Alternative 13: 51.1% accurate, 3.9× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2650:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+64}:\\ \;\;\;\;\frac{t}{i}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b c i)
                       :precision binary64
                       (if (<= y -2650.0) x (if (<= y 6.5e+64) (/ t i) x)))
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double tmp;
                      	if (y <= -2650.0) {
                      		tmp = x;
                      	} else if (y <= 6.5e+64) {
                      		tmp = t / i;
                      	} else {
                      		tmp = x;
                      	}
                      	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 <= (-2650.0d0)) then
                              tmp = x
                          else if (y <= 6.5d+64) then
                              tmp = t / i
                          else
                              tmp = x
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double tmp;
                      	if (y <= -2650.0) {
                      		tmp = x;
                      	} else if (y <= 6.5e+64) {
                      		tmp = t / i;
                      	} else {
                      		tmp = x;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t, a, b, c, i):
                      	tmp = 0
                      	if y <= -2650.0:
                      		tmp = x
                      	elif y <= 6.5e+64:
                      		tmp = t / i
                      	else:
                      		tmp = x
                      	return tmp
                      
                      function code(x, y, z, t, a, b, c, i)
                      	tmp = 0.0
                      	if (y <= -2650.0)
                      		tmp = x;
                      	elseif (y <= 6.5e+64)
                      		tmp = Float64(t / i);
                      	else
                      		tmp = x;
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y, z, t, a, b, c, i)
                      	tmp = 0.0;
                      	if (y <= -2650.0)
                      		tmp = x;
                      	elseif (y <= 6.5e+64)
                      		tmp = t / i;
                      	else
                      		tmp = x;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -2650.0], x, If[LessEqual[y, 6.5e+64], N[(t / i), $MachinePrecision], x]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;y \leq -2650:\\
                      \;\;\;\;x\\
                      
                      \mathbf{elif}\;y \leq 6.5 \cdot 10^{+64}:\\
                      \;\;\;\;\frac{t}{i}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;x\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if y < -2650 or 6.50000000000000007e64 < y

                        1. Initial program 6.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 y around inf

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

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

                          if -2650 < y < 6.50000000000000007e64

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

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

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

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

                        Alternative 14: 25.6% 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.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 inf

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

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

                          Reproduce

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