Linear.Matrix:det33 from linear-1.19.1.3

Percentage Accurate: 74.0% → 83.0%
Time: 7.0s
Alternatives: 25
Speedup: 0.5×

Specification

?
\[\begin{array}{l} \\ \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (+
  (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
  (* j (- (* c t) (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
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, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j):
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
function code(x, y, z, t, a, b, c, i, j)
	return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y))))
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\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 25 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: 74.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (+
  (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
  (* j (- (* c t) (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
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, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j):
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
function code(x, y, z, t, a, b, c, i, j)
	return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y))))
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\end{array}

Alternative 1: 83.0% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\right) \cdot y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) < +inf.0

    1. Initial program 91.7%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Add Preprocessing

    if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y))))

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6444.2

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites44.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    6. Taylor expanded in z around -inf

      \[\leadsto \left(-1 \cdot \left(z \cdot \left(-1 \cdot x + \frac{i \cdot j}{z}\right)\right)\right) \cdot y \]
    7. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

        \[\leadsto \left(\left(-z\right) \cdot \left(-1 \cdot x + \frac{i \cdot j}{z}\right)\right) \cdot y \]
      5. +-commutativeN/A

        \[\leadsto \left(\left(-z\right) \cdot \left(\frac{i \cdot j}{z} + -1 \cdot x\right)\right) \cdot y \]
      6. associate-/l*N/A

        \[\leadsto \left(\left(-z\right) \cdot \left(i \cdot \frac{j}{z} + -1 \cdot x\right)\right) \cdot y \]
      7. lower-fma.f64N/A

        \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -1 \cdot x\right)\right) \cdot y \]
      8. lower-/.f64N/A

        \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -1 \cdot x\right)\right) \cdot y \]
      9. mul-1-negN/A

        \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, \mathsf{neg}\left(x\right)\right)\right) \cdot y \]
      10. lower-neg.f6446.6

        \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\right) \cdot y \]
    8. Applied rewrites46.6%

      \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\right) \cdot y \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 72.2% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;b \leq 3.8 \cdot 10^{-159}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -7e-109 or 3.8000000000000001e-159 < b

    1. Initial program 74.6%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

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

        \[\leadsto \left(-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + \left(c \cdot \left(j \cdot t\right) + y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)\right)\right) - \color{blue}{b \cdot \left(c \cdot z - a \cdot i\right)} \]
    5. Applied rewrites75.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(j \cdot c, t, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\right) - \mathsf{fma}\left(-a, i, c \cdot z\right) \cdot b} \]
    6. Taylor expanded in y around inf

      \[\leadsto \mathsf{fma}\left(-a, t \cdot x, y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)\right) - \mathsf{fma}\left(-a, i, \color{blue}{c \cdot z}\right) \cdot b \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot y\right) - \mathsf{fma}\left(-a, i, c \cdot \color{blue}{z}\right) \cdot b \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(\left(\mathsf{neg}\left(i \cdot j\right)\right) + x \cdot z\right) \cdot y\right) - \mathsf{fma}\left(-a, i, c \cdot z\right) \cdot b \]
      3. distribute-lft-neg-outN/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y\right) - \mathsf{fma}\left(-a, i, c \cdot z\right) \cdot b \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y\right) - \mathsf{fma}\left(-a, i, c \cdot z\right) \cdot b \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, z \cdot x\right) \cdot y\right) - \mathsf{fma}\left(-a, i, c \cdot z\right) \cdot b \]
      6. lift-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right) - \mathsf{fma}\left(-a, i, c \cdot z\right) \cdot b \]
      7. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right) - \mathsf{fma}\left(-a, i, c \cdot z\right) \cdot b \]
      8. lift-*.f6470.6

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right) - \mathsf{fma}\left(-a, i, c \cdot \color{blue}{z}\right) \cdot b \]
    8. Applied rewrites70.6%

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

    if -7e-109 < b < 3.8000000000000001e-159

    1. Initial program 72.5%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0

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

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

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

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, \color{blue}{x}, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - a \cdot t, x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      6. fp-cancel-sub-sign-invN/A

        \[\leadsto \mathsf{fma}\left(y \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot t, x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      7. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(y \cdot z + \left(-1 \cdot a\right) \cdot t, x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      8. associate-*r*N/A

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

        \[\leadsto \mathsf{fma}\left(-1 \cdot \left(a \cdot t\right) + y \cdot z, x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(\left(-1 \cdot a\right) \cdot t + y \cdot z, x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(a\right)\right) \cdot t + y \cdot z, x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      12. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{neg}\left(a\right), t, y \cdot z\right), x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      13. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-a, t, y \cdot z\right), x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      15. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
    5. Applied rewrites76.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 3: 55.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\right) \cdot y\\ t_2 := j \cdot \left(c \cdot t - i \cdot y\right)\\ \mathbf{if}\;y \leq -1.1 \cdot 10^{+76}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-189}:\\ \;\;\;\;\left(i \cdot b\right) \cdot a + t\_2\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{-249}:\\ \;\;\;\;\left(-a\right) \cdot \mathsf{fma}\left(t, x, \left(-b\right) \cdot i\right)\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-30}:\\ \;\;\;\;\left(-\left(c \cdot b\right) \cdot z\right) + t\_2\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{+147}:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right) + t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* (- z) (fma i (/ j z) (- x))) y))
        (t_2 (* j (- (* c t) (* i y)))))
   (if (<= y -1.1e+76)
     t_1
     (if (<= y -1.9e-189)
       (+ (* (* i b) a) t_2)
       (if (<= y -4.1e-249)
         (* (- a) (fma t x (* (- b) i)))
         (if (<= y 3.5e-30)
           (+ (- (* (* c b) z)) t_2)
           (if (<= y 7.8e+147) (+ (* (- a) (* t x)) t_2) t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (-z * fma(i, (j / z), -x)) * y;
	double t_2 = j * ((c * t) - (i * y));
	double tmp;
	if (y <= -1.1e+76) {
		tmp = t_1;
	} else if (y <= -1.9e-189) {
		tmp = ((i * b) * a) + t_2;
	} else if (y <= -4.1e-249) {
		tmp = -a * fma(t, x, (-b * i));
	} else if (y <= 3.5e-30) {
		tmp = -((c * b) * z) + t_2;
	} else if (y <= 7.8e+147) {
		tmp = (-a * (t * x)) + t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(Float64(-z) * fma(i, Float64(j / z), Float64(-x))) * y)
	t_2 = Float64(j * Float64(Float64(c * t) - Float64(i * y)))
	tmp = 0.0
	if (y <= -1.1e+76)
		tmp = t_1;
	elseif (y <= -1.9e-189)
		tmp = Float64(Float64(Float64(i * b) * a) + t_2);
	elseif (y <= -4.1e-249)
		tmp = Float64(Float64(-a) * fma(t, x, Float64(Float64(-b) * i)));
	elseif (y <= 3.5e-30)
		tmp = Float64(Float64(-Float64(Float64(c * b) * z)) + t_2);
	elseif (y <= 7.8e+147)
		tmp = Float64(Float64(Float64(-a) * Float64(t * x)) + t_2);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-z) * N[(i * N[(j / z), $MachinePrecision] + (-x)), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.1e+76], t$95$1, If[LessEqual[y, -1.9e-189], N[(N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[y, -4.1e-249], N[((-a) * N[(t * x + N[((-b) * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e-30], N[((-N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]) + t$95$2), $MachinePrecision], If[LessEqual[y, 7.8e+147], N[(N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\right) \cdot y\\
t_2 := j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1.9 \cdot 10^{-189}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a + t\_2\\

\mathbf{elif}\;y \leq -4.1 \cdot 10^{-249}:\\
\;\;\;\;\left(-a\right) \cdot \mathsf{fma}\left(t, x, \left(-b\right) \cdot i\right)\\

\mathbf{elif}\;y \leq 3.5 \cdot 10^{-30}:\\
\;\;\;\;\left(-\left(c \cdot b\right) \cdot z\right) + t\_2\\

\mathbf{elif}\;y \leq 7.8 \cdot 10^{+147}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right) + t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.1e76 or 7.80000000000000033e147 < y

    1. Initial program 62.1%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6466.7

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites66.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    6. Taylor expanded in z around -inf

      \[\leadsto \left(-1 \cdot \left(z \cdot \left(-1 \cdot x + \frac{i \cdot j}{z}\right)\right)\right) \cdot y \]
    7. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

        \[\leadsto \left(\left(-z\right) \cdot \left(-1 \cdot x + \frac{i \cdot j}{z}\right)\right) \cdot y \]
      5. +-commutativeN/A

        \[\leadsto \left(\left(-z\right) \cdot \left(\frac{i \cdot j}{z} + -1 \cdot x\right)\right) \cdot y \]
      6. associate-/l*N/A

        \[\leadsto \left(\left(-z\right) \cdot \left(i \cdot \frac{j}{z} + -1 \cdot x\right)\right) \cdot y \]
      7. lower-fma.f64N/A

        \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -1 \cdot x\right)\right) \cdot y \]
      8. lower-/.f64N/A

        \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -1 \cdot x\right)\right) \cdot y \]
      9. mul-1-negN/A

        \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, \mathsf{neg}\left(x\right)\right)\right) \cdot y \]
      10. lower-neg.f6466.0

        \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\right) \cdot y \]
    8. Applied rewrites66.0%

      \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\right) \cdot y \]

    if -1.1e76 < y < -1.90000000000000011e-189

    1. Initial program 79.1%

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

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

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

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

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-*.f6451.5

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right) \]
    5. Applied rewrites51.5%

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

    if -1.90000000000000011e-189 < y < -4.10000000000000004e-249

    1. Initial program 79.1%

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

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot a\right) \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(\color{blue}{t \cdot x} - b \cdot i\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(\color{blue}{t \cdot x} - b \cdot i\right) \]
      5. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x + \color{blue}{\left(\mathsf{neg}\left(b\right)\right) \cdot i}\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \left(-a\right) \cdot \mathsf{fma}\left(t, \color{blue}{x}, \left(\mathsf{neg}\left(b\right)\right) \cdot i\right) \]
      7. lower-*.f64N/A

        \[\leadsto \left(-a\right) \cdot \mathsf{fma}\left(t, x, \left(\mathsf{neg}\left(b\right)\right) \cdot i\right) \]
      8. lower-neg.f6452.5

        \[\leadsto \left(-a\right) \cdot \mathsf{fma}\left(t, x, \left(-b\right) \cdot i\right) \]
    5. Applied rewrites52.5%

      \[\leadsto \color{blue}{\left(-a\right) \cdot \mathsf{fma}\left(t, x, \left(-b\right) \cdot i\right)} \]

    if -4.10000000000000004e-249 < y < 3.5000000000000003e-30

    1. Initial program 81.8%

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

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(c \cdot z\right)\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(c \cdot z\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      2. lower-neg.f64N/A

        \[\leadsto \left(-b \cdot \left(c \cdot z\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      3. associate-*r*N/A

        \[\leadsto \left(-\left(b \cdot c\right) \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(-\left(b \cdot c\right) \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      5. *-commutativeN/A

        \[\leadsto \left(-\left(c \cdot b\right) \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      6. lower-*.f6449.4

        \[\leadsto \left(-\left(c \cdot b\right) \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    5. Applied rewrites49.4%

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

    if 3.5000000000000003e-30 < y < 7.80000000000000033e147

    1. Initial program 75.2%

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

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(t \cdot x\right)\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot a\right) \cdot \color{blue}{\left(t \cdot x\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(\color{blue}{t} \cdot x\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \color{blue}{\left(t \cdot x\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(\color{blue}{t} \cdot x\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      5. lower-*.f6450.9

        \[\leadsto \left(-a\right) \cdot \left(t \cdot \color{blue}{x}\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    5. Applied rewrites50.9%

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

Alternative 4: 55.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\right) \cdot y\\ t_2 := j \cdot \left(c \cdot t - i \cdot y\right)\\ \mathbf{if}\;y \leq -1.1 \cdot 10^{+76}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-189}:\\ \;\;\;\;\left(i \cdot b\right) \cdot a + t\_2\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{-249}:\\ \;\;\;\;\left(-a\right) \cdot \mathsf{fma}\left(t, x, \left(-b\right) \cdot i\right)\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-30}:\\ \;\;\;\;\left(-\left(c \cdot b\right) \cdot z\right) + t\_2\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{+147}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot t\right), j, \left(\left(-a\right) \cdot t\right) \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* (- z) (fma i (/ j z) (- x))) y))
        (t_2 (* j (- (* c t) (* i y)))))
   (if (<= y -1.1e+76)
     t_1
     (if (<= y -1.9e-189)
       (+ (* (* i b) a) t_2)
       (if (<= y -4.1e-249)
         (* (- a) (fma t x (* (- b) i)))
         (if (<= y 3.5e-30)
           (+ (- (* (* c b) z)) t_2)
           (if (<= y 7.8e+147)
             (fma (fma (- i) y (* c t)) j (* (* (- a) t) x))
             t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (-z * fma(i, (j / z), -x)) * y;
	double t_2 = j * ((c * t) - (i * y));
	double tmp;
	if (y <= -1.1e+76) {
		tmp = t_1;
	} else if (y <= -1.9e-189) {
		tmp = ((i * b) * a) + t_2;
	} else if (y <= -4.1e-249) {
		tmp = -a * fma(t, x, (-b * i));
	} else if (y <= 3.5e-30) {
		tmp = -((c * b) * z) + t_2;
	} else if (y <= 7.8e+147) {
		tmp = fma(fma(-i, y, (c * t)), j, ((-a * t) * x));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(Float64(-z) * fma(i, Float64(j / z), Float64(-x))) * y)
	t_2 = Float64(j * Float64(Float64(c * t) - Float64(i * y)))
	tmp = 0.0
	if (y <= -1.1e+76)
		tmp = t_1;
	elseif (y <= -1.9e-189)
		tmp = Float64(Float64(Float64(i * b) * a) + t_2);
	elseif (y <= -4.1e-249)
		tmp = Float64(Float64(-a) * fma(t, x, Float64(Float64(-b) * i)));
	elseif (y <= 3.5e-30)
		tmp = Float64(Float64(-Float64(Float64(c * b) * z)) + t_2);
	elseif (y <= 7.8e+147)
		tmp = fma(fma(Float64(-i), y, Float64(c * t)), j, Float64(Float64(Float64(-a) * t) * x));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-z) * N[(i * N[(j / z), $MachinePrecision] + (-x)), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.1e+76], t$95$1, If[LessEqual[y, -1.9e-189], N[(N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[y, -4.1e-249], N[((-a) * N[(t * x + N[((-b) * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e-30], N[((-N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]) + t$95$2), $MachinePrecision], If[LessEqual[y, 7.8e+147], N[(N[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\right) \cdot y\\
t_2 := j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1.9 \cdot 10^{-189}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a + t\_2\\

\mathbf{elif}\;y \leq -4.1 \cdot 10^{-249}:\\
\;\;\;\;\left(-a\right) \cdot \mathsf{fma}\left(t, x, \left(-b\right) \cdot i\right)\\

\mathbf{elif}\;y \leq 3.5 \cdot 10^{-30}:\\
\;\;\;\;\left(-\left(c \cdot b\right) \cdot z\right) + t\_2\\

\mathbf{elif}\;y \leq 7.8 \cdot 10^{+147}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot t\right), j, \left(\left(-a\right) \cdot t\right) \cdot x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.1e76 or 7.80000000000000033e147 < y

    1. Initial program 62.1%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6466.7

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites66.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    6. Taylor expanded in z around -inf

      \[\leadsto \left(-1 \cdot \left(z \cdot \left(-1 \cdot x + \frac{i \cdot j}{z}\right)\right)\right) \cdot y \]
    7. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

        \[\leadsto \left(\left(-z\right) \cdot \left(-1 \cdot x + \frac{i \cdot j}{z}\right)\right) \cdot y \]
      5. +-commutativeN/A

        \[\leadsto \left(\left(-z\right) \cdot \left(\frac{i \cdot j}{z} + -1 \cdot x\right)\right) \cdot y \]
      6. associate-/l*N/A

        \[\leadsto \left(\left(-z\right) \cdot \left(i \cdot \frac{j}{z} + -1 \cdot x\right)\right) \cdot y \]
      7. lower-fma.f64N/A

        \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -1 \cdot x\right)\right) \cdot y \]
      8. lower-/.f64N/A

        \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -1 \cdot x\right)\right) \cdot y \]
      9. mul-1-negN/A

        \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, \mathsf{neg}\left(x\right)\right)\right) \cdot y \]
      10. lower-neg.f6466.0

        \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\right) \cdot y \]
    8. Applied rewrites66.0%

      \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\right) \cdot y \]

    if -1.1e76 < y < -1.90000000000000011e-189

    1. Initial program 79.1%

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

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

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

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

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-*.f6451.5

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right) \]
    5. Applied rewrites51.5%

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

    if -1.90000000000000011e-189 < y < -4.10000000000000004e-249

    1. Initial program 79.1%

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

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot a\right) \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(\color{blue}{t \cdot x} - b \cdot i\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(\color{blue}{t \cdot x} - b \cdot i\right) \]
      5. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x + \color{blue}{\left(\mathsf{neg}\left(b\right)\right) \cdot i}\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \left(-a\right) \cdot \mathsf{fma}\left(t, \color{blue}{x}, \left(\mathsf{neg}\left(b\right)\right) \cdot i\right) \]
      7. lower-*.f64N/A

        \[\leadsto \left(-a\right) \cdot \mathsf{fma}\left(t, x, \left(\mathsf{neg}\left(b\right)\right) \cdot i\right) \]
      8. lower-neg.f6452.5

        \[\leadsto \left(-a\right) \cdot \mathsf{fma}\left(t, x, \left(-b\right) \cdot i\right) \]
    5. Applied rewrites52.5%

      \[\leadsto \color{blue}{\left(-a\right) \cdot \mathsf{fma}\left(t, x, \left(-b\right) \cdot i\right)} \]

    if -4.10000000000000004e-249 < y < 3.5000000000000003e-30

    1. Initial program 81.8%

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

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(c \cdot z\right)\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(c \cdot z\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      2. lower-neg.f64N/A

        \[\leadsto \left(-b \cdot \left(c \cdot z\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      3. associate-*r*N/A

        \[\leadsto \left(-\left(b \cdot c\right) \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(-\left(b \cdot c\right) \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      5. *-commutativeN/A

        \[\leadsto \left(-\left(c \cdot b\right) \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      6. lower-*.f6449.4

        \[\leadsto \left(-\left(c \cdot b\right) \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    5. Applied rewrites49.4%

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

    if 3.5000000000000003e-30 < y < 7.80000000000000033e147

    1. Initial program 75.2%

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

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(t \cdot x\right)\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot a\right) \cdot \color{blue}{\left(t \cdot x\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(\color{blue}{t} \cdot x\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \color{blue}{\left(t \cdot x\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(\color{blue}{t} \cdot x\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      5. lower-*.f6450.9

        \[\leadsto \left(-a\right) \cdot \left(t \cdot \color{blue}{x}\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    5. Applied rewrites50.9%

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(t \cdot x\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
    6. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \color{blue}{\left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(c \cdot t - i \cdot y\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) + \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right)} \]
      3. lift--.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \color{blue}{\left(c \cdot t - i \cdot y\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\color{blue}{c \cdot t} - i \cdot y\right) \]
      5. lift-*.f64N/A

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

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

        \[\leadsto \color{blue}{\left(c \cdot t - i \cdot y\right) \cdot j} + \left(-a\right) \cdot \left(t \cdot x\right) \]
      8. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(-a\right) \cdot \left(t \cdot x\right)\right)} \]
    7. Applied rewrites51.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot t\right), j, \left(\left(-a\right) \cdot t\right) \cdot x\right)} \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 5: 66.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.85 \cdot 10^{+176}:\\
\;\;\;\;\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\

\mathbf{elif}\;b \leq 1.35 \cdot 10^{-78}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right) - \left(c \cdot z\right) \cdot b\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.8499999999999999e176

    1. Initial program 71.6%

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

      \[\leadsto \color{blue}{b \cdot \left(a \cdot i - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      2. lower-*.f64N/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(a \cdot i + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      4. *-commutativeN/A

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6472.7

        \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
    5. Applied rewrites72.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b} \]

    if -1.8499999999999999e176 < b < 1.34999999999999997e-78

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0

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

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

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

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, \color{blue}{x}, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - a \cdot t, x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      6. fp-cancel-sub-sign-invN/A

        \[\leadsto \mathsf{fma}\left(y \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot t, x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      7. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(y \cdot z + \left(-1 \cdot a\right) \cdot t, x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      8. associate-*r*N/A

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

        \[\leadsto \mathsf{fma}\left(-1 \cdot \left(a \cdot t\right) + y \cdot z, x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(\left(-1 \cdot a\right) \cdot t + y \cdot z, x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(a\right)\right) \cdot t + y \cdot z, x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      12. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{neg}\left(a\right), t, y \cdot z\right), x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      13. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-a, t, y \cdot z\right), x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      15. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
    5. Applied rewrites68.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right)} \]

    if 1.34999999999999997e-78 < b

    1. Initial program 74.8%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

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

        \[\leadsto \left(-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + \left(c \cdot \left(j \cdot t\right) + y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)\right)\right) - \color{blue}{b \cdot \left(c \cdot z - a \cdot i\right)} \]
    5. Applied rewrites75.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(j \cdot c, t, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\right) - \mathsf{fma}\left(-a, i, c \cdot z\right) \cdot b} \]
    6. Taylor expanded in y around inf

      \[\leadsto \mathsf{fma}\left(-a, t \cdot x, y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)\right) - \mathsf{fma}\left(-a, i, \color{blue}{c \cdot z}\right) \cdot b \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot y\right) - \mathsf{fma}\left(-a, i, c \cdot \color{blue}{z}\right) \cdot b \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(\left(\mathsf{neg}\left(i \cdot j\right)\right) + x \cdot z\right) \cdot y\right) - \mathsf{fma}\left(-a, i, c \cdot z\right) \cdot b \]
      3. distribute-lft-neg-outN/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y\right) - \mathsf{fma}\left(-a, i, c \cdot z\right) \cdot b \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y\right) - \mathsf{fma}\left(-a, i, c \cdot z\right) \cdot b \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, z \cdot x\right) \cdot y\right) - \mathsf{fma}\left(-a, i, c \cdot z\right) \cdot b \]
      6. lift-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right) - \mathsf{fma}\left(-a, i, c \cdot z\right) \cdot b \]
      7. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right) - \mathsf{fma}\left(-a, i, c \cdot z\right) \cdot b \]
      8. lift-*.f6472.1

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right) - \mathsf{fma}\left(-a, i, c \cdot \color{blue}{z}\right) \cdot b \]
    8. Applied rewrites72.1%

      \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right) - \mathsf{fma}\left(-a, i, \color{blue}{c \cdot z}\right) \cdot b \]
    9. Taylor expanded in z around inf

      \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right) - \left(c \cdot z\right) \cdot b \]
    10. Step-by-step derivation
      1. lift-*.f6459.5

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right) - \left(c \cdot z\right) \cdot b \]
    11. Applied rewrites59.5%

      \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right) - \left(c \cdot z\right) \cdot b \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 6: 55.4% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\right) \cdot y\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -2.1 \cdot 10^{-158}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right)\\

\mathbf{elif}\;y \leq 1.08 \cdot 10^{-246}:\\
\;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\

\mathbf{elif}\;y \leq 7.8 \cdot 10^{+147}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot t\right), j, \left(\left(-a\right) \cdot t\right) \cdot x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.1e76 or 7.80000000000000033e147 < y

    1. Initial program 62.1%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6466.7

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites66.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    6. Taylor expanded in z around -inf

      \[\leadsto \left(-1 \cdot \left(z \cdot \left(-1 \cdot x + \frac{i \cdot j}{z}\right)\right)\right) \cdot y \]
    7. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

        \[\leadsto \left(\left(-z\right) \cdot \left(-1 \cdot x + \frac{i \cdot j}{z}\right)\right) \cdot y \]
      5. +-commutativeN/A

        \[\leadsto \left(\left(-z\right) \cdot \left(\frac{i \cdot j}{z} + -1 \cdot x\right)\right) \cdot y \]
      6. associate-/l*N/A

        \[\leadsto \left(\left(-z\right) \cdot \left(i \cdot \frac{j}{z} + -1 \cdot x\right)\right) \cdot y \]
      7. lower-fma.f64N/A

        \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -1 \cdot x\right)\right) \cdot y \]
      8. lower-/.f64N/A

        \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -1 \cdot x\right)\right) \cdot y \]
      9. mul-1-negN/A

        \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, \mathsf{neg}\left(x\right)\right)\right) \cdot y \]
      10. lower-neg.f6466.0

        \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\right) \cdot y \]
    8. Applied rewrites66.0%

      \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\right) \cdot y \]

    if -1.1e76 < y < -2.09999999999999991e-158

    1. Initial program 79.0%

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

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

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

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

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-*.f6451.3

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right) \]
    5. Applied rewrites51.3%

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

    if -2.09999999999999991e-158 < y < 1.08000000000000003e-246

    1. Initial program 79.8%

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

      \[\leadsto \color{blue}{c \cdot \left(j \cdot t - b \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      2. lower-*.f64N/A

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(j \cdot t + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      6. lower-neg.f6448.7

        \[\leadsto \mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c \]
    5. Applied rewrites48.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c} \]

    if 1.08000000000000003e-246 < y < 7.80000000000000033e147

    1. Initial program 79.5%

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

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(t \cdot x\right)\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot a\right) \cdot \color{blue}{\left(t \cdot x\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(\color{blue}{t} \cdot x\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \color{blue}{\left(t \cdot x\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(\color{blue}{t} \cdot x\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      5. lower-*.f6450.0

        \[\leadsto \left(-a\right) \cdot \left(t \cdot \color{blue}{x}\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    5. Applied rewrites50.0%

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(t \cdot x\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
    6. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \color{blue}{\left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(c \cdot t - i \cdot y\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) + \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right)} \]
      3. lift--.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \color{blue}{\left(c \cdot t - i \cdot y\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\color{blue}{c \cdot t} - i \cdot y\right) \]
      5. lift-*.f64N/A

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

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

        \[\leadsto \color{blue}{\left(c \cdot t - i \cdot y\right) \cdot j} + \left(-a\right) \cdot \left(t \cdot x\right) \]
      8. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(-a\right) \cdot \left(t \cdot x\right)\right)} \]
    7. Applied rewrites51.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot t\right), j, \left(\left(-a\right) \cdot t\right) \cdot x\right)} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 7: 58.0% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right)\\ t_2 := \mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\ \mathbf{if}\;z \leq -6.3 \cdot 10^{+24}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-142}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-301}:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\left(-i\right) \cdot y\right)\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+35}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (+ (* (* i b) a) (* j (- (* c t) (* i y)))))
        (t_2 (* (fma y x (* (- b) c)) z)))
   (if (<= z -6.3e+24)
     t_2
     (if (<= z -3.4e-142)
       t_1
       (if (<= z -6.8e-301)
         (+ (* (- a) (* t x)) (* j (* (- i) y)))
         (if (<= z 3e+35) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((i * b) * a) + (j * ((c * t) - (i * y)));
	double t_2 = fma(y, x, (-b * c)) * z;
	double tmp;
	if (z <= -6.3e+24) {
		tmp = t_2;
	} else if (z <= -3.4e-142) {
		tmp = t_1;
	} else if (z <= -6.8e-301) {
		tmp = (-a * (t * x)) + (j * (-i * y));
	} else if (z <= 3e+35) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(Float64(i * b) * a) + Float64(j * Float64(Float64(c * t) - Float64(i * y))))
	t_2 = Float64(fma(y, x, Float64(Float64(-b) * c)) * z)
	tmp = 0.0
	if (z <= -6.3e+24)
		tmp = t_2;
	elseif (z <= -3.4e-142)
		tmp = t_1;
	elseif (z <= -6.8e-301)
		tmp = Float64(Float64(Float64(-a) * Float64(t * x)) + Float64(j * Float64(Float64(-i) * y)));
	elseif (z <= 3e+35)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * x + N[((-b) * c), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -6.3e+24], t$95$2, If[LessEqual[z, -3.4e-142], t$95$1, If[LessEqual[z, -6.8e-301], N[(N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision] + N[(j * N[((-i) * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+35], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right)\\
t_2 := \mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\
\mathbf{if}\;z \leq -6.3 \cdot 10^{+24}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -3.4 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -6.8 \cdot 10^{-301}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\left(-i\right) \cdot y\right)\\

\mathbf{elif}\;z \leq 3 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.30000000000000038e24 or 2.99999999999999991e35 < z

    1. Initial program 64.7%

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

      \[\leadsto \color{blue}{z \cdot \left(x \cdot y - b \cdot c\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot \color{blue}{z} \]
      2. lower-*.f64N/A

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot \color{blue}{z} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(x \cdot y + \left(\mathsf{neg}\left(b\right)\right) \cdot c\right) \cdot z \]
      4. *-commutativeN/A

        \[\leadsto \left(y \cdot x + \left(\mathsf{neg}\left(b\right)\right) \cdot c\right) \cdot z \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y, x, \left(\mathsf{neg}\left(b\right)\right) \cdot c\right) \cdot z \]
      6. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(y, x, \left(\mathsf{neg}\left(b\right)\right) \cdot c\right) \cdot z \]
      7. lower-neg.f6462.8

        \[\leadsto \mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z \]
    5. Applied rewrites62.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z} \]

    if -6.30000000000000038e24 < z < -3.40000000000000029e-142 or -6.8000000000000004e-301 < z < 2.99999999999999991e35

    1. Initial program 81.4%

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

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

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

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

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-*.f6456.8

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right) \]
    5. Applied rewrites56.8%

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

    if -3.40000000000000029e-142 < z < -6.8000000000000004e-301

    1. Initial program 81.9%

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

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(t \cdot x\right)\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot a\right) \cdot \color{blue}{\left(t \cdot x\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(\color{blue}{t} \cdot x\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \color{blue}{\left(t \cdot x\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(\color{blue}{t} \cdot x\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      5. lower-*.f6461.4

        \[\leadsto \left(-a\right) \cdot \left(t \cdot \color{blue}{x}\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    5. Applied rewrites61.4%

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(t \cdot x\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
    6. Taylor expanded in y around inf

      \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \color{blue}{\left(-1 \cdot \left(i \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\left(-1 \cdot i\right) \cdot \color{blue}{y}\right) \]
      2. mul-1-negN/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\left(\mathsf{neg}\left(i\right)\right) \cdot y\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\left(\mathsf{neg}\left(i\right)\right) \cdot \color{blue}{y}\right) \]
      4. lift-neg.f6445.3

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\left(-i\right) \cdot y\right) \]
    8. Applied rewrites45.3%

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

Alternative 8: 51.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\right) \cdot y\\
\mathbf{if}\;y \leq -8 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -4.5 \cdot 10^{-158}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot t, j, \left(i \cdot b\right) \cdot a\right)\\

\mathbf{elif}\;y \leq 4.6 \cdot 10^{-41}:\\
\;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\

\mathbf{elif}\;y \leq 5.5 \cdot 10^{+94}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\left(-i\right) \cdot y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.99999999999999941e75 or 5.4999999999999997e94 < y

    1. Initial program 63.1%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6465.4

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites65.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    6. Taylor expanded in z around -inf

      \[\leadsto \left(-1 \cdot \left(z \cdot \left(-1 \cdot x + \frac{i \cdot j}{z}\right)\right)\right) \cdot y \]
    7. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

        \[\leadsto \left(\left(-z\right) \cdot \left(-1 \cdot x + \frac{i \cdot j}{z}\right)\right) \cdot y \]
      5. +-commutativeN/A

        \[\leadsto \left(\left(-z\right) \cdot \left(\frac{i \cdot j}{z} + -1 \cdot x\right)\right) \cdot y \]
      6. associate-/l*N/A

        \[\leadsto \left(\left(-z\right) \cdot \left(i \cdot \frac{j}{z} + -1 \cdot x\right)\right) \cdot y \]
      7. lower-fma.f64N/A

        \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -1 \cdot x\right)\right) \cdot y \]
      8. lower-/.f64N/A

        \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -1 \cdot x\right)\right) \cdot y \]
      9. mul-1-negN/A

        \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, \mathsf{neg}\left(x\right)\right)\right) \cdot y \]
      10. lower-neg.f6464.7

        \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\right) \cdot y \]
    8. Applied rewrites64.7%

      \[\leadsto \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\right) \cdot y \]

    if -7.99999999999999941e75 < y < -4.5e-158

    1. Initial program 79.0%

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

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

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

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

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-*.f6451.2

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right) \]
    5. Applied rewrites51.2%

      \[\leadsto \color{blue}{\left(i \cdot b\right) \cdot a} + j \cdot \left(c \cdot t - i \cdot y\right) \]
    6. Taylor expanded in y around 0

      \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \color{blue}{\left(c \cdot t\right)} \]
    7. Step-by-step derivation
      1. lift-*.f6441.9

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot \color{blue}{t}\right) \]
    8. Applied rewrites41.9%

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

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

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

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

        \[\leadsto \color{blue}{\left(c \cdot t\right) \cdot j} + \left(i \cdot b\right) \cdot a \]
      5. lower-fma.f6442.4

        \[\leadsto \color{blue}{\mathsf{fma}\left(c \cdot t, j, \left(i \cdot b\right) \cdot a\right)} \]
    10. Applied rewrites42.4%

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

    if -4.5e-158 < y < 4.6000000000000002e-41

    1. Initial program 81.3%

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

      \[\leadsto \color{blue}{c \cdot \left(j \cdot t - b \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      2. lower-*.f64N/A

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(j \cdot t + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      6. lower-neg.f6447.9

        \[\leadsto \mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c \]
    5. Applied rewrites47.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c} \]

    if 4.6000000000000002e-41 < y < 5.4999999999999997e94

    1. Initial program 76.8%

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

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(t \cdot x\right)\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot a\right) \cdot \color{blue}{\left(t \cdot x\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(\color{blue}{t} \cdot x\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \color{blue}{\left(t \cdot x\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(\color{blue}{t} \cdot x\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      5. lower-*.f6450.8

        \[\leadsto \left(-a\right) \cdot \left(t \cdot \color{blue}{x}\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    5. Applied rewrites50.8%

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(t \cdot x\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
    6. Taylor expanded in y around inf

      \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \color{blue}{\left(-1 \cdot \left(i \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\left(-1 \cdot i\right) \cdot \color{blue}{y}\right) \]
      2. mul-1-negN/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\left(\mathsf{neg}\left(i\right)\right) \cdot y\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\left(\mathsf{neg}\left(i\right)\right) \cdot \color{blue}{y}\right) \]
      4. lift-neg.f6439.1

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\left(-i\right) \cdot y\right) \]
    8. Applied rewrites39.1%

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

Alternative 9: 52.0% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \mathbf{if}\;y \leq -8 \cdot 10^{+75}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{-158}:\\ \;\;\;\;\mathsf{fma}\left(c \cdot t, j, \left(i \cdot b\right) \cdot a\right)\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{-41}:\\ \;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{+94}:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\left(-i\right) \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (fma (- i) j (* z x)) y)))
   (if (<= y -8e+75)
     t_1
     (if (<= y -4.5e-158)
       (fma (* c t) j (* (* i b) a))
       (if (<= y 4.6e-41)
         (* (fma j t (* (- b) z)) c)
         (if (<= y 3.4e+94) (+ (* (- a) (* t x)) (* j (* (- i) y))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = fma(-i, j, (z * x)) * y;
	double tmp;
	if (y <= -8e+75) {
		tmp = t_1;
	} else if (y <= -4.5e-158) {
		tmp = fma((c * t), j, ((i * b) * a));
	} else if (y <= 4.6e-41) {
		tmp = fma(j, t, (-b * z)) * c;
	} else if (y <= 3.4e+94) {
		tmp = (-a * (t * x)) + (j * (-i * y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(fma(Float64(-i), j, Float64(z * x)) * y)
	tmp = 0.0
	if (y <= -8e+75)
		tmp = t_1;
	elseif (y <= -4.5e-158)
		tmp = fma(Float64(c * t), j, Float64(Float64(i * b) * a));
	elseif (y <= 4.6e-41)
		tmp = Float64(fma(j, t, Float64(Float64(-b) * z)) * c);
	elseif (y <= 3.4e+94)
		tmp = Float64(Float64(Float64(-a) * Float64(t * x)) + Float64(j * Float64(Float64(-i) * y)));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -8e+75], t$95$1, If[LessEqual[y, -4.5e-158], N[(N[(c * t), $MachinePrecision] * j + N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e-41], N[(N[(j * t + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y, 3.4e+94], N[(N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision] + N[(j * N[((-i) * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -8 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -4.5 \cdot 10^{-158}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot t, j, \left(i \cdot b\right) \cdot a\right)\\

\mathbf{elif}\;y \leq 4.6 \cdot 10^{-41}:\\
\;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\

\mathbf{elif}\;y \leq 3.4 \cdot 10^{+94}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\left(-i\right) \cdot y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.99999999999999941e75 or 3.4000000000000002e94 < y

    1. Initial program 63.1%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6465.4

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites65.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]

    if -7.99999999999999941e75 < y < -4.5e-158

    1. Initial program 79.0%

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

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

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

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

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-*.f6451.2

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right) \]
    5. Applied rewrites51.2%

      \[\leadsto \color{blue}{\left(i \cdot b\right) \cdot a} + j \cdot \left(c \cdot t - i \cdot y\right) \]
    6. Taylor expanded in y around 0

      \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \color{blue}{\left(c \cdot t\right)} \]
    7. Step-by-step derivation
      1. lift-*.f6441.9

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot \color{blue}{t}\right) \]
    8. Applied rewrites41.9%

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

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

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

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

        \[\leadsto \color{blue}{\left(c \cdot t\right) \cdot j} + \left(i \cdot b\right) \cdot a \]
      5. lower-fma.f6442.4

        \[\leadsto \color{blue}{\mathsf{fma}\left(c \cdot t, j, \left(i \cdot b\right) \cdot a\right)} \]
    10. Applied rewrites42.4%

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

    if -4.5e-158 < y < 4.6000000000000002e-41

    1. Initial program 81.3%

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

      \[\leadsto \color{blue}{c \cdot \left(j \cdot t - b \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      2. lower-*.f64N/A

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(j \cdot t + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      6. lower-neg.f6447.9

        \[\leadsto \mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c \]
    5. Applied rewrites47.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c} \]

    if 4.6000000000000002e-41 < y < 3.4000000000000002e94

    1. Initial program 76.9%

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

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(t \cdot x\right)\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot a\right) \cdot \color{blue}{\left(t \cdot x\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(\color{blue}{t} \cdot x\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \color{blue}{\left(t \cdot x\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(\color{blue}{t} \cdot x\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      5. lower-*.f6450.8

        \[\leadsto \left(-a\right) \cdot \left(t \cdot \color{blue}{x}\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    5. Applied rewrites50.8%

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(t \cdot x\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
    6. Taylor expanded in y around inf

      \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \color{blue}{\left(-1 \cdot \left(i \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\left(-1 \cdot i\right) \cdot \color{blue}{y}\right) \]
      2. mul-1-negN/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\left(\mathsf{neg}\left(i\right)\right) \cdot y\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\left(\mathsf{neg}\left(i\right)\right) \cdot \color{blue}{y}\right) \]
      4. lift-neg.f6439.0

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\left(-i\right) \cdot y\right) \]
    8. Applied rewrites39.0%

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

Alternative 10: 65.3% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right)\\
\mathbf{if}\;x \leq -4 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 8.8 \cdot 10^{-69}:\\
\;\;\;\;\left(-\left(c \cdot b\right) \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.00000000000000036e25 or 8.8000000000000001e-69 < x

    1. Initial program 73.9%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0

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

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

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

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, \color{blue}{x}, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - a \cdot t, x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      6. fp-cancel-sub-sign-invN/A

        \[\leadsto \mathsf{fma}\left(y \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot t, x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      7. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(y \cdot z + \left(-1 \cdot a\right) \cdot t, x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      8. associate-*r*N/A

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

        \[\leadsto \mathsf{fma}\left(-1 \cdot \left(a \cdot t\right) + y \cdot z, x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(\left(-1 \cdot a\right) \cdot t + y \cdot z, x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(a\right)\right) \cdot t + y \cdot z, x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      12. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{neg}\left(a\right), t, y \cdot z\right), x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      13. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-a, t, y \cdot z\right), x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      15. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
    5. Applied rewrites69.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right)} \]

    if -4.00000000000000036e25 < x < 8.8000000000000001e-69

    1. Initial program 74.1%

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

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(c \cdot z\right)\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(c \cdot z\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      2. lower-neg.f64N/A

        \[\leadsto \left(-b \cdot \left(c \cdot z\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      3. associate-*r*N/A

        \[\leadsto \left(-\left(b \cdot c\right) \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(-\left(b \cdot c\right) \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      5. *-commutativeN/A

        \[\leadsto \left(-\left(c \cdot b\right) \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      6. lower-*.f6460.2

        \[\leadsto \left(-\left(c \cdot b\right) \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    5. Applied rewrites60.2%

      \[\leadsto \color{blue}{\left(-\left(c \cdot b\right) \cdot z\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 11: 30.4% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -7.8 \cdot 10^{+161}:\\ \;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\ \mathbf{elif}\;x \leq -1.35 \cdot 10^{+43}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{elif}\;x \leq -7.5 \cdot 10^{-241}:\\ \;\;\;\;-\left(c \cdot b\right) \cdot z\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{-268}:\\ \;\;\;\;\left(j \cdot c\right) \cdot t\\ \mathbf{elif}\;x \leq 3.4 \cdot 10^{+67}:\\ \;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= x -7.8e+161)
   (* (* (- a) t) x)
   (if (<= x -1.35e+43)
     (* (* z x) y)
     (if (<= x -7.5e-241)
       (- (* (* c b) z))
       (if (<= x 1.45e-268)
         (* (* j c) t)
         (if (<= x 3.4e+67) (* (- i) (* j y)) (* (* y x) z)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -7.8e+161) {
		tmp = (-a * t) * x;
	} else if (x <= -1.35e+43) {
		tmp = (z * x) * y;
	} else if (x <= -7.5e-241) {
		tmp = -((c * b) * z);
	} else if (x <= 1.45e-268) {
		tmp = (j * c) * t;
	} else if (x <= 3.4e+67) {
		tmp = -i * (j * y);
	} else {
		tmp = (y * x) * z;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if (x <= (-7.8d+161)) then
        tmp = (-a * t) * x
    else if (x <= (-1.35d+43)) then
        tmp = (z * x) * y
    else if (x <= (-7.5d-241)) then
        tmp = -((c * b) * z)
    else if (x <= 1.45d-268) then
        tmp = (j * c) * t
    else if (x <= 3.4d+67) then
        tmp = -i * (j * y)
    else
        tmp = (y * x) * z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -7.8e+161) {
		tmp = (-a * t) * x;
	} else if (x <= -1.35e+43) {
		tmp = (z * x) * y;
	} else if (x <= -7.5e-241) {
		tmp = -((c * b) * z);
	} else if (x <= 1.45e-268) {
		tmp = (j * c) * t;
	} else if (x <= 3.4e+67) {
		tmp = -i * (j * y);
	} else {
		tmp = (y * x) * z;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if x <= -7.8e+161:
		tmp = (-a * t) * x
	elif x <= -1.35e+43:
		tmp = (z * x) * y
	elif x <= -7.5e-241:
		tmp = -((c * b) * z)
	elif x <= 1.45e-268:
		tmp = (j * c) * t
	elif x <= 3.4e+67:
		tmp = -i * (j * y)
	else:
		tmp = (y * x) * z
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (x <= -7.8e+161)
		tmp = Float64(Float64(Float64(-a) * t) * x);
	elseif (x <= -1.35e+43)
		tmp = Float64(Float64(z * x) * y);
	elseif (x <= -7.5e-241)
		tmp = Float64(-Float64(Float64(c * b) * z));
	elseif (x <= 1.45e-268)
		tmp = Float64(Float64(j * c) * t);
	elseif (x <= 3.4e+67)
		tmp = Float64(Float64(-i) * Float64(j * y));
	else
		tmp = Float64(Float64(y * x) * z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (x <= -7.8e+161)
		tmp = (-a * t) * x;
	elseif (x <= -1.35e+43)
		tmp = (z * x) * y;
	elseif (x <= -7.5e-241)
		tmp = -((c * b) * z);
	elseif (x <= 1.45e-268)
		tmp = (j * c) * t;
	elseif (x <= 3.4e+67)
		tmp = -i * (j * y);
	else
		tmp = (y * x) * z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -7.8e+161], N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, -1.35e+43], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[x, -7.5e-241], (-N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]), If[LessEqual[x, 1.45e-268], N[(N[(j * c), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[x, 3.4e+67], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{+161}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\

\mathbf{elif}\;x \leq -1.35 \cdot 10^{+43}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\

\mathbf{elif}\;x \leq -7.5 \cdot 10^{-241}:\\
\;\;\;\;-\left(c \cdot b\right) \cdot z\\

\mathbf{elif}\;x \leq 1.45 \cdot 10^{-268}:\\
\;\;\;\;\left(j \cdot c\right) \cdot t\\

\mathbf{elif}\;x \leq 3.4 \cdot 10^{+67}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\

\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < -7.8000000000000004e161

    1. Initial program 71.7%

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6451.5

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    5. Applied rewrites51.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]
    6. Taylor expanded in x around inf

      \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot x\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot a\right) \cdot \left(t \cdot \color{blue}{x}\right) \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(t \cdot x\right) \]
      3. lift-neg.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) \]
      4. associate-*r*N/A

        \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot x \]
      5. lift-neg.f64N/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      6. mul-1-negN/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      7. associate-*r*N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot t\right)\right) \cdot x \]
      8. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot t\right)\right) \cdot x \]
      9. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      10. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      11. lift-neg.f64N/A

        \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot x \]
      12. lower-*.f6441.7

        \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot x \]
    8. Applied rewrites41.7%

      \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot \color{blue}{x} \]

    if -7.8000000000000004e161 < x < -1.3500000000000001e43

    1. Initial program 75.3%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6444.1

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites44.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    6. Taylor expanded in x around inf

      \[\leadsto \left(x \cdot z\right) \cdot y \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(z \cdot x\right) \cdot y \]
      2. lift-*.f6431.2

        \[\leadsto \left(z \cdot x\right) \cdot y \]
    8. Applied rewrites31.2%

      \[\leadsto \left(z \cdot x\right) \cdot y \]

    if -1.3500000000000001e43 < x < -7.49999999999999977e-241

    1. Initial program 74.8%

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

      \[\leadsto \color{blue}{b \cdot \left(a \cdot i - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      2. lower-*.f64N/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(a \cdot i + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      4. *-commutativeN/A

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6444.3

        \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
    5. Applied rewrites44.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b} \]
    6. Taylor expanded in z around 0

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      4. lower-*.f6424.5

        \[\leadsto \left(i \cdot b\right) \cdot a \]
    8. Applied rewrites24.5%

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]
    9. Taylor expanded in z around inf

      \[\leadsto -1 \cdot \color{blue}{\left(b \cdot \left(c \cdot z\right)\right)} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(b \cdot \left(c \cdot z\right)\right) \]
      2. lower-neg.f64N/A

        \[\leadsto -b \cdot \left(c \cdot z\right) \]
      3. associate-*r*N/A

        \[\leadsto -\left(b \cdot c\right) \cdot z \]
      4. lower-*.f64N/A

        \[\leadsto -\left(b \cdot c\right) \cdot z \]
      5. *-commutativeN/A

        \[\leadsto -\left(c \cdot b\right) \cdot z \]
      6. lower-*.f6425.6

        \[\leadsto -\left(c \cdot b\right) \cdot z \]
    11. Applied rewrites25.6%

      \[\leadsto -\left(c \cdot b\right) \cdot z \]

    if -7.49999999999999977e-241 < x < 1.4500000000000001e-268

    1. Initial program 73.6%

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6432.8

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    5. Applied rewrites32.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]
    6. Taylor expanded in x around 0

      \[\leadsto \left(c \cdot j\right) \cdot t \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot c\right) \cdot t \]
      2. lift-*.f6430.6

        \[\leadsto \left(j \cdot c\right) \cdot t \]
    8. Applied rewrites30.6%

      \[\leadsto \left(j \cdot c\right) \cdot t \]

    if 1.4500000000000001e-268 < x < 3.4000000000000002e67

    1. Initial program 75.1%

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

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot y - a \cdot b\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot i\right) \cdot \color{blue}{\left(j \cdot y - a \cdot b\right)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \color{blue}{\left(j \cdot y - a \cdot b\right)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-i\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      5. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y + \color{blue}{\left(\mathsf{neg}\left(a\right)\right) \cdot b}\right) \]
      6. mul-1-negN/A

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y + \left(-1 \cdot a\right) \cdot b\right) \]
      7. associate-*r*N/A

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y + -1 \cdot \color{blue}{\left(a \cdot b\right)}\right) \]
      8. lower-fma.f64N/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, \color{blue}{y}, -1 \cdot \left(a \cdot b\right)\right) \]
      9. associate-*r*N/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-1 \cdot a\right) \cdot b\right) \]
      10. mul-1-negN/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(\mathsf{neg}\left(a\right)\right) \cdot b\right) \]
      11. lower-*.f64N/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(\mathsf{neg}\left(a\right)\right) \cdot b\right) \]
      12. lower-neg.f6442.9

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-a\right) \cdot b\right) \]
    5. Applied rewrites42.9%

      \[\leadsto \color{blue}{\left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-a\right) \cdot b\right)} \]
    6. Taylor expanded in y around inf

      \[\leadsto \left(-i\right) \cdot \left(j \cdot \color{blue}{y}\right) \]
    7. Step-by-step derivation
      1. lower-*.f6424.9

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y\right) \]
    8. Applied rewrites24.9%

      \[\leadsto \left(-i\right) \cdot \left(j \cdot \color{blue}{y}\right) \]

    if 3.4000000000000002e67 < x

    1. Initial program 72.5%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6445.4

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites45.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    6. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(x \cdot y\right) \cdot z \]
      2. lower-*.f64N/A

        \[\leadsto \left(x \cdot y\right) \cdot z \]
      3. *-commutativeN/A

        \[\leadsto \left(y \cdot x\right) \cdot z \]
      4. lift-*.f6436.2

        \[\leadsto \left(y \cdot x\right) \cdot z \]
    8. Applied rewrites36.2%

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

Alternative 12: 30.4% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -7.8 \cdot 10^{+161}:\\ \;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\ \mathbf{elif}\;x \leq -1.35 \cdot 10^{+43}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{elif}\;x \leq -7.5 \cdot 10^{-241}:\\ \;\;\;\;-\left(c \cdot b\right) \cdot z\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{-185}:\\ \;\;\;\;\left(j \cdot c\right) \cdot t\\ \mathbf{elif}\;x \leq 3.2 \cdot 10^{+46}:\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= x -7.8e+161)
   (* (* (- a) t) x)
   (if (<= x -1.35e+43)
     (* (* z x) y)
     (if (<= x -7.5e-241)
       (- (* (* c b) z))
       (if (<= x 1.45e-185)
         (* (* j c) t)
         (if (<= x 3.2e+46) (* (* b a) i) (* (* y x) z)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -7.8e+161) {
		tmp = (-a * t) * x;
	} else if (x <= -1.35e+43) {
		tmp = (z * x) * y;
	} else if (x <= -7.5e-241) {
		tmp = -((c * b) * z);
	} else if (x <= 1.45e-185) {
		tmp = (j * c) * t;
	} else if (x <= 3.2e+46) {
		tmp = (b * a) * i;
	} else {
		tmp = (y * x) * z;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if (x <= (-7.8d+161)) then
        tmp = (-a * t) * x
    else if (x <= (-1.35d+43)) then
        tmp = (z * x) * y
    else if (x <= (-7.5d-241)) then
        tmp = -((c * b) * z)
    else if (x <= 1.45d-185) then
        tmp = (j * c) * t
    else if (x <= 3.2d+46) then
        tmp = (b * a) * i
    else
        tmp = (y * x) * z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -7.8e+161) {
		tmp = (-a * t) * x;
	} else if (x <= -1.35e+43) {
		tmp = (z * x) * y;
	} else if (x <= -7.5e-241) {
		tmp = -((c * b) * z);
	} else if (x <= 1.45e-185) {
		tmp = (j * c) * t;
	} else if (x <= 3.2e+46) {
		tmp = (b * a) * i;
	} else {
		tmp = (y * x) * z;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if x <= -7.8e+161:
		tmp = (-a * t) * x
	elif x <= -1.35e+43:
		tmp = (z * x) * y
	elif x <= -7.5e-241:
		tmp = -((c * b) * z)
	elif x <= 1.45e-185:
		tmp = (j * c) * t
	elif x <= 3.2e+46:
		tmp = (b * a) * i
	else:
		tmp = (y * x) * z
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (x <= -7.8e+161)
		tmp = Float64(Float64(Float64(-a) * t) * x);
	elseif (x <= -1.35e+43)
		tmp = Float64(Float64(z * x) * y);
	elseif (x <= -7.5e-241)
		tmp = Float64(-Float64(Float64(c * b) * z));
	elseif (x <= 1.45e-185)
		tmp = Float64(Float64(j * c) * t);
	elseif (x <= 3.2e+46)
		tmp = Float64(Float64(b * a) * i);
	else
		tmp = Float64(Float64(y * x) * z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (x <= -7.8e+161)
		tmp = (-a * t) * x;
	elseif (x <= -1.35e+43)
		tmp = (z * x) * y;
	elseif (x <= -7.5e-241)
		tmp = -((c * b) * z);
	elseif (x <= 1.45e-185)
		tmp = (j * c) * t;
	elseif (x <= 3.2e+46)
		tmp = (b * a) * i;
	else
		tmp = (y * x) * z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -7.8e+161], N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, -1.35e+43], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[x, -7.5e-241], (-N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]), If[LessEqual[x, 1.45e-185], N[(N[(j * c), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[x, 3.2e+46], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{+161}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\

\mathbf{elif}\;x \leq -1.35 \cdot 10^{+43}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\

\mathbf{elif}\;x \leq -7.5 \cdot 10^{-241}:\\
\;\;\;\;-\left(c \cdot b\right) \cdot z\\

\mathbf{elif}\;x \leq 1.45 \cdot 10^{-185}:\\
\;\;\;\;\left(j \cdot c\right) \cdot t\\

\mathbf{elif}\;x \leq 3.2 \cdot 10^{+46}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\

\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < -7.8000000000000004e161

    1. Initial program 71.7%

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6451.5

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    5. Applied rewrites51.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]
    6. Taylor expanded in x around inf

      \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot x\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot a\right) \cdot \left(t \cdot \color{blue}{x}\right) \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(t \cdot x\right) \]
      3. lift-neg.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) \]
      4. associate-*r*N/A

        \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot x \]
      5. lift-neg.f64N/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      6. mul-1-negN/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      7. associate-*r*N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot t\right)\right) \cdot x \]
      8. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot t\right)\right) \cdot x \]
      9. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      10. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      11. lift-neg.f64N/A

        \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot x \]
      12. lower-*.f6441.7

        \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot x \]
    8. Applied rewrites41.7%

      \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot \color{blue}{x} \]

    if -7.8000000000000004e161 < x < -1.3500000000000001e43

    1. Initial program 75.3%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6444.1

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites44.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    6. Taylor expanded in x around inf

      \[\leadsto \left(x \cdot z\right) \cdot y \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(z \cdot x\right) \cdot y \]
      2. lift-*.f6431.2

        \[\leadsto \left(z \cdot x\right) \cdot y \]
    8. Applied rewrites31.2%

      \[\leadsto \left(z \cdot x\right) \cdot y \]

    if -1.3500000000000001e43 < x < -7.49999999999999977e-241

    1. Initial program 74.8%

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

      \[\leadsto \color{blue}{b \cdot \left(a \cdot i - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      2. lower-*.f64N/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(a \cdot i + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      4. *-commutativeN/A

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6444.3

        \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
    5. Applied rewrites44.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b} \]
    6. Taylor expanded in z around 0

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      4. lower-*.f6424.5

        \[\leadsto \left(i \cdot b\right) \cdot a \]
    8. Applied rewrites24.5%

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]
    9. Taylor expanded in z around inf

      \[\leadsto -1 \cdot \color{blue}{\left(b \cdot \left(c \cdot z\right)\right)} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(b \cdot \left(c \cdot z\right)\right) \]
      2. lower-neg.f64N/A

        \[\leadsto -b \cdot \left(c \cdot z\right) \]
      3. associate-*r*N/A

        \[\leadsto -\left(b \cdot c\right) \cdot z \]
      4. lower-*.f64N/A

        \[\leadsto -\left(b \cdot c\right) \cdot z \]
      5. *-commutativeN/A

        \[\leadsto -\left(c \cdot b\right) \cdot z \]
      6. lower-*.f6425.6

        \[\leadsto -\left(c \cdot b\right) \cdot z \]
    11. Applied rewrites25.6%

      \[\leadsto -\left(c \cdot b\right) \cdot z \]

    if -7.49999999999999977e-241 < x < 1.44999999999999997e-185

    1. Initial program 73.2%

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6432.0

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    5. Applied rewrites32.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]
    6. Taylor expanded in x around 0

      \[\leadsto \left(c \cdot j\right) \cdot t \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot c\right) \cdot t \]
      2. lift-*.f6429.2

        \[\leadsto \left(j \cdot c\right) \cdot t \]
    8. Applied rewrites29.2%

      \[\leadsto \left(j \cdot c\right) \cdot t \]

    if 1.44999999999999997e-185 < x < 3.1999999999999998e46

    1. Initial program 75.9%

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

      \[\leadsto \color{blue}{b \cdot \left(a \cdot i - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      2. lower-*.f64N/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(a \cdot i + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      4. *-commutativeN/A

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6443.7

        \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
    5. Applied rewrites43.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b} \]
    6. Taylor expanded in z around 0

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      4. lower-*.f6424.5

        \[\leadsto \left(i \cdot b\right) \cdot a \]
    8. Applied rewrites24.5%

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]
    9. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      2. lift-*.f64N/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto a \cdot \left(i \cdot \color{blue}{b}\right) \]
      4. *-commutativeN/A

        \[\leadsto a \cdot \left(b \cdot i\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      6. lower-*.f64N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      7. *-commutativeN/A

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      8. lower-*.f6423.9

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    10. Applied rewrites23.9%

      \[\leadsto \left(b \cdot a\right) \cdot i \]

    if 3.1999999999999998e46 < x

    1. Initial program 72.8%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6445.2

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites45.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    6. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(x \cdot y\right) \cdot z \]
      2. lower-*.f64N/A

        \[\leadsto \left(x \cdot y\right) \cdot z \]
      3. *-commutativeN/A

        \[\leadsto \left(y \cdot x\right) \cdot z \]
      4. lift-*.f6435.6

        \[\leadsto \left(y \cdot x\right) \cdot z \]
    8. Applied rewrites35.6%

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

Alternative 13: 52.5% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -1.32 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 1.45 \cdot 10^{-268}:\\
\;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\

\mathbf{elif}\;x \leq 4 \cdot 10^{+54}:\\
\;\;\;\;\left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-a\right) \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.3200000000000001e44 or 4.0000000000000003e54 < x

    1. Initial program 72.8%

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

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

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot \color{blue}{x} \]
      2. *-commutativeN/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x \]
      3. lower-*.f64N/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot \color{blue}{x} \]
      4. *-commutativeN/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x \]
      5. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(y \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      6. mul-1-negN/A

        \[\leadsto \left(y \cdot z + \left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      7. associate-*r*N/A

        \[\leadsto \left(y \cdot z + -1 \cdot \left(a \cdot t\right)\right) \cdot x \]
      8. +-commutativeN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), t, y \cdot z\right) \cdot x \]
      12. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t, y \cdot z\right) \cdot x \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x \]
      14. lower-*.f6463.1

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x \]
    5. Applied rewrites63.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x} \]

    if -1.3200000000000001e44 < x < 1.4500000000000001e-268

    1. Initial program 74.5%

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

      \[\leadsto \color{blue}{c \cdot \left(j \cdot t - b \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      2. lower-*.f64N/A

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(j \cdot t + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      6. lower-neg.f6446.8

        \[\leadsto \mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c \]
    5. Applied rewrites46.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c} \]

    if 1.4500000000000001e-268 < x < 4.0000000000000003e54

    1. Initial program 75.2%

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

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot y - a \cdot b\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot i\right) \cdot \color{blue}{\left(j \cdot y - a \cdot b\right)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \color{blue}{\left(j \cdot y - a \cdot b\right)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-i\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      5. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y + \color{blue}{\left(\mathsf{neg}\left(a\right)\right) \cdot b}\right) \]
      6. mul-1-negN/A

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y + \left(-1 \cdot a\right) \cdot b\right) \]
      7. associate-*r*N/A

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y + -1 \cdot \color{blue}{\left(a \cdot b\right)}\right) \]
      8. lower-fma.f64N/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, \color{blue}{y}, -1 \cdot \left(a \cdot b\right)\right) \]
      9. associate-*r*N/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-1 \cdot a\right) \cdot b\right) \]
      10. mul-1-negN/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(\mathsf{neg}\left(a\right)\right) \cdot b\right) \]
      11. lower-*.f64N/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(\mathsf{neg}\left(a\right)\right) \cdot b\right) \]
      12. lower-neg.f6442.8

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-a\right) \cdot b\right) \]
    5. Applied rewrites42.8%

      \[\leadsto \color{blue}{\left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-a\right) \cdot b\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 14: 52.7% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -8 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -4.5 \cdot 10^{-158}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot t, j, \left(i \cdot b\right) \cdot a\right)\\

\mathbf{elif}\;y \leq 7 \cdot 10^{+31}:\\
\;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\

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


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

    1. Initial program 64.2%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6463.2

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites63.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]

    if -7.99999999999999941e75 < y < -4.5e-158

    1. Initial program 79.0%

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

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

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

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

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-*.f6451.2

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right) \]
    5. Applied rewrites51.2%

      \[\leadsto \color{blue}{\left(i \cdot b\right) \cdot a} + j \cdot \left(c \cdot t - i \cdot y\right) \]
    6. Taylor expanded in y around 0

      \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \color{blue}{\left(c \cdot t\right)} \]
    7. Step-by-step derivation
      1. lift-*.f6441.9

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot \color{blue}{t}\right) \]
    8. Applied rewrites41.9%

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

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

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

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

        \[\leadsto \color{blue}{\left(c \cdot t\right) \cdot j} + \left(i \cdot b\right) \cdot a \]
      5. lower-fma.f6442.4

        \[\leadsto \color{blue}{\mathsf{fma}\left(c \cdot t, j, \left(i \cdot b\right) \cdot a\right)} \]
    10. Applied rewrites42.4%

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

    if -4.5e-158 < y < 7e31

    1. Initial program 81.1%

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

      \[\leadsto \color{blue}{c \cdot \left(j \cdot t - b \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      2. lower-*.f64N/A

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(j \cdot t + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      6. lower-neg.f6447.5

        \[\leadsto \mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c \]
    5. Applied rewrites47.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 15: 52.7% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -8 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1.32 \cdot 10^{-45}:\\
\;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\

\mathbf{elif}\;y \leq 7 \cdot 10^{+31}:\\
\;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\

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


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

    1. Initial program 64.2%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6463.2

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites63.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]

    if -7.99999999999999941e75 < y < -1.32000000000000005e-45

    1. Initial program 77.4%

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6438.9

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    5. Applied rewrites38.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]

    if -1.32000000000000005e-45 < y < 7e31

    1. Initial program 81.0%

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

      \[\leadsto \color{blue}{c \cdot \left(j \cdot t - b \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      2. lower-*.f64N/A

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(j \cdot t + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      6. lower-neg.f6447.2

        \[\leadsto \mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c \]
    5. Applied rewrites47.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 16: 52.8% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{if}\;c \leq -2.65 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq -7 \cdot 10^{-80}:\\
\;\;\;\;\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\

\mathbf{elif}\;c \leq 1.05 \cdot 10^{+35}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -2.64999999999999998e133 or 1.0499999999999999e35 < c

    1. Initial program 63.6%

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

      \[\leadsto \color{blue}{c \cdot \left(j \cdot t - b \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      2. lower-*.f64N/A

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(j \cdot t + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      6. lower-neg.f6465.6

        \[\leadsto \mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c \]
    5. Applied rewrites65.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c} \]

    if -2.64999999999999998e133 < c < -7.00000000000000029e-80

    1. Initial program 76.0%

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

      \[\leadsto \color{blue}{b \cdot \left(a \cdot i - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      2. lower-*.f64N/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(a \cdot i + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      4. *-commutativeN/A

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6440.8

        \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
    5. Applied rewrites40.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b} \]

    if -7.00000000000000029e-80 < c < 1.0499999999999999e35

    1. Initial program 81.7%

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

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

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot \color{blue}{x} \]
      2. *-commutativeN/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x \]
      3. lower-*.f64N/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot \color{blue}{x} \]
      4. *-commutativeN/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x \]
      5. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(y \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      6. mul-1-negN/A

        \[\leadsto \left(y \cdot z + \left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      7. associate-*r*N/A

        \[\leadsto \left(y \cdot z + -1 \cdot \left(a \cdot t\right)\right) \cdot x \]
      8. +-commutativeN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), t, y \cdot z\right) \cdot x \]
      12. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t, y \cdot z\right) \cdot x \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x \]
      14. lower-*.f6447.2

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x \]
    5. Applied rewrites47.2%

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

Alternative 17: 45.3% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.9 \cdot 10^{-293}:\\
\;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\

\mathbf{elif}\;z \leq 1.9 \cdot 10^{+20}:\\
\;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.50000000000000004e-25 or 1.9e20 < z

    1. Initial program 66.1%

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

      \[\leadsto \color{blue}{z \cdot \left(x \cdot y - b \cdot c\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot \color{blue}{z} \]
      2. lower-*.f64N/A

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot \color{blue}{z} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(x \cdot y + \left(\mathsf{neg}\left(b\right)\right) \cdot c\right) \cdot z \]
      4. *-commutativeN/A

        \[\leadsto \left(y \cdot x + \left(\mathsf{neg}\left(b\right)\right) \cdot c\right) \cdot z \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y, x, \left(\mathsf{neg}\left(b\right)\right) \cdot c\right) \cdot z \]
      6. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(y, x, \left(\mathsf{neg}\left(b\right)\right) \cdot c\right) \cdot z \]
      7. lower-neg.f6460.4

        \[\leadsto \mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z \]
    5. Applied rewrites60.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z} \]

    if -5.50000000000000004e-25 < z < 2.8999999999999999e-293

    1. Initial program 82.7%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6432.3

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites32.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    6. Taylor expanded in x around 0

      \[\leadsto \left(-1 \cdot \left(i \cdot j\right)\right) \cdot y \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j\right) \cdot y \]
      2. lower-*.f64N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j\right) \cdot y \]
      3. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y \]
      4. lift-neg.f6425.5

        \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]
    8. Applied rewrites25.5%

      \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]

    if 2.8999999999999999e-293 < z < 1.9e20

    1. Initial program 80.9%

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

      \[\leadsto \color{blue}{c \cdot \left(j \cdot t - b \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      2. lower-*.f64N/A

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(j \cdot t + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      6. lower-neg.f6435.2

        \[\leadsto \mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c \]
    5. Applied rewrites35.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 18: 42.4% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{+161}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\

\mathbf{elif}\;x \leq -1.05 \cdot 10^{+45}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\

\mathbf{elif}\;x \leq 3.6 \cdot 10^{+67}:\\
\;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\

\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -7.8000000000000004e161

    1. Initial program 71.7%

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6451.5

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    5. Applied rewrites51.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]
    6. Taylor expanded in x around inf

      \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot x\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot a\right) \cdot \left(t \cdot \color{blue}{x}\right) \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(t \cdot x\right) \]
      3. lift-neg.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) \]
      4. associate-*r*N/A

        \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot x \]
      5. lift-neg.f64N/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      6. mul-1-negN/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      7. associate-*r*N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot t\right)\right) \cdot x \]
      8. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot t\right)\right) \cdot x \]
      9. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      10. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      11. lift-neg.f64N/A

        \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot x \]
      12. lower-*.f6441.7

        \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot x \]
    8. Applied rewrites41.7%

      \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot \color{blue}{x} \]

    if -7.8000000000000004e161 < x < -1.04999999999999997e45

    1. Initial program 75.2%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6443.8

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites43.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    6. Taylor expanded in x around inf

      \[\leadsto \left(x \cdot z\right) \cdot y \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(z \cdot x\right) \cdot y \]
      2. lift-*.f6431.1

        \[\leadsto \left(z \cdot x\right) \cdot y \]
    8. Applied rewrites31.1%

      \[\leadsto \left(z \cdot x\right) \cdot y \]

    if -1.04999999999999997e45 < x < 3.5999999999999999e67

    1. Initial program 74.7%

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

      \[\leadsto \color{blue}{c \cdot \left(j \cdot t - b \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      2. lower-*.f64N/A

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(j \cdot t + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      6. lower-neg.f6446.3

        \[\leadsto \mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c \]
    5. Applied rewrites46.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c} \]

    if 3.5999999999999999e67 < x

    1. Initial program 72.6%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6445.3

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites45.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    6. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(x \cdot y\right) \cdot z \]
      2. lower-*.f64N/A

        \[\leadsto \left(x \cdot y\right) \cdot z \]
      3. *-commutativeN/A

        \[\leadsto \left(y \cdot x\right) \cdot z \]
      4. lift-*.f6436.2

        \[\leadsto \left(y \cdot x\right) \cdot z \]
    8. Applied rewrites36.2%

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

Alternative 19: 42.0% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{+161}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\

\mathbf{elif}\;x \leq -6.4 \cdot 10^{+44}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\

\mathbf{elif}\;x \leq 3.5 \cdot 10^{+67}:\\
\;\;\;\;\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\

\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -7.8000000000000004e161

    1. Initial program 71.7%

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6451.5

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    5. Applied rewrites51.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]
    6. Taylor expanded in x around inf

      \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot x\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot a\right) \cdot \left(t \cdot \color{blue}{x}\right) \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(t \cdot x\right) \]
      3. lift-neg.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) \]
      4. associate-*r*N/A

        \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot x \]
      5. lift-neg.f64N/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      6. mul-1-negN/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      7. associate-*r*N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot t\right)\right) \cdot x \]
      8. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot t\right)\right) \cdot x \]
      9. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      10. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      11. lift-neg.f64N/A

        \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot x \]
      12. lower-*.f6441.7

        \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot x \]
    8. Applied rewrites41.7%

      \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot \color{blue}{x} \]

    if -7.8000000000000004e161 < x < -6.40000000000000009e44

    1. Initial program 75.2%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6443.9

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites43.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    6. Taylor expanded in x around inf

      \[\leadsto \left(x \cdot z\right) \cdot y \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(z \cdot x\right) \cdot y \]
      2. lift-*.f6431.3

        \[\leadsto \left(z \cdot x\right) \cdot y \]
    8. Applied rewrites31.3%

      \[\leadsto \left(z \cdot x\right) \cdot y \]

    if -6.40000000000000009e44 < x < 3.5e67

    1. Initial program 74.7%

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

      \[\leadsto \color{blue}{b \cdot \left(a \cdot i - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      2. lower-*.f64N/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(a \cdot i + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      4. *-commutativeN/A

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6445.6

        \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
    5. Applied rewrites45.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b} \]

    if 3.5e67 < x

    1. Initial program 72.5%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6445.3

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites45.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    6. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(x \cdot y\right) \cdot z \]
      2. lower-*.f64N/A

        \[\leadsto \left(x \cdot y\right) \cdot z \]
      3. *-commutativeN/A

        \[\leadsto \left(y \cdot x\right) \cdot z \]
      4. lift-*.f6436.2

        \[\leadsto \left(y \cdot x\right) \cdot z \]
    8. Applied rewrites36.2%

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

Alternative 20: 29.8% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot x\right) \cdot y\\ \mathbf{if}\;z \leq -4.5 \cdot 10^{+150}:\\ \;\;\;\;\left(\left(-b\right) \cdot z\right) \cdot c\\ \mathbf{elif}\;z \leq -8 \cdot 10^{+24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-293}:\\ \;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+35}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* z x) y)))
   (if (<= z -4.5e+150)
     (* (* (- b) z) c)
     (if (<= z -8e+24)
       t_1
       (if (<= z 3.8e-293)
         (* (* (- i) j) y)
         (if (<= z 3e+35) (* (* j t) c) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (z * x) * y;
	double tmp;
	if (z <= -4.5e+150) {
		tmp = (-b * z) * c;
	} else if (z <= -8e+24) {
		tmp = t_1;
	} else if (z <= 3.8e-293) {
		tmp = (-i * j) * y;
	} else if (z <= 3e+35) {
		tmp = (j * t) * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z * x) * y
    if (z <= (-4.5d+150)) then
        tmp = (-b * z) * c
    else if (z <= (-8d+24)) then
        tmp = t_1
    else if (z <= 3.8d-293) then
        tmp = (-i * j) * y
    else if (z <= 3d+35) then
        tmp = (j * t) * c
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (z * x) * y;
	double tmp;
	if (z <= -4.5e+150) {
		tmp = (-b * z) * c;
	} else if (z <= -8e+24) {
		tmp = t_1;
	} else if (z <= 3.8e-293) {
		tmp = (-i * j) * y;
	} else if (z <= 3e+35) {
		tmp = (j * t) * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (z * x) * y
	tmp = 0
	if z <= -4.5e+150:
		tmp = (-b * z) * c
	elif z <= -8e+24:
		tmp = t_1
	elif z <= 3.8e-293:
		tmp = (-i * j) * y
	elif z <= 3e+35:
		tmp = (j * t) * c
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(z * x) * y)
	tmp = 0.0
	if (z <= -4.5e+150)
		tmp = Float64(Float64(Float64(-b) * z) * c);
	elseif (z <= -8e+24)
		tmp = t_1;
	elseif (z <= 3.8e-293)
		tmp = Float64(Float64(Float64(-i) * j) * y);
	elseif (z <= 3e+35)
		tmp = Float64(Float64(j * t) * c);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (z * x) * y;
	tmp = 0.0;
	if (z <= -4.5e+150)
		tmp = (-b * z) * c;
	elseif (z <= -8e+24)
		tmp = t_1;
	elseif (z <= 3.8e-293)
		tmp = (-i * j) * y;
	elseif (z <= 3e+35)
		tmp = (j * t) * c;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -4.5e+150], N[(N[((-b) * z), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[z, -8e+24], t$95$1, If[LessEqual[z, 3.8e-293], N[(N[((-i) * j), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 3e+35], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(z \cdot x\right) \cdot y\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+150}:\\
\;\;\;\;\left(\left(-b\right) \cdot z\right) \cdot c\\

\mathbf{elif}\;z \leq -8 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3.8 \cdot 10^{-293}:\\
\;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\

\mathbf{elif}\;z \leq 3 \cdot 10^{+35}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.5e150

    1. Initial program 60.2%

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

      \[\leadsto \color{blue}{c \cdot \left(j \cdot t - b \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      2. lower-*.f64N/A

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(j \cdot t + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      6. lower-neg.f6449.4

        \[\leadsto \mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c \]
    5. Applied rewrites49.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c} \]
    6. Taylor expanded in z around inf

      \[\leadsto \left(-1 \cdot \left(b \cdot z\right)\right) \cdot c \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(b \cdot z\right)\right) \cdot c \]
      2. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      3. lift-*.f64N/A

        \[\leadsto \left(\left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. lift-neg.f6441.1

        \[\leadsto \left(\left(-b\right) \cdot z\right) \cdot c \]
    8. Applied rewrites41.1%

      \[\leadsto \left(\left(-b\right) \cdot z\right) \cdot c \]

    if -4.5e150 < z < -7.9999999999999999e24 or 2.99999999999999991e35 < z

    1. Initial program 66.5%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6444.4

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites44.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    6. Taylor expanded in x around inf

      \[\leadsto \left(x \cdot z\right) \cdot y \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(z \cdot x\right) \cdot y \]
      2. lift-*.f6432.5

        \[\leadsto \left(z \cdot x\right) \cdot y \]
    8. Applied rewrites32.5%

      \[\leadsto \left(z \cdot x\right) \cdot y \]

    if -7.9999999999999999e24 < z < 3.8e-293

    1. Initial program 82.4%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6432.6

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites32.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    6. Taylor expanded in x around 0

      \[\leadsto \left(-1 \cdot \left(i \cdot j\right)\right) \cdot y \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j\right) \cdot y \]
      2. lower-*.f64N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j\right) \cdot y \]
      3. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y \]
      4. lift-neg.f6424.8

        \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]
    8. Applied rewrites24.8%

      \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]

    if 3.8e-293 < z < 2.99999999999999991e35

    1. Initial program 80.6%

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6446.4

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    5. Applied rewrites46.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]
    6. Taylor expanded in x around 0

      \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      2. lower-*.f64N/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      3. lower-*.f6426.5

        \[\leadsto \left(j \cdot t\right) \cdot c \]
    8. Applied rewrites26.5%

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 21: 29.6% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot x\right) \cdot y\\ \mathbf{if}\;z \leq -4.5 \cdot 10^{+150}:\\ \;\;\;\;-\left(c \cdot b\right) \cdot z\\ \mathbf{elif}\;z \leq -1900:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-274}:\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+35}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* z x) y)))
   (if (<= z -4.5e+150)
     (- (* (* c b) z))
     (if (<= z -1900.0)
       t_1
       (if (<= z -1.2e-274)
         (* (* b a) i)
         (if (<= z 3e+35) (* (* j t) c) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (z * x) * y;
	double tmp;
	if (z <= -4.5e+150) {
		tmp = -((c * b) * z);
	} else if (z <= -1900.0) {
		tmp = t_1;
	} else if (z <= -1.2e-274) {
		tmp = (b * a) * i;
	} else if (z <= 3e+35) {
		tmp = (j * t) * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z * x) * y
    if (z <= (-4.5d+150)) then
        tmp = -((c * b) * z)
    else if (z <= (-1900.0d0)) then
        tmp = t_1
    else if (z <= (-1.2d-274)) then
        tmp = (b * a) * i
    else if (z <= 3d+35) then
        tmp = (j * t) * c
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (z * x) * y;
	double tmp;
	if (z <= -4.5e+150) {
		tmp = -((c * b) * z);
	} else if (z <= -1900.0) {
		tmp = t_1;
	} else if (z <= -1.2e-274) {
		tmp = (b * a) * i;
	} else if (z <= 3e+35) {
		tmp = (j * t) * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (z * x) * y
	tmp = 0
	if z <= -4.5e+150:
		tmp = -((c * b) * z)
	elif z <= -1900.0:
		tmp = t_1
	elif z <= -1.2e-274:
		tmp = (b * a) * i
	elif z <= 3e+35:
		tmp = (j * t) * c
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(z * x) * y)
	tmp = 0.0
	if (z <= -4.5e+150)
		tmp = Float64(-Float64(Float64(c * b) * z));
	elseif (z <= -1900.0)
		tmp = t_1;
	elseif (z <= -1.2e-274)
		tmp = Float64(Float64(b * a) * i);
	elseif (z <= 3e+35)
		tmp = Float64(Float64(j * t) * c);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (z * x) * y;
	tmp = 0.0;
	if (z <= -4.5e+150)
		tmp = -((c * b) * z);
	elseif (z <= -1900.0)
		tmp = t_1;
	elseif (z <= -1.2e-274)
		tmp = (b * a) * i;
	elseif (z <= 3e+35)
		tmp = (j * t) * c;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -4.5e+150], (-N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]), If[LessEqual[z, -1900.0], t$95$1, If[LessEqual[z, -1.2e-274], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[z, 3e+35], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(z \cdot x\right) \cdot y\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+150}:\\
\;\;\;\;-\left(c \cdot b\right) \cdot z\\

\mathbf{elif}\;z \leq -1900:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.2 \cdot 10^{-274}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\

\mathbf{elif}\;z \leq 3 \cdot 10^{+35}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.5e150

    1. Initial program 60.2%

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

      \[\leadsto \color{blue}{b \cdot \left(a \cdot i - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      2. lower-*.f64N/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(a \cdot i + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      4. *-commutativeN/A

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6449.0

        \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
    5. Applied rewrites49.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b} \]
    6. Taylor expanded in z around 0

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      4. lower-*.f6418.3

        \[\leadsto \left(i \cdot b\right) \cdot a \]
    8. Applied rewrites18.3%

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]
    9. Taylor expanded in z around inf

      \[\leadsto -1 \cdot \color{blue}{\left(b \cdot \left(c \cdot z\right)\right)} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(b \cdot \left(c \cdot z\right)\right) \]
      2. lower-neg.f64N/A

        \[\leadsto -b \cdot \left(c \cdot z\right) \]
      3. associate-*r*N/A

        \[\leadsto -\left(b \cdot c\right) \cdot z \]
      4. lower-*.f64N/A

        \[\leadsto -\left(b \cdot c\right) \cdot z \]
      5. *-commutativeN/A

        \[\leadsto -\left(c \cdot b\right) \cdot z \]
      6. lower-*.f6438.9

        \[\leadsto -\left(c \cdot b\right) \cdot z \]
    11. Applied rewrites38.9%

      \[\leadsto -\left(c \cdot b\right) \cdot z \]

    if -4.5e150 < z < -1900 or 2.99999999999999991e35 < z

    1. Initial program 67.0%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6444.0

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites44.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    6. Taylor expanded in x around inf

      \[\leadsto \left(x \cdot z\right) \cdot y \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(z \cdot x\right) \cdot y \]
      2. lift-*.f6432.2

        \[\leadsto \left(z \cdot x\right) \cdot y \]
    8. Applied rewrites32.2%

      \[\leadsto \left(z \cdot x\right) \cdot y \]

    if -1900 < z < -1.2e-274

    1. Initial program 82.7%

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

      \[\leadsto \color{blue}{b \cdot \left(a \cdot i - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      2. lower-*.f64N/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(a \cdot i + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      4. *-commutativeN/A

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6433.3

        \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
    5. Applied rewrites33.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b} \]
    6. Taylor expanded in z around 0

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      4. lower-*.f6424.1

        \[\leadsto \left(i \cdot b\right) \cdot a \]
    8. Applied rewrites24.1%

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]
    9. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      2. lift-*.f64N/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto a \cdot \left(i \cdot \color{blue}{b}\right) \]
      4. *-commutativeN/A

        \[\leadsto a \cdot \left(b \cdot i\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      6. lower-*.f64N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      7. *-commutativeN/A

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      8. lower-*.f6424.5

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    10. Applied rewrites24.5%

      \[\leadsto \left(b \cdot a\right) \cdot i \]

    if -1.2e-274 < z < 2.99999999999999991e35

    1. Initial program 80.9%

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6446.8

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    5. Applied rewrites46.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]
    6. Taylor expanded in x around 0

      \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      2. lower-*.f64N/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      3. lower-*.f6426.8

        \[\leadsto \left(j \cdot t\right) \cdot c \]
    8. Applied rewrites26.8%

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 22: 30.1% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot x\right) \cdot y\\ \mathbf{if}\;z \leq -1900:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-274}:\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+35}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* z x) y)))
   (if (<= z -1900.0)
     t_1
     (if (<= z -1.2e-274) (* (* b a) i) (if (<= z 3e+35) (* (* j t) c) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (z * x) * y;
	double tmp;
	if (z <= -1900.0) {
		tmp = t_1;
	} else if (z <= -1.2e-274) {
		tmp = (b * a) * i;
	} else if (z <= 3e+35) {
		tmp = (j * t) * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z * x) * y
    if (z <= (-1900.0d0)) then
        tmp = t_1
    else if (z <= (-1.2d-274)) then
        tmp = (b * a) * i
    else if (z <= 3d+35) then
        tmp = (j * t) * c
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (z * x) * y;
	double tmp;
	if (z <= -1900.0) {
		tmp = t_1;
	} else if (z <= -1.2e-274) {
		tmp = (b * a) * i;
	} else if (z <= 3e+35) {
		tmp = (j * t) * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (z * x) * y
	tmp = 0
	if z <= -1900.0:
		tmp = t_1
	elif z <= -1.2e-274:
		tmp = (b * a) * i
	elif z <= 3e+35:
		tmp = (j * t) * c
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(z * x) * y)
	tmp = 0.0
	if (z <= -1900.0)
		tmp = t_1;
	elseif (z <= -1.2e-274)
		tmp = Float64(Float64(b * a) * i);
	elseif (z <= 3e+35)
		tmp = Float64(Float64(j * t) * c);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (z * x) * y;
	tmp = 0.0;
	if (z <= -1900.0)
		tmp = t_1;
	elseif (z <= -1.2e-274)
		tmp = (b * a) * i;
	elseif (z <= 3e+35)
		tmp = (j * t) * c;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -1900.0], t$95$1, If[LessEqual[z, -1.2e-274], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[z, 3e+35], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(z \cdot x\right) \cdot y\\
\mathbf{if}\;z \leq -1900:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.2 \cdot 10^{-274}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\

\mathbf{elif}\;z \leq 3 \cdot 10^{+35}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1900 or 2.99999999999999991e35 < z

    1. Initial program 65.1%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6445.9

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites45.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    6. Taylor expanded in x around inf

      \[\leadsto \left(x \cdot z\right) \cdot y \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(z \cdot x\right) \cdot y \]
      2. lift-*.f6435.0

        \[\leadsto \left(z \cdot x\right) \cdot y \]
    8. Applied rewrites35.0%

      \[\leadsto \left(z \cdot x\right) \cdot y \]

    if -1900 < z < -1.2e-274

    1. Initial program 82.7%

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

      \[\leadsto \color{blue}{b \cdot \left(a \cdot i - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      2. lower-*.f64N/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(a \cdot i + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      4. *-commutativeN/A

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6433.3

        \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
    5. Applied rewrites33.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b} \]
    6. Taylor expanded in z around 0

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      4. lower-*.f6424.1

        \[\leadsto \left(i \cdot b\right) \cdot a \]
    8. Applied rewrites24.1%

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]
    9. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      2. lift-*.f64N/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto a \cdot \left(i \cdot \color{blue}{b}\right) \]
      4. *-commutativeN/A

        \[\leadsto a \cdot \left(b \cdot i\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      6. lower-*.f64N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      7. *-commutativeN/A

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      8. lower-*.f6424.5

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    10. Applied rewrites24.5%

      \[\leadsto \left(b \cdot a\right) \cdot i \]

    if -1.2e-274 < z < 2.99999999999999991e35

    1. Initial program 80.9%

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6446.8

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    5. Applied rewrites46.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]
    6. Taylor expanded in x around 0

      \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      2. lower-*.f64N/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      3. lower-*.f6426.8

        \[\leadsto \left(j \cdot t\right) \cdot c \]
    8. Applied rewrites26.8%

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 23: 29.6% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y \cdot x\right) \cdot z\\ \mathbf{if}\;z \leq -1900:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-274}:\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+35}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* y x) z)))
   (if (<= z -1900.0)
     t_1
     (if (<= z -1.2e-274) (* (* b a) i) (if (<= z 3e+35) (* (* j t) c) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (y * x) * z;
	double tmp;
	if (z <= -1900.0) {
		tmp = t_1;
	} else if (z <= -1.2e-274) {
		tmp = (b * a) * i;
	} else if (z <= 3e+35) {
		tmp = (j * t) * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y * x) * z
    if (z <= (-1900.0d0)) then
        tmp = t_1
    else if (z <= (-1.2d-274)) then
        tmp = (b * a) * i
    else if (z <= 3d+35) then
        tmp = (j * t) * c
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (y * x) * z;
	double tmp;
	if (z <= -1900.0) {
		tmp = t_1;
	} else if (z <= -1.2e-274) {
		tmp = (b * a) * i;
	} else if (z <= 3e+35) {
		tmp = (j * t) * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (y * x) * z
	tmp = 0
	if z <= -1900.0:
		tmp = t_1
	elif z <= -1.2e-274:
		tmp = (b * a) * i
	elif z <= 3e+35:
		tmp = (j * t) * c
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(y * x) * z)
	tmp = 0.0
	if (z <= -1900.0)
		tmp = t_1;
	elseif (z <= -1.2e-274)
		tmp = Float64(Float64(b * a) * i);
	elseif (z <= 3e+35)
		tmp = Float64(Float64(j * t) * c);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (y * x) * z;
	tmp = 0.0;
	if (z <= -1900.0)
		tmp = t_1;
	elseif (z <= -1.2e-274)
		tmp = (b * a) * i;
	elseif (z <= 3e+35)
		tmp = (j * t) * c;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -1900.0], t$95$1, If[LessEqual[z, -1.2e-274], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[z, 3e+35], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y \cdot x\right) \cdot z\\
\mathbf{if}\;z \leq -1900:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.2 \cdot 10^{-274}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\

\mathbf{elif}\;z \leq 3 \cdot 10^{+35}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1900 or 2.99999999999999991e35 < z

    1. Initial program 65.1%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6445.9

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites45.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    6. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(x \cdot y\right) \cdot z \]
      2. lower-*.f64N/A

        \[\leadsto \left(x \cdot y\right) \cdot z \]
      3. *-commutativeN/A

        \[\leadsto \left(y \cdot x\right) \cdot z \]
      4. lift-*.f6433.9

        \[\leadsto \left(y \cdot x\right) \cdot z \]
    8. Applied rewrites33.9%

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

    if -1900 < z < -1.2e-274

    1. Initial program 82.7%

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

      \[\leadsto \color{blue}{b \cdot \left(a \cdot i - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      2. lower-*.f64N/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(a \cdot i + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      4. *-commutativeN/A

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6433.3

        \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
    5. Applied rewrites33.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b} \]
    6. Taylor expanded in z around 0

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      4. lower-*.f6424.1

        \[\leadsto \left(i \cdot b\right) \cdot a \]
    8. Applied rewrites24.1%

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]
    9. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      2. lift-*.f64N/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto a \cdot \left(i \cdot \color{blue}{b}\right) \]
      4. *-commutativeN/A

        \[\leadsto a \cdot \left(b \cdot i\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      6. lower-*.f64N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      7. *-commutativeN/A

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      8. lower-*.f6424.5

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    10. Applied rewrites24.5%

      \[\leadsto \left(b \cdot a\right) \cdot i \]

    if -1.2e-274 < z < 2.99999999999999991e35

    1. Initial program 80.9%

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6446.8

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    5. Applied rewrites46.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]
    6. Taylor expanded in x around 0

      \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      2. lower-*.f64N/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      3. lower-*.f6426.8

        \[\leadsto \left(j \cdot t\right) \cdot c \]
    8. Applied rewrites26.8%

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 24: 28.3% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b \cdot a\right) \cdot i\\ \mathbf{if}\;a \leq -2.1 \cdot 10^{-176}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-63}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* b a) i)))
   (if (<= a -2.1e-176) t_1 (if (<= a 8e-63) (* (* j t) c) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (b * a) * i;
	double tmp;
	if (a <= -2.1e-176) {
		tmp = t_1;
	} else if (a <= 8e-63) {
		tmp = (j * t) * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (b * a) * i
    if (a <= (-2.1d-176)) then
        tmp = t_1
    else if (a <= 8d-63) then
        tmp = (j * t) * c
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (b * a) * i;
	double tmp;
	if (a <= -2.1e-176) {
		tmp = t_1;
	} else if (a <= 8e-63) {
		tmp = (j * t) * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (b * a) * i
	tmp = 0
	if a <= -2.1e-176:
		tmp = t_1
	elif a <= 8e-63:
		tmp = (j * t) * c
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(b * a) * i)
	tmp = 0.0
	if (a <= -2.1e-176)
		tmp = t_1;
	elseif (a <= 8e-63)
		tmp = Float64(Float64(j * t) * c);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (b * a) * i;
	tmp = 0.0;
	if (a <= -2.1e-176)
		tmp = t_1;
	elseif (a <= 8e-63)
		tmp = (j * t) * c;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[a, -2.1e-176], t$95$1, If[LessEqual[a, 8e-63], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(b \cdot a\right) \cdot i\\
\mathbf{if}\;a \leq -2.1 \cdot 10^{-176}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 8 \cdot 10^{-63}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.09999999999999992e-176 or 8.00000000000000053e-63 < a

    1. Initial program 70.7%

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

      \[\leadsto \color{blue}{b \cdot \left(a \cdot i - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      2. lower-*.f64N/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(a \cdot i + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      4. *-commutativeN/A

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6443.5

        \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
    5. Applied rewrites43.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b} \]
    6. Taylor expanded in z around 0

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      4. lower-*.f6428.1

        \[\leadsto \left(i \cdot b\right) \cdot a \]
    8. Applied rewrites28.1%

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]
    9. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      2. lift-*.f64N/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto a \cdot \left(i \cdot \color{blue}{b}\right) \]
      4. *-commutativeN/A

        \[\leadsto a \cdot \left(b \cdot i\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      6. lower-*.f64N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      7. *-commutativeN/A

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      8. lower-*.f6428.8

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    10. Applied rewrites28.8%

      \[\leadsto \left(b \cdot a\right) \cdot i \]

    if -2.09999999999999992e-176 < a < 8.00000000000000053e-63

    1. Initial program 81.8%

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6433.3

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    5. Applied rewrites33.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]
    6. Taylor expanded in x around 0

      \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      2. lower-*.f64N/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      3. lower-*.f6427.2

        \[\leadsto \left(j \cdot t\right) \cdot c \]
    8. Applied rewrites27.2%

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 25: 22.4% accurate, 5.5× speedup?

\[\begin{array}{l} \\ \left(b \cdot a\right) \cdot i \end{array} \]
(FPCore (x y z t a b c i j) :precision binary64 (* (* b a) i))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return (b * a) * 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, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    code = (b * a) * i
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return (b * a) * i;
}
def code(x, y, z, t, a, b, c, i, j):
	return (b * a) * i
function code(x, y, z, t, a, b, c, i, j)
	return Float64(Float64(b * a) * i)
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = (b * a) * i;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision]
\begin{array}{l}

\\
\left(b \cdot a\right) \cdot i
\end{array}
Derivation
  1. Initial program 74.0%

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

    \[\leadsto \color{blue}{b \cdot \left(a \cdot i - c \cdot z\right)} \]
  4. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
    2. lower-*.f64N/A

      \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
    3. fp-cancel-sub-sign-invN/A

      \[\leadsto \left(a \cdot i + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
    4. *-commutativeN/A

      \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
    5. lower-fma.f64N/A

      \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
    6. mul-1-negN/A

      \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
    7. lower-*.f64N/A

      \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
    8. mul-1-negN/A

      \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
    9. lower-neg.f6440.4

      \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
  5. Applied rewrites40.4%

    \[\leadsto \color{blue}{\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b} \]
  6. Taylor expanded in z around 0

    \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
  7. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \left(b \cdot i\right) \cdot a \]
    2. lower-*.f64N/A

      \[\leadsto \left(b \cdot i\right) \cdot a \]
    3. *-commutativeN/A

      \[\leadsto \left(i \cdot b\right) \cdot a \]
    4. lower-*.f6422.4

      \[\leadsto \left(i \cdot b\right) \cdot a \]
  8. Applied rewrites22.4%

    \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]
  9. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto \left(i \cdot b\right) \cdot a \]
    2. lift-*.f64N/A

      \[\leadsto \left(i \cdot b\right) \cdot a \]
    3. *-commutativeN/A

      \[\leadsto a \cdot \left(i \cdot \color{blue}{b}\right) \]
    4. *-commutativeN/A

      \[\leadsto a \cdot \left(b \cdot i\right) \]
    5. associate-*r*N/A

      \[\leadsto \left(a \cdot b\right) \cdot i \]
    6. lower-*.f64N/A

      \[\leadsto \left(a \cdot b\right) \cdot i \]
    7. *-commutativeN/A

      \[\leadsto \left(b \cdot a\right) \cdot i \]
    8. lower-*.f6422.4

      \[\leadsto \left(b \cdot a\right) \cdot i \]
  10. Applied rewrites22.4%

    \[\leadsto \left(b \cdot a\right) \cdot i \]
  11. Add Preprocessing

Developer Target 1: 69.5% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \frac{j \cdot \left({\left(c \cdot t\right)}^{2} - {\left(i \cdot y\right)}^{2}\right)}{c \cdot t + i \cdot y}\\ t_2 := x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\ \mathbf{if}\;t < -8.120978919195912 \cdot 10^{-33}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t < -4.712553818218485 \cdot 10^{-169}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t < -7.633533346031584 \cdot 10^{-308}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t < 1.0535888557455487 \cdot 10^{-139}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1
         (+
          (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
          (/
           (* j (- (pow (* c t) 2.0) (pow (* i y) 2.0)))
           (+ (* c t) (* i y)))))
        (t_2
         (-
          (* x (- (* z y) (* a t)))
          (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j)))))
   (if (< t -8.120978919195912e-33)
     t_2
     (if (< t -4.712553818218485e-169)
       t_1
       (if (< t -7.633533346031584e-308)
         t_2
         (if (< t 1.0535888557455487e-139) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (pow((c * t), 2.0) - pow((i * y), 2.0))) / ((c * t) + (i * y)));
	double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
	double tmp;
	if (t < -8.120978919195912e-33) {
		tmp = t_2;
	} else if (t < -4.712553818218485e-169) {
		tmp = t_1;
	} else if (t < -7.633533346031584e-308) {
		tmp = t_2;
	} else if (t < 1.0535888557455487e-139) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ** 2.0d0) - ((i * y) ** 2.0d0))) / ((c * t) + (i * y)))
    t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j))
    if (t < (-8.120978919195912d-33)) then
        tmp = t_2
    else if (t < (-4.712553818218485d-169)) then
        tmp = t_1
    else if (t < (-7.633533346031584d-308)) then
        tmp = t_2
    else if (t < 1.0535888557455487d-139) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (Math.pow((c * t), 2.0) - Math.pow((i * y), 2.0))) / ((c * t) + (i * y)));
	double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
	double tmp;
	if (t < -8.120978919195912e-33) {
		tmp = t_2;
	} else if (t < -4.712553818218485e-169) {
		tmp = t_1;
	} else if (t < -7.633533346031584e-308) {
		tmp = t_2;
	} else if (t < 1.0535888557455487e-139) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (math.pow((c * t), 2.0) - math.pow((i * y), 2.0))) / ((c * t) + (i * y)))
	t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j))
	tmp = 0
	if t < -8.120978919195912e-33:
		tmp = t_2
	elif t < -4.712553818218485e-169:
		tmp = t_1
	elif t < -7.633533346031584e-308:
		tmp = t_2
	elif t < 1.0535888557455487e-139:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(Float64(j * Float64((Float64(c * t) ^ 2.0) - (Float64(i * y) ^ 2.0))) / Float64(Float64(c * t) + Float64(i * y))))
	t_2 = Float64(Float64(x * Float64(Float64(z * y) - Float64(a * t))) - Float64(Float64(b * Float64(Float64(z * c) - Float64(a * i))) - Float64(Float64(Float64(c * t) - Float64(y * i)) * j)))
	tmp = 0.0
	if (t < -8.120978919195912e-33)
		tmp = t_2;
	elseif (t < -4.712553818218485e-169)
		tmp = t_1;
	elseif (t < -7.633533346031584e-308)
		tmp = t_2;
	elseif (t < 1.0535888557455487e-139)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ^ 2.0) - ((i * y) ^ 2.0))) / ((c * t) + (i * y)));
	t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
	tmp = 0.0;
	if (t < -8.120978919195912e-33)
		tmp = t_2;
	elseif (t < -4.712553818218485e-169)
		tmp = t_1;
	elseif (t < -7.633533346031584e-308)
		tmp = t_2;
	elseif (t < 1.0535888557455487e-139)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(j * N[(N[Power[N[(c * t), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(i * y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * t), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[(z * c), $MachinePrecision] - N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(c * t), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -8.120978919195912e-33], t$95$2, If[Less[t, -4.712553818218485e-169], t$95$1, If[Less[t, -7.633533346031584e-308], t$95$2, If[Less[t, 1.0535888557455487e-139], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \frac{j \cdot \left({\left(c \cdot t\right)}^{2} - {\left(i \cdot y\right)}^{2}\right)}{c \cdot t + i \cdot y}\\
t_2 := x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\
\mathbf{if}\;t < -8.120978919195912 \cdot 10^{-33}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t < -4.712553818218485 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t < -7.633533346031584 \cdot 10^{-308}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t < 1.0535888557455487 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2025091 
(FPCore (x y z t a b c i j)
  :name "Linear.Matrix:det33 from linear-1.19.1.3"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< t -1015122364899489/125000000000000000000000000000000000000000000000) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t -942510763643697/2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2) (pow (* i y) 2))) (+ (* c t) (* i y)))) (if (< t -238547917063487/3125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t 10535888557455487/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2) (pow (* i y) 2))) (+ (* c t) (* i y)))) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))))))))

  (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))