Data.Colour.Matrix:determinant from colour-2.3.3, A

Percentage Accurate: 73.9% → 84.0%
Time: 58.5s
Alternatives: 25
Speedup: 0.5×

Specification

?
\[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (+
 (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
 (* j (- (* c a) (* y i)))))
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) - (t * i)))) + (j * ((c * a) - (y * i)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, 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) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j):
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
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(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i))))
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
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[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 25 alternatives:

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

Initial Program: 73.9% accurate, 1.0× speedup?

\[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (+
 (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
 (* j (- (* c a) (* y i)))))
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) - (t * i)))) + (j * ((c * a) - (y * i)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, 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) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j):
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
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(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i))))
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
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[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)

Alternative 1: 84.0% accurate, 0.5× speedup?

\[\begin{array}{l} t_1 := x \cdot \left(y \cdot z - t \cdot a\right)\\ t_2 := j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{if}\;\left(t\_1 - b \cdot \left(c \cdot z - t \cdot i\right)\right) + t\_2 \leq \infty:\\ \;\;\;\;\left(t\_1 - \mathsf{134\_z0z1z2z3z4}\left(b, z, c, t, i\right)\right) + t\_2\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (let* ((t_1 (* x (- (* y z) (* t a))))
       (t_2 (* j (- (* c a) (* y i)))))
  (if (<= (+ (- t_1 (* b (- (* c z) (* t i)))) t_2) INFINITY)
    (+ (- t_1 (134-z0z1z2z3z4 b z c t i)) t_2)
    (* j (- (* a c) (* i y))))))
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - t \cdot a\right)\\
t_2 := j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;\left(t\_1 - b \cdot \left(c \cdot z - t \cdot i\right)\right) + t\_2 \leq \infty:\\
\;\;\;\;\left(t\_1 - \mathsf{134\_z0z1z2z3z4}\left(b, z, c, t, i\right)\right) + t\_2\\

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


\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 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0

    1. Initial program 73.9%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{\left(\mathsf{neg}\left(b\right)\right) \cdot \left(t \cdot i - c \cdot z\right)}\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      6. sub-negate-revN/A

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

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\left(c \cdot z - t \cdot i\right)}\right)\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      8. distribute-rgt-neg-outN/A

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

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right)\right)\right) \cdot \left(c \cdot z - t \cdot i\right)}\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      10. remove-double-negN/A

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

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

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

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

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(z \cdot c - \color{blue}{t \cdot i}\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      15. lower-134-z0z1z2z3z478.1%

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(b, z, c, t, i\right)}\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    3. Applied rewrites78.1%

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

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

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
      7. lower-*.f6451.3%

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
    7. Applied rewrites51.3%

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

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

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

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

        \[\leadsto j \cdot \left(a \cdot c - i \cdot y\right) \]
      4. lower-*.f6439.6%

        \[\leadsto j \cdot \left(a \cdot c - i \cdot y\right) \]
    10. Applied rewrites39.6%

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

Alternative 2: 84.0% accurate, 0.5× speedup?

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

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


\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 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0

    1. Initial program 73.9%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \color{blue}{\left(\mathsf{neg}\left(j\right)\right) \cdot \left(y \cdot i - c \cdot a\right)} \]
      6. sub-negate-revN/A

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

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \left(\mathsf{neg}\left(j\right)\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\left(c \cdot a - y \cdot i\right)}\right)\right) \]
      8. distribute-rgt-neg-outN/A

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

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(j\right)\right)\right)\right) \cdot \left(c \cdot a - y \cdot i\right)} \]
      10. remove-double-negN/A

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

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

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

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - \color{blue}{y \cdot i}\right) \]
      14. lower-134-z0z1z2z3z478.1%

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)} \]
    3. Applied rewrites78.1%

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

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

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
      7. lower-*.f6451.3%

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
    7. Applied rewrites51.3%

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

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

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

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

        \[\leadsto j \cdot \left(a \cdot c - i \cdot y\right) \]
      4. lower-*.f6439.6%

        \[\leadsto j \cdot \left(a \cdot c - i \cdot y\right) \]
    10. Applied rewrites39.6%

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

Alternative 3: 81.9% accurate, 0.5× speedup?

\[\begin{array}{l} t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{if}\;t\_1 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\ \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) (* t i))))
         (* j (- (* c a) (* y i))))))
  (if (<= t_1 INFINITY) t_1 (* j (- (* a c) (* i y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = j * ((a * c) - (i * y));
	}
	return tmp;
}
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) - (t * i)))) + (j * ((c * a) - (y * i)));
	double tmp;
	if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else {
		tmp = j * ((a * c) - (i * y));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
	tmp = 0
	if t_1 <= math.inf:
		tmp = t_1
	else:
		tmp = j * ((a * c) - (i * y))
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i))))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(j * Float64(Float64(a * c) - Float64(i * y)));
	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) - (t * i)))) + (j * ((c * a) - (y * i)));
	tmp = 0.0;
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = j * ((a * c) - (i * y));
	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[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\

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


\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 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0

    1. Initial program 73.9%

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

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

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
      7. lower-*.f6451.3%

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
    7. Applied rewrites51.3%

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

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

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

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

        \[\leadsto j \cdot \left(a \cdot c - i \cdot y\right) \]
      4. lower-*.f6439.6%

        \[\leadsto j \cdot \left(a \cdot c - i \cdot y\right) \]
    10. Applied rewrites39.6%

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

Alternative 4: 66.8% accurate, 0.9× speedup?

\[\begin{array}{l} t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{if}\;j \leq \frac{-2561194933379311}{26959946667150639794667015087019630673637144422540572481103610249216}:\\ \;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(t, i, b, x, a\right) + t\_1\\ \mathbf{elif}\;j \leq \frac{1210964111994553}{6210072369202835740595917953850010221027544068466786444556208152104203810745507545323513635314585911801950922788524292824686320176459257565777149100164724556817819904083399622201061142526393779301051996774865875003571387415264231424}:\\ \;\;\;\;\left(-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + a \cdot \left(c \cdot j\right)\right) - b \cdot \left(c \cdot z - i \cdot t\right)\\ \mathbf{elif}\;j \leq \frac{1725436586697641}{6901746346790563787434755862277025452451108972170386555162524223799296}:\\ \;\;\;\;-1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right) + t\_1\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (let* ((t_1 (* j (- (* c a) (* y i)))))
  (if (<=
       j
       -2561194933379311/26959946667150639794667015087019630673637144422540572481103610249216)
    (+ (134-z0z1z2z3z4 t i b x a) t_1)
    (if (<=
         j
         1210964111994553/6210072369202835740595917953850010221027544068466786444556208152104203810745507545323513635314585911801950922788524292824686320176459257565777149100164724556817819904083399622201061142526393779301051996774865875003571387415264231424)
      (-
       (+ (* -1 (* a (* t x))) (* a (* c j)))
       (* b (- (* c z) (* i t))))
      (if (<=
           j
           1725436586697641/6901746346790563787434755862277025452451108972170386555162524223799296)
        (+
         (* -1 (* t (- (* a x) (* b i))))
         (134-z0z1z2z3z4 j c a y i))
        (+ (* z (- (* x y) (* b c))) t_1))))))
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;j \leq \frac{-2561194933379311}{26959946667150639794667015087019630673637144422540572481103610249216}:\\
\;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(t, i, b, x, a\right) + t\_1\\

\mathbf{elif}\;j \leq \frac{1210964111994553}{6210072369202835740595917953850010221027544068466786444556208152104203810745507545323513635314585911801950922788524292824686320176459257565777149100164724556817819904083399622201061142526393779301051996774865875003571387415264231424}:\\
\;\;\;\;\left(-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + a \cdot \left(c \cdot j\right)\right) - b \cdot \left(c \cdot z - i \cdot t\right)\\

\mathbf{elif}\;j \leq \frac{1725436586697641}{6901746346790563787434755862277025452451108972170386555162524223799296}:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)\\

\mathbf{else}:\\
\;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right) + t\_1\\


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if j < -9.5000000000000008e-53

    1. Initial program 73.9%

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - \color{blue}{b} \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      5. lower-*.f6459.3%

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \left(\mathsf{neg}\left(\left(a \cdot x + \left(\mathsf{neg}\left(b\right)\right) \cdot i\right)\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      8. add-flipN/A

        \[\leadsto t \cdot \left(\mathsf{neg}\left(\left(a \cdot x - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot i\right)\right)\right)\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      9. sub-negateN/A

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

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

        \[\leadsto t \cdot \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot i\right)\right)\right)\right) - a \cdot x\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      12. remove-double-negN/A

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

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

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

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

        \[\leadsto t \cdot \left(i \cdot b - x \cdot \color{blue}{a}\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      17. lower-134-z0z1z2z3z462.8%

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

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

    if -9.5000000000000008e-53 < j < 1.95e-217

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + a \cdot \left(c \cdot j\right)\right) - b \cdot \left(c \cdot z - \color{blue}{i} \cdot t\right) \]
      11. lower-*.f6458.6%

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

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

    if 1.95e-217 < j < 2.5000000000000001e-55

    1. Initial program 73.9%

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - \color{blue}{b} \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      5. lower-*.f6459.3%

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + j \cdot \left(c \cdot a - \color{blue}{y \cdot i}\right) \]
      5. lower-134-z0z1z2z3z462.7%

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)} \]
    6. Applied rewrites62.7%

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

    if 2.5000000000000001e-55 < j

    1. Initial program 73.9%

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

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

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

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

        \[\leadsto z \cdot \left(x \cdot y - \color{blue}{b} \cdot c\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      4. lower-*.f6459.4%

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

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

Alternative 5: 66.2% accurate, 1.1× speedup?

\[\begin{array}{l} t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\ t_2 := z \cdot \left(x \cdot y - b \cdot c\right) + t\_1\\ \mathbf{if}\;c \leq \frac{-1968499104217263}{803469022129495137770981046170581301261101496891396417650688}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;c \leq 82000000000000000000:\\ \;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(t, i, b, x, a\right) + t\_1\\ \mathbf{elif}\;c \leq 69999999999999996580030472474645924373724123228303516896266087234014582066249714282948715224206381596671128141369967796948637772753867451648450151483935177956392565768613975005440655767603603570688:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(c, j, a, z, b\right)\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (let* ((t_1 (* j (- (* c a) (* y i))))
       (t_2 (+ (* z (- (* x y) (* b c))) t_1)))
  (if (<=
       c
       -1968499104217263/803469022129495137770981046170581301261101496891396417650688)
    t_2
    (if (<= c 82000000000000000000)
      (+ (134-z0z1z2z3z4 t i b x a) t_1)
      (if (<=
           c
           69999999999999996580030472474645924373724123228303516896266087234014582066249714282948715224206381596671128141369967796948637772753867451648450151483935177956392565768613975005440655767603603570688)
        t_2
        (134-z0z1z2z3z4 c j a z b))))))
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
t_2 := z \cdot \left(x \cdot y - b \cdot c\right) + t\_1\\
\mathbf{if}\;c \leq \frac{-1968499104217263}{803469022129495137770981046170581301261101496891396417650688}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;c \leq 82000000000000000000:\\
\;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(t, i, b, x, a\right) + t\_1\\

\mathbf{elif}\;c \leq 69999999999999996580030472474645924373724123228303516896266087234014582066249714282948715224206381596671128141369967796948637772753867451648450151483935177956392565768613975005440655767603603570688:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(c, j, a, z, b\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -2.4499999999999999e-45 or 8.2e19 < c < 6.9999999999999997e196

    1. Initial program 73.9%

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

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

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

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

        \[\leadsto z \cdot \left(x \cdot y - \color{blue}{b} \cdot c\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      4. lower-*.f6459.4%

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

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

    if -2.4499999999999999e-45 < c < 8.2e19

    1. Initial program 73.9%

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - \color{blue}{b} \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      5. lower-*.f6459.3%

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \left(\mathsf{neg}\left(\left(a \cdot x + \left(\mathsf{neg}\left(b\right)\right) \cdot i\right)\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      8. add-flipN/A

        \[\leadsto t \cdot \left(\mathsf{neg}\left(\left(a \cdot x - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot i\right)\right)\right)\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      9. sub-negateN/A

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

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

        \[\leadsto t \cdot \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot i\right)\right)\right)\right) - a \cdot x\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      12. remove-double-negN/A

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

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

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

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

        \[\leadsto t \cdot \left(i \cdot b - x \cdot \color{blue}{a}\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      17. lower-134-z0z1z2z3z462.8%

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

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

    if 6.9999999999999997e196 < c

    1. Initial program 73.9%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6439.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.7%

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

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

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

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

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

        \[\leadsto c \cdot \left(a \cdot j + \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot b}\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto c \cdot \left(a \cdot j + \left(\mathsf{neg}\left(z \cdot b\right)\right)\right) \]
      7. distribute-rgt-neg-inN/A

        \[\leadsto c \cdot \left(a \cdot j + z \cdot \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}\right) \]
      8. fp-cancel-sign-sub-invN/A

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(b\right)\right)}\right) \]
      9. lift-*.f64N/A

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

        \[\leadsto c \cdot \left(j \cdot a - \color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot \left(\mathsf{neg}\left(b\right)\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto c \cdot \left(j \cdot a - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right) \cdot b\right)\right)\right) \]
      12. distribute-lft-neg-inN/A

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

        \[\leadsto c \cdot \left(j \cdot a - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot z\right)\right)\right)\right)\right) \]
      14. lift-*.f64N/A

        \[\leadsto c \cdot \left(j \cdot a - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot z\right)\right)\right)\right)\right) \]
      15. remove-double-negN/A

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

        \[\leadsto c \cdot \left(j \cdot a - b \cdot \color{blue}{z}\right) \]
      17. *-commutativeN/A

        \[\leadsto c \cdot \left(j \cdot a - z \cdot \color{blue}{b}\right) \]
      18. lower-134-z0z1z2z3z439.5%

        \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(c, \color{blue}{j}, a, z, b\right) \]
    6. Applied rewrites39.5%

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

Alternative 6: 63.1% accurate, 1.2× speedup?

\[\begin{array}{l} \mathbf{if}\;j \leq \frac{1725436586697641}{6901746346790563787434755862277025452451108972170386555162524223799296}:\\ \;\;\;\;-1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (if (<=
     j
     1725436586697641/6901746346790563787434755862277025452451108972170386555162524223799296)
  (+ (* -1 (* t (- (* a x) (* b i)))) (134-z0z1z2z3z4 j c a y i))
  (+ (* z (- (* x y) (* b c))) (* j (- (* c a) (* y i))))))
\begin{array}{l}
\mathbf{if}\;j \leq \frac{1725436586697641}{6901746346790563787434755862277025452451108972170386555162524223799296}:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < 2.5000000000000001e-55

    1. Initial program 73.9%

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - \color{blue}{b} \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      5. lower-*.f6459.3%

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + j \cdot \left(c \cdot a - \color{blue}{y \cdot i}\right) \]
      5. lower-134-z0z1z2z3z462.7%

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)} \]
    6. Applied rewrites62.7%

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

    if 2.5000000000000001e-55 < j

    1. Initial program 73.9%

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

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

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

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

        \[\leadsto z \cdot \left(x \cdot y - \color{blue}{b} \cdot c\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      4. lower-*.f6459.4%

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

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

Alternative 7: 63.0% accurate, 1.1× speedup?

\[\begin{array}{l} t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\ t_2 := b \cdot \left(i \cdot t\right) + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)\\ \mathbf{if}\;i \leq -6600000000000000170498070795170432660144950935994891604555722343977806925614311324299607146496:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;i \leq 749999999999999941246189568:\\ \;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right) + t\_1\\ \mathbf{elif}\;i \leq 27000000000000000922834500647727241045210369510666415635740567789841827394974450876641813549004880291063176848469465534841235627977264177678370097423367893744448087470656798904802291653415713371904815015478794649600:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right) + t\_1\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (let* ((t_1 (* j (- (* c a) (* y i))))
       (t_2 (+ (* b (* i t)) (134-z0z1z2z3z4 j c a y i))))
  (if (<=
       i
       -6600000000000000170498070795170432660144950935994891604555722343977806925614311324299607146496)
    t_2
    (if (<= i 749999999999999941246189568)
      (+ (* z (- (* x y) (* b c))) t_1)
      (if (<=
           i
           27000000000000000922834500647727241045210369510666415635740567789841827394974450876641813549004880291063176848469465534841235627977264177678370097423367893744448087470656798904802291653415713371904815015478794649600)
        t_2
        (+ (* -1 (* b (* c z))) t_1))))))
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
t_2 := b \cdot \left(i \cdot t\right) + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)\\
\mathbf{if}\;i \leq -6600000000000000170498070795170432660144950935994891604555722343977806925614311324299607146496:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;i \leq 749999999999999941246189568:\\
\;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right) + t\_1\\

\mathbf{elif}\;i \leq 27000000000000000922834500647727241045210369510666415635740567789841827394974450876641813549004880291063176848469465534841235627977264177678370097423367893744448087470656798904802291653415713371904815015478794649600:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right) + t\_1\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -6.6000000000000002e93 or 7.4999999999999994e26 < i < 2.7000000000000001e214

    1. Initial program 73.9%

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - \color{blue}{b} \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      5. lower-*.f6459.3%

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + j \cdot \left(c \cdot a - \color{blue}{y \cdot i}\right) \]
      5. lower-134-z0z1z2z3z462.7%

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)} \]
    6. Applied rewrites62.7%

      \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)} \]
    7. Taylor expanded in x around 0

      \[\leadsto b \cdot \color{blue}{\left(i \cdot t\right)} + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right) \]
    8. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \left(i \cdot \color{blue}{t}\right) + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right) \]
      2. lower-*.f6451.7%

        \[\leadsto b \cdot \left(i \cdot t\right) + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right) \]
    9. Applied rewrites51.7%

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

    if -6.6000000000000002e93 < i < 7.4999999999999994e26

    1. Initial program 73.9%

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

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

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

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

        \[\leadsto z \cdot \left(x \cdot y - \color{blue}{b} \cdot c\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      4. lower-*.f6459.4%

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

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

    if 2.7000000000000001e214 < i

    1. Initial program 73.9%

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

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

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

        \[\leadsto -1 \cdot \left(b \cdot \color{blue}{\left(c \cdot z\right)}\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      3. lower-*.f6450.0%

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

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

Alternative 8: 62.4% accurate, 1.1× speedup?

\[\begin{array}{l} t_1 := b \cdot \left(i \cdot t\right) + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)\\ \mathbf{if}\;i \leq -55000000000000000981369353015810551861615715402103866681329908659147537121280:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;i \leq \frac{8620287417370625}{11972621413014756705924586149611790497021399392059392}:\\ \;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right) + x \cdot \left(y \cdot z - a \cdot t\right)\\ \mathbf{elif}\;i \leq 27000000000000000922834500647727241045210369510666415635740567789841827394974450876641813549004880291063176848469465534841235627977264177678370097423367893744448087470656798904802291653415713371904815015478794649600:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (let* ((t_1 (+ (* b (* i t)) (134-z0z1z2z3z4 j c a y i))))
  (if (<=
       i
       -55000000000000000981369353015810551861615715402103866681329908659147537121280)
    t_1
    (if (<=
         i
         8620287417370625/11972621413014756705924586149611790497021399392059392)
      (+ (* j (- (* a c) (* i y))) (* x (- (* y z) (* a t))))
      (if (<=
           i
           27000000000000000922834500647727241045210369510666415635740567789841827394974450876641813549004880291063176848469465534841235627977264177678370097423367893744448087470656798904802291653415713371904815015478794649600)
        t_1
        (+ (* -1 (* b (* c z))) (* j (- (* c a) (* y i)))))))))
\begin{array}{l}
t_1 := b \cdot \left(i \cdot t\right) + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)\\
\mathbf{if}\;i \leq -55000000000000000981369353015810551861615715402103866681329908659147537121280:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;i \leq \frac{8620287417370625}{11972621413014756705924586149611790497021399392059392}:\\
\;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right) + x \cdot \left(y \cdot z - a \cdot t\right)\\

\mathbf{elif}\;i \leq 27000000000000000922834500647727241045210369510666415635740567789841827394974450876641813549004880291063176848469465534841235627977264177678370097423367893744448087470656798904802291653415713371904815015478794649600:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -5.5000000000000001e76 or 7.2000000000000001e-37 < i < 2.7000000000000001e214

    1. Initial program 73.9%

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - \color{blue}{b} \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      5. lower-*.f6459.3%

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + j \cdot \left(c \cdot a - \color{blue}{y \cdot i}\right) \]
      5. lower-134-z0z1z2z3z462.7%

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)} \]
    6. Applied rewrites62.7%

      \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)} \]
    7. Taylor expanded in x around 0

      \[\leadsto b \cdot \color{blue}{\left(i \cdot t\right)} + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right) \]
    8. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \left(i \cdot \color{blue}{t}\right) + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right) \]
      2. lower-*.f6451.7%

        \[\leadsto b \cdot \left(i \cdot t\right) + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right) \]
    9. Applied rewrites51.7%

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

    if -5.5000000000000001e76 < i < 7.2000000000000001e-37

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.7000000000000001e214 < i

    1. Initial program 73.9%

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

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

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

        \[\leadsto -1 \cdot \left(b \cdot \color{blue}{\left(c \cdot z\right)}\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      3. lower-*.f6450.0%

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

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

Alternative 9: 61.7% accurate, 1.1× speedup?

\[\begin{array}{l} t_1 := b \cdot \left(i \cdot t\right) + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)\\ \mathbf{if}\;i \leq -749999999999999992703876120785120969834346383151554625536:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;i \leq \frac{8612299728833109}{273406340597876490546562778389702670669146178861651554553221325801244124899921990402939147127881728}:\\ \;\;\;\;a \cdot \left(c \cdot j\right) + \mathsf{134\_z0z1z2z3z4}\left(x, z, y, t, a\right)\\ \mathbf{elif}\;i \leq 27000000000000000922834500647727241045210369510666415635740567789841827394974450876641813549004880291063176848469465534841235627977264177678370097423367893744448087470656798904802291653415713371904815015478794649600:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (let* ((t_1 (+ (* b (* i t)) (134-z0z1z2z3z4 j c a y i))))
  (if (<=
       i
       -749999999999999992703876120785120969834346383151554625536)
    t_1
    (if (<=
         i
         8612299728833109/273406340597876490546562778389702670669146178861651554553221325801244124899921990402939147127881728)
      (+ (* a (* c j)) (134-z0z1z2z3z4 x z y t a))
      (if (<=
           i
           27000000000000000922834500647727241045210369510666415635740567789841827394974450876641813549004880291063176848469465534841235627977264177678370097423367893744448087470656798904802291653415713371904815015478794649600)
        t_1
        (+ (* -1 (* b (* c z))) (* j (- (* c a) (* y i)))))))))
\begin{array}{l}
t_1 := b \cdot \left(i \cdot t\right) + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)\\
\mathbf{if}\;i \leq -749999999999999992703876120785120969834346383151554625536:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;i \leq \frac{8612299728833109}{273406340597876490546562778389702670669146178861651554553221325801244124899921990402939147127881728}:\\
\;\;\;\;a \cdot \left(c \cdot j\right) + \mathsf{134\_z0z1z2z3z4}\left(x, z, y, t, a\right)\\

\mathbf{elif}\;i \leq 27000000000000000922834500647727241045210369510666415635740567789841827394974450876641813549004880291063176848469465534841235627977264177678370097423367893744448087470656798904802291653415713371904815015478794649600:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -7.4999999999999999e56 or 3.1499999999999998e-83 < i < 2.7000000000000001e214

    1. Initial program 73.9%

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - \color{blue}{b} \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      5. lower-*.f6459.3%

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + j \cdot \left(c \cdot a - \color{blue}{y \cdot i}\right) \]
      5. lower-134-z0z1z2z3z462.7%

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)} \]
    6. Applied rewrites62.7%

      \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)} \]
    7. Taylor expanded in x around 0

      \[\leadsto b \cdot \color{blue}{\left(i \cdot t\right)} + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right) \]
    8. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \left(i \cdot \color{blue}{t}\right) + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right) \]
      2. lower-*.f6451.7%

        \[\leadsto b \cdot \left(i \cdot t\right) + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right) \]
    9. Applied rewrites51.7%

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

    if -7.4999999999999999e56 < i < 3.1499999999999998e-83

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
      7. lower-*.f6451.3%

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
    7. Applied rewrites51.3%

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

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(y \cdot z - a \cdot t\right) \cdot x\right)\right)\right)\right) \]
      4. distribute-rgt-neg-inN/A

        \[\leadsto a \cdot \left(c \cdot j\right) + \left(\mathsf{neg}\left(\left(y \cdot z - a \cdot t\right) \cdot \left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
      5. distribute-lft-neg-inN/A

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

        \[\leadsto a \cdot \left(c \cdot j\right) + \left(\mathsf{neg}\left(\left(y \cdot z - a \cdot t\right)\right)\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
      7. sub-negate-revN/A

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

        \[\leadsto a \cdot \left(c \cdot j\right) + \left(\mathsf{neg}\left(x\right)\right) \cdot \left(a \cdot t - \color{blue}{y \cdot z}\right) \]
      9. sub-negate-revN/A

        \[\leadsto a \cdot \left(c \cdot j\right) + \left(\mathsf{neg}\left(x\right)\right) \cdot \left(\mathsf{neg}\left(\left(y \cdot z - a \cdot t\right)\right)\right) \]
      10. lift--.f64N/A

        \[\leadsto a \cdot \left(c \cdot j\right) + \left(\mathsf{neg}\left(x\right)\right) \cdot \left(\mathsf{neg}\left(\left(y \cdot z - a \cdot t\right)\right)\right) \]
      11. distribute-rgt-neg-outN/A

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

        \[\leadsto a \cdot \left(c \cdot j\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \cdot \left(y \cdot z - \color{blue}{a \cdot t}\right) \]
      13. remove-double-negN/A

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
      16. *-commutativeN/A

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(z \cdot y - a \cdot t\right) \]
      17. lift-*.f64N/A

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(z \cdot y - a \cdot t\right) \]
      18. *-commutativeN/A

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(z \cdot y - t \cdot a\right) \]
      19. lower-134-z0z1z2z3z453.4%

        \[\leadsto a \cdot \left(c \cdot j\right) + \mathsf{134\_z0z1z2z3z4}\left(x, z, y, t, a\right) \]
    9. Applied rewrites53.4%

      \[\leadsto a \cdot \left(c \cdot j\right) + \mathsf{134\_z0z1z2z3z4}\left(x, z, y, t, a\right) \]

    if 2.7000000000000001e214 < i

    1. Initial program 73.9%

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

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

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

        \[\leadsto -1 \cdot \left(b \cdot \color{blue}{\left(c \cdot z\right)}\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      3. lower-*.f6450.0%

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

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

Alternative 10: 61.6% accurate, 1.2× speedup?

\[\begin{array}{l} t_1 := b \cdot \left(i \cdot t\right) + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)\\ \mathbf{if}\;i \leq -749999999999999992703876120785120969834346383151554625536:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;i \leq \frac{8612299728833109}{273406340597876490546562778389702670669146178861651554553221325801244124899921990402939147127881728}:\\ \;\;\;\;a \cdot \left(c \cdot j\right) + \mathsf{134\_z0z1z2z3z4}\left(x, z, y, t, a\right)\\ \mathbf{elif}\;i \leq 36000000000000001230446000863636321393613826014221887514320757053122436526632601168855751398673173721417569131292620713121647503969685570237826796564490524992597449960875731873069722204554284495873086687305059532800:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (let* ((t_1 (+ (* b (* i t)) (134-z0z1z2z3z4 j c a y i))))
  (if (<=
       i
       -749999999999999992703876120785120969834346383151554625536)
    t_1
    (if (<=
         i
         8612299728833109/273406340597876490546562778389702670669146178861651554553221325801244124899921990402939147127881728)
      (+ (* a (* c j)) (134-z0z1z2z3z4 x z y t a))
      (if (<=
           i
           36000000000000001230446000863636321393613826014221887514320757053122436526632601168855751398673173721417569131292620713121647503969685570237826796564490524992597449960875731873069722204554284495873086687305059532800)
        t_1
        (* j (- (* a c) (* i y))))))))
\begin{array}{l}
t_1 := b \cdot \left(i \cdot t\right) + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)\\
\mathbf{if}\;i \leq -749999999999999992703876120785120969834346383151554625536:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;i \leq \frac{8612299728833109}{273406340597876490546562778389702670669146178861651554553221325801244124899921990402939147127881728}:\\
\;\;\;\;a \cdot \left(c \cdot j\right) + \mathsf{134\_z0z1z2z3z4}\left(x, z, y, t, a\right)\\

\mathbf{elif}\;i \leq 36000000000000001230446000863636321393613826014221887514320757053122436526632601168855751398673173721417569131292620713121647503969685570237826796564490524992597449960875731873069722204554284495873086687305059532800:\\
\;\;\;\;t\_1\\

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -7.4999999999999999e56 or 3.1499999999999998e-83 < i < 3.6000000000000001e214

    1. Initial program 73.9%

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - \color{blue}{b} \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      5. lower-*.f6459.3%

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + j \cdot \left(c \cdot a - \color{blue}{y \cdot i}\right) \]
      5. lower-134-z0z1z2z3z462.7%

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)} \]
    6. Applied rewrites62.7%

      \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right)} \]
    7. Taylor expanded in x around 0

      \[\leadsto b \cdot \color{blue}{\left(i \cdot t\right)} + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right) \]
    8. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \left(i \cdot \color{blue}{t}\right) + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right) \]
      2. lower-*.f6451.7%

        \[\leadsto b \cdot \left(i \cdot t\right) + \mathsf{134\_z0z1z2z3z4}\left(j, c, a, y, i\right) \]
    9. Applied rewrites51.7%

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

    if -7.4999999999999999e56 < i < 3.1499999999999998e-83

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
      7. lower-*.f6451.3%

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
    7. Applied rewrites51.3%

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

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(y \cdot z - a \cdot t\right) \cdot x\right)\right)\right)\right) \]
      4. distribute-rgt-neg-inN/A

        \[\leadsto a \cdot \left(c \cdot j\right) + \left(\mathsf{neg}\left(\left(y \cdot z - a \cdot t\right) \cdot \left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
      5. distribute-lft-neg-inN/A

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

        \[\leadsto a \cdot \left(c \cdot j\right) + \left(\mathsf{neg}\left(\left(y \cdot z - a \cdot t\right)\right)\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
      7. sub-negate-revN/A

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

        \[\leadsto a \cdot \left(c \cdot j\right) + \left(\mathsf{neg}\left(x\right)\right) \cdot \left(a \cdot t - \color{blue}{y \cdot z}\right) \]
      9. sub-negate-revN/A

        \[\leadsto a \cdot \left(c \cdot j\right) + \left(\mathsf{neg}\left(x\right)\right) \cdot \left(\mathsf{neg}\left(\left(y \cdot z - a \cdot t\right)\right)\right) \]
      10. lift--.f64N/A

        \[\leadsto a \cdot \left(c \cdot j\right) + \left(\mathsf{neg}\left(x\right)\right) \cdot \left(\mathsf{neg}\left(\left(y \cdot z - a \cdot t\right)\right)\right) \]
      11. distribute-rgt-neg-outN/A

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

        \[\leadsto a \cdot \left(c \cdot j\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \cdot \left(y \cdot z - \color{blue}{a \cdot t}\right) \]
      13. remove-double-negN/A

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
      16. *-commutativeN/A

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(z \cdot y - a \cdot t\right) \]
      17. lift-*.f64N/A

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(z \cdot y - a \cdot t\right) \]
      18. *-commutativeN/A

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(z \cdot y - t \cdot a\right) \]
      19. lower-134-z0z1z2z3z453.4%

        \[\leadsto a \cdot \left(c \cdot j\right) + \mathsf{134\_z0z1z2z3z4}\left(x, z, y, t, a\right) \]
    9. Applied rewrites53.4%

      \[\leadsto a \cdot \left(c \cdot j\right) + \mathsf{134\_z0z1z2z3z4}\left(x, z, y, t, a\right) \]

    if 3.6000000000000001e214 < i

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
      7. lower-*.f6451.3%

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
    7. Applied rewrites51.3%

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

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

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

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

        \[\leadsto j \cdot \left(a \cdot c - i \cdot y\right) \]
      4. lower-*.f6439.6%

        \[\leadsto j \cdot \left(a \cdot c - i \cdot y\right) \]
    10. Applied rewrites39.6%

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

Alternative 11: 55.8% accurate, 1.2× speedup?

\[\begin{array}{l} \mathbf{if}\;c \leq \frac{-8021834716940879}{102844034832575377634685573909834406561420991602098741459288064}:\\ \;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{elif}\;c \leq 11500000000000001048576:\\ \;\;\;\;-1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + j \cdot \left(a \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(c, j, a, z, b\right)\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (if (<=
     c
     -8021834716940879/102844034832575377634685573909834406561420991602098741459288064)
  (+ (* -1 (* b (* c z))) (* j (- (* c a) (* y i))))
  (if (<= c 11500000000000001048576)
    (+ (* -1 (* t (- (* a x) (* b i)))) (* j (* a c)))
    (134-z0z1z2z3z4 c j a z b))))
\begin{array}{l}
\mathbf{if}\;c \leq \frac{-8021834716940879}{102844034832575377634685573909834406561420991602098741459288064}:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\

\mathbf{elif}\;c \leq 11500000000000001048576:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + j \cdot \left(a \cdot c\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(c, j, a, z, b\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -7.7999999999999996e-47

    1. Initial program 73.9%

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

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

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

        \[\leadsto -1 \cdot \left(b \cdot \color{blue}{\left(c \cdot z\right)}\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      3. lower-*.f6450.0%

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

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

    if -7.7999999999999996e-47 < c < 1.1500000000000001e22

    1. Initial program 73.9%

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - \color{blue}{b} \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      5. lower-*.f6459.3%

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

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

      \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + j \cdot \color{blue}{\left(a \cdot c\right)} \]
    6. Step-by-step derivation
      1. lower-*.f6449.4%

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + j \cdot \left(a \cdot \color{blue}{c}\right) \]
    7. Applied rewrites49.4%

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

    if 1.1500000000000001e22 < c

    1. Initial program 73.9%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6439.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.7%

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

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

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

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

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

        \[\leadsto c \cdot \left(a \cdot j + \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot b}\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto c \cdot \left(a \cdot j + \left(\mathsf{neg}\left(z \cdot b\right)\right)\right) \]
      7. distribute-rgt-neg-inN/A

        \[\leadsto c \cdot \left(a \cdot j + z \cdot \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}\right) \]
      8. fp-cancel-sign-sub-invN/A

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(b\right)\right)}\right) \]
      9. lift-*.f64N/A

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

        \[\leadsto c \cdot \left(j \cdot a - \color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot \left(\mathsf{neg}\left(b\right)\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto c \cdot \left(j \cdot a - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right) \cdot b\right)\right)\right) \]
      12. distribute-lft-neg-inN/A

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

        \[\leadsto c \cdot \left(j \cdot a - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot z\right)\right)\right)\right)\right) \]
      14. lift-*.f64N/A

        \[\leadsto c \cdot \left(j \cdot a - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot z\right)\right)\right)\right)\right) \]
      15. remove-double-negN/A

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

        \[\leadsto c \cdot \left(j \cdot a - b \cdot \color{blue}{z}\right) \]
      17. *-commutativeN/A

        \[\leadsto c \cdot \left(j \cdot a - z \cdot \color{blue}{b}\right) \]
      18. lower-134-z0z1z2z3z439.5%

        \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(c, \color{blue}{j}, a, z, b\right) \]
    6. Applied rewrites39.5%

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

Alternative 12: 53.8% accurate, 1.4× speedup?

\[\begin{array}{l} \mathbf{if}\;c \leq -3399999999999999831186108956068229205858928944848587501332570464514623530847100049246365002819165417460259049247034162670765820368522630572013466729871336663874751765025393289173714528632832:\\ \;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\ \mathbf{elif}\;c \leq \frac{-2639280756911205}{3105036184601417870297958976925005110513772034233393222278104076052101905372753772661756817657292955900975461394262146412343160088229628782888574550082362278408909952041699811100530571263196889650525998387432937501785693707632115712}:\\ \;\;\;\;b \cdot \left(i \cdot t\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{elif}\;c \leq 1720000000:\\ \;\;\;\;-1 \cdot \left(i \cdot \left(j \cdot y - b \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(c, j, a, z, b\right)\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (if (<=
     c
     -3399999999999999831186108956068229205858928944848587501332570464514623530847100049246365002819165417460259049247034162670765820368522630572013466729871336663874751765025393289173714528632832)
  (* c (- (* a j) (* b z)))
  (if (<=
       c
       -2639280756911205/3105036184601417870297958976925005110513772034233393222278104076052101905372753772661756817657292955900975461394262146412343160088229628782888574550082362278408909952041699811100530571263196889650525998387432937501785693707632115712)
    (+ (* b (* i t)) (* j (- (* c a) (* y i))))
    (if (<= c 1720000000)
      (* -1 (* i (- (* j y) (* b t))))
      (134-z0z1z2z3z4 c j a z b)))))
\begin{array}{l}
\mathbf{if}\;c \leq -3399999999999999831186108956068229205858928944848587501332570464514623530847100049246365002819165417460259049247034162670765820368522630572013466729871336663874751765025393289173714528632832:\\
\;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\

\mathbf{elif}\;c \leq \frac{-2639280756911205}{3105036184601417870297958976925005110513772034233393222278104076052101905372753772661756817657292955900975461394262146412343160088229628782888574550082362278408909952041699811100530571263196889650525998387432937501785693707632115712}:\\
\;\;\;\;b \cdot \left(i \cdot t\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\

\mathbf{elif}\;c \leq 1720000000:\\
\;\;\;\;-1 \cdot \left(i \cdot \left(j \cdot y - b \cdot t\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(c, j, a, z, b\right)\\


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -3.3999999999999998e189

    1. Initial program 73.9%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6439.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.7%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]

    if -3.3999999999999998e189 < c < -8.4999999999999994e-217

    1. Initial program 73.9%

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

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

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

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

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

    if -8.4999999999999994e-217 < c < 1.72e9

    1. Initial program 73.9%

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

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

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot y - \color{blue}{b} \cdot t\right)\right) \]
      5. lower-*.f6439.6%

        \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot y - b \cdot \color{blue}{t}\right)\right) \]
    4. Applied rewrites39.6%

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

    if 1.72e9 < c

    1. Initial program 73.9%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6439.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.7%

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

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

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

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

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

        \[\leadsto c \cdot \left(a \cdot j + \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot b}\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto c \cdot \left(a \cdot j + \left(\mathsf{neg}\left(z \cdot b\right)\right)\right) \]
      7. distribute-rgt-neg-inN/A

        \[\leadsto c \cdot \left(a \cdot j + z \cdot \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}\right) \]
      8. fp-cancel-sign-sub-invN/A

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(b\right)\right)}\right) \]
      9. lift-*.f64N/A

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

        \[\leadsto c \cdot \left(j \cdot a - \color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot \left(\mathsf{neg}\left(b\right)\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto c \cdot \left(j \cdot a - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right) \cdot b\right)\right)\right) \]
      12. distribute-lft-neg-inN/A

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

        \[\leadsto c \cdot \left(j \cdot a - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot z\right)\right)\right)\right)\right) \]
      14. lift-*.f64N/A

        \[\leadsto c \cdot \left(j \cdot a - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot z\right)\right)\right)\right)\right) \]
      15. remove-double-negN/A

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

        \[\leadsto c \cdot \left(j \cdot a - b \cdot \color{blue}{z}\right) \]
      17. *-commutativeN/A

        \[\leadsto c \cdot \left(j \cdot a - z \cdot \color{blue}{b}\right) \]
      18. lower-134-z0z1z2z3z439.5%

        \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(c, \color{blue}{j}, a, z, b\right) \]
    6. Applied rewrites39.5%

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

Alternative 13: 52.2% accurate, 1.7× speedup?

\[\begin{array}{l} \mathbf{if}\;c \leq -1220000000000000007013907797317579868768389929320174277104788231821610384184081590843392043250260152214957873851109129026390557322570104832:\\ \;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\ \mathbf{elif}\;c \leq 1720000000:\\ \;\;\;\;-1 \cdot \left(i \cdot \left(j \cdot y - b \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(c, j, a, z, b\right)\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (if (<=
     c
     -1220000000000000007013907797317579868768389929320174277104788231821610384184081590843392043250260152214957873851109129026390557322570104832)
  (* c (- (* a j) (* b z)))
  (if (<= c 1720000000)
    (* -1 (* i (- (* j y) (* b t))))
    (134-z0z1z2z3z4 c j a z b))))
\begin{array}{l}
\mathbf{if}\;c \leq -1220000000000000007013907797317579868768389929320174277104788231821610384184081590843392043250260152214957873851109129026390557322570104832:\\
\;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\

\mathbf{elif}\;c \leq 1720000000:\\
\;\;\;\;-1 \cdot \left(i \cdot \left(j \cdot y - b \cdot t\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(c, j, a, z, b\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -1.22e138

    1. Initial program 73.9%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6439.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.7%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]

    if -1.22e138 < c < 1.72e9

    1. Initial program 73.9%

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

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

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot y - \color{blue}{b} \cdot t\right)\right) \]
      5. lower-*.f6439.6%

        \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot y - b \cdot \color{blue}{t}\right)\right) \]
    4. Applied rewrites39.6%

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

    if 1.72e9 < c

    1. Initial program 73.9%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6439.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.7%

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

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

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

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

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

        \[\leadsto c \cdot \left(a \cdot j + \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot b}\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto c \cdot \left(a \cdot j + \left(\mathsf{neg}\left(z \cdot b\right)\right)\right) \]
      7. distribute-rgt-neg-inN/A

        \[\leadsto c \cdot \left(a \cdot j + z \cdot \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}\right) \]
      8. fp-cancel-sign-sub-invN/A

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(b\right)\right)}\right) \]
      9. lift-*.f64N/A

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

        \[\leadsto c \cdot \left(j \cdot a - \color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot \left(\mathsf{neg}\left(b\right)\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto c \cdot \left(j \cdot a - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right) \cdot b\right)\right)\right) \]
      12. distribute-lft-neg-inN/A

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

        \[\leadsto c \cdot \left(j \cdot a - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot z\right)\right)\right)\right)\right) \]
      14. lift-*.f64N/A

        \[\leadsto c \cdot \left(j \cdot a - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot z\right)\right)\right)\right)\right) \]
      15. remove-double-negN/A

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

        \[\leadsto c \cdot \left(j \cdot a - b \cdot \color{blue}{z}\right) \]
      17. *-commutativeN/A

        \[\leadsto c \cdot \left(j \cdot a - z \cdot \color{blue}{b}\right) \]
      18. lower-134-z0z1z2z3z439.5%

        \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(c, \color{blue}{j}, a, z, b\right) \]
    6. Applied rewrites39.5%

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

Alternative 14: 52.0% accurate, 1.6× speedup?

\[\begin{array}{l} \mathbf{if}\;c \leq -3399999999999999831186108956068229205858928944848587501332570464514623530847100049246365002819165417460259049247034162670765820368522630572013466729871336663874751765025393289173714528632832:\\ \;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\ \mathbf{elif}\;c \leq -2149999999999999937085440:\\ \;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\ \mathbf{elif}\;c \leq 1720000000:\\ \;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(y, z, x, j, i\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(c, j, a, z, b\right)\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (if (<=
     c
     -3399999999999999831186108956068229205858928944848587501332570464514623530847100049246365002819165417460259049247034162670765820368522630572013466729871336663874751765025393289173714528632832)
  (* c (- (* a j) (* b z)))
  (if (<= c -2149999999999999937085440)
    (* j (- (* a c) (* i y)))
    (if (<= c 1720000000)
      (134-z0z1z2z3z4 y z x j i)
      (134-z0z1z2z3z4 c j a z b)))))
\begin{array}{l}
\mathbf{if}\;c \leq -3399999999999999831186108956068229205858928944848587501332570464514623530847100049246365002819165417460259049247034162670765820368522630572013466729871336663874751765025393289173714528632832:\\
\;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\

\mathbf{elif}\;c \leq -2149999999999999937085440:\\
\;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\

\mathbf{elif}\;c \leq 1720000000:\\
\;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(y, z, x, j, i\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(c, j, a, z, b\right)\\


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -3.3999999999999998e189

    1. Initial program 73.9%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6439.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.7%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]

    if -3.3999999999999998e189 < c < -2.1499999999999999e24

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
      7. lower-*.f6451.3%

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
    7. Applied rewrites51.3%

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

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

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

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

        \[\leadsto j \cdot \left(a \cdot c - i \cdot y\right) \]
      4. lower-*.f6439.6%

        \[\leadsto j \cdot \left(a \cdot c - i \cdot y\right) \]
    10. Applied rewrites39.6%

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

    if -2.1499999999999999e24 < c < 1.72e9

    1. Initial program 73.9%

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

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

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

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

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

        \[\leadsto y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \]
      5. lower-*.f6439.6%

        \[\leadsto y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.6%

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

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

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

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

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

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

        \[\leadsto y \cdot \left(x \cdot z + \left(\mathsf{neg}\left(i \cdot j\right)\right)\right) \]
      7. distribute-rgt-neg-inN/A

        \[\leadsto y \cdot \left(x \cdot z + i \cdot \color{blue}{\left(\mathsf{neg}\left(j\right)\right)}\right) \]
      8. fp-cancel-sign-sub-invN/A

        \[\leadsto y \cdot \left(x \cdot z - \color{blue}{\left(\mathsf{neg}\left(i\right)\right) \cdot \left(\mathsf{neg}\left(j\right)\right)}\right) \]
      9. lift-*.f64N/A

        \[\leadsto y \cdot \left(x \cdot z - \color{blue}{\left(\mathsf{neg}\left(i\right)\right)} \cdot \left(\mathsf{neg}\left(j\right)\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto y \cdot \left(z \cdot x - \color{blue}{\left(\mathsf{neg}\left(i\right)\right)} \cdot \left(\mathsf{neg}\left(j\right)\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto y \cdot \left(z \cdot x - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right)\right)\right) \]
      12. distribute-lft-neg-inN/A

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

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

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

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

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

        \[\leadsto y \cdot \left(z \cdot x - \left(\mathsf{neg}\left(-1\right)\right) \cdot \color{blue}{\left(i \cdot j\right)}\right) \]
      18. metadata-evalN/A

        \[\leadsto y \cdot \left(z \cdot x - 1 \cdot \left(\color{blue}{i} \cdot j\right)\right) \]
      19. *-lft-identityN/A

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

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

        \[\leadsto y \cdot \left(z \cdot x - j \cdot \color{blue}{i}\right) \]
      22. lower-134-z0z1z2z3z439.0%

        \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(y, \color{blue}{z}, x, j, i\right) \]
    6. Applied rewrites39.0%

      \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(y, \color{blue}{z}, x, j, i\right) \]

    if 1.72e9 < c

    1. Initial program 73.9%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6439.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.7%

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

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

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

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

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

        \[\leadsto c \cdot \left(a \cdot j + \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot b}\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto c \cdot \left(a \cdot j + \left(\mathsf{neg}\left(z \cdot b\right)\right)\right) \]
      7. distribute-rgt-neg-inN/A

        \[\leadsto c \cdot \left(a \cdot j + z \cdot \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}\right) \]
      8. fp-cancel-sign-sub-invN/A

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(b\right)\right)}\right) \]
      9. lift-*.f64N/A

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

        \[\leadsto c \cdot \left(j \cdot a - \color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot \left(\mathsf{neg}\left(b\right)\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto c \cdot \left(j \cdot a - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right) \cdot b\right)\right)\right) \]
      12. distribute-lft-neg-inN/A

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

        \[\leadsto c \cdot \left(j \cdot a - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot z\right)\right)\right)\right)\right) \]
      14. lift-*.f64N/A

        \[\leadsto c \cdot \left(j \cdot a - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot z\right)\right)\right)\right)\right) \]
      15. remove-double-negN/A

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

        \[\leadsto c \cdot \left(j \cdot a - b \cdot \color{blue}{z}\right) \]
      17. *-commutativeN/A

        \[\leadsto c \cdot \left(j \cdot a - z \cdot \color{blue}{b}\right) \]
      18. lower-134-z0z1z2z3z439.5%

        \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(c, \color{blue}{j}, a, z, b\right) \]
    6. Applied rewrites39.5%

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

Alternative 15: 50.1% accurate, 1.6× speedup?

\[\begin{array}{l} \mathbf{if}\;c \leq -3399999999999999831186108956068229205858928944848587501332570464514623530847100049246365002819165417460259049247034162670765820368522630572013466729871336663874751765025393289173714528632832:\\ \;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\ \mathbf{elif}\;c \leq \frac{-4099067742394941}{17822033662586700072817076584766762987864173856439687228824970773044043621908896041038721919208482030385321521771853153557377752817872804680674458280164899172859354196719784961261227313463296}:\\ \;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\ \mathbf{elif}\;c \leq \frac{872305872233851}{20769187434139310514121985316880384}:\\ \;\;\;\;\left(z \cdot x - j \cdot i\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(c, j, a, z, b\right)\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (if (<=
     c
     -3399999999999999831186108956068229205858928944848587501332570464514623530847100049246365002819165417460259049247034162670765820368522630572013466729871336663874751765025393289173714528632832)
  (* c (- (* a j) (* b z)))
  (if (<=
       c
       -4099067742394941/17822033662586700072817076584766762987864173856439687228824970773044043621908896041038721919208482030385321521771853153557377752817872804680674458280164899172859354196719784961261227313463296)
    (* j (- (* a c) (* i y)))
    (if (<= c 872305872233851/20769187434139310514121985316880384)
      (* (- (* z x) (* j i)) y)
      (134-z0z1z2z3z4 c j a z b)))))
\begin{array}{l}
\mathbf{if}\;c \leq -3399999999999999831186108956068229205858928944848587501332570464514623530847100049246365002819165417460259049247034162670765820368522630572013466729871336663874751765025393289173714528632832:\\
\;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\

\mathbf{elif}\;c \leq \frac{-4099067742394941}{17822033662586700072817076584766762987864173856439687228824970773044043621908896041038721919208482030385321521771853153557377752817872804680674458280164899172859354196719784961261227313463296}:\\
\;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\

\mathbf{elif}\;c \leq \frac{872305872233851}{20769187434139310514121985316880384}:\\
\;\;\;\;\left(z \cdot x - j \cdot i\right) \cdot y\\

\mathbf{else}:\\
\;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(c, j, a, z, b\right)\\


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -3.3999999999999998e189

    1. Initial program 73.9%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6439.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.7%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]

    if -3.3999999999999998e189 < c < -2.3e-175

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
      7. lower-*.f6451.3%

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
    7. Applied rewrites51.3%

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

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

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

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

        \[\leadsto j \cdot \left(a \cdot c - i \cdot y\right) \]
      4. lower-*.f6439.6%

        \[\leadsto j \cdot \left(a \cdot c - i \cdot y\right) \]
    10. Applied rewrites39.6%

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

    if -2.3e-175 < c < 4.1999999999999998e-20

    1. Initial program 73.9%

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

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

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

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

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

        \[\leadsto y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \]
      5. lower-*.f6439.6%

        \[\leadsto y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.6%

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

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. lower-*.f6439.6%

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

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

        \[\leadsto \left(x \cdot z + -1 \cdot \left(i \cdot j\right)\right) \cdot y \]
      6. add-flipN/A

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

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

        \[\leadsto \left(x \cdot z - \left(\mathsf{neg}\left(-1 \cdot \left(i \cdot j\right)\right)\right)\right) \cdot y \]
      9. *-commutativeN/A

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

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

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

        \[\leadsto \left(z \cdot x - \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(i \cdot j\right)\right) \cdot y \]
      13. metadata-evalN/A

        \[\leadsto \left(z \cdot x - 1 \cdot \left(i \cdot j\right)\right) \cdot y \]
      14. *-lft-identity39.6%

        \[\leadsto \left(z \cdot x - i \cdot j\right) \cdot y \]
      15. lift-*.f64N/A

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

        \[\leadsto \left(z \cdot x - j \cdot i\right) \cdot y \]
      17. lower-*.f6439.6%

        \[\leadsto \left(z \cdot x - j \cdot i\right) \cdot y \]
    6. Applied rewrites39.6%

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

    if 4.1999999999999998e-20 < c

    1. Initial program 73.9%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6439.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.7%

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

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

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

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

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

        \[\leadsto c \cdot \left(a \cdot j + \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot b}\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto c \cdot \left(a \cdot j + \left(\mathsf{neg}\left(z \cdot b\right)\right)\right) \]
      7. distribute-rgt-neg-inN/A

        \[\leadsto c \cdot \left(a \cdot j + z \cdot \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}\right) \]
      8. fp-cancel-sign-sub-invN/A

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(b\right)\right)}\right) \]
      9. lift-*.f64N/A

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

        \[\leadsto c \cdot \left(j \cdot a - \color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot \left(\mathsf{neg}\left(b\right)\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto c \cdot \left(j \cdot a - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right) \cdot b\right)\right)\right) \]
      12. distribute-lft-neg-inN/A

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

        \[\leadsto c \cdot \left(j \cdot a - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot z\right)\right)\right)\right)\right) \]
      14. lift-*.f64N/A

        \[\leadsto c \cdot \left(j \cdot a - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot z\right)\right)\right)\right)\right) \]
      15. remove-double-negN/A

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

        \[\leadsto c \cdot \left(j \cdot a - b \cdot \color{blue}{z}\right) \]
      17. *-commutativeN/A

        \[\leadsto c \cdot \left(j \cdot a - z \cdot \color{blue}{b}\right) \]
      18. lower-134-z0z1z2z3z439.5%

        \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(c, \color{blue}{j}, a, z, b\right) \]
    6. Applied rewrites39.5%

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

Alternative 16: 49.8% accurate, 1.6× speedup?

\[\begin{array}{l} t_1 := c \cdot \left(a \cdot j - b \cdot z\right)\\ \mathbf{if}\;c \leq -3399999999999999831186108956068229205858928944848587501332570464514623530847100049246365002819165417460259049247034162670765820368522630572013466729871336663874751765025393289173714528632832:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq \frac{-4099067742394941}{17822033662586700072817076584766762987864173856439687228824970773044043621908896041038721919208482030385321521771853153557377752817872804680674458280164899172859354196719784961261227313463296}:\\ \;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\ \mathbf{elif}\;c \leq \frac{872305872233851}{20769187434139310514121985316880384}:\\ \;\;\;\;\left(z \cdot x - j \cdot i\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (let* ((t_1 (* c (- (* a j) (* b z)))))
  (if (<=
       c
       -3399999999999999831186108956068229205858928944848587501332570464514623530847100049246365002819165417460259049247034162670765820368522630572013466729871336663874751765025393289173714528632832)
    t_1
    (if (<=
         c
         -4099067742394941/17822033662586700072817076584766762987864173856439687228824970773044043621908896041038721919208482030385321521771853153557377752817872804680674458280164899172859354196719784961261227313463296)
      (* j (- (* a c) (* i y)))
      (if (<= c 872305872233851/20769187434139310514121985316880384)
        (* (- (* z x) (* j i)) y)
        t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = c * ((a * j) - (b * z));
	double tmp;
	if (c <= -3.4e+189) {
		tmp = t_1;
	} else if (c <= -2.3e-175) {
		tmp = j * ((a * c) - (i * y));
	} else if (c <= 4.2e-20) {
		tmp = ((z * x) - (j * i)) * y;
	} 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 = c * ((a * j) - (b * z))
    if (c <= (-3.4d+189)) then
        tmp = t_1
    else if (c <= (-2.3d-175)) then
        tmp = j * ((a * c) - (i * y))
    else if (c <= 4.2d-20) then
        tmp = ((z * x) - (j * i)) * y
    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 = c * ((a * j) - (b * z));
	double tmp;
	if (c <= -3.4e+189) {
		tmp = t_1;
	} else if (c <= -2.3e-175) {
		tmp = j * ((a * c) - (i * y));
	} else if (c <= 4.2e-20) {
		tmp = ((z * x) - (j * i)) * y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = c * ((a * j) - (b * z))
	tmp = 0
	if c <= -3.4e+189:
		tmp = t_1
	elif c <= -2.3e-175:
		tmp = j * ((a * c) - (i * y))
	elif c <= 4.2e-20:
		tmp = ((z * x) - (j * i)) * y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(c * Float64(Float64(a * j) - Float64(b * z)))
	tmp = 0.0
	if (c <= -3.4e+189)
		tmp = t_1;
	elseif (c <= -2.3e-175)
		tmp = Float64(j * Float64(Float64(a * c) - Float64(i * y)));
	elseif (c <= 4.2e-20)
		tmp = Float64(Float64(Float64(z * x) - Float64(j * i)) * y);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = c * ((a * j) - (b * z));
	tmp = 0.0;
	if (c <= -3.4e+189)
		tmp = t_1;
	elseif (c <= -2.3e-175)
		tmp = j * ((a * c) - (i * y));
	elseif (c <= 4.2e-20)
		tmp = ((z * x) - (j * i)) * y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3399999999999999831186108956068229205858928944848587501332570464514623530847100049246365002819165417460259049247034162670765820368522630572013466729871336663874751765025393289173714528632832], t$95$1, If[LessEqual[c, -4099067742394941/17822033662586700072817076584766762987864173856439687228824970773044043621908896041038721919208482030385321521771853153557377752817872804680674458280164899172859354196719784961261227313463296], N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 872305872233851/20769187434139310514121985316880384], N[(N[(N[(z * x), $MachinePrecision] - N[(j * i), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := c \cdot \left(a \cdot j - b \cdot z\right)\\
\mathbf{if}\;c \leq -3399999999999999831186108956068229205858928944848587501332570464514623530847100049246365002819165417460259049247034162670765820368522630572013466729871336663874751765025393289173714528632832:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq \frac{-4099067742394941}{17822033662586700072817076584766762987864173856439687228824970773044043621908896041038721919208482030385321521771853153557377752817872804680674458280164899172859354196719784961261227313463296}:\\
\;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\

\mathbf{elif}\;c \leq \frac{872305872233851}{20769187434139310514121985316880384}:\\
\;\;\;\;\left(z \cdot x - j \cdot i\right) \cdot y\\

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -3.3999999999999998e189 or 4.1999999999999998e-20 < c

    1. Initial program 73.9%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6439.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.7%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]

    if -3.3999999999999998e189 < c < -2.3e-175

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
      7. lower-*.f6451.3%

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
    7. Applied rewrites51.3%

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

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

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

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

        \[\leadsto j \cdot \left(a \cdot c - i \cdot y\right) \]
      4. lower-*.f6439.6%

        \[\leadsto j \cdot \left(a \cdot c - i \cdot y\right) \]
    10. Applied rewrites39.6%

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

    if -2.3e-175 < c < 4.1999999999999998e-20

    1. Initial program 73.9%

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

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

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

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

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

        \[\leadsto y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \]
      5. lower-*.f6439.6%

        \[\leadsto y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.6%

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

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

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. lower-*.f6439.6%

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

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

        \[\leadsto \left(x \cdot z + -1 \cdot \left(i \cdot j\right)\right) \cdot y \]
      6. add-flipN/A

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

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

        \[\leadsto \left(x \cdot z - \left(\mathsf{neg}\left(-1 \cdot \left(i \cdot j\right)\right)\right)\right) \cdot y \]
      9. *-commutativeN/A

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

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

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

        \[\leadsto \left(z \cdot x - \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(i \cdot j\right)\right) \cdot y \]
      13. metadata-evalN/A

        \[\leadsto \left(z \cdot x - 1 \cdot \left(i \cdot j\right)\right) \cdot y \]
      14. *-lft-identity39.6%

        \[\leadsto \left(z \cdot x - i \cdot j\right) \cdot y \]
      15. lift-*.f64N/A

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

        \[\leadsto \left(z \cdot x - j \cdot i\right) \cdot y \]
      17. lower-*.f6439.6%

        \[\leadsto \left(z \cdot x - j \cdot i\right) \cdot y \]
    6. Applied rewrites39.6%

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

Alternative 17: 45.2% accurate, 2.0× speedup?

\[\begin{array}{l} t_1 := c \cdot \left(a \cdot j - b \cdot z\right)\\ \mathbf{if}\;c \leq -3399999999999999831186108956068229205858928944848587501332570464514623530847100049246365002819165417460259049247034162670765820368522630572013466729871336663874751765025393289173714528632832:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq 1720000000:\\ \;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (let* ((t_1 (* c (- (* a j) (* b z)))))
  (if (<=
       c
       -3399999999999999831186108956068229205858928944848587501332570464514623530847100049246365002819165417460259049247034162670765820368522630572013466729871336663874751765025393289173714528632832)
    t_1
    (if (<= c 1720000000) (* j (- (* a c) (* i y))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = c * ((a * j) - (b * z));
	double tmp;
	if (c <= -3.4e+189) {
		tmp = t_1;
	} else if (c <= 1720000000.0) {
		tmp = j * ((a * c) - (i * y));
	} 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 = c * ((a * j) - (b * z))
    if (c <= (-3.4d+189)) then
        tmp = t_1
    else if (c <= 1720000000.0d0) then
        tmp = j * ((a * c) - (i * y))
    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 = c * ((a * j) - (b * z));
	double tmp;
	if (c <= -3.4e+189) {
		tmp = t_1;
	} else if (c <= 1720000000.0) {
		tmp = j * ((a * c) - (i * y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = c * ((a * j) - (b * z))
	tmp = 0
	if c <= -3.4e+189:
		tmp = t_1
	elif c <= 1720000000.0:
		tmp = j * ((a * c) - (i * y))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(c * Float64(Float64(a * j) - Float64(b * z)))
	tmp = 0.0
	if (c <= -3.4e+189)
		tmp = t_1;
	elseif (c <= 1720000000.0)
		tmp = Float64(j * Float64(Float64(a * c) - Float64(i * y)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = c * ((a * j) - (b * z));
	tmp = 0.0;
	if (c <= -3.4e+189)
		tmp = t_1;
	elseif (c <= 1720000000.0)
		tmp = j * ((a * c) - (i * y));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3399999999999999831186108956068229205858928944848587501332570464514623530847100049246365002819165417460259049247034162670765820368522630572013466729871336663874751765025393289173714528632832], t$95$1, If[LessEqual[c, 1720000000], N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := c \cdot \left(a \cdot j - b \cdot z\right)\\
\mathbf{if}\;c \leq -3399999999999999831186108956068229205858928944848587501332570464514623530847100049246365002819165417460259049247034162670765820368522630572013466729871336663874751765025393289173714528632832:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq 1720000000:\\
\;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -3.3999999999999998e189 or 1.72e9 < c

    1. Initial program 73.9%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6439.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.7%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]

    if -3.3999999999999998e189 < c < 1.72e9

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
      7. lower-*.f6451.3%

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
    7. Applied rewrites51.3%

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

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

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

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

        \[\leadsto j \cdot \left(a \cdot c - i \cdot y\right) \]
      4. lower-*.f6439.6%

        \[\leadsto j \cdot \left(a \cdot c - i \cdot y\right) \]
    10. Applied rewrites39.6%

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

Alternative 18: 40.8% accurate, 2.4× speedup?

\[\begin{array}{l} \mathbf{if}\;z \leq 16000000000000001252664646473539901476885764798177869824:\\ \;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-z\right) \cdot b\right) \cdot c\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (if (<= z 16000000000000001252664646473539901476885764798177869824)
  (* j (- (* a c) (* i y)))
  (* (* (- z) b) c)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (z <= 1.6e+55) {
		tmp = j * ((a * c) - (i * y));
	} else {
		tmp = (-z * b) * c;
	}
	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 (z <= 1.6d+55) then
        tmp = j * ((a * c) - (i * y))
    else
        tmp = (-z * b) * c
    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 (z <= 1.6e+55) {
		tmp = j * ((a * c) - (i * y));
	} else {
		tmp = (-z * b) * c;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if z <= 1.6e+55:
		tmp = j * ((a * c) - (i * y))
	else:
		tmp = (-z * b) * c
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (z <= 1.6e+55)
		tmp = Float64(j * Float64(Float64(a * c) - Float64(i * y)));
	else
		tmp = Float64(Float64(Float64(-z) * b) * c);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (z <= 1.6e+55)
		tmp = j * ((a * c) - (i * y));
	else
		tmp = (-z * b) * c;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, 16000000000000001252664646473539901476885764798177869824], N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-z) * b), $MachinePrecision] * c), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;z \leq 16000000000000001252664646473539901476885764798177869824:\\
\;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(-z\right) \cdot b\right) \cdot c\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 1.6000000000000001e55

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
      7. lower-*.f6451.3%

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
    7. Applied rewrites51.3%

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

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

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

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

        \[\leadsto j \cdot \left(a \cdot c - i \cdot y\right) \]
      4. lower-*.f6439.6%

        \[\leadsto j \cdot \left(a \cdot c - i \cdot y\right) \]
    10. Applied rewrites39.6%

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

    if 1.6000000000000001e55 < z

    1. Initial program 73.9%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6439.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.7%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    5. Taylor expanded in z around inf

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

        \[\leadsto c \cdot \left(-1 \cdot \left(b \cdot \color{blue}{z}\right)\right) \]
      2. lower-*.f6422.6%

        \[\leadsto c \cdot \left(-1 \cdot \left(b \cdot z\right)\right) \]
    7. Applied rewrites22.6%

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

        \[\leadsto c \cdot \color{blue}{\left(-1 \cdot \left(b \cdot z\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(b \cdot z\right)\right) \cdot \color{blue}{c} \]
      3. lower-*.f6422.6%

        \[\leadsto \left(-1 \cdot \left(b \cdot z\right)\right) \cdot \color{blue}{c} \]
      4. lift-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(b \cdot z\right)\right) \cdot c \]
      5. mul-1-negN/A

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

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

        \[\leadsto \left(\mathsf{neg}\left(z \cdot b\right)\right) \cdot c \]
      8. distribute-lft-neg-outN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(z\right)\right) \cdot b\right) \cdot c \]
      10. lower-neg.f6422.6%

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

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

Alternative 19: 30.4% accurate, 2.2× speedup?

\[\begin{array}{l} \mathbf{if}\;c \leq -519999999999999984024814054874131613477481132868446090246168833440487479354929993962591122310850963336193220502083424121336613878622060544:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{elif}\;c \leq 1720000000:\\ \;\;\;\;-1 \cdot \left(i \cdot \left(j \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-z\right) \cdot b\right) \cdot c\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (if (<=
     c
     -519999999999999984024814054874131613477481132868446090246168833440487479354929993962591122310850963336193220502083424121336613878622060544)
  (* c (* a j))
  (if (<= c 1720000000) (* -1 (* i (* j y))) (* (* (- z) b) c))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (c <= -5.2e+137) {
		tmp = c * (a * j);
	} else if (c <= 1720000000.0) {
		tmp = -1.0 * (i * (j * y));
	} else {
		tmp = (-z * b) * c;
	}
	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 (c <= (-5.2d+137)) then
        tmp = c * (a * j)
    else if (c <= 1720000000.0d0) then
        tmp = (-1.0d0) * (i * (j * y))
    else
        tmp = (-z * b) * c
    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 (c <= -5.2e+137) {
		tmp = c * (a * j);
	} else if (c <= 1720000000.0) {
		tmp = -1.0 * (i * (j * y));
	} else {
		tmp = (-z * b) * c;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if c <= -5.2e+137:
		tmp = c * (a * j)
	elif c <= 1720000000.0:
		tmp = -1.0 * (i * (j * y))
	else:
		tmp = (-z * b) * c
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (c <= -5.2e+137)
		tmp = Float64(c * Float64(a * j));
	elseif (c <= 1720000000.0)
		tmp = Float64(-1.0 * Float64(i * Float64(j * y)));
	else
		tmp = Float64(Float64(Float64(-z) * b) * c);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (c <= -5.2e+137)
		tmp = c * (a * j);
	elseif (c <= 1720000000.0)
		tmp = -1.0 * (i * (j * y));
	else
		tmp = (-z * b) * c;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[c, -519999999999999984024814054874131613477481132868446090246168833440487479354929993962591122310850963336193220502083424121336613878622060544], N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1720000000], N[(-1 * N[(i * N[(j * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-z) * b), $MachinePrecision] * c), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;c \leq -519999999999999984024814054874131613477481132868446090246168833440487479354929993962591122310850963336193220502083424121336613878622060544:\\
\;\;\;\;c \cdot \left(a \cdot j\right)\\

\mathbf{elif}\;c \leq 1720000000:\\
\;\;\;\;-1 \cdot \left(i \cdot \left(j \cdot y\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(-z\right) \cdot b\right) \cdot c\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -5.1999999999999998e137

    1. Initial program 73.9%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6439.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.7%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    5. Taylor expanded in z around 0

      \[\leadsto c \cdot \left(a \cdot \color{blue}{j}\right) \]
    6. Step-by-step derivation
      1. lower-*.f6423.0%

        \[\leadsto c \cdot \left(a \cdot j\right) \]
    7. Applied rewrites23.0%

      \[\leadsto c \cdot \left(a \cdot \color{blue}{j}\right) \]

    if -5.1999999999999998e137 < c < 1.72e9

    1. Initial program 73.9%

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

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

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

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

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

        \[\leadsto y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \]
      5. lower-*.f6439.6%

        \[\leadsto y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.6%

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    5. Taylor expanded in x around inf

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

        \[\leadsto x \cdot \left(y \cdot \color{blue}{z}\right) \]
      2. lower-*.f6422.9%

        \[\leadsto x \cdot \left(y \cdot z\right) \]
    7. Applied rewrites22.9%

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
    8. Taylor expanded in x around 0

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \color{blue}{y}\right)\right) \]
      3. lower-*.f6422.2%

        \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot y\right)\right) \]
    10. Applied rewrites22.2%

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

    if 1.72e9 < c

    1. Initial program 73.9%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6439.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.7%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    5. Taylor expanded in z around inf

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

        \[\leadsto c \cdot \left(-1 \cdot \left(b \cdot \color{blue}{z}\right)\right) \]
      2. lower-*.f6422.6%

        \[\leadsto c \cdot \left(-1 \cdot \left(b \cdot z\right)\right) \]
    7. Applied rewrites22.6%

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

        \[\leadsto c \cdot \color{blue}{\left(-1 \cdot \left(b \cdot z\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(b \cdot z\right)\right) \cdot \color{blue}{c} \]
      3. lower-*.f6422.6%

        \[\leadsto \left(-1 \cdot \left(b \cdot z\right)\right) \cdot \color{blue}{c} \]
      4. lift-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(b \cdot z\right)\right) \cdot c \]
      5. mul-1-negN/A

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

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

        \[\leadsto \left(\mathsf{neg}\left(z \cdot b\right)\right) \cdot c \]
      8. distribute-lft-neg-outN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(z\right)\right) \cdot b\right) \cdot c \]
      10. lower-neg.f6422.6%

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

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

Alternative 20: 30.0% accurate, 2.4× speedup?

\[\begin{array}{l} \mathbf{if}\;j \leq \frac{-5499829120098731}{53919893334301279589334030174039261347274288845081144962207220498432}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{elif}\;j \leq 38000000000000001390623291328167936:\\ \;\;\;\;\left(\left(-z\right) \cdot b\right) \cdot c\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (if (<=
     j
     -5499829120098731/53919893334301279589334030174039261347274288845081144962207220498432)
  (* c (* a j))
  (if (<= j 38000000000000001390623291328167936)
    (* (* (- z) b) c)
    (* a (* c j)))))
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.02e-52) {
		tmp = c * (a * j);
	} else if (j <= 3.8e+34) {
		tmp = (-z * b) * c;
	} else {
		tmp = a * (c * 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 (j <= (-1.02d-52)) then
        tmp = c * (a * j)
    else if (j <= 3.8d+34) then
        tmp = (-z * b) * c
    else
        tmp = a * (c * 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 (j <= -1.02e-52) {
		tmp = c * (a * j);
	} else if (j <= 3.8e+34) {
		tmp = (-z * b) * c;
	} else {
		tmp = a * (c * j);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if j <= -1.02e-52:
		tmp = c * (a * j)
	elif j <= 3.8e+34:
		tmp = (-z * b) * c
	else:
		tmp = a * (c * j)
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (j <= -1.02e-52)
		tmp = Float64(c * Float64(a * j));
	elseif (j <= 3.8e+34)
		tmp = Float64(Float64(Float64(-z) * b) * c);
	else
		tmp = Float64(a * Float64(c * j));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (j <= -1.02e-52)
		tmp = c * (a * j);
	elseif (j <= 3.8e+34)
		tmp = (-z * b) * c;
	else
		tmp = a * (c * j);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -5499829120098731/53919893334301279589334030174039261347274288845081144962207220498432], N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 38000000000000001390623291328167936], N[(N[((-z) * b), $MachinePrecision] * c), $MachinePrecision], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;j \leq \frac{-5499829120098731}{53919893334301279589334030174039261347274288845081144962207220498432}:\\
\;\;\;\;c \cdot \left(a \cdot j\right)\\

\mathbf{elif}\;j \leq 38000000000000001390623291328167936:\\
\;\;\;\;\left(\left(-z\right) \cdot b\right) \cdot c\\

\mathbf{else}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -1.0200000000000001e-52

    1. Initial program 73.9%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6439.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.7%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    5. Taylor expanded in z around 0

      \[\leadsto c \cdot \left(a \cdot \color{blue}{j}\right) \]
    6. Step-by-step derivation
      1. lower-*.f6423.0%

        \[\leadsto c \cdot \left(a \cdot j\right) \]
    7. Applied rewrites23.0%

      \[\leadsto c \cdot \left(a \cdot \color{blue}{j}\right) \]

    if -1.0200000000000001e-52 < j < 3.8000000000000001e34

    1. Initial program 73.9%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6439.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.7%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    5. Taylor expanded in z around inf

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

        \[\leadsto c \cdot \left(-1 \cdot \left(b \cdot \color{blue}{z}\right)\right) \]
      2. lower-*.f6422.6%

        \[\leadsto c \cdot \left(-1 \cdot \left(b \cdot z\right)\right) \]
    7. Applied rewrites22.6%

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

        \[\leadsto c \cdot \color{blue}{\left(-1 \cdot \left(b \cdot z\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(b \cdot z\right)\right) \cdot \color{blue}{c} \]
      3. lower-*.f6422.6%

        \[\leadsto \left(-1 \cdot \left(b \cdot z\right)\right) \cdot \color{blue}{c} \]
      4. lift-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(b \cdot z\right)\right) \cdot c \]
      5. mul-1-negN/A

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

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

        \[\leadsto \left(\mathsf{neg}\left(z \cdot b\right)\right) \cdot c \]
      8. distribute-lft-neg-outN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(z\right)\right) \cdot b\right) \cdot c \]
      10. lower-neg.f6422.6%

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

      \[\leadsto \left(\left(-z\right) \cdot b\right) \cdot \color{blue}{c} \]

    if 3.8000000000000001e34 < j

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
      7. lower-*.f6451.3%

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
    7. Applied rewrites51.3%

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) \]
      2. lower-*.f6423.0%

        \[\leadsto a \cdot \left(c \cdot j\right) \]
    10. Applied rewrites23.0%

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

Alternative 21: 28.9% accurate, 2.4× speedup?

\[\begin{array}{l} \mathbf{if}\;j \leq \frac{-5499829120098731}{53919893334301279589334030174039261347274288845081144962207220498432}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{elif}\;j \leq 38000000000000001390623291328167936:\\ \;\;\;\;\left(\left(-c\right) \cdot b\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (if (<=
     j
     -5499829120098731/53919893334301279589334030174039261347274288845081144962207220498432)
  (* c (* a j))
  (if (<= j 38000000000000001390623291328167936)
    (* (* (- c) b) z)
    (* a (* c j)))))
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.02e-52) {
		tmp = c * (a * j);
	} else if (j <= 3.8e+34) {
		tmp = (-c * b) * z;
	} else {
		tmp = a * (c * 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 (j <= (-1.02d-52)) then
        tmp = c * (a * j)
    else if (j <= 3.8d+34) then
        tmp = (-c * b) * z
    else
        tmp = a * (c * 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 (j <= -1.02e-52) {
		tmp = c * (a * j);
	} else if (j <= 3.8e+34) {
		tmp = (-c * b) * z;
	} else {
		tmp = a * (c * j);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if j <= -1.02e-52:
		tmp = c * (a * j)
	elif j <= 3.8e+34:
		tmp = (-c * b) * z
	else:
		tmp = a * (c * j)
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (j <= -1.02e-52)
		tmp = Float64(c * Float64(a * j));
	elseif (j <= 3.8e+34)
		tmp = Float64(Float64(Float64(-c) * b) * z);
	else
		tmp = Float64(a * Float64(c * j));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (j <= -1.02e-52)
		tmp = c * (a * j);
	elseif (j <= 3.8e+34)
		tmp = (-c * b) * z;
	else
		tmp = a * (c * j);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -5499829120098731/53919893334301279589334030174039261347274288845081144962207220498432], N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 38000000000000001390623291328167936], N[(N[((-c) * b), $MachinePrecision] * z), $MachinePrecision], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;j \leq \frac{-5499829120098731}{53919893334301279589334030174039261347274288845081144962207220498432}:\\
\;\;\;\;c \cdot \left(a \cdot j\right)\\

\mathbf{elif}\;j \leq 38000000000000001390623291328167936:\\
\;\;\;\;\left(\left(-c\right) \cdot b\right) \cdot z\\

\mathbf{else}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -1.0200000000000001e-52

    1. Initial program 73.9%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6439.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.7%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    5. Taylor expanded in z around 0

      \[\leadsto c \cdot \left(a \cdot \color{blue}{j}\right) \]
    6. Step-by-step derivation
      1. lower-*.f6423.0%

        \[\leadsto c \cdot \left(a \cdot j\right) \]
    7. Applied rewrites23.0%

      \[\leadsto c \cdot \left(a \cdot \color{blue}{j}\right) \]

    if -1.0200000000000001e-52 < j < 3.8000000000000001e34

    1. Initial program 73.9%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6439.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.7%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    5. Taylor expanded in z around inf

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

        \[\leadsto c \cdot \left(-1 \cdot \left(b \cdot \color{blue}{z}\right)\right) \]
      2. lower-*.f6422.6%

        \[\leadsto c \cdot \left(-1 \cdot \left(b \cdot z\right)\right) \]
    7. Applied rewrites22.6%

      \[\leadsto c \cdot \left(-1 \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
    8. Taylor expanded in z around inf

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

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

        \[\leadsto -1 \cdot \left(b \cdot \left(c \cdot \color{blue}{z}\right)\right) \]
      3. lower-*.f6422.9%

        \[\leadsto -1 \cdot \left(b \cdot \left(c \cdot z\right)\right) \]
    10. Applied rewrites22.9%

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

        \[\leadsto -1 \cdot \left(b \cdot \color{blue}{\left(c \cdot z\right)}\right) \]
      2. mul-1-negN/A

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

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

        \[\leadsto \mathsf{neg}\left(b \cdot \left(c \cdot z\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{neg}\left(\left(b \cdot c\right) \cdot z\right) \]
      6. distribute-lft-neg-inN/A

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

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

        \[\leadsto \left(\mathsf{neg}\left(c \cdot b\right)\right) \cdot z \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(c\right)\right) \cdot b\right) \cdot z \]
      11. lower-neg.f6422.3%

        \[\leadsto \left(\left(-c\right) \cdot b\right) \cdot z \]
    12. Applied rewrites22.3%

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

    if 3.8000000000000001e34 < j

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
      7. lower-*.f6451.3%

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
    7. Applied rewrites51.3%

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) \]
      2. lower-*.f6423.0%

        \[\leadsto a \cdot \left(c \cdot j\right) \]
    10. Applied rewrites23.0%

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

Alternative 22: 27.6% accurate, 3.6× speedup?

\[\begin{array}{l} \mathbf{if}\;y \leq 6400000000000000277614700637562790869057877279692411595467352251751147602493959110024472035328:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (if (<=
     y
     6400000000000000277614700637562790869057877279692411595467352251751147602493959110024472035328)
  (* c (* a j))
  (* (* y x) z)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (y <= 6.4e+93) {
		tmp = c * (a * j);
	} else {
		tmp = (y * x) * z;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if (y <= 6.4d+93) then
        tmp = c * (a * j)
    else
        tmp = (y * x) * z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (y <= 6.4e+93) {
		tmp = c * (a * j);
	} else {
		tmp = (y * x) * z;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if y <= 6.4e+93:
		tmp = c * (a * j)
	else:
		tmp = (y * x) * z
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (y <= 6.4e+93)
		tmp = Float64(c * Float64(a * j));
	else
		tmp = Float64(Float64(y * x) * z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (y <= 6.4e+93)
		tmp = c * (a * j);
	else
		tmp = (y * x) * z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, 6400000000000000277614700637562790869057877279692411595467352251751147602493959110024472035328], N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;y \leq 6400000000000000277614700637562790869057877279692411595467352251751147602493959110024472035328:\\
\;\;\;\;c \cdot \left(a \cdot j\right)\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 6.4000000000000003e93

    1. Initial program 73.9%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6439.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.7%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    5. Taylor expanded in z around 0

      \[\leadsto c \cdot \left(a \cdot \color{blue}{j}\right) \]
    6. Step-by-step derivation
      1. lower-*.f6423.0%

        \[\leadsto c \cdot \left(a \cdot j\right) \]
    7. Applied rewrites23.0%

      \[\leadsto c \cdot \left(a \cdot \color{blue}{j}\right) \]

    if 6.4000000000000003e93 < y

    1. Initial program 73.9%

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

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

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

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

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

        \[\leadsto y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \]
      5. lower-*.f6439.6%

        \[\leadsto y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.6%

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    5. Taylor expanded in x around inf

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

        \[\leadsto x \cdot \left(y \cdot \color{blue}{z}\right) \]
      2. lower-*.f6422.9%

        \[\leadsto x \cdot \left(y \cdot z\right) \]
    7. Applied rewrites22.9%

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

      \[\leadsto \left(y \cdot x\right) \cdot z \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 23: 27.5% accurate, 3.6× speedup?

\[\begin{array}{l} \mathbf{if}\;y \leq 23999999999999999026001386952408705555807906151562834552073736235360894150822906212384768:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (if (<=
     y
     23999999999999999026001386952408705555807906151562834552073736235360894150822906212384768)
  (* a (* c j))
  (* (* y x) z)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (y <= 2.4e+88) {
		tmp = a * (c * j);
	} else {
		tmp = (y * x) * z;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if (y <= 2.4d+88) then
        tmp = a * (c * j)
    else
        tmp = (y * x) * z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (y <= 2.4e+88) {
		tmp = a * (c * j);
	} else {
		tmp = (y * x) * z;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if y <= 2.4e+88:
		tmp = a * (c * j)
	else:
		tmp = (y * x) * z
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (y <= 2.4e+88)
		tmp = Float64(a * Float64(c * j));
	else
		tmp = Float64(Float64(y * x) * z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (y <= 2.4e+88)
		tmp = a * (c * j);
	else
		tmp = (y * x) * z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, 23999999999999999026001386952408705555807906151562834552073736235360894150822906212384768], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;y \leq 23999999999999999026001386952408705555807906151562834552073736235360894150822906212384768:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 2.3999999999999999e88

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
      7. lower-*.f6451.3%

        \[\leadsto a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right) \]
    7. Applied rewrites51.3%

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) \]
      2. lower-*.f6423.0%

        \[\leadsto a \cdot \left(c \cdot j\right) \]
    10. Applied rewrites23.0%

      \[\leadsto a \cdot \left(c \cdot \color{blue}{j}\right) \]

    if 2.3999999999999999e88 < y

    1. Initial program 73.9%

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

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

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

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

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

        \[\leadsto y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \]
      5. lower-*.f6439.6%

        \[\leadsto y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot \color{blue}{z}\right) \]
    4. Applied rewrites39.6%

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    5. Taylor expanded in x around inf

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

        \[\leadsto x \cdot \left(y \cdot \color{blue}{z}\right) \]
      2. lower-*.f6422.9%

        \[\leadsto x \cdot \left(y \cdot z\right) \]
    7. Applied rewrites22.9%

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

      \[\leadsto \left(y \cdot x\right) \cdot z \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 24: 22.9% accurate, 5.5× speedup?

\[\left(y \cdot x\right) \cdot z \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (* (* y x) z))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return (y * x) * z;
}
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 = (y * x) * z
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 (y * x) * z;
}
def code(x, y, z, t, a, b, c, i, j):
	return (y * x) * z
function code(x, y, z, t, a, b, c, i, j)
	return Float64(Float64(y * x) * z)
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = (y * x) * z;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]
\left(y \cdot x\right) \cdot z
Derivation
  1. Initial program 73.9%

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

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

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

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

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

      \[\leadsto y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \]
    5. lower-*.f6439.6%

      \[\leadsto y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot \color{blue}{z}\right) \]
  4. Applied rewrites39.6%

    \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
  5. Taylor expanded in x around inf

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

      \[\leadsto x \cdot \left(y \cdot \color{blue}{z}\right) \]
    2. lower-*.f6422.9%

      \[\leadsto x \cdot \left(y \cdot z\right) \]
  7. Applied rewrites22.9%

    \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
  8. Step-by-step derivation
    1. lift-*.f64N/A

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

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

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

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

      \[\leadsto \left(y \cdot x\right) \cdot z \]
    6. lower-*.f6422.6%

      \[\leadsto \left(y \cdot x\right) \cdot z \]
  9. Applied rewrites22.6%

    \[\leadsto \left(y \cdot x\right) \cdot z \]
  10. Add Preprocessing

Alternative 25: 22.6% accurate, 5.5× speedup?

\[x \cdot \left(y \cdot z\right) \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (* x (* y z)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return x * (y * z);
}
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)
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);
}
def code(x, y, z, t, a, b, c, i, j):
	return x * (y * z)
function code(x, y, z, t, a, b, c, i, j)
	return Float64(x * Float64(y * z))
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = x * (y * z);
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]
x \cdot \left(y \cdot z\right)
Derivation
  1. Initial program 73.9%

    \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
  2. Taylor expanded in y around inf

    \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
  3. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    2. lower-+.f64N/A

      \[\leadsto y \cdot \left(-1 \cdot \left(i \cdot j\right) + \color{blue}{x \cdot z}\right) \]
    3. lower-*.f64N/A

      \[\leadsto y \cdot \left(-1 \cdot \left(i \cdot j\right) + \color{blue}{x} \cdot z\right) \]
    4. lower-*.f64N/A

      \[\leadsto y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \]
    5. lower-*.f6439.6%

      \[\leadsto y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot \color{blue}{z}\right) \]
  4. Applied rewrites39.6%

    \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
  5. Taylor expanded in x around inf

    \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
  6. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto x \cdot \left(y \cdot \color{blue}{z}\right) \]
    2. lower-*.f6422.9%

      \[\leadsto x \cdot \left(y \cdot z\right) \]
  7. Applied rewrites22.9%

    \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
  8. Add Preprocessing

Reproduce

?
herbie shell --seed 2025271 -o generate:evaluate
(FPCore (x y z t a b c i j)
  :name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
  :precision binary64
  (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))