Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2

Percentage Accurate: 56.9% → 82.5%
Time: 10.3s
Alternatives: 16
Speedup: 1.7×

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 16 alternatives:

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

Initial Program: 56.9% accurate, 1.0× speedup?

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

    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 56.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.f6430.5

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

      \[\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 2: 79.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x\\ t_2 := \left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i\\ \mathbf{if}\;y \leq -4 \cdot 10^{+55}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1 \cdot 10^{-58}:\\ \;\;\;\;\frac{\left(\left(y \cdot y\right) \cdot z\right) \cdot y + t}{t\_2}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-5}:\\ \;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{t\_2}\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+41}:\\ \;\;\;\;\frac{\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot x}{t\_2}\\ \mathbf{elif}\;y \leq 1.72 \cdot 10^{+106}:\\ \;\;\;\;y \cdot \left(\frac{27464.7644705}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\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))
        (t_2 (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
   (if (<= y -4e+55)
     t_1
     (if (<= y -1e-58)
       (/ (+ (* (* (* y y) z) y) t) t_2)
       (if (<= y 3.1e-5)
         (/ (fma 230661.510616 y t) t_2)
         (if (<= y 9.5e+41)
           (/ (* (* (* y y) (* y y)) x) t_2)
           (if (<= y 1.72e+106)
             (*
              y
              (+ (/ 27464.7644705 (* a (* y y))) (+ (/ x a) (/ z (* a y)))))
             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 t_2 = ((((((y + a) * y) + b) * y) + c) * y) + i;
	double tmp;
	if (y <= -4e+55) {
		tmp = t_1;
	} else if (y <= -1e-58) {
		tmp = ((((y * y) * z) * y) + t) / t_2;
	} else if (y <= 3.1e-5) {
		tmp = fma(230661.510616, y, t) / t_2;
	} else if (y <= 9.5e+41) {
		tmp = (((y * y) * (y * y)) * x) / t_2;
	} else if (y <= 1.72e+106) {
		tmp = y * ((27464.7644705 / (a * (y * y))) + ((x / a) + (z / (a * y))));
	} 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)
	t_2 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)
	tmp = 0.0
	if (y <= -4e+55)
		tmp = t_1;
	elseif (y <= -1e-58)
		tmp = Float64(Float64(Float64(Float64(Float64(y * y) * z) * y) + t) / t_2);
	elseif (y <= 3.1e-5)
		tmp = Float64(fma(230661.510616, y, t) / t_2);
	elseif (y <= 9.5e+41)
		tmp = Float64(Float64(Float64(Float64(y * y) * Float64(y * y)) * x) / t_2);
	elseif (y <= 1.72e+106)
		tmp = Float64(y * Float64(Float64(27464.7644705 / Float64(a * Float64(y * y))) + Float64(Float64(x / a) + Float64(z / Float64(a * y)))));
	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]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]}, If[LessEqual[y, -4e+55], t$95$1, If[LessEqual[y, -1e-58], N[(N[(N[(N[(N[(y * y), $MachinePrecision] * z), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, 3.1e-5], N[(N[(230661.510616 * y + t), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, 9.5e+41], N[(N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, 1.72e+106], N[(y * N[(N[(27464.7644705 / N[(a * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x / a), $MachinePrecision] + N[(z / N[(a * y), $MachinePrecision]), $MachinePrecision]), $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\\
t_2 := \left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i\\
\mathbf{if}\;y \leq -4 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1 \cdot 10^{-58}:\\
\;\;\;\;\frac{\left(\left(y \cdot y\right) \cdot z\right) \cdot y + t}{t\_2}\\

\mathbf{elif}\;y \leq 3.1 \cdot 10^{-5}:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{t\_2}\\

\mathbf{elif}\;y \leq 9.5 \cdot 10^{+41}:\\
\;\;\;\;\frac{\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot x}{t\_2}\\

\mathbf{elif}\;y \leq 1.72 \cdot 10^{+106}:\\
\;\;\;\;y \cdot \left(\frac{27464.7644705}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -4.00000000000000004e55 or 1.7200000000000001e106 < y

    1. Initial program 56.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.f6430.5

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

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

    if -4.00000000000000004e55 < y < -1e-58

    1. Initial program 56.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 z around inf

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

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

        \[\leadsto \frac{\left(\left(y \cdot y\right) \cdot z\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      3. lower-*.f6444.9

        \[\leadsto \frac{\left(\left(y \cdot y\right) \cdot z\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    4. Applied rewrites44.9%

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

    if -1e-58 < y < 3.10000000000000014e-5

    1. Initial program 56.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 + \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.f6448.6

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

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

    if 3.10000000000000014e-5 < y < 9.4999999999999996e41

    1. Initial program 56.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 x around inf

      \[\leadsto \frac{\color{blue}{x \cdot {y}^{4}}}{\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}^{4} \cdot \color{blue}{x}}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      2. lower-*.f64N/A

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

        \[\leadsto \frac{\left({y}^{\left(\frac{4}{2}\right)} \cdot {y}^{\left(\frac{4}{2}\right)}\right) \cdot x}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      4. metadata-evalN/A

        \[\leadsto \frac{\left({y}^{2} \cdot {y}^{\left(\frac{4}{2}\right)}\right) \cdot x}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      5. metadata-evalN/A

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

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

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

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

        \[\leadsto \frac{\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot x}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      10. lower-*.f649.1

        \[\leadsto \frac{\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot x}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    4. Applied rewrites9.1%

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

    if 9.4999999999999996e41 < y < 1.7200000000000001e106

    1. Initial program 56.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. Applied rewrites57.7%

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(\frac{\frac{54929528941}{2000000}}{a \cdot {y}^{2}} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\right) \]
      5. pow2N/A

        \[\leadsto y \cdot \left(\frac{\frac{54929528941}{2000000}}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\right) \]
      6. lift-*.f64N/A

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

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

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

        \[\leadsto y \cdot \left(\frac{\frac{54929528941}{2000000}}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot \color{blue}{y}}\right)\right) \]
      10. lower-*.f6410.8

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

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

Alternative 3: 74.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x\\ t_2 := \left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i\\ \mathbf{if}\;y \leq -4 \cdot 10^{+55}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1 \cdot 10^{-58}:\\ \;\;\;\;\frac{\left(\left(y \cdot y\right) \cdot z\right) \cdot y + t}{t\_2}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-5}:\\ \;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{t\_2}\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+41}:\\ \;\;\;\;\frac{\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot x}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\ \mathbf{elif}\;y \leq 1.72 \cdot 10^{+106}:\\ \;\;\;\;y \cdot \left(\frac{27464.7644705}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\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))
        (t_2 (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
   (if (<= y -4e+55)
     t_1
     (if (<= y -1e-58)
       (/ (+ (* (* (* y y) z) y) t) t_2)
       (if (<= y 3.1e-5)
         (/ (fma 230661.510616 y t) t_2)
         (if (<= y 9.5e+41)
           (/ (* (* (* y y) (* y y)) x) (fma (fma (fma (+ a y) y b) y c) y i))
           (if (<= y 1.72e+106)
             (*
              y
              (+ (/ 27464.7644705 (* a (* y y))) (+ (/ x a) (/ z (* a y)))))
             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 t_2 = ((((((y + a) * y) + b) * y) + c) * y) + i;
	double tmp;
	if (y <= -4e+55) {
		tmp = t_1;
	} else if (y <= -1e-58) {
		tmp = ((((y * y) * z) * y) + t) / t_2;
	} else if (y <= 3.1e-5) {
		tmp = fma(230661.510616, y, t) / t_2;
	} else if (y <= 9.5e+41) {
		tmp = (((y * y) * (y * y)) * x) / fma(fma(fma((a + y), y, b), y, c), y, i);
	} else if (y <= 1.72e+106) {
		tmp = y * ((27464.7644705 / (a * (y * y))) + ((x / a) + (z / (a * y))));
	} 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)
	t_2 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)
	tmp = 0.0
	if (y <= -4e+55)
		tmp = t_1;
	elseif (y <= -1e-58)
		tmp = Float64(Float64(Float64(Float64(Float64(y * y) * z) * y) + t) / t_2);
	elseif (y <= 3.1e-5)
		tmp = Float64(fma(230661.510616, y, t) / t_2);
	elseif (y <= 9.5e+41)
		tmp = Float64(Float64(Float64(Float64(y * y) * Float64(y * y)) * x) / fma(fma(fma(Float64(a + y), y, b), y, c), y, i));
	elseif (y <= 1.72e+106)
		tmp = Float64(y * Float64(Float64(27464.7644705 / Float64(a * Float64(y * y))) + Float64(Float64(x / a) + Float64(z / Float64(a * y)))));
	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]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]}, If[LessEqual[y, -4e+55], t$95$1, If[LessEqual[y, -1e-58], N[(N[(N[(N[(N[(y * y), $MachinePrecision] * z), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, 3.1e-5], N[(N[(230661.510616 * y + t), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, 9.5e+41], N[(N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.72e+106], N[(y * N[(N[(27464.7644705 / N[(a * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x / a), $MachinePrecision] + N[(z / N[(a * y), $MachinePrecision]), $MachinePrecision]), $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\\
t_2 := \left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i\\
\mathbf{if}\;y \leq -4 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1 \cdot 10^{-58}:\\
\;\;\;\;\frac{\left(\left(y \cdot y\right) \cdot z\right) \cdot y + t}{t\_2}\\

\mathbf{elif}\;y \leq 3.1 \cdot 10^{-5}:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{t\_2}\\

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

\mathbf{elif}\;y \leq 1.72 \cdot 10^{+106}:\\
\;\;\;\;y \cdot \left(\frac{27464.7644705}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -4.00000000000000004e55 or 1.7200000000000001e106 < y

    1. Initial program 56.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.f6430.5

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

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

    if -4.00000000000000004e55 < y < -1e-58

    1. Initial program 56.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 z around inf

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

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

        \[\leadsto \frac{\left(\left(y \cdot y\right) \cdot z\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
      3. lower-*.f6444.9

        \[\leadsto \frac{\left(\left(y \cdot y\right) \cdot z\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    4. Applied rewrites44.9%

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

    if -1e-58 < y < 3.10000000000000014e-5

    1. Initial program 56.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 + \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.f6448.6

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

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

    if 3.10000000000000014e-5 < y < 9.4999999999999996e41

    1. Initial program 56.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 x around inf

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

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

        \[\leadsto \frac{{y}^{4} \cdot x}{\color{blue}{i} + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      4. sqr-powN/A

        \[\leadsto \frac{\left({y}^{\left(\frac{4}{2}\right)} \cdot {y}^{\left(\frac{4}{2}\right)}\right) \cdot x}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      5. metadata-evalN/A

        \[\leadsto \frac{\left({y}^{2} \cdot {y}^{\left(\frac{4}{2}\right)}\right) \cdot x}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      6. metadata-evalN/A

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

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

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

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

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

        \[\leadsto \frac{\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot x}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      12. +-commutativeN/A

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

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

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

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

    if 9.4999999999999996e41 < y < 1.7200000000000001e106

    1. Initial program 56.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. Applied rewrites57.7%

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(\frac{\frac{54929528941}{2000000}}{a \cdot {y}^{2}} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\right) \]
      5. pow2N/A

        \[\leadsto y \cdot \left(\frac{\frac{54929528941}{2000000}}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\right) \]
      6. lift-*.f64N/A

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

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

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

        \[\leadsto y \cdot \left(\frac{\frac{54929528941}{2000000}}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot \color{blue}{y}}\right)\right) \]
      10. lower-*.f6410.8

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

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

Alternative 4: 74.7% accurate, 1.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 -1.2 \cdot 10^{+56}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{+44}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, y, b\right), y, c\right), y, i\right)}\\ \mathbf{elif}\;y \leq 1.72 \cdot 10^{+106}:\\ \;\;\;\;y \cdot \left(\frac{27464.7644705}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\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 -1.2e+56)
     t_1
     (if (<= y 3.8e+44)
       (/
        (fma (fma (fma (fma y x z) y 27464.7644705) y 230661.510616) y t)
        (fma (fma (fma y y b) y c) y i))
       (if (<= y 1.72e+106)
         (* y (+ (/ 27464.7644705 (* a (* y y))) (+ (/ x a) (/ z (* a y)))))
         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.2e+56) {
		tmp = t_1;
	} else if (y <= 3.8e+44) {
		tmp = fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(y, y, b), y, c), y, i);
	} else if (y <= 1.72e+106) {
		tmp = y * ((27464.7644705 / (a * (y * y))) + ((x / a) + (z / (a * y))));
	} 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.2e+56)
		tmp = t_1;
	elseif (y <= 3.8e+44)
		tmp = Float64(fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(y, y, b), y, c), y, i));
	elseif (y <= 1.72e+106)
		tmp = Float64(y * Float64(Float64(27464.7644705 / Float64(a * Float64(y * y))) + Float64(Float64(x / a) + Float64(z / Float64(a * y)))));
	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.2e+56], t$95$1, If[LessEqual[y, 3.8e+44], N[(N[(N[(N[(N[(y * x + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(y * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.72e+106], N[(y * N[(N[(27464.7644705 / N[(a * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x / a), $MachinePrecision] + N[(z / N[(a * y), $MachinePrecision]), $MachinePrecision]), $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 -1.2 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 1.72 \cdot 10^{+106}:\\
\;\;\;\;y \cdot \left(\frac{27464.7644705}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.20000000000000007e56 or 1.7200000000000001e106 < y

    1. Initial program 56.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.f6430.5

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

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

    if -1.20000000000000007e56 < y < 3.8000000000000002e44

    1. Initial program 56.9%

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

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

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

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

    if 3.8000000000000002e44 < y < 1.7200000000000001e106

    1. Initial program 56.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. Applied rewrites57.7%

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(\frac{\frac{54929528941}{2000000}}{a \cdot {y}^{2}} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\right) \]
      5. pow2N/A

        \[\leadsto y \cdot \left(\frac{\frac{54929528941}{2000000}}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\right) \]
      6. lift-*.f64N/A

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

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

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

        \[\leadsto y \cdot \left(\frac{\frac{54929528941}{2000000}}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot \color{blue}{y}}\right)\right) \]
      10. lower-*.f6410.8

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

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

Alternative 5: 74.0% accurate, 1.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 -7 \cdot 10^{+31}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-5}:\\ \;\;\;\;\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{elif}\;y \leq 9.5 \cdot 10^{+41}:\\ \;\;\;\;\frac{\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot x}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\ \mathbf{elif}\;y \leq 1.72 \cdot 10^{+106}:\\ \;\;\;\;y \cdot \left(\frac{27464.7644705}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\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 -7e+31)
     t_1
     (if (<= y 3.1e-5)
       (/ (fma 230661.510616 y t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
       (if (<= y 9.5e+41)
         (/ (* (* (* y y) (* y y)) x) (fma (fma (fma (+ a y) y b) y c) y i))
         (if (<= y 1.72e+106)
           (* y (+ (/ 27464.7644705 (* a (* y y))) (+ (/ x a) (/ z (* a y)))))
           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 <= -7e+31) {
		tmp = t_1;
	} else if (y <= 3.1e-5) {
		tmp = fma(230661.510616, y, t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
	} else if (y <= 9.5e+41) {
		tmp = (((y * y) * (y * y)) * x) / fma(fma(fma((a + y), y, b), y, c), y, i);
	} else if (y <= 1.72e+106) {
		tmp = y * ((27464.7644705 / (a * (y * y))) + ((x / a) + (z / (a * y))));
	} 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 <= -7e+31)
		tmp = t_1;
	elseif (y <= 3.1e-5)
		tmp = Float64(fma(230661.510616, y, t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i));
	elseif (y <= 9.5e+41)
		tmp = Float64(Float64(Float64(Float64(y * y) * Float64(y * y)) * x) / fma(fma(fma(Float64(a + y), y, b), y, c), y, i));
	elseif (y <= 1.72e+106)
		tmp = Float64(y * Float64(Float64(27464.7644705 / Float64(a * Float64(y * y))) + Float64(Float64(x / a) + Float64(z / Float64(a * y)))));
	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, -7e+31], t$95$1, If[LessEqual[y, 3.1e-5], 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], If[LessEqual[y, 9.5e+41], N[(N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.72e+106], N[(y * N[(N[(27464.7644705 / N[(a * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x / a), $MachinePrecision] + N[(z / N[(a * y), $MachinePrecision]), $MachinePrecision]), $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 -7 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 3.1 \cdot 10^{-5}:\\
\;\;\;\;\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{elif}\;y \leq 9.5 \cdot 10^{+41}:\\
\;\;\;\;\frac{\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot x}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\

\mathbf{elif}\;y \leq 1.72 \cdot 10^{+106}:\\
\;\;\;\;y \cdot \left(\frac{27464.7644705}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7e31 or 1.7200000000000001e106 < y

    1. Initial program 56.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.f6430.5

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

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

    if -7e31 < y < 3.10000000000000014e-5

    1. Initial program 56.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 + \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.f6448.6

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

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

    if 3.10000000000000014e-5 < y < 9.4999999999999996e41

    1. Initial program 56.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 x around inf

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

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

        \[\leadsto \frac{{y}^{4} \cdot x}{\color{blue}{i} + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      4. sqr-powN/A

        \[\leadsto \frac{\left({y}^{\left(\frac{4}{2}\right)} \cdot {y}^{\left(\frac{4}{2}\right)}\right) \cdot x}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      5. metadata-evalN/A

        \[\leadsto \frac{\left({y}^{2} \cdot {y}^{\left(\frac{4}{2}\right)}\right) \cdot x}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      6. metadata-evalN/A

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

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

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

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

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

        \[\leadsto \frac{\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot x}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} \]
      12. +-commutativeN/A

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

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

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

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

    if 9.4999999999999996e41 < y < 1.7200000000000001e106

    1. Initial program 56.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. Applied rewrites57.7%

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(\frac{\frac{54929528941}{2000000}}{a \cdot {y}^{2}} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\right) \]
      5. pow2N/A

        \[\leadsto y \cdot \left(\frac{\frac{54929528941}{2000000}}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\right) \]
      6. lift-*.f64N/A

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

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

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

        \[\leadsto y \cdot \left(\frac{\frac{54929528941}{2000000}}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot \color{blue}{y}}\right)\right) \]
      10. lower-*.f6410.8

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

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

Alternative 6: 73.9% accurate, 1.2× 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 -7 \cdot 10^{+31}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 0.00023:\\ \;\;\;\;\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{elif}\;y \leq 1.72 \cdot 10^{+106}:\\ \;\;\;\;y \cdot \left(\frac{27464.7644705}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\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 -7e+31)
     t_1
     (if (<= y 0.00023)
       (/ (fma 230661.510616 y t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
       (if (<= y 1.72e+106)
         (* y (+ (/ 27464.7644705 (* a (* y y))) (+ (/ x a) (/ z (* a y)))))
         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 <= -7e+31) {
		tmp = t_1;
	} else if (y <= 0.00023) {
		tmp = fma(230661.510616, y, t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
	} else if (y <= 1.72e+106) {
		tmp = y * ((27464.7644705 / (a * (y * y))) + ((x / a) + (z / (a * y))));
	} 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 <= -7e+31)
		tmp = t_1;
	elseif (y <= 0.00023)
		tmp = Float64(fma(230661.510616, y, t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i));
	elseif (y <= 1.72e+106)
		tmp = Float64(y * Float64(Float64(27464.7644705 / Float64(a * Float64(y * y))) + Float64(Float64(x / a) + Float64(z / Float64(a * y)))));
	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, -7e+31], t$95$1, If[LessEqual[y, 0.00023], 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], If[LessEqual[y, 1.72e+106], N[(y * N[(N[(27464.7644705 / N[(a * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x / a), $MachinePrecision] + N[(z / N[(a * y), $MachinePrecision]), $MachinePrecision]), $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 -7 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 0.00023:\\
\;\;\;\;\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{elif}\;y \leq 1.72 \cdot 10^{+106}:\\
\;\;\;\;y \cdot \left(\frac{27464.7644705}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7e31 or 1.7200000000000001e106 < y

    1. Initial program 56.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.f6430.5

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

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

    if -7e31 < y < 2.3000000000000001e-4

    1. Initial program 56.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 + \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.f6448.6

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

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

    if 2.3000000000000001e-4 < y < 1.7200000000000001e106

    1. Initial program 56.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. Applied rewrites57.7%

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(\frac{\frac{54929528941}{2000000}}{a \cdot {y}^{2}} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\right) \]
      5. pow2N/A

        \[\leadsto y \cdot \left(\frac{\frac{54929528941}{2000000}}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\right) \]
      6. lift-*.f64N/A

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

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

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

        \[\leadsto y \cdot \left(\frac{\frac{54929528941}{2000000}}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot \color{blue}{y}}\right)\right) \]
      10. lower-*.f6410.8

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

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

Alternative 7: 70.9% accurate, 0.4× 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 -4 \cdot 10^{+60}:\\ \;\;\;\;\frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\frac{\left(\left(y \cdot z + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\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)
          (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))))
   (if (<= t_1 -4e+60)
     (/ t (fma (fma (fma (+ a y) y b) y c) y i))
     (if (<= t_1 INFINITY)
       (/
        (+ (* (+ (* (+ (* y z) 27464.7644705) y) 230661.510616) y) t)
        (fma c 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) / (((((((y + a) * y) + b) * y) + c) * y) + i);
	double tmp;
	if (t_1 <= -4e+60) {
		tmp = t / fma(fma(fma((a + y), y, b), y, c), y, i);
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = ((((((y * z) + 27464.7644705) * y) + 230661.510616) * y) + t) / fma(c, 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(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 <= -4e+60)
		tmp = Float64(t / fma(fma(fma(Float64(a + y), y, b), y, c), y, i));
	elseif (t_1 <= Inf)
		tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(y * z) + 27464.7644705) * y) + 230661.510616) * y) + t) / fma(c, 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[(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, -4e+60], N[(t / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(N[(N[(N[(N[(N[(y * z), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(c * y + i), $MachinePrecision]), $MachinePrecision], 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 -4 \cdot 10^{+60}:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{\left(\left(y \cdot z + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\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)) < -3.9999999999999998e60

    1. Initial program 56.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 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 + \left(a + y\right) \cdot y\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-+.f6441.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 rewrites41.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)}} \]

    if -3.9999999999999998e60 < (/.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 56.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{\left(\left(\left(x \cdot y + z\right) \cdot y + \frac{54929528941}{2000000}\right) \cdot y + \frac{28832688827}{125000}\right) \cdot y + t}{\color{blue}{i + c \cdot y}} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

    1. Initial program 56.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.f6430.5

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

      \[\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 8: 69.1% accurate, 1.7× 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.5 \cdot 10^{+30}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 0.00022:\\ \;\;\;\;\frac{\left(27464.7644705 \cdot y + 230661.510616\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\ \mathbf{elif}\;y \leq 1.72 \cdot 10^{+106}:\\ \;\;\;\;y \cdot \left(\frac{x}{a} + \frac{z}{a \cdot y}\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.5e+30)
     t_1
     (if (<= y 0.00022)
       (/ (+ (* (+ (* 27464.7644705 y) 230661.510616) y) t) (fma c y i))
       (if (<= y 1.72e+106) (* y (+ (/ x a) (/ z (* a y)))) 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.5e+30) {
		tmp = t_1;
	} else if (y <= 0.00022) {
		tmp = ((((27464.7644705 * y) + 230661.510616) * y) + t) / fma(c, y, i);
	} else if (y <= 1.72e+106) {
		tmp = y * ((x / a) + (z / (a * y)));
	} 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.5e+30)
		tmp = t_1;
	elseif (y <= 0.00022)
		tmp = Float64(Float64(Float64(Float64(Float64(27464.7644705 * y) + 230661.510616) * y) + t) / fma(c, y, i));
	elseif (y <= 1.72e+106)
		tmp = Float64(y * Float64(Float64(x / a) + Float64(z / Float64(a * y))));
	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.5e+30], t$95$1, If[LessEqual[y, 0.00022], N[(N[(N[(N[(N[(27464.7644705 * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(c * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.72e+106], N[(y * N[(N[(x / a), $MachinePrecision] + N[(z / N[(a * y), $MachinePrecision]), $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 -1.5 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 1.72 \cdot 10^{+106}:\\
\;\;\;\;y \cdot \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.49999999999999989e30 or 1.7200000000000001e106 < y

    1. Initial program 56.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.f6430.5

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

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

    if -1.49999999999999989e30 < y < 2.20000000000000008e-4

    1. Initial program 56.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{\left(\left(\left(x \cdot y + z\right) \cdot y + \frac{54929528941}{2000000}\right) \cdot y + \frac{28832688827}{125000}\right) \cdot y + t}{\color{blue}{i + c \cdot y}} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

    if 2.20000000000000008e-4 < y < 1.7200000000000001e106

    1. Initial program 56.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. Applied rewrites57.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 69.0% accurate, 1.7× 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.5 \cdot 10^{+30}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 0.00022:\\ \;\;\;\;\frac{230661.510616 \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\ \mathbf{elif}\;y \leq 1.72 \cdot 10^{+106}:\\ \;\;\;\;y \cdot \left(\frac{x}{a} + \frac{z}{a \cdot y}\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.5e+30)
     t_1
     (if (<= y 0.00022)
       (/ (+ (* 230661.510616 y) t) (fma c y i))
       (if (<= y 1.72e+106) (* y (+ (/ x a) (/ z (* a y)))) 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.5e+30) {
		tmp = t_1;
	} else if (y <= 0.00022) {
		tmp = ((230661.510616 * y) + t) / fma(c, y, i);
	} else if (y <= 1.72e+106) {
		tmp = y * ((x / a) + (z / (a * y)));
	} 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.5e+30)
		tmp = t_1;
	elseif (y <= 0.00022)
		tmp = Float64(Float64(Float64(230661.510616 * y) + t) / fma(c, y, i));
	elseif (y <= 1.72e+106)
		tmp = Float64(y * Float64(Float64(x / a) + Float64(z / Float64(a * y))));
	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.5e+30], t$95$1, If[LessEqual[y, 0.00022], N[(N[(N[(230661.510616 * y), $MachinePrecision] + t), $MachinePrecision] / N[(c * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.72e+106], N[(y * N[(N[(x / a), $MachinePrecision] + N[(z / N[(a * y), $MachinePrecision]), $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 -1.5 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 1.72 \cdot 10^{+106}:\\
\;\;\;\;y \cdot \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.49999999999999989e30 or 1.7200000000000001e106 < y

    1. Initial program 56.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.f6430.5

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

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

    if -1.49999999999999989e30 < y < 2.20000000000000008e-4

    1. Initial program 56.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{\left(\left(\left(x \cdot y + z\right) \cdot y + \frac{54929528941}{2000000}\right) \cdot y + \frac{28832688827}{125000}\right) \cdot y + t}{\color{blue}{i + c \cdot y}} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

    if 2.20000000000000008e-4 < y < 1.7200000000000001e106

    1. Initial program 56.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. Applied rewrites57.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 68.5% accurate, 0.4× 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 -1 \cdot 10^{+82}:\\ \;\;\;\;\frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\frac{\left(27464.7644705 \cdot y + 230661.510616\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\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)
          (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))))
   (if (<= t_1 -1e+82)
     (/ t (fma (fma (fma (+ a y) y b) y c) y i))
     (if (<= t_1 INFINITY)
       (/ (+ (* (+ (* 27464.7644705 y) 230661.510616) y) t) (fma c 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) / (((((((y + a) * y) + b) * y) + c) * y) + i);
	double tmp;
	if (t_1 <= -1e+82) {
		tmp = t / fma(fma(fma((a + y), y, b), y, c), y, i);
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = ((((27464.7644705 * y) + 230661.510616) * y) + t) / fma(c, 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(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 <= -1e+82)
		tmp = Float64(t / fma(fma(fma(Float64(a + y), y, b), y, c), y, i));
	elseif (t_1 <= Inf)
		tmp = Float64(Float64(Float64(Float64(Float64(27464.7644705 * y) + 230661.510616) * y) + t) / fma(c, 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[(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, -1e+82], N[(t / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(N[(N[(N[(27464.7644705 * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(c * y + i), $MachinePrecision]), $MachinePrecision], 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 -1 \cdot 10^{+82}:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{\left(27464.7644705 \cdot y + 230661.510616\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\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)) < -9.9999999999999996e81

    1. Initial program 56.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 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 + \left(a + y\right) \cdot y\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-+.f6441.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 rewrites41.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)}} \]

    if -9.9999999999999996e81 < (/.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 56.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{\left(\left(\left(x \cdot y + z\right) \cdot y + \frac{54929528941}{2000000}\right) \cdot y + \frac{28832688827}{125000}\right) \cdot y + t}{\color{blue}{i + c \cdot y}} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

    1. Initial program 56.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.f6430.5

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

      \[\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 11: 67.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq \infty:\\ \;\;\;\;\frac{230661.510616 \cdot y + t}{\mathsf{fma}\left(c, y, i\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
 (if (<=
      (/
       (+
        (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
        t)
       (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
      INFINITY)
   (/ (+ (* 230661.510616 y) t) (fma c 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 tmp;
	if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
		tmp = ((230661.510616 * y) + t) / fma(c, y, i);
	} else {
		tmp = -((-z - (-a * x)) / y) + x;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) <= Inf)
		tmp = Float64(Float64(Float64(230661.510616 * y) + t) / fma(c, 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_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(230661.510616 * y), $MachinePrecision] + t), $MachinePrecision] / N[(c * y + i), $MachinePrecision]), $MachinePrecision], N[((-N[(N[((-z) - N[((-a) * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq \infty:\\
\;\;\;\;\frac{230661.510616 \cdot y + t}{\mathsf{fma}\left(c, y, i\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 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 56.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{\left(\left(\left(x \cdot y + z\right) \cdot y + \frac{54929528941}{2000000}\right) \cdot y + \frac{28832688827}{125000}\right) \cdot y + t}{\color{blue}{i + c \cdot y}} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

    1. Initial program 56.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.f6430.5

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

      \[\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 12: 45.8% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 56.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{\left(\left(\left(x \cdot y + z\right) \cdot y + \frac{54929528941}{2000000}\right) \cdot y + \frac{28832688827}{125000}\right) \cdot y + t}{\color{blue}{i + c \cdot y}} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

    1. Initial program 56.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. Applied rewrites57.7%

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

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

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

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

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

        \[\leadsto \frac{x \cdot y}{a} \]
      2. lower-*.f649.6

        \[\leadsto \frac{x \cdot y}{a} \]
    8. Applied rewrites9.6%

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

Alternative 13: 38.8% accurate, 3.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.6 \cdot 10^{-6}:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(c, y, i\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 2.60000000000000009e-6

    1. Initial program 56.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{\left(\left(\left(x \cdot y + z\right) \cdot y + \frac{54929528941}{2000000}\right) \cdot y + \frac{28832688827}{125000}\right) \cdot y + t}{\color{blue}{i + c \cdot y}} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

      if 2.60000000000000009e-6 < y

      1. Initial program 56.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. Applied rewrites57.7%

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

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

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

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

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

          \[\leadsto \frac{x \cdot y}{a} \]
        2. lower-*.f649.6

          \[\leadsto \frac{x \cdot y}{a} \]
      8. Applied rewrites9.6%

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

    Alternative 14: 32.0% accurate, 0.8× speedup?

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

      1. Initial program 56.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 \color{blue}{\frac{t}{i}} \]
      3. Step-by-step derivation
        1. lower-/.f6429.0

          \[\leadsto \frac{t}{\color{blue}{i}} \]
      4. Applied rewrites29.0%

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

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

      1. Initial program 56.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. Applied rewrites57.7%

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

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

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

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

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

          \[\leadsto \frac{x \cdot y}{a} \]
        2. lower-*.f649.6

          \[\leadsto \frac{x \cdot y}{a} \]
      8. Applied rewrites9.6%

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

    Alternative 15: 31.1% accurate, 0.9× speedup?

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

      1. Initial program 56.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 \color{blue}{\frac{t}{i}} \]
      3. Step-by-step derivation
        1. lower-/.f6429.0

          \[\leadsto \frac{t}{\color{blue}{i}} \]
      4. Applied rewrites29.0%

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

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

      1. Initial program 56.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. Applied rewrites57.7%

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

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

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

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

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

          \[\leadsto \frac{z}{a} \]
      8. Applied rewrites7.5%

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

    Alternative 16: 7.5% accurate, 10.8× speedup?

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

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

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

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

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

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

        \[\leadsto \frac{z}{a} \]
    8. Applied rewrites7.5%

      \[\leadsto \frac{z}{\color{blue}{a}} \]
    9. Add Preprocessing

    Reproduce

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