Linear.Matrix:det33 from linear-1.19.1.3

Percentage Accurate: 73.8% → 82.7%
Time: 10.5s
Alternatives: 23
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 23 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: 73.8% 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: 82.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\\
\mathbf{if}\;\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) \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right), b, \mathsf{fma}\left(\mathsf{fma}\left(z, y, \left(-t\right) \cdot a\right), x, t\_1\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b \cdot a, i, t\_1\right)\\


\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.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 0

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right), b, \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)\right)} \]
    5. Step-by-step derivation
      1. lift-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right), b, \mathsf{fma}\left(\mathsf{fma}\left(z, y, \left(\mathsf{neg}\left(t\right)\right) \cdot a\right), x, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right)\right) \]
      18. lower-neg.f6491.8

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

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

    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 x around 0

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(b \cdot a, i, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right) \]
      11. lift-*.f6445.3

        \[\leadsto \mathsf{fma}\left(b \cdot a, i, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right) \]
    8. Applied rewrites45.3%

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

Alternative 2: 72.0% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -3.20000000000000023e71 or 1.00000000000000004e48 < j

    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 x around 0

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(b \cdot a, i, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right) \]
      11. lift-*.f6469.7

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

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

    if -3.20000000000000023e71 < j < 1.00000000000000004e48

    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}{b \cdot \left(a \cdot i - c \cdot z\right) + \left(j \cdot \left(c \cdot t - i \cdot y\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right)} \]
    4. Applied rewrites76.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right), b, \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)\right)} \]
    5. Step-by-step derivation
      1. lift-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right), b, \mathsf{fma}\left(\mathsf{fma}\left(z, y, \left(\mathsf{neg}\left(t\right)\right) \cdot a\right), x, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right)\right) \]
      18. lower-neg.f6476.2

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

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

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

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

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

Alternative 3: 54.3% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(b \cdot a, i, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right)\\ \mathbf{if}\;j \leq -5.2 \cdot 10^{+67}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq -6.2 \cdot 10^{-173}:\\ \;\;\;\;\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\ \mathbf{elif}\;j \leq 1.6 \cdot 10^{-302}:\\ \;\;\;\;\mathsf{fma}\left(-t, x, i \cdot b\right) \cdot a\\ \mathbf{elif}\;j \leq 6.6 \cdot 10^{+44}:\\ \;\;\;\;\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 (* b a) i (* (fma (- i) y (* c t)) j))))
   (if (<= j -5.2e+67)
     t_1
     (if (<= j -6.2e-173)
       (* (fma y x (* (- b) c)) z)
       (if (<= j 1.6e-302)
         (* (fma (- t) x (* i b)) a)
         (if (<= j 6.6e+44) (* (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((b * a), i, (fma(-i, y, (c * t)) * j));
	double tmp;
	if (j <= -5.2e+67) {
		tmp = t_1;
	} else if (j <= -6.2e-173) {
		tmp = fma(y, x, (-b * c)) * z;
	} else if (j <= 1.6e-302) {
		tmp = fma(-t, x, (i * b)) * a;
	} else if (j <= 6.6e+44) {
		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 = fma(Float64(b * a), i, Float64(fma(Float64(-i), y, Float64(c * t)) * j))
	tmp = 0.0
	if (j <= -5.2e+67)
		tmp = t_1;
	elseif (j <= -6.2e-173)
		tmp = Float64(fma(y, x, Float64(Float64(-b) * c)) * z);
	elseif (j <= 1.6e-302)
		tmp = Float64(fma(Float64(-t), x, Float64(i * b)) * a);
	elseif (j <= 6.6e+44)
		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[(b * a), $MachinePrecision] * i + N[(N[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -5.2e+67], t$95$1, If[LessEqual[j, -6.2e-173], N[(N[(y * x + N[((-b) * c), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[j, 1.6e-302], N[(N[((-t) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[j, 6.6e+44], 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(b \cdot a, i, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right)\\
\mathbf{if}\;j \leq -5.2 \cdot 10^{+67}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;j \leq 6.6 \cdot 10^{+44}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if j < -5.2000000000000001e67 or 6.60000000000000027e44 < j

    1. Initial program 73.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 x around 0

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(b \cdot a, i, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right) \]
      11. lift-*.f6469.4

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

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

    if -5.2000000000000001e67 < j < -6.20000000000000011e-173

    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 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.f6442.9

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

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

    if -6.20000000000000011e-173 < j < 1.59999999999999989e-302

    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 b around 0

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right), b, \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)\right)} \]
    5. Taylor expanded in a around inf

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

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

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot t\right) \cdot x + b \cdot i\right) \cdot a \]
      7. lower-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(-t, x, b \cdot i\right) \cdot a \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-t, x, i \cdot b\right) \cdot a \]
      11. lower-*.f6447.5

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

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

    if 1.59999999999999989e-302 < j < 6.60000000000000027e44

    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-*.f6443.1

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x \]
    5. Applied rewrites43.1%

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

Alternative 4: 70.5% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -7.49999999999999939e69 or 6.50000000000000034e45 < j

    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 x around 0

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(b \cdot a, i, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right) \]
      11. lift-*.f6469.5

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

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

    if -7.49999999999999939e69 < j < 6.50000000000000034e45

    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 j around 0

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - a \cdot t\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y \cdot z - a \cdot t, x, \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - a \cdot i\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, \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - a \cdot i\right)\right) \]
      7. mul-1-negN/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(a\right)\right) \cdot t + y \cdot z, x, \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - a \cdot i\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, \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - a \cdot i\right)\right) \]
      13. lower-neg.f64N/A

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

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

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

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

Alternative 5: 51.9% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\ t_2 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\ \mathbf{if}\;x \leq -1.8 \cdot 10^{+85}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -6.6 \cdot 10^{-263}:\\ \;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\ \mathbf{elif}\;x \leq 2 \cdot 10^{-304}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 21000:\\ \;\;\;\;\mathsf{fma}\left(-b, z, j \cdot t\right) \cdot c\\ \mathbf{elif}\;x \leq 10^{+88}:\\ \;\;\;\;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 (* (fma i a (* (- c) z)) b)) (t_2 (* (fma (- a) t (* z y)) x)))
   (if (<= x -1.8e+85)
     t_2
     (if (<= x -6.6e-263)
       (* (fma j t (* (- b) z)) c)
       (if (<= x 2e-304)
         t_1
         (if (<= x 21000.0)
           (* (fma (- b) z (* j t)) c)
           (if (<= x 1e+88) 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 = fma(i, a, (-c * z)) * b;
	double t_2 = fma(-a, t, (z * y)) * x;
	double tmp;
	if (x <= -1.8e+85) {
		tmp = t_2;
	} else if (x <= -6.6e-263) {
		tmp = fma(j, t, (-b * z)) * c;
	} else if (x <= 2e-304) {
		tmp = t_1;
	} else if (x <= 21000.0) {
		tmp = fma(-b, z, (j * t)) * c;
	} else if (x <= 1e+88) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(fma(i, a, Float64(Float64(-c) * z)) * b)
	t_2 = Float64(fma(Float64(-a), t, Float64(z * y)) * x)
	tmp = 0.0
	if (x <= -1.8e+85)
		tmp = t_2;
	elseif (x <= -6.6e-263)
		tmp = Float64(fma(j, t, Float64(Float64(-b) * z)) * c);
	elseif (x <= 2e-304)
		tmp = t_1;
	elseif (x <= 21000.0)
		tmp = Float64(fma(Float64(-b), z, Float64(j * t)) * c);
	elseif (x <= 1e+88)
		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[(i * a + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.8e+85], t$95$2, If[LessEqual[x, -6.6e-263], N[(N[(j * t + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[x, 2e-304], t$95$1, If[LessEqual[x, 21000.0], N[(N[((-b) * z + N[(j * t), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[x, 1e+88], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;x \leq 2 \cdot 10^{-304}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 21000:\\
\;\;\;\;\mathsf{fma}\left(-b, z, j \cdot t\right) \cdot c\\

\mathbf{elif}\;x \leq 10^{+88}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.7999999999999999e85 or 9.99999999999999959e87 < x

    1. Initial program 73.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 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-*.f6466.4

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x \]
    5. Applied rewrites66.4%

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

    if -1.7999999999999999e85 < x < -6.5999999999999994e-263

    1. Initial program 75.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.f6443.1

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

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

    if -6.5999999999999994e-263 < x < 1.99999999999999994e-304 or 21000 < x < 9.99999999999999959e87

    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 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.9

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

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

    if 1.99999999999999994e-304 < x < 21000

    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 b around 0

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right), b, \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)\right)} \]
    5. Taylor expanded in c around inf

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

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

        \[\leadsto \left(j \cdot t + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      3. mul-1-negN/A

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot b\right) \cdot z + j \cdot t\right) \cdot c \]
      8. mul-1-negN/A

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

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

        \[\leadsto \mathsf{fma}\left(-b, z, j \cdot t\right) \cdot c \]
      11. lower-*.f6446.2

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

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

Alternative 6: 43.0% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\ \mathbf{if}\;j \leq -3.4 \cdot 10^{+71}:\\ \;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\ \mathbf{elif}\;j \leq -1.85 \cdot 10^{-172}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq 5.8 \cdot 10^{-303}:\\ \;\;\;\;\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\ \mathbf{elif}\;j \leq 2.15 \cdot 10^{+46}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq 3.4 \cdot 10^{+81}:\\ \;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\ \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 (<= j -3.4e+71)
     (* (- i) (* j y))
     (if (<= j -1.85e-172)
       t_1
       (if (<= j 5.8e-303)
         (* (fma i a (* (- c) z)) b)
         (if (<= j 2.15e+46)
           t_1
           (if (<= j 3.4e+81)
             (* (fma j t (* (- b) z)) c)
             (* (* (- i) j) y))))))))
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 (j <= -3.4e+71) {
		tmp = -i * (j * y);
	} else if (j <= -1.85e-172) {
		tmp = t_1;
	} else if (j <= 5.8e-303) {
		tmp = fma(i, a, (-c * z)) * b;
	} else if (j <= 2.15e+46) {
		tmp = t_1;
	} else if (j <= 3.4e+81) {
		tmp = fma(j, t, (-b * z)) * c;
	} else {
		tmp = (-i * j) * y;
	}
	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 (j <= -3.4e+71)
		tmp = Float64(Float64(-i) * Float64(j * y));
	elseif (j <= -1.85e-172)
		tmp = t_1;
	elseif (j <= 5.8e-303)
		tmp = Float64(fma(i, a, Float64(Float64(-c) * z)) * b);
	elseif (j <= 2.15e+46)
		tmp = t_1;
	elseif (j <= 3.4e+81)
		tmp = Float64(fma(j, t, Float64(Float64(-b) * z)) * c);
	else
		tmp = Float64(Float64(Float64(-i) * j) * y);
	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[j, -3.4e+71], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -1.85e-172], t$95$1, If[LessEqual[j, 5.8e-303], N[(N[(i * a + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[j, 2.15e+46], t$95$1, If[LessEqual[j, 3.4e+81], N[(N[(j * t + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], N[(N[((-i) * j), $MachinePrecision] * y), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;j \leq -1.85 \cdot 10^{-172}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;j \leq 5.8 \cdot 10^{-303}:\\
\;\;\;\;\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\

\mathbf{elif}\;j \leq 2.15 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\

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

\mathbf{else}:\\
\;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if j < -3.3999999999999998e71

    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 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.f6448.4

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

      \[\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-*.f6439.3

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

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

    if -3.3999999999999998e71 < j < -1.85e-172 or 5.80000000000000028e-303 < j < 2.15000000000000002e46

    1. Initial program 73.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 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.f6444.3

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

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

    if -1.85e-172 < j < 5.80000000000000028e-303

    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 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.f6450.5

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

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

    if 2.15000000000000002e46 < j < 3.40000000000000003e81

    1. Initial program 73.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 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.f6441.7

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

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

    if 3.40000000000000003e81 < j

    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-*.f6447.7

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

      \[\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. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(i \cdot j\right)\right) \cdot y \]
      2. distribute-lft-neg-outN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y \]
      4. lift-neg.f6439.0

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

      \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 7: 59.8% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(b \cdot a, i, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right)\\ \mathbf{if}\;j \leq -7.2 \cdot 10^{+69}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq 1.05 \cdot 10^{-259}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right), b, \left(y \cdot x\right) \cdot z\right)\\ \mathbf{elif}\;j \leq 6.6 \cdot 10^{+44}:\\ \;\;\;\;\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 (* b a) i (* (fma (- i) y (* c t)) j))))
   (if (<= j -7.2e+69)
     t_1
     (if (<= j 1.05e-259)
       (fma (fma i a (* (- c) z)) b (* (* y x) z))
       (if (<= j 6.6e+44) (* (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((b * a), i, (fma(-i, y, (c * t)) * j));
	double tmp;
	if (j <= -7.2e+69) {
		tmp = t_1;
	} else if (j <= 1.05e-259) {
		tmp = fma(fma(i, a, (-c * z)), b, ((y * x) * z));
	} else if (j <= 6.6e+44) {
		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 = fma(Float64(b * a), i, Float64(fma(Float64(-i), y, Float64(c * t)) * j))
	tmp = 0.0
	if (j <= -7.2e+69)
		tmp = t_1;
	elseif (j <= 1.05e-259)
		tmp = fma(fma(i, a, Float64(Float64(-c) * z)), b, Float64(Float64(y * x) * z));
	elseif (j <= 6.6e+44)
		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[(b * a), $MachinePrecision] * i + N[(N[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -7.2e+69], t$95$1, If[LessEqual[j, 1.05e-259], N[(N[(i * a + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b + N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 6.6e+44], 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(b \cdot a, i, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right)\\
\mathbf{if}\;j \leq -7.2 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;j \leq 6.6 \cdot 10^{+44}:\\
\;\;\;\;\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 j < -7.2000000000000005e69 or 6.60000000000000027e44 < j

    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 x around 0

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(b \cdot a, i, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right) \]
      11. lift-*.f6469.4

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

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

    if -7.2000000000000005e69 < j < 1.04999999999999999e-259

    1. Initial program 74.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 b around 0

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right), b, \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)\right)} \]
    5. Taylor expanded in z around inf

      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right), b, x \cdot \left(y \cdot z\right)\right) \]
    6. Step-by-step derivation
      1. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right), b, \left(y \cdot x\right) \cdot z\right) \]
      4. lower-*.f6460.9

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

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

    if 1.04999999999999999e-259 < j < 6.60000000000000027e44

    1. Initial program 73.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 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-*.f6442.6

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x \]
    5. Applied rewrites42.6%

      \[\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 8: 29.3% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(i \cdot a\right) \cdot b\\ t_2 := \left(z \cdot x\right) \cdot y\\ \mathbf{if}\;x \leq -6.2 \cdot 10^{+26}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -2.55 \cdot 10^{-108}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -5 \cdot 10^{-187}:\\ \;\;\;\;\left(j \cdot c\right) \cdot t\\ \mathbf{elif}\;x \leq 1.55 \cdot 10^{-134}:\\ \;\;\;\;-c \cdot \left(b \cdot z\right)\\ \mathbf{elif}\;x \leq 21000:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{elif}\;x \leq 10^{+88}:\\ \;\;\;\;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 a) b)) (t_2 (* (* z x) y)))
   (if (<= x -6.2e+26)
     t_2
     (if (<= x -2.55e-108)
       t_1
       (if (<= x -5e-187)
         (* (* j c) t)
         (if (<= x 1.55e-134)
           (- (* c (* b z)))
           (if (<= x 21000.0) (* (* j t) c) (if (<= x 1e+88) 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 * a) * b;
	double t_2 = (z * x) * y;
	double tmp;
	if (x <= -6.2e+26) {
		tmp = t_2;
	} else if (x <= -2.55e-108) {
		tmp = t_1;
	} else if (x <= -5e-187) {
		tmp = (j * c) * t;
	} else if (x <= 1.55e-134) {
		tmp = -(c * (b * z));
	} else if (x <= 21000.0) {
		tmp = (j * t) * c;
	} else if (x <= 1e+88) {
		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 = (i * a) * b
    t_2 = (z * x) * y
    if (x <= (-6.2d+26)) then
        tmp = t_2
    else if (x <= (-2.55d-108)) then
        tmp = t_1
    else if (x <= (-5d-187)) then
        tmp = (j * c) * t
    else if (x <= 1.55d-134) then
        tmp = -(c * (b * z))
    else if (x <= 21000.0d0) then
        tmp = (j * t) * c
    else if (x <= 1d+88) 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 = (i * a) * b;
	double t_2 = (z * x) * y;
	double tmp;
	if (x <= -6.2e+26) {
		tmp = t_2;
	} else if (x <= -2.55e-108) {
		tmp = t_1;
	} else if (x <= -5e-187) {
		tmp = (j * c) * t;
	} else if (x <= 1.55e-134) {
		tmp = -(c * (b * z));
	} else if (x <= 21000.0) {
		tmp = (j * t) * c;
	} else if (x <= 1e+88) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (i * a) * b
	t_2 = (z * x) * y
	tmp = 0
	if x <= -6.2e+26:
		tmp = t_2
	elif x <= -2.55e-108:
		tmp = t_1
	elif x <= -5e-187:
		tmp = (j * c) * t
	elif x <= 1.55e-134:
		tmp = -(c * (b * z))
	elif x <= 21000.0:
		tmp = (j * t) * c
	elif x <= 1e+88:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(i * a) * b)
	t_2 = Float64(Float64(z * x) * y)
	tmp = 0.0
	if (x <= -6.2e+26)
		tmp = t_2;
	elseif (x <= -2.55e-108)
		tmp = t_1;
	elseif (x <= -5e-187)
		tmp = Float64(Float64(j * c) * t);
	elseif (x <= 1.55e-134)
		tmp = Float64(-Float64(c * Float64(b * z)));
	elseif (x <= 21000.0)
		tmp = Float64(Float64(j * t) * c);
	elseif (x <= 1e+88)
		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 = (i * a) * b;
	t_2 = (z * x) * y;
	tmp = 0.0;
	if (x <= -6.2e+26)
		tmp = t_2;
	elseif (x <= -2.55e-108)
		tmp = t_1;
	elseif (x <= -5e-187)
		tmp = (j * c) * t;
	elseif (x <= 1.55e-134)
		tmp = -(c * (b * z));
	elseif (x <= 21000.0)
		tmp = (j * t) * c;
	elseif (x <= 1e+88)
		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[(i * a), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[x, -6.2e+26], t$95$2, If[LessEqual[x, -2.55e-108], t$95$1, If[LessEqual[x, -5e-187], N[(N[(j * c), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[x, 1.55e-134], (-N[(c * N[(b * z), $MachinePrecision]), $MachinePrecision]), If[LessEqual[x, 21000.0], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[x, 1e+88], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(i \cdot a\right) \cdot b\\
t_2 := \left(z \cdot x\right) \cdot y\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{+26}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq -2.55 \cdot 10^{-108}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;x \leq 21000:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\

\mathbf{elif}\;x \leq 10^{+88}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -6.1999999999999999e26 or 9.99999999999999959e87 < 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 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-*.f6447.0

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites47.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-*.f6436.0

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

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

    if -6.1999999999999999e26 < x < -2.5500000000000001e-108 or 21000 < x < 9.99999999999999959e87

    1. Initial program 77.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.9

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

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

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

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

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

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

    if -2.5500000000000001e-108 < x < -4.9999999999999996e-187

    1. Initial program 71.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 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-*.f6431.6

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

      \[\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-*.f6426.3

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

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

    if -4.9999999999999996e-187 < x < 1.55000000000000003e-134

    1. Initial program 71.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 x around 0

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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-*.f6427.8

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

      \[\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-*.f6427.1

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

      \[\leadsto -\left(c \cdot b\right) \cdot z \]
    12. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto -c \cdot \left(b \cdot z\right) \]
    13. Applied rewrites26.5%

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

    if 1.55000000000000003e-134 < x < 21000

    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 x around 0

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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-*.f6423.8

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

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

Alternative 9: 29.2% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(i \cdot a\right) \cdot b\\ t_2 := \left(z \cdot x\right) \cdot y\\ \mathbf{if}\;x \leq -6.2 \cdot 10^{+26}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -2.55 \cdot 10^{-108}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -5 \cdot 10^{-243}:\\ \;\;\;\;\left(j \cdot c\right) \cdot t\\ \mathbf{elif}\;x \leq 2 \cdot 10^{-304}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 21000:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{elif}\;x \leq 10^{+88}:\\ \;\;\;\;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 a) b)) (t_2 (* (* z x) y)))
   (if (<= x -6.2e+26)
     t_2
     (if (<= x -2.55e-108)
       t_1
       (if (<= x -5e-243)
         (* (* j c) t)
         (if (<= x 2e-304)
           t_1
           (if (<= x 21000.0) (* (* j t) c) (if (<= x 1e+88) 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 * a) * b;
	double t_2 = (z * x) * y;
	double tmp;
	if (x <= -6.2e+26) {
		tmp = t_2;
	} else if (x <= -2.55e-108) {
		tmp = t_1;
	} else if (x <= -5e-243) {
		tmp = (j * c) * t;
	} else if (x <= 2e-304) {
		tmp = t_1;
	} else if (x <= 21000.0) {
		tmp = (j * t) * c;
	} else if (x <= 1e+88) {
		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 = (i * a) * b
    t_2 = (z * x) * y
    if (x <= (-6.2d+26)) then
        tmp = t_2
    else if (x <= (-2.55d-108)) then
        tmp = t_1
    else if (x <= (-5d-243)) then
        tmp = (j * c) * t
    else if (x <= 2d-304) then
        tmp = t_1
    else if (x <= 21000.0d0) then
        tmp = (j * t) * c
    else if (x <= 1d+88) 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 = (i * a) * b;
	double t_2 = (z * x) * y;
	double tmp;
	if (x <= -6.2e+26) {
		tmp = t_2;
	} else if (x <= -2.55e-108) {
		tmp = t_1;
	} else if (x <= -5e-243) {
		tmp = (j * c) * t;
	} else if (x <= 2e-304) {
		tmp = t_1;
	} else if (x <= 21000.0) {
		tmp = (j * t) * c;
	} else if (x <= 1e+88) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (i * a) * b
	t_2 = (z * x) * y
	tmp = 0
	if x <= -6.2e+26:
		tmp = t_2
	elif x <= -2.55e-108:
		tmp = t_1
	elif x <= -5e-243:
		tmp = (j * c) * t
	elif x <= 2e-304:
		tmp = t_1
	elif x <= 21000.0:
		tmp = (j * t) * c
	elif x <= 1e+88:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(i * a) * b)
	t_2 = Float64(Float64(z * x) * y)
	tmp = 0.0
	if (x <= -6.2e+26)
		tmp = t_2;
	elseif (x <= -2.55e-108)
		tmp = t_1;
	elseif (x <= -5e-243)
		tmp = Float64(Float64(j * c) * t);
	elseif (x <= 2e-304)
		tmp = t_1;
	elseif (x <= 21000.0)
		tmp = Float64(Float64(j * t) * c);
	elseif (x <= 1e+88)
		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 = (i * a) * b;
	t_2 = (z * x) * y;
	tmp = 0.0;
	if (x <= -6.2e+26)
		tmp = t_2;
	elseif (x <= -2.55e-108)
		tmp = t_1;
	elseif (x <= -5e-243)
		tmp = (j * c) * t;
	elseif (x <= 2e-304)
		tmp = t_1;
	elseif (x <= 21000.0)
		tmp = (j * t) * c;
	elseif (x <= 1e+88)
		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[(i * a), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[x, -6.2e+26], t$95$2, If[LessEqual[x, -2.55e-108], t$95$1, If[LessEqual[x, -5e-243], N[(N[(j * c), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[x, 2e-304], t$95$1, If[LessEqual[x, 21000.0], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[x, 1e+88], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(i \cdot a\right) \cdot b\\
t_2 := \left(z \cdot x\right) \cdot y\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{+26}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq -2.55 \cdot 10^{-108}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \leq 2 \cdot 10^{-304}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 21000:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\

\mathbf{elif}\;x \leq 10^{+88}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -6.1999999999999999e26 or 9.99999999999999959e87 < 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 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-*.f6447.0

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites47.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-*.f6436.0

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

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

    if -6.1999999999999999e26 < x < -2.5500000000000001e-108 or -5e-243 < x < 1.99999999999999994e-304 or 21000 < x < 9.99999999999999959e87

    1. Initial program 75.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 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.f6442.3

        \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
    5. Applied rewrites42.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 \left(a \cdot i\right) \cdot b \]
    7. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

    if -2.5500000000000001e-108 < x < -5e-243

    1. Initial program 72.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 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-*.f6430.7

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

      \[\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-*.f6425.6

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

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

    if 1.99999999999999994e-304 < x < 21000

    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 0

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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-*.f6424.6

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

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 10: 30.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;j \leq -6.5 \cdot 10^{+70}:\\ \;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\ \mathbf{elif}\;j \leq -3.2 \cdot 10^{-180}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{elif}\;j \leq 1.55 \cdot 10^{-302}:\\ \;\;\;\;\left(i \cdot b\right) \cdot a\\ \mathbf{elif}\;j \leq 3.5 \cdot 10^{+49}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;j \leq 1.2 \cdot 10^{+81}:\\ \;\;\;\;\left(c \cdot t\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= j -6.5e+70)
   (* (- i) (* j y))
   (if (<= j -3.2e-180)
     (* (* z x) y)
     (if (<= j 1.55e-302)
       (* (* i b) a)
       (if (<= j 3.5e+49)
         (* (* z y) x)
         (if (<= j 1.2e+81) (* (* c t) j) (* (* (- i) j) y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (j <= -6.5e+70) {
		tmp = -i * (j * y);
	} else if (j <= -3.2e-180) {
		tmp = (z * x) * y;
	} else if (j <= 1.55e-302) {
		tmp = (i * b) * a;
	} else if (j <= 3.5e+49) {
		tmp = (z * y) * x;
	} else if (j <= 1.2e+81) {
		tmp = (c * t) * j;
	} else {
		tmp = (-i * j) * y;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, 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 (j <= (-6.5d+70)) then
        tmp = -i * (j * y)
    else if (j <= (-3.2d-180)) then
        tmp = (z * x) * y
    else if (j <= 1.55d-302) then
        tmp = (i * b) * a
    else if (j <= 3.5d+49) then
        tmp = (z * y) * x
    else if (j <= 1.2d+81) then
        tmp = (c * t) * j
    else
        tmp = (-i * j) * y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (j <= -6.5e+70) {
		tmp = -i * (j * y);
	} else if (j <= -3.2e-180) {
		tmp = (z * x) * y;
	} else if (j <= 1.55e-302) {
		tmp = (i * b) * a;
	} else if (j <= 3.5e+49) {
		tmp = (z * y) * x;
	} else if (j <= 1.2e+81) {
		tmp = (c * t) * j;
	} else {
		tmp = (-i * j) * y;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if j <= -6.5e+70:
		tmp = -i * (j * y)
	elif j <= -3.2e-180:
		tmp = (z * x) * y
	elif j <= 1.55e-302:
		tmp = (i * b) * a
	elif j <= 3.5e+49:
		tmp = (z * y) * x
	elif j <= 1.2e+81:
		tmp = (c * t) * j
	else:
		tmp = (-i * j) * y
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (j <= -6.5e+70)
		tmp = Float64(Float64(-i) * Float64(j * y));
	elseif (j <= -3.2e-180)
		tmp = Float64(Float64(z * x) * y);
	elseif (j <= 1.55e-302)
		tmp = Float64(Float64(i * b) * a);
	elseif (j <= 3.5e+49)
		tmp = Float64(Float64(z * y) * x);
	elseif (j <= 1.2e+81)
		tmp = Float64(Float64(c * t) * j);
	else
		tmp = Float64(Float64(Float64(-i) * j) * y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (j <= -6.5e+70)
		tmp = -i * (j * y);
	elseif (j <= -3.2e-180)
		tmp = (z * x) * y;
	elseif (j <= 1.55e-302)
		tmp = (i * b) * a;
	elseif (j <= 3.5e+49)
		tmp = (z * y) * x;
	elseif (j <= 1.2e+81)
		tmp = (c * t) * j;
	else
		tmp = (-i * j) * y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -6.5e+70], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -3.2e-180], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[j, 1.55e-302], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[j, 3.5e+49], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[j, 1.2e+81], N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision], N[(N[((-i) * j), $MachinePrecision] * y), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;j \leq -6.5 \cdot 10^{+70}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\

\mathbf{elif}\;j \leq -3.2 \cdot 10^{-180}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\

\mathbf{elif}\;j \leq 1.55 \cdot 10^{-302}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\

\mathbf{elif}\;j \leq 3.5 \cdot 10^{+49}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\

\mathbf{elif}\;j \leq 1.2 \cdot 10^{+81}:\\
\;\;\;\;\left(c \cdot t\right) \cdot j\\

\mathbf{else}:\\
\;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if j < -6.49999999999999978e70

    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 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.f6448.4

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

      \[\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-*.f6439.3

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

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

    if -6.49999999999999978e70 < j < -3.20000000000000015e-180

    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-*.f6436.8

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites36.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-*.f6424.8

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

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

    if -3.20000000000000015e-180 < j < 1.54999999999999992e-302

    1. Initial program 74.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 x around 0

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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.0

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

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]

    if 1.54999999999999992e-302 < j < 3.49999999999999975e49

    1. Initial program 72.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 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-*.f6433.8

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

      \[\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. *-commutativeN/A

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lower-*.f6424.6

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

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

    if 3.49999999999999975e49 < j < 1.19999999999999995e81

    1. Initial program 73.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 j around inf

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

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

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

        \[\leadsto \left(c \cdot t + \left(\mathsf{neg}\left(i\right)\right) \cdot y\right) \cdot j \]
      4. mul-1-negN/A

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

        \[\leadsto \left(c \cdot t + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      6. +-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + c \cdot t\right) \cdot j \]
      8. mul-1-negN/A

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

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

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j \]
      11. lift-*.f6445.0

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j \]
    5. Applied rewrites45.0%

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

      \[\leadsto \left(c \cdot t\right) \cdot j \]
    7. Step-by-step derivation
      1. lift-*.f6424.0

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

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

    if 1.19999999999999995e81 < j

    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-*.f6447.7

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

      \[\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. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(i \cdot j\right)\right) \cdot y \]
      2. distribute-lft-neg-outN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y \]
      4. lift-neg.f6438.9

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

      \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]
  3. Recombined 6 regimes into one program.
  4. Add Preprocessing

Alternative 11: 30.1% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;j \leq -6.5 \cdot 10^{+70}:\\ \;\;\;\;\left(\left(-i\right) \cdot y\right) \cdot j\\ \mathbf{elif}\;j \leq -3.2 \cdot 10^{-180}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{elif}\;j \leq 1.55 \cdot 10^{-302}:\\ \;\;\;\;\left(i \cdot b\right) \cdot a\\ \mathbf{elif}\;j \leq 3.5 \cdot 10^{+49}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;j \leq 1.2 \cdot 10^{+81}:\\ \;\;\;\;\left(c \cdot t\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= j -6.5e+70)
   (* (* (- i) y) j)
   (if (<= j -3.2e-180)
     (* (* z x) y)
     (if (<= j 1.55e-302)
       (* (* i b) a)
       (if (<= j 3.5e+49)
         (* (* z y) x)
         (if (<= j 1.2e+81) (* (* c t) j) (* (* (- i) j) y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (j <= -6.5e+70) {
		tmp = (-i * y) * j;
	} else if (j <= -3.2e-180) {
		tmp = (z * x) * y;
	} else if (j <= 1.55e-302) {
		tmp = (i * b) * a;
	} else if (j <= 3.5e+49) {
		tmp = (z * y) * x;
	} else if (j <= 1.2e+81) {
		tmp = (c * t) * j;
	} else {
		tmp = (-i * j) * y;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, 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 (j <= (-6.5d+70)) then
        tmp = (-i * y) * j
    else if (j <= (-3.2d-180)) then
        tmp = (z * x) * y
    else if (j <= 1.55d-302) then
        tmp = (i * b) * a
    else if (j <= 3.5d+49) then
        tmp = (z * y) * x
    else if (j <= 1.2d+81) then
        tmp = (c * t) * j
    else
        tmp = (-i * j) * y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (j <= -6.5e+70) {
		tmp = (-i * y) * j;
	} else if (j <= -3.2e-180) {
		tmp = (z * x) * y;
	} else if (j <= 1.55e-302) {
		tmp = (i * b) * a;
	} else if (j <= 3.5e+49) {
		tmp = (z * y) * x;
	} else if (j <= 1.2e+81) {
		tmp = (c * t) * j;
	} else {
		tmp = (-i * j) * y;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if j <= -6.5e+70:
		tmp = (-i * y) * j
	elif j <= -3.2e-180:
		tmp = (z * x) * y
	elif j <= 1.55e-302:
		tmp = (i * b) * a
	elif j <= 3.5e+49:
		tmp = (z * y) * x
	elif j <= 1.2e+81:
		tmp = (c * t) * j
	else:
		tmp = (-i * j) * y
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (j <= -6.5e+70)
		tmp = Float64(Float64(Float64(-i) * y) * j);
	elseif (j <= -3.2e-180)
		tmp = Float64(Float64(z * x) * y);
	elseif (j <= 1.55e-302)
		tmp = Float64(Float64(i * b) * a);
	elseif (j <= 3.5e+49)
		tmp = Float64(Float64(z * y) * x);
	elseif (j <= 1.2e+81)
		tmp = Float64(Float64(c * t) * j);
	else
		tmp = Float64(Float64(Float64(-i) * j) * y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (j <= -6.5e+70)
		tmp = (-i * y) * j;
	elseif (j <= -3.2e-180)
		tmp = (z * x) * y;
	elseif (j <= 1.55e-302)
		tmp = (i * b) * a;
	elseif (j <= 3.5e+49)
		tmp = (z * y) * x;
	elseif (j <= 1.2e+81)
		tmp = (c * t) * j;
	else
		tmp = (-i * j) * y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -6.5e+70], N[(N[((-i) * y), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[j, -3.2e-180], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[j, 1.55e-302], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[j, 3.5e+49], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[j, 1.2e+81], N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision], N[(N[((-i) * j), $MachinePrecision] * y), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;j \leq -6.5 \cdot 10^{+70}:\\
\;\;\;\;\left(\left(-i\right) \cdot y\right) \cdot j\\

\mathbf{elif}\;j \leq -3.2 \cdot 10^{-180}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\

\mathbf{elif}\;j \leq 1.55 \cdot 10^{-302}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\

\mathbf{elif}\;j \leq 3.5 \cdot 10^{+49}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\

\mathbf{elif}\;j \leq 1.2 \cdot 10^{+81}:\\
\;\;\;\;\left(c \cdot t\right) \cdot j\\

\mathbf{else}:\\
\;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if j < -6.49999999999999978e70

    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 j around inf

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

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

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

        \[\leadsto \left(c \cdot t + \left(\mathsf{neg}\left(i\right)\right) \cdot y\right) \cdot j \]
      4. mul-1-negN/A

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

        \[\leadsto \left(c \cdot t + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      6. +-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + c \cdot t\right) \cdot j \]
      8. mul-1-negN/A

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

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

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j \]
      11. lift-*.f6465.4

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

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

      \[\leadsto \left(-1 \cdot \left(i \cdot y\right)\right) \cdot j \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(i \cdot y\right)\right) \cdot j \]
      2. distribute-lft-neg-outN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot y\right) \cdot j \]
      4. lift-neg.f6437.2

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

      \[\leadsto \left(\left(-i\right) \cdot y\right) \cdot j \]

    if -6.49999999999999978e70 < j < -3.20000000000000015e-180

    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-*.f6436.8

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites36.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-*.f6424.8

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

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

    if -3.20000000000000015e-180 < j < 1.54999999999999992e-302

    1. Initial program 74.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 x around 0

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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.0

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

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]

    if 1.54999999999999992e-302 < j < 3.49999999999999975e49

    1. Initial program 72.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 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-*.f6433.8

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

      \[\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. *-commutativeN/A

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lower-*.f6424.6

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

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

    if 3.49999999999999975e49 < j < 1.19999999999999995e81

    1. Initial program 73.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 j around inf

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

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

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

        \[\leadsto \left(c \cdot t + \left(\mathsf{neg}\left(i\right)\right) \cdot y\right) \cdot j \]
      4. mul-1-negN/A

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

        \[\leadsto \left(c \cdot t + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      6. +-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + c \cdot t\right) \cdot j \]
      8. mul-1-negN/A

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

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

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j \]
      11. lift-*.f6445.0

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j \]
    5. Applied rewrites45.0%

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

      \[\leadsto \left(c \cdot t\right) \cdot j \]
    7. Step-by-step derivation
      1. lift-*.f6424.0

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

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

    if 1.19999999999999995e81 < j

    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-*.f6447.7

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

      \[\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. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(i \cdot j\right)\right) \cdot y \]
      2. distribute-lft-neg-outN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y \]
      4. lift-neg.f6438.9

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

      \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]
  3. Recombined 6 regimes into one program.
  4. Add Preprocessing

Alternative 12: 30.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(-i\right) \cdot j\right) \cdot y\\ \mathbf{if}\;j \leq -6.5 \cdot 10^{+70}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq -3.2 \cdot 10^{-180}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{elif}\;j \leq 1.55 \cdot 10^{-302}:\\ \;\;\;\;\left(i \cdot b\right) \cdot a\\ \mathbf{elif}\;j \leq 3.5 \cdot 10^{+49}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;j \leq 1.2 \cdot 10^{+81}:\\ \;\;\;\;\left(c \cdot t\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* (- i) j) y)))
   (if (<= j -6.5e+70)
     t_1
     (if (<= j -3.2e-180)
       (* (* z x) y)
       (if (<= j 1.55e-302)
         (* (* i b) a)
         (if (<= j 3.5e+49)
           (* (* z y) x)
           (if (<= j 1.2e+81) (* (* 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 = (-i * j) * y;
	double tmp;
	if (j <= -6.5e+70) {
		tmp = t_1;
	} else if (j <= -3.2e-180) {
		tmp = (z * x) * y;
	} else if (j <= 1.55e-302) {
		tmp = (i * b) * a;
	} else if (j <= 3.5e+49) {
		tmp = (z * y) * x;
	} else if (j <= 1.2e+81) {
		tmp = (c * t) * j;
	} 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 = (-i * j) * y
    if (j <= (-6.5d+70)) then
        tmp = t_1
    else if (j <= (-3.2d-180)) then
        tmp = (z * x) * y
    else if (j <= 1.55d-302) then
        tmp = (i * b) * a
    else if (j <= 3.5d+49) then
        tmp = (z * y) * x
    else if (j <= 1.2d+81) then
        tmp = (c * t) * j
    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 = (-i * j) * y;
	double tmp;
	if (j <= -6.5e+70) {
		tmp = t_1;
	} else if (j <= -3.2e-180) {
		tmp = (z * x) * y;
	} else if (j <= 1.55e-302) {
		tmp = (i * b) * a;
	} else if (j <= 3.5e+49) {
		tmp = (z * y) * x;
	} else if (j <= 1.2e+81) {
		tmp = (c * t) * j;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (-i * j) * y
	tmp = 0
	if j <= -6.5e+70:
		tmp = t_1
	elif j <= -3.2e-180:
		tmp = (z * x) * y
	elif j <= 1.55e-302:
		tmp = (i * b) * a
	elif j <= 3.5e+49:
		tmp = (z * y) * x
	elif j <= 1.2e+81:
		tmp = (c * t) * j
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(Float64(-i) * j) * y)
	tmp = 0.0
	if (j <= -6.5e+70)
		tmp = t_1;
	elseif (j <= -3.2e-180)
		tmp = Float64(Float64(z * x) * y);
	elseif (j <= 1.55e-302)
		tmp = Float64(Float64(i * b) * a);
	elseif (j <= 3.5e+49)
		tmp = Float64(Float64(z * y) * x);
	elseif (j <= 1.2e+81)
		tmp = Float64(Float64(c * t) * j);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (-i * j) * y;
	tmp = 0.0;
	if (j <= -6.5e+70)
		tmp = t_1;
	elseif (j <= -3.2e-180)
		tmp = (z * x) * y;
	elseif (j <= 1.55e-302)
		tmp = (i * b) * a;
	elseif (j <= 3.5e+49)
		tmp = (z * y) * x;
	elseif (j <= 1.2e+81)
		tmp = (c * t) * j;
	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[((-i) * j), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[j, -6.5e+70], t$95$1, If[LessEqual[j, -3.2e-180], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[j, 1.55e-302], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[j, 3.5e+49], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[j, 1.2e+81], N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(\left(-i\right) \cdot j\right) \cdot y\\
\mathbf{if}\;j \leq -6.5 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;j \leq -3.2 \cdot 10^{-180}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\

\mathbf{elif}\;j \leq 1.55 \cdot 10^{-302}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\

\mathbf{elif}\;j \leq 3.5 \cdot 10^{+49}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\

\mathbf{elif}\;j \leq 1.2 \cdot 10^{+81}:\\
\;\;\;\;\left(c \cdot t\right) \cdot j\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if j < -6.49999999999999978e70 or 1.19999999999999995e81 < j

    1. Initial program 73.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-*.f6447.7

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

      \[\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. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(i \cdot j\right)\right) \cdot y \]
      2. distribute-lft-neg-outN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y \]
      4. lift-neg.f6439.1

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

      \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]

    if -6.49999999999999978e70 < j < -3.20000000000000015e-180

    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-*.f6436.8

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites36.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-*.f6424.8

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

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

    if -3.20000000000000015e-180 < j < 1.54999999999999992e-302

    1. Initial program 74.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 x around 0

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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.0

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

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]

    if 1.54999999999999992e-302 < j < 3.49999999999999975e49

    1. Initial program 72.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 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-*.f6433.8

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

      \[\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. *-commutativeN/A

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lower-*.f6424.6

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

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

    if 3.49999999999999975e49 < j < 1.19999999999999995e81

    1. Initial program 73.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 j around inf

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

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

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

        \[\leadsto \left(c \cdot t + \left(\mathsf{neg}\left(i\right)\right) \cdot y\right) \cdot j \]
      4. mul-1-negN/A

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

        \[\leadsto \left(c \cdot t + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      6. +-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + c \cdot t\right) \cdot j \]
      8. mul-1-negN/A

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

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

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j \]
      11. lift-*.f6445.0

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j \]
    5. Applied rewrites45.0%

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

      \[\leadsto \left(c \cdot t\right) \cdot j \]
    7. Step-by-step derivation
      1. lift-*.f6424.0

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

      \[\leadsto \left(c \cdot t\right) \cdot j \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 13: 51.9% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\\ \mathbf{if}\;j \leq -8.5 \cdot 10^{+69}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq -6.2 \cdot 10^{-173}:\\ \;\;\;\;\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\ \mathbf{elif}\;j \leq 1.6 \cdot 10^{-302}:\\ \;\;\;\;\mathsf{fma}\left(-t, x, i \cdot b\right) \cdot a\\ \mathbf{elif}\;j \leq 3.4 \cdot 10^{+49}:\\ \;\;\;\;\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 (- i) y (* c t)) j)))
   (if (<= j -8.5e+69)
     t_1
     (if (<= j -6.2e-173)
       (* (fma y x (* (- b) c)) z)
       (if (<= j 1.6e-302)
         (* (fma (- t) x (* i b)) a)
         (if (<= j 3.4e+49) (* (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(-i, y, (c * t)) * j;
	double tmp;
	if (j <= -8.5e+69) {
		tmp = t_1;
	} else if (j <= -6.2e-173) {
		tmp = fma(y, x, (-b * c)) * z;
	} else if (j <= 1.6e-302) {
		tmp = fma(-t, x, (i * b)) * a;
	} else if (j <= 3.4e+49) {
		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(Float64(-i), y, Float64(c * t)) * j)
	tmp = 0.0
	if (j <= -8.5e+69)
		tmp = t_1;
	elseif (j <= -6.2e-173)
		tmp = Float64(fma(y, x, Float64(Float64(-b) * c)) * z);
	elseif (j <= 1.6e-302)
		tmp = Float64(fma(Float64(-t), x, Float64(i * b)) * a);
	elseif (j <= 3.4e+49)
		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[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[j, -8.5e+69], t$95$1, If[LessEqual[j, -6.2e-173], N[(N[(y * x + N[((-b) * c), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[j, 1.6e-302], N[(N[((-t) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[j, 3.4e+49], 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(-i, y, c \cdot t\right) \cdot j\\
\mathbf{if}\;j \leq -8.5 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;j \leq 3.4 \cdot 10^{+49}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if j < -8.5000000000000002e69 or 3.4000000000000001e49 < j

    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 j around inf

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

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

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

        \[\leadsto \left(c \cdot t + \left(\mathsf{neg}\left(i\right)\right) \cdot y\right) \cdot j \]
      4. mul-1-negN/A

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

        \[\leadsto \left(c \cdot t + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      6. +-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + c \cdot t\right) \cdot j \]
      8. mul-1-negN/A

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

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

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j \]
      11. lift-*.f6463.7

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

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

    if -8.5000000000000002e69 < j < -6.20000000000000011e-173

    1. Initial program 75.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 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.f6442.9

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

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

    if -6.20000000000000011e-173 < j < 1.59999999999999989e-302

    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 b around 0

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right), b, \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)\right)} \]
    5. Taylor expanded in a around inf

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

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

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot t\right) \cdot x + b \cdot i\right) \cdot a \]
      7. lower-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(-t, x, b \cdot i\right) \cdot a \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-t, x, i \cdot b\right) \cdot a \]
      11. lower-*.f6447.5

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

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

    if 1.59999999999999989e-302 < j < 3.4000000000000001e49

    1. Initial program 72.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 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-*.f6443.3

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

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

Alternative 14: 52.3% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\\ \mathbf{if}\;j \leq -8.5 \cdot 10^{+69}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq -1.85 \cdot 10^{-172}:\\ \;\;\;\;\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\ \mathbf{elif}\;j \leq 2.2 \cdot 10^{-303}:\\ \;\;\;\;\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\ \mathbf{elif}\;j \leq 3.4 \cdot 10^{+49}:\\ \;\;\;\;\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 (- i) y (* c t)) j)))
   (if (<= j -8.5e+69)
     t_1
     (if (<= j -1.85e-172)
       (* (fma y x (* (- b) c)) z)
       (if (<= j 2.2e-303)
         (* (fma i a (* (- c) z)) b)
         (if (<= j 3.4e+49) (* (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(-i, y, (c * t)) * j;
	double tmp;
	if (j <= -8.5e+69) {
		tmp = t_1;
	} else if (j <= -1.85e-172) {
		tmp = fma(y, x, (-b * c)) * z;
	} else if (j <= 2.2e-303) {
		tmp = fma(i, a, (-c * z)) * b;
	} else if (j <= 3.4e+49) {
		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(Float64(-i), y, Float64(c * t)) * j)
	tmp = 0.0
	if (j <= -8.5e+69)
		tmp = t_1;
	elseif (j <= -1.85e-172)
		tmp = Float64(fma(y, x, Float64(Float64(-b) * c)) * z);
	elseif (j <= 2.2e-303)
		tmp = Float64(fma(i, a, Float64(Float64(-c) * z)) * b);
	elseif (j <= 3.4e+49)
		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[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[j, -8.5e+69], t$95$1, If[LessEqual[j, -1.85e-172], N[(N[(y * x + N[((-b) * c), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[j, 2.2e-303], N[(N[(i * a + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[j, 3.4e+49], 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(-i, y, c \cdot t\right) \cdot j\\
\mathbf{if}\;j \leq -8.5 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;j \leq 2.2 \cdot 10^{-303}:\\
\;\;\;\;\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\

\mathbf{elif}\;j \leq 3.4 \cdot 10^{+49}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if j < -8.5000000000000002e69 or 3.4000000000000001e49 < j

    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 j around inf

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

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

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

        \[\leadsto \left(c \cdot t + \left(\mathsf{neg}\left(i\right)\right) \cdot y\right) \cdot j \]
      4. mul-1-negN/A

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

        \[\leadsto \left(c \cdot t + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      6. +-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + c \cdot t\right) \cdot j \]
      8. mul-1-negN/A

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

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

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j \]
      11. lift-*.f6463.7

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

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

    if -8.5000000000000002e69 < j < -1.85e-172

    1. Initial program 75.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 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.f6442.9

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

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

    if -1.85e-172 < j < 2.20000000000000014e-303

    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.f6450.4

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

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

    if 2.20000000000000014e-303 < j < 3.4000000000000001e49

    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-*.f6443.3

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

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

Alternative 15: 45.2% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\ t_2 := \mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\ \mathbf{if}\;c \leq -1.35 \cdot 10^{-98}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;c \leq -6.4 \cdot 10^{-188}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq 6.5 \cdot 10^{-115}:\\ \;\;\;\;\left(\left(-i\right) \cdot y\right) \cdot j\\ \mathbf{elif}\;c \leq 9.2 \cdot 10^{-13}:\\ \;\;\;\;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 (* (fma i a (* (- c) z)) b)) (t_2 (* (fma j t (* (- b) z)) c)))
   (if (<= c -1.35e-98)
     t_2
     (if (<= c -6.4e-188)
       t_1
       (if (<= c 6.5e-115) (* (* (- i) y) j) (if (<= c 9.2e-13) 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 = fma(i, a, (-c * z)) * b;
	double t_2 = fma(j, t, (-b * z)) * c;
	double tmp;
	if (c <= -1.35e-98) {
		tmp = t_2;
	} else if (c <= -6.4e-188) {
		tmp = t_1;
	} else if (c <= 6.5e-115) {
		tmp = (-i * y) * j;
	} else if (c <= 9.2e-13) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(fma(i, a, Float64(Float64(-c) * z)) * b)
	t_2 = Float64(fma(j, t, Float64(Float64(-b) * z)) * c)
	tmp = 0.0
	if (c <= -1.35e-98)
		tmp = t_2;
	elseif (c <= -6.4e-188)
		tmp = t_1;
	elseif (c <= 6.5e-115)
		tmp = Float64(Float64(Float64(-i) * y) * j);
	elseif (c <= 9.2e-13)
		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[(i * a + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * t + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -1.35e-98], t$95$2, If[LessEqual[c, -6.4e-188], t$95$1, If[LessEqual[c, 6.5e-115], N[(N[((-i) * y), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[c, 9.2e-13], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;c \leq -6.4 \cdot 10^{-188}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq 6.5 \cdot 10^{-115}:\\
\;\;\;\;\left(\left(-i\right) \cdot y\right) \cdot j\\

\mathbf{elif}\;c \leq 9.2 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -1.3499999999999999e-98 or 9.19999999999999917e-13 < c

    1. Initial program 68.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.f6455.1

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

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

    if -1.3499999999999999e-98 < c < -6.40000000000000044e-188 or 6.50000000000000033e-115 < c < 9.19999999999999917e-13

    1. Initial program 80.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.f6435.3

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

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

    if -6.40000000000000044e-188 < c < 6.50000000000000033e-115

    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 j around inf

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

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

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

        \[\leadsto \left(c \cdot t + \left(\mathsf{neg}\left(i\right)\right) \cdot y\right) \cdot j \]
      4. mul-1-negN/A

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

        \[\leadsto \left(c \cdot t + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      6. +-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + c \cdot t\right) \cdot j \]
      8. mul-1-negN/A

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

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

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j \]
      11. lift-*.f6432.7

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

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

      \[\leadsto \left(-1 \cdot \left(i \cdot y\right)\right) \cdot j \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(i \cdot y\right)\right) \cdot j \]
      2. distribute-lft-neg-outN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot y\right) \cdot j \]
      4. lift-neg.f6429.0

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

      \[\leadsto \left(\left(-i\right) \cdot y\right) \cdot j \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 16: 51.6% 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.6 \cdot 10^{-39}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3.15 \cdot 10^{-127}:\\ \;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{+56}:\\ \;\;\;\;\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\ \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 -8.6e-39)
     t_1
     (if (<= y 3.15e-127)
       (* (fma (- a) x (* j c)) t)
       (if (<= y 3.9e+56) (* (fma i a (* (- c) z)) 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(-i, j, (z * x)) * y;
	double tmp;
	if (y <= -8.6e-39) {
		tmp = t_1;
	} else if (y <= 3.15e-127) {
		tmp = fma(-a, x, (j * c)) * t;
	} else if (y <= 3.9e+56) {
		tmp = fma(i, a, (-c * z)) * b;
	} 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 <= -8.6e-39)
		tmp = t_1;
	elseif (y <= 3.15e-127)
		tmp = Float64(fma(Float64(-a), x, Float64(j * c)) * t);
	elseif (y <= 3.9e+56)
		tmp = Float64(fma(i, a, Float64(Float64(-c) * z)) * 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[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -8.6e-39], t$95$1, If[LessEqual[y, 3.15e-127], N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 3.9e+56], N[(N[(i * a + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $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.6 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.5999999999999999e-39 or 3.89999999999999994e56 < y

    1. Initial program 66.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-*.f6459.5

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

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

    if -8.5999999999999999e-39 < y < 3.1499999999999999e-127

    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 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.0

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

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

    if 3.1499999999999999e-127 < y < 3.89999999999999994e56

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

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

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

Alternative 17: 52.1% 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.8 \cdot 10^{+85}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 145000000:\\ \;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\ \mathbf{elif}\;x \leq 10^{+88}:\\ \;\;\;\;\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\ \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.8e+85)
     t_1
     (if (<= x 145000000.0)
       (* (fma j t (* (- b) z)) c)
       (if (<= x 1e+88) (* (fma i a (* (- c) z)) 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.8e+85) {
		tmp = t_1;
	} else if (x <= 145000000.0) {
		tmp = fma(j, t, (-b * z)) * c;
	} else if (x <= 1e+88) {
		tmp = fma(i, a, (-c * z)) * 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.8e+85)
		tmp = t_1;
	elseif (x <= 145000000.0)
		tmp = Float64(fma(j, t, Float64(Float64(-b) * z)) * c);
	elseif (x <= 1e+88)
		tmp = Float64(fma(i, a, Float64(Float64(-c) * z)) * 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.8e+85], t$95$1, If[LessEqual[x, 145000000.0], N[(N[(j * t + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[x, 1e+88], N[(N[(i * a + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $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.8 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 145000000:\\
\;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\

\mathbf{elif}\;x \leq 10^{+88}:\\
\;\;\;\;\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.7999999999999999e85 or 9.99999999999999959e87 < x

    1. Initial program 73.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 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-*.f6466.4

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x \]
    5. Applied rewrites66.4%

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

    if -1.7999999999999999e85 < x < 1.45e8

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

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

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

    if 1.45e8 < x < 9.99999999999999959e87

    1. Initial program 76.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 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.f6438.7

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

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

Alternative 18: 29.8% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot y\right) \cdot x\\ t_2 := \left(j \cdot t\right) \cdot c\\ \mathbf{if}\;j \leq -2.2 \cdot 10^{+97}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;j \leq -3.2 \cdot 10^{-180}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq 1.55 \cdot 10^{-302}:\\ \;\;\;\;\left(i \cdot b\right) \cdot a\\ \mathbf{elif}\;j \leq 3.5 \cdot 10^{+49}:\\ \;\;\;\;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 (* (* z y) x)) (t_2 (* (* j t) c)))
   (if (<= j -2.2e+97)
     t_2
     (if (<= j -3.2e-180)
       t_1
       (if (<= j 1.55e-302) (* (* i b) a) (if (<= j 3.5e+49) 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 = (z * y) * x;
	double t_2 = (j * t) * c;
	double tmp;
	if (j <= -2.2e+97) {
		tmp = t_2;
	} else if (j <= -3.2e-180) {
		tmp = t_1;
	} else if (j <= 1.55e-302) {
		tmp = (i * b) * a;
	} else if (j <= 3.5e+49) {
		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 = (z * y) * x
    t_2 = (j * t) * c
    if (j <= (-2.2d+97)) then
        tmp = t_2
    else if (j <= (-3.2d-180)) then
        tmp = t_1
    else if (j <= 1.55d-302) then
        tmp = (i * b) * a
    else if (j <= 3.5d+49) 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 = (z * y) * x;
	double t_2 = (j * t) * c;
	double tmp;
	if (j <= -2.2e+97) {
		tmp = t_2;
	} else if (j <= -3.2e-180) {
		tmp = t_1;
	} else if (j <= 1.55e-302) {
		tmp = (i * b) * a;
	} else if (j <= 3.5e+49) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (z * y) * x
	t_2 = (j * t) * c
	tmp = 0
	if j <= -2.2e+97:
		tmp = t_2
	elif j <= -3.2e-180:
		tmp = t_1
	elif j <= 1.55e-302:
		tmp = (i * b) * a
	elif j <= 3.5e+49:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(z * y) * x)
	t_2 = Float64(Float64(j * t) * c)
	tmp = 0.0
	if (j <= -2.2e+97)
		tmp = t_2;
	elseif (j <= -3.2e-180)
		tmp = t_1;
	elseif (j <= 1.55e-302)
		tmp = Float64(Float64(i * b) * a);
	elseif (j <= 3.5e+49)
		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 = (z * y) * x;
	t_2 = (j * t) * c;
	tmp = 0.0;
	if (j <= -2.2e+97)
		tmp = t_2;
	elseif (j <= -3.2e-180)
		tmp = t_1;
	elseif (j <= 1.55e-302)
		tmp = (i * b) * a;
	elseif (j <= 3.5e+49)
		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[(z * y), $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[j, -2.2e+97], t$95$2, If[LessEqual[j, -3.2e-180], t$95$1, If[LessEqual[j, 1.55e-302], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[j, 3.5e+49], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
t_2 := \left(j \cdot t\right) \cdot c\\
\mathbf{if}\;j \leq -2.2 \cdot 10^{+97}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;j \leq -3.2 \cdot 10^{-180}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;j \leq 1.55 \cdot 10^{-302}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\

\mathbf{elif}\;j \leq 3.5 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -2.2000000000000001e97 or 3.49999999999999975e49 < j

    1. Initial program 73.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 x around 0

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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-*.f6437.9

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

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]

    if -2.2000000000000001e97 < j < -3.20000000000000015e-180 or 1.54999999999999992e-302 < j < 3.49999999999999975e49

    1. Initial program 74.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-*.f6435.0

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

      \[\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. *-commutativeN/A

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lower-*.f6424.1

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

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

    if -3.20000000000000015e-180 < j < 1.54999999999999992e-302

    1. Initial program 74.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 x around 0

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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.0

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

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 19: 42.6% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;j \leq -1.05 \cdot 10^{+119}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\

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

\mathbf{elif}\;j \leq 1.2 \cdot 10^{+81}:\\
\;\;\;\;\left(c \cdot t\right) \cdot j\\

\mathbf{else}:\\
\;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if j < -1.04999999999999991e119

    1. Initial program 72.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 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.f6450.4

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

      \[\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-*.f6442.4

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

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

    if -1.04999999999999991e119 < j < 4.49999999999999982e49

    1. Initial program 74.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 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.4

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

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

    if 4.49999999999999982e49 < j < 1.19999999999999995e81

    1. Initial program 73.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 j around inf

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

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

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

        \[\leadsto \left(c \cdot t + \left(\mathsf{neg}\left(i\right)\right) \cdot y\right) \cdot j \]
      4. mul-1-negN/A

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

        \[\leadsto \left(c \cdot t + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      6. +-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + c \cdot t\right) \cdot j \]
      8. mul-1-negN/A

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

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

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j \]
      11. lift-*.f6445.0

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j \]
    5. Applied rewrites45.0%

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

      \[\leadsto \left(c \cdot t\right) \cdot j \]
    7. Step-by-step derivation
      1. lift-*.f6424.0

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

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

    if 1.19999999999999995e81 < j

    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-*.f6447.7

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

      \[\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. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(i \cdot j\right)\right) \cdot y \]
      2. distribute-lft-neg-outN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y \]
      4. lift-neg.f6438.9

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

      \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 20: 30.5% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{+42}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{+55}:\\ \;\;\;\;-c \cdot \left(b \cdot z\right)\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{+219}:\\ \;\;\;\;\left(\left(-a\right) \cdot x\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\left(c \cdot t\right) \cdot j\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= t -2.5e+42)
   (* (* j t) c)
   (if (<= t 1.75e+55)
     (- (* c (* b z)))
     (if (<= t 2.15e+219) (* (* (- a) x) t) (* (* c t) j)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (t <= -2.5e+42) {
		tmp = (j * t) * c;
	} else if (t <= 1.75e+55) {
		tmp = -(c * (b * z));
	} else if (t <= 2.15e+219) {
		tmp = (-a * x) * t;
	} else {
		tmp = (c * t) * j;
	}
	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 (t <= (-2.5d+42)) then
        tmp = (j * t) * c
    else if (t <= 1.75d+55) then
        tmp = -(c * (b * z))
    else if (t <= 2.15d+219) then
        tmp = (-a * x) * t
    else
        tmp = (c * t) * j
    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 (t <= -2.5e+42) {
		tmp = (j * t) * c;
	} else if (t <= 1.75e+55) {
		tmp = -(c * (b * z));
	} else if (t <= 2.15e+219) {
		tmp = (-a * x) * t;
	} else {
		tmp = (c * t) * j;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if t <= -2.5e+42:
		tmp = (j * t) * c
	elif t <= 1.75e+55:
		tmp = -(c * (b * z))
	elif t <= 2.15e+219:
		tmp = (-a * x) * t
	else:
		tmp = (c * t) * j
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (t <= -2.5e+42)
		tmp = Float64(Float64(j * t) * c);
	elseif (t <= 1.75e+55)
		tmp = Float64(-Float64(c * Float64(b * z)));
	elseif (t <= 2.15e+219)
		tmp = Float64(Float64(Float64(-a) * x) * t);
	else
		tmp = Float64(Float64(c * t) * j);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (t <= -2.5e+42)
		tmp = (j * t) * c;
	elseif (t <= 1.75e+55)
		tmp = -(c * (b * z));
	elseif (t <= 2.15e+219)
		tmp = (-a * x) * t;
	else
		tmp = (c * t) * j;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[t, -2.5e+42], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[t, 1.75e+55], (-N[(c * N[(b * z), $MachinePrecision]), $MachinePrecision]), If[LessEqual[t, 2.15e+219], N[(N[((-a) * x), $MachinePrecision] * t), $MachinePrecision], N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+42}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\

\mathbf{elif}\;t \leq 1.75 \cdot 10^{+55}:\\
\;\;\;\;-c \cdot \left(b \cdot z\right)\\

\mathbf{elif}\;t \leq 2.15 \cdot 10^{+219}:\\
\;\;\;\;\left(\left(-a\right) \cdot x\right) \cdot t\\

\mathbf{else}:\\
\;\;\;\;\left(c \cdot t\right) \cdot j\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.50000000000000003e42

    1. Initial program 66.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 x around 0

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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-*.f6436.3

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

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]

    if -2.50000000000000003e42 < t < 1.75000000000000005e55

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

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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-*.f6426.0

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

      \[\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.5

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

      \[\leadsto -\left(c \cdot b\right) \cdot z \]
    12. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

        \[\leadsto -c \cdot \left(b \cdot z\right) \]
      5. lower-*.f6426.4

        \[\leadsto -c \cdot \left(b \cdot z\right) \]
    13. Applied rewrites26.4%

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

    if 1.75000000000000005e55 < t < 2.1499999999999999e219

    1. Initial program 65.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-*.f6458.5

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

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

      \[\leadsto \left(-1 \cdot \left(a \cdot x\right)\right) \cdot t \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a \cdot x\right)\right) \cdot t \]
      2. distribute-lft-neg-outN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x\right) \cdot t \]
      4. lift-neg.f6432.9

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

      \[\leadsto \left(\left(-a\right) \cdot x\right) \cdot t \]

    if 2.1499999999999999e219 < t

    1. Initial program 55.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 j around inf

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

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

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

        \[\leadsto \left(c \cdot t + \left(\mathsf{neg}\left(i\right)\right) \cdot y\right) \cdot j \]
      4. mul-1-negN/A

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

        \[\leadsto \left(c \cdot t + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      6. +-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + c \cdot t\right) \cdot j \]
      8. mul-1-negN/A

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

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

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j \]
      11. lift-*.f6448.2

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j \]
    5. Applied rewrites48.2%

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

      \[\leadsto \left(c \cdot t\right) \cdot j \]
    7. Step-by-step derivation
      1. lift-*.f6441.5

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

      \[\leadsto \left(c \cdot t\right) \cdot j \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 21: 29.3% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot y\right) \cdot x\\ \mathbf{if}\;x \leq -6.2 \cdot 10^{+26}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 9 \cdot 10^{+87}:\\ \;\;\;\;\left(i \cdot b\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* z y) x)))
   (if (<= x -6.2e+26) t_1 (if (<= x 9e+87) (* (* i b) a) 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 * y) * x;
	double tmp;
	if (x <= -6.2e+26) {
		tmp = t_1;
	} else if (x <= 9e+87) {
		tmp = (i * b) * a;
	} 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 * y) * x
    if (x <= (-6.2d+26)) then
        tmp = t_1
    else if (x <= 9d+87) then
        tmp = (i * b) * a
    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 * y) * x;
	double tmp;
	if (x <= -6.2e+26) {
		tmp = t_1;
	} else if (x <= 9e+87) {
		tmp = (i * b) * a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (z * y) * x
	tmp = 0
	if x <= -6.2e+26:
		tmp = t_1
	elif x <= 9e+87:
		tmp = (i * b) * a
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(z * y) * x)
	tmp = 0.0
	if (x <= -6.2e+26)
		tmp = t_1;
	elseif (x <= 9e+87)
		tmp = Float64(Float64(i * b) * a);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (z * y) * x;
	tmp = 0.0;
	if (x <= -6.2e+26)
		tmp = t_1;
	elseif (x <= 9e+87)
		tmp = (i * b) * a;
	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 * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -6.2e+26], t$95$1, If[LessEqual[x, 9e+87], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.1999999999999999e26 or 9.0000000000000005e87 < 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 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-*.f6447.0

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

      \[\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. *-commutativeN/A

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lower-*.f6435.1

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

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

    if -6.1999999999999999e26 < x < 9.0000000000000005e87

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

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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-*.f6425.3

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

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 22: 27.1% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot y\right) \cdot x\\ \mathbf{if}\;z \leq -2.15 \cdot 10^{-37}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-224}:\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* z y) x)))
   (if (<= z -2.15e-37) t_1 (if (<= z 1.05e-224) (* (* b a) i) 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 * y) * x;
	double tmp;
	if (z <= -2.15e-37) {
		tmp = t_1;
	} else if (z <= 1.05e-224) {
		tmp = (b * a) * i;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, 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 * y) * x
    if (z <= (-2.15d-37)) then
        tmp = t_1
    else if (z <= 1.05d-224) then
        tmp = (b * a) * i
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (z * y) * x;
	double tmp;
	if (z <= -2.15e-37) {
		tmp = t_1;
	} else if (z <= 1.05e-224) {
		tmp = (b * a) * i;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (z * y) * x
	tmp = 0
	if z <= -2.15e-37:
		tmp = t_1
	elif z <= 1.05e-224:
		tmp = (b * a) * i
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(z * y) * x)
	tmp = 0.0
	if (z <= -2.15e-37)
		tmp = t_1;
	elseif (z <= 1.05e-224)
		tmp = Float64(Float64(b * a) * i);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (z * y) * x;
	tmp = 0.0;
	if (z <= -2.15e-37)
		tmp = t_1;
	elseif (z <= 1.05e-224)
		tmp = (b * a) * i;
	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 * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -2.15e-37], t$95$1, If[LessEqual[z, 1.05e-224], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;z \leq -2.15 \cdot 10^{-37}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.05 \cdot 10^{-224}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.14999999999999984e-37 or 1.05000000000000003e-224 < z

    1. Initial program 70.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-*.f6442.3

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites42.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. *-commutativeN/A

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lower-*.f6427.3

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

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

    if -2.14999999999999984e-37 < z < 1.05000000000000003e-224

    1. Initial program 82.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 x around 0

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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-*.f6425.9

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

      \[\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 \left(b \cdot i\right) \cdot a \]
      4. *-commutativeN/A

        \[\leadsto a \cdot \left(b \cdot \color{blue}{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-*.f6426.5

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

      \[\leadsto \left(b \cdot a\right) \cdot i \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 23: 21.7% accurate, 5.5× speedup?

\[\begin{array}{l} \\ \left(z \cdot y\right) \cdot x \end{array} \]
(FPCore (x y z t a b c i j) :precision binary64 (* (* z y) x))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return (z * y) * x;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, 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 = (z * y) * x
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 (z * y) * x;
}
def code(x, y, z, t, a, b, c, i, j):
	return (z * y) * x
function code(x, y, z, t, a, b, c, i, j)
	return Float64(Float64(z * y) * x)
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = (z * y) * x;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]
\begin{array}{l}

\\
\left(z \cdot y\right) \cdot x
\end{array}
Derivation
  1. Initial program 73.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-*.f6439.5

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

    \[\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. *-commutativeN/A

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

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

      \[\leadsto \left(z \cdot y\right) \cdot x \]
    4. lower-*.f6421.7

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

    \[\leadsto \left(z \cdot y\right) \cdot \color{blue}{x} \]
  9. Add Preprocessing

Developer Target 1: 69.4% 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 2025089 
(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)))))