Linear.Matrix:det44 from linear-1.19.1.3

Percentage Accurate: 29.5% → 53.3%
Time: 22.2s
Alternatives: 35
Speedup: 5.8×

Specification

?
\[\begin{array}{l} \\ \left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (+
  (-
   (+
    (+
     (-
      (* (- (* x y) (* z t)) (- (* a b) (* c i)))
      (* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
     (* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a))))
    (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
   (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
  (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
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, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    code = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(Float64(x * j) - Float64(z * k)) * Float64(Float64(y0 * b) - Float64(y1 * i)))) + Float64(Float64(Float64(x * y2) - Float64(z * y3)) * Float64(Float64(y0 * c) - Float64(y1 * a)))) + Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))) - Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))))
end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)
\end{array}

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 35 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: 29.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (+
  (-
   (+
    (+
     (-
      (* (- (* x y) (* z t)) (- (* a b) (* c i)))
      (* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
     (* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a))))
    (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
   (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
  (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
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, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    code = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(Float64(x * j) - Float64(z * k)) * Float64(Float64(y0 * b) - Float64(y1 * i)))) + Float64(Float64(Float64(x * y2) - Float64(z * y3)) * Float64(Float64(y0 * c) - Float64(y1 * a)))) + Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))) - Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))))
end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)
\end{array}

Alternative 1: 53.3% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c \cdot y0 - a \cdot y1\\ t_2 := -1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, a \cdot b - c \cdot i, y3 \cdot t\_1\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)\\ t_3 := k \cdot y2 - j \cdot y3\\ \mathbf{if}\;z \leq -1.25 \cdot 10^{+164}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-130}:\\ \;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot t\_1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-286}:\\ \;\;\;\;-1 \cdot \left(y5 \cdot \left(\mathsf{fma}\left(i, j \cdot t - k \cdot y, y0 \cdot t\_3\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+40}:\\ \;\;\;\;c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) + t\_3 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+220}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (- (* c y0) (* a y1)))
        (t_2
         (*
          -1.0
          (*
           z
           (-
            (fma t (- (* a b) (* c i)) (* y3 t_1))
            (* k (- (* b y0) (* i y1)))))))
        (t_3 (- (* k y2) (* j y3))))
   (if (<= z -1.25e+164)
     t_2
     (if (<= z -1.1e-130)
       (*
        y2
        (-
         (fma k (- (* y1 y4) (* y0 y5)) (* x t_1))
         (* t (- (* c y4) (* a y5)))))
       (if (<= z 4.5e-286)
         (*
          -1.0
          (*
           y5
           (-
            (fma i (- (* j t) (* k y)) (* y0 t_3))
            (* a (- (* t y2) (* y y3))))))
         (if (<= z 1.95e+40)
           (+ (* c (* x (* y0 y2))) (* t_3 (- (* y4 y1) (* y5 y0))))
           (if (<= z 1.25e+220) t_2 (* y1 (* z (- (* a y3) (* i k)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = (c * y0) - (a * y1);
	double t_2 = -1.0 * (z * (fma(t, ((a * b) - (c * i)), (y3 * t_1)) - (k * ((b * y0) - (i * y1)))));
	double t_3 = (k * y2) - (j * y3);
	double tmp;
	if (z <= -1.25e+164) {
		tmp = t_2;
	} else if (z <= -1.1e-130) {
		tmp = y2 * (fma(k, ((y1 * y4) - (y0 * y5)), (x * t_1)) - (t * ((c * y4) - (a * y5))));
	} else if (z <= 4.5e-286) {
		tmp = -1.0 * (y5 * (fma(i, ((j * t) - (k * y)), (y0 * t_3)) - (a * ((t * y2) - (y * y3)))));
	} else if (z <= 1.95e+40) {
		tmp = (c * (x * (y0 * y2))) + (t_3 * ((y4 * y1) - (y5 * y0)));
	} else if (z <= 1.25e+220) {
		tmp = t_2;
	} else {
		tmp = y1 * (z * ((a * y3) - (i * k)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(c * y0) - Float64(a * y1))
	t_2 = Float64(-1.0 * Float64(z * Float64(fma(t, Float64(Float64(a * b) - Float64(c * i)), Float64(y3 * t_1)) - Float64(k * Float64(Float64(b * y0) - Float64(i * y1))))))
	t_3 = Float64(Float64(k * y2) - Float64(j * y3))
	tmp = 0.0
	if (z <= -1.25e+164)
		tmp = t_2;
	elseif (z <= -1.1e-130)
		tmp = Float64(y2 * Float64(fma(k, Float64(Float64(y1 * y4) - Float64(y0 * y5)), Float64(x * t_1)) - Float64(t * Float64(Float64(c * y4) - Float64(a * y5)))));
	elseif (z <= 4.5e-286)
		tmp = Float64(-1.0 * Float64(y5 * Float64(fma(i, Float64(Float64(j * t) - Float64(k * y)), Float64(y0 * t_3)) - Float64(a * Float64(Float64(t * y2) - Float64(y * y3))))));
	elseif (z <= 1.95e+40)
		tmp = Float64(Float64(c * Float64(x * Float64(y0 * y2))) + Float64(t_3 * Float64(Float64(y4 * y1) - Float64(y5 * y0))));
	elseif (z <= 1.25e+220)
		tmp = t_2;
	else
		tmp = Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 * N[(z * N[(N[(t * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(y3 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(k * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.25e+164], t$95$2, If[LessEqual[z, -1.1e-130], N[(y2 * N[(N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision] + N[(x * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e-286], N[(-1.0 * N[(y5 * N[(N[(i * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision] + N[(y0 * t$95$3), $MachinePrecision]), $MachinePrecision] - N[(a * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.95e+40], N[(N[(c * N[(x * N[(y0 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e+220], t$95$2, N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := c \cdot y0 - a \cdot y1\\
t_2 := -1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, a \cdot b - c \cdot i, y3 \cdot t\_1\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)\\
t_3 := k \cdot y2 - j \cdot y3\\
\mathbf{if}\;z \leq -1.25 \cdot 10^{+164}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -1.1 \cdot 10^{-130}:\\
\;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot t\_1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\

\mathbf{elif}\;z \leq 4.5 \cdot 10^{-286}:\\
\;\;\;\;-1 \cdot \left(y5 \cdot \left(\mathsf{fma}\left(i, j \cdot t - k \cdot y, y0 \cdot t\_3\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)\\

\mathbf{elif}\;z \leq 1.95 \cdot 10^{+40}:\\
\;\;\;\;c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) + t\_3 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\

\mathbf{elif}\;z \leq 1.25 \cdot 10^{+220}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.24999999999999987e164 or 1.95e40 < z < 1.2500000000000001e220

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in z around -inf

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

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

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

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    4. Applied rewrites37.1%

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, a \cdot b - c \cdot i, y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]

    if -1.24999999999999987e164 < z < -1.0999999999999999e-130

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites37.7%

      \[\leadsto \color{blue}{y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]

    if -1.0999999999999999e-130 < z < 4.50000000000000005e-286

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y5 around -inf

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

        \[\leadsto -1 \cdot \color{blue}{\left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \color{blue}{\left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{a \cdot \left(t \cdot y2 - y \cdot y3\right)}\right)\right) \]
    4. Applied rewrites36.7%

      \[\leadsto \color{blue}{-1 \cdot \left(y5 \cdot \left(\mathsf{fma}\left(i, j \cdot t - k \cdot y, y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]

    if 4.50000000000000005e-286 < z < 1.95e40

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in y0 around inf

      \[\leadsto c \cdot \color{blue}{\left(x \cdot \left(y0 \cdot y2\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f6434.4

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites34.4%

      \[\leadsto c \cdot \color{blue}{\left(x \cdot \left(y0 \cdot y2\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]

    if 1.2500000000000001e220 < z

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in z around inf

      \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - \color{blue}{i \cdot k}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot \color{blue}{k}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
      4. lower-*.f6427.4

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
    7. Applied rewrites27.4%

      \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 2: 48.6% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c \cdot y0 - a \cdot y1\\ t_2 := j \cdot t - k \cdot y\\ t_3 := k \cdot y2 - j \cdot y3\\ t_4 := y1 \cdot y4 - y0 \cdot y5\\ t_5 := c \cdot y4 - a \cdot y5\\ t_6 := y2 \cdot \left(\mathsf{fma}\left(k, t\_4, x \cdot t\_1\right) - t \cdot t\_5\right)\\ \mathbf{if}\;y3 \leq -1.6 \cdot 10^{+133}:\\ \;\;\;\;-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, t\_4, z \cdot t\_1\right) - y \cdot t\_5\right)\right)\\ \mathbf{elif}\;y3 \leq -4 \cdot 10^{+48}:\\ \;\;\;\;-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot t\_2\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)\\ \mathbf{elif}\;y3 \leq -1.3 \cdot 10^{-131}:\\ \;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + t\_3 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ \mathbf{elif}\;y3 \leq 8 \cdot 10^{-11}:\\ \;\;\;\;t\_6\\ \mathbf{elif}\;y3 \leq 7 \cdot 10^{+147}:\\ \;\;\;\;-1 \cdot \left(y5 \cdot \left(\mathsf{fma}\left(i, t\_2, y0 \cdot t\_3\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_6\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (- (* c y0) (* a y1)))
        (t_2 (- (* j t) (* k y)))
        (t_3 (- (* k y2) (* j y3)))
        (t_4 (- (* y1 y4) (* y0 y5)))
        (t_5 (- (* c y4) (* a y5)))
        (t_6 (* y2 (- (fma k t_4 (* x t_1)) (* t t_5)))))
   (if (<= y3 -1.6e+133)
     (* -1.0 (* y3 (- (fma j t_4 (* z t_1)) (* y t_5))))
     (if (<= y3 -4e+48)
       (*
        -1.0
        (*
         i
         (-
          (fma c (- (* x y) (* t z)) (* y5 t_2))
          (* y1 (- (* j x) (* k z))))))
       (if (<= y3 -1.3e-131)
         (+ (* y2 (* t (- (* a y5) (* c y4)))) (* t_3 (- (* y4 y1) (* y5 y0))))
         (if (<= y3 8e-11)
           t_6
           (if (<= y3 7e+147)
             (*
              -1.0
              (* y5 (- (fma i t_2 (* y0 t_3)) (* a (- (* t y2) (* y y3))))))
             t_6)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = (c * y0) - (a * y1);
	double t_2 = (j * t) - (k * y);
	double t_3 = (k * y2) - (j * y3);
	double t_4 = (y1 * y4) - (y0 * y5);
	double t_5 = (c * y4) - (a * y5);
	double t_6 = y2 * (fma(k, t_4, (x * t_1)) - (t * t_5));
	double tmp;
	if (y3 <= -1.6e+133) {
		tmp = -1.0 * (y3 * (fma(j, t_4, (z * t_1)) - (y * t_5)));
	} else if (y3 <= -4e+48) {
		tmp = -1.0 * (i * (fma(c, ((x * y) - (t * z)), (y5 * t_2)) - (y1 * ((j * x) - (k * z)))));
	} else if (y3 <= -1.3e-131) {
		tmp = (y2 * (t * ((a * y5) - (c * y4)))) + (t_3 * ((y4 * y1) - (y5 * y0)));
	} else if (y3 <= 8e-11) {
		tmp = t_6;
	} else if (y3 <= 7e+147) {
		tmp = -1.0 * (y5 * (fma(i, t_2, (y0 * t_3)) - (a * ((t * y2) - (y * y3)))));
	} else {
		tmp = t_6;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(c * y0) - Float64(a * y1))
	t_2 = Float64(Float64(j * t) - Float64(k * y))
	t_3 = Float64(Float64(k * y2) - Float64(j * y3))
	t_4 = Float64(Float64(y1 * y4) - Float64(y0 * y5))
	t_5 = Float64(Float64(c * y4) - Float64(a * y5))
	t_6 = Float64(y2 * Float64(fma(k, t_4, Float64(x * t_1)) - Float64(t * t_5)))
	tmp = 0.0
	if (y3 <= -1.6e+133)
		tmp = Float64(-1.0 * Float64(y3 * Float64(fma(j, t_4, Float64(z * t_1)) - Float64(y * t_5))));
	elseif (y3 <= -4e+48)
		tmp = Float64(-1.0 * Float64(i * Float64(fma(c, Float64(Float64(x * y) - Float64(t * z)), Float64(y5 * t_2)) - Float64(y1 * Float64(Float64(j * x) - Float64(k * z))))));
	elseif (y3 <= -1.3e-131)
		tmp = Float64(Float64(y2 * Float64(t * Float64(Float64(a * y5) - Float64(c * y4)))) + Float64(t_3 * Float64(Float64(y4 * y1) - Float64(y5 * y0))));
	elseif (y3 <= 8e-11)
		tmp = t_6;
	elseif (y3 <= 7e+147)
		tmp = Float64(-1.0 * Float64(y5 * Float64(fma(i, t_2, Float64(y0 * t_3)) - Float64(a * Float64(Float64(t * y2) - Float64(y * y3))))));
	else
		tmp = t_6;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(y2 * N[(N[(k * t$95$4 + N[(x * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(t * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y3, -1.6e+133], N[(-1.0 * N[(y3 * N[(N[(j * t$95$4 + N[(z * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, -4e+48], N[(-1.0 * N[(i * N[(N[(c * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y5 * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, -1.3e-131], N[(N[(y2 * N[(t * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 8e-11], t$95$6, If[LessEqual[y3, 7e+147], N[(-1.0 * N[(y5 * N[(N[(i * t$95$2 + N[(y0 * t$95$3), $MachinePrecision]), $MachinePrecision] - N[(a * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$6]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := c \cdot y0 - a \cdot y1\\
t_2 := j \cdot t - k \cdot y\\
t_3 := k \cdot y2 - j \cdot y3\\
t_4 := y1 \cdot y4 - y0 \cdot y5\\
t_5 := c \cdot y4 - a \cdot y5\\
t_6 := y2 \cdot \left(\mathsf{fma}\left(k, t\_4, x \cdot t\_1\right) - t \cdot t\_5\right)\\
\mathbf{if}\;y3 \leq -1.6 \cdot 10^{+133}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, t\_4, z \cdot t\_1\right) - y \cdot t\_5\right)\right)\\

\mathbf{elif}\;y3 \leq -4 \cdot 10^{+48}:\\
\;\;\;\;-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot t\_2\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)\\

\mathbf{elif}\;y3 \leq -1.3 \cdot 10^{-131}:\\
\;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + t\_3 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\

\mathbf{elif}\;y3 \leq 8 \cdot 10^{-11}:\\
\;\;\;\;t\_6\\

\mathbf{elif}\;y3 \leq 7 \cdot 10^{+147}:\\
\;\;\;\;-1 \cdot \left(y5 \cdot \left(\mathsf{fma}\left(i, t\_2, y0 \cdot t\_3\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y3 < -1.59999999999999999e133

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y3 around -inf

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

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

        \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
    4. Applied rewrites37.6%

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]

    if -1.59999999999999999e133 < y3 < -4.00000000000000018e48

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

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

    if -4.00000000000000018e48 < y3 < -1.29999999999999998e-131

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in t around inf

      \[\leadsto y2 \cdot \left(t \cdot \color{blue}{\left(a \cdot y5 - c \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - \color{blue}{c \cdot y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot \color{blue}{y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lift-*.f6437.4

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites37.4%

      \[\leadsto y2 \cdot \left(t \cdot \color{blue}{\left(a \cdot y5 - c \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]

    if -1.29999999999999998e-131 < y3 < 7.99999999999999952e-11 or 6.99999999999999949e147 < y3

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites37.7%

      \[\leadsto \color{blue}{y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]

    if 7.99999999999999952e-11 < y3 < 6.99999999999999949e147

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y5 around -inf

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

        \[\leadsto -1 \cdot \color{blue}{\left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \color{blue}{\left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{a \cdot \left(t \cdot y2 - y \cdot y3\right)}\right)\right) \]
    4. Applied rewrites36.7%

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

Alternative 3: 44.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ t_2 := \left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + t\_1\\ \mathbf{if}\;t\_2 \leq \infty:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))
        (t_2
         (+
          (-
           (+
            (+
             (-
              (* (- (* x y) (* z t)) (- (* a b) (* c i)))
              (* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
             (* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a))))
            (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
           (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
          t_1)))
   (if (<= t_2 INFINITY) t_2 (+ (* y2 (* c (- (* x y0) (* t y4)))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
	double t_2 = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + t_1;
	double tmp;
	if (t_2 <= ((double) INFINITY)) {
		tmp = t_2;
	} else {
		tmp = (y2 * (c * ((x * y0) - (t * y4)))) + t_1;
	}
	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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
	double t_2 = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + t_1;
	double tmp;
	if (t_2 <= Double.POSITIVE_INFINITY) {
		tmp = t_2;
	} else {
		tmp = (y2 * (c * ((x * y0) - (t * y4)))) + t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))
	t_2 = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + t_1
	tmp = 0
	if t_2 <= math.inf:
		tmp = t_2
	else:
		tmp = (y2 * (c * ((x * y0) - (t * y4)))) + t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))
	t_2 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(Float64(x * j) - Float64(z * k)) * Float64(Float64(y0 * b) - Float64(y1 * i)))) + Float64(Float64(Float64(x * y2) - Float64(z * y3)) * Float64(Float64(y0 * c) - Float64(y1 * a)))) + Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))) - Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a)))) + t_1)
	tmp = 0.0
	if (t_2 <= Inf)
		tmp = t_2;
	else
		tmp = Float64(Float64(y2 * Float64(c * Float64(Float64(x * y0) - Float64(t * y4)))) + t_1);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
	t_2 = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + t_1;
	tmp = 0.0;
	if (t_2 <= Inf)
		tmp = t_2;
	else
		tmp = (y2 * (c * ((x * y0) - (t * y4)))) + t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, Infinity], t$95$2, N[(N[(y2 * N[(c * N[(N[(x * y0), $MachinePrecision] - N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
t_2 := \left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + t\_1\\
\mathbf{if}\;t\_2 \leq \infty:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + t\_1\\


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

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]

    if +inf.0 < (+.f64 (-.f64 (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 (*.f64 x y) (*.f64 z t)) (-.f64 (*.f64 a b) (*.f64 c i))) (*.f64 (-.f64 (*.f64 x j) (*.f64 z k)) (-.f64 (*.f64 y0 b) (*.f64 y1 i)))) (*.f64 (-.f64 (*.f64 x y2) (*.f64 z y3)) (-.f64 (*.f64 y0 c) (*.f64 y1 a)))) (*.f64 (-.f64 (*.f64 t j) (*.f64 y k)) (-.f64 (*.f64 y4 b) (*.f64 y5 i)))) (*.f64 (-.f64 (*.f64 t y2) (*.f64 y y3)) (-.f64 (*.f64 y4 c) (*.f64 y5 a)))) (*.f64 (-.f64 (*.f64 k y2) (*.f64 j y3)) (-.f64 (*.f64 y4 y1) (*.f64 y5 y0))))

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in c around inf

      \[\leadsto y2 \cdot \left(c \cdot \color{blue}{\left(x \cdot y0 - t \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - \color{blue}{t \cdot y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot \color{blue}{y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower-*.f6436.5

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites36.5%

      \[\leadsto y2 \cdot \left(c \cdot \color{blue}{\left(x \cdot y0 - t \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 4: 42.3% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)\\ \mathbf{if}\;i \leq -3.8 \cdot 10^{+39}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;i \leq -4.4 \cdot 10^{-89}:\\ \;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \mathbf{elif}\;i \leq 7.5 \cdot 10^{-72}:\\ \;\;\;\;y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1
         (*
          -1.0
          (*
           i
           (-
            (fma c (- (* x y) (* t z)) (* y5 (- (* j t) (* k y))))
            (* y1 (- (* j x) (* k z))))))))
   (if (<= i -3.8e+39)
     t_1
     (if (<= i -4.4e-89)
       (*
        y2
        (-
         (fma k (- (* y1 y4) (* y0 y5)) (* x (- (* c y0) (* a y1))))
         (* t (- (* c y4) (* a y5)))))
       (if (<= i 7.5e-72)
         (+
          (* y2 (* c (- (* x y0) (* t y4))))
          (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))
         t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = -1.0 * (i * (fma(c, ((x * y) - (t * z)), (y5 * ((j * t) - (k * y)))) - (y1 * ((j * x) - (k * z)))));
	double tmp;
	if (i <= -3.8e+39) {
		tmp = t_1;
	} else if (i <= -4.4e-89) {
		tmp = y2 * (fma(k, ((y1 * y4) - (y0 * y5)), (x * ((c * y0) - (a * y1)))) - (t * ((c * y4) - (a * y5))));
	} else if (i <= 7.5e-72) {
		tmp = (y2 * (c * ((x * y0) - (t * y4)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(-1.0 * Float64(i * Float64(fma(c, Float64(Float64(x * y) - Float64(t * z)), Float64(y5 * Float64(Float64(j * t) - Float64(k * y)))) - Float64(y1 * Float64(Float64(j * x) - Float64(k * z))))))
	tmp = 0.0
	if (i <= -3.8e+39)
		tmp = t_1;
	elseif (i <= -4.4e-89)
		tmp = Float64(y2 * Float64(fma(k, Float64(Float64(y1 * y4) - Float64(y0 * y5)), Float64(x * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(t * Float64(Float64(c * y4) - Float64(a * y5)))));
	elseif (i <= 7.5e-72)
		tmp = Float64(Float64(y2 * Float64(c * Float64(Float64(x * y0) - Float64(t * y4)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(-1.0 * N[(i * N[(N[(c * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y5 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -3.8e+39], t$95$1, If[LessEqual[i, -4.4e-89], N[(y2 * N[(N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 7.5e-72], N[(N[(y2 * N[(c * N[(N[(x * y0), $MachinePrecision] - N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := -1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)\\
\mathbf{if}\;i \leq -3.8 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;i \leq -4.4 \cdot 10^{-89}:\\
\;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\

\mathbf{elif}\;i \leq 7.5 \cdot 10^{-72}:\\
\;\;\;\;y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -3.7999999999999998e39 or 7.5000000000000004e-72 < i

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

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

    if -3.7999999999999998e39 < i < -4.40000000000000024e-89

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites37.7%

      \[\leadsto \color{blue}{y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]

    if -4.40000000000000024e-89 < i < 7.5000000000000004e-72

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in c around inf

      \[\leadsto y2 \cdot \left(c \cdot \color{blue}{\left(x \cdot y0 - t \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - \color{blue}{t \cdot y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot \color{blue}{y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower-*.f6436.5

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites36.5%

      \[\leadsto y2 \cdot \left(c \cdot \color{blue}{\left(x \cdot y0 - t \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 5: 41.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\\ t_2 := \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\\ t_3 := \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\\ t_4 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ \mathbf{if}\;\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + t\_1\right) + t\_3\right) - t\_2\right) + t\_4 \leq \infty:\\ \;\;\;\;\left(\left(\left(i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right) + t\_1\right) + t\_3\right) - t\_2\right) + t\_4\\ \mathbf{else}:\\ \;\;\;\;y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + t\_4\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a))))
        (t_2 (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
        (t_3 (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
        (t_4 (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
   (if (<=
        (+
         (-
          (+
           (+
            (-
             (* (- (* x y) (* z t)) (- (* a b) (* c i)))
             (* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
            t_1)
           t_3)
          t_2)
         t_4)
        INFINITY)
     (+ (- (+ (+ (* i (* y1 (- (* j x) (* k z)))) t_1) t_3) t_2) t_4)
     (+ (* y2 (* c (- (* x y0) (* t y4)))) t_4))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = ((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a));
	double t_2 = ((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a));
	double t_3 = ((t * j) - (y * k)) * ((y4 * b) - (y5 * i));
	double t_4 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
	double tmp;
	if (((((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + t_1) + t_3) - t_2) + t_4) <= ((double) INFINITY)) {
		tmp = ((((i * (y1 * ((j * x) - (k * z)))) + t_1) + t_3) - t_2) + t_4;
	} else {
		tmp = (y2 * (c * ((x * y0) - (t * y4)))) + t_4;
	}
	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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = ((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a));
	double t_2 = ((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a));
	double t_3 = ((t * j) - (y * k)) * ((y4 * b) - (y5 * i));
	double t_4 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
	double tmp;
	if (((((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + t_1) + t_3) - t_2) + t_4) <= Double.POSITIVE_INFINITY) {
		tmp = ((((i * (y1 * ((j * x) - (k * z)))) + t_1) + t_3) - t_2) + t_4;
	} else {
		tmp = (y2 * (c * ((x * y0) - (t * y4)))) + t_4;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = ((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a))
	t_2 = ((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a))
	t_3 = ((t * j) - (y * k)) * ((y4 * b) - (y5 * i))
	t_4 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))
	tmp = 0
	if ((((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + t_1) + t_3) - t_2) + t_4) <= math.inf:
		tmp = ((((i * (y1 * ((j * x) - (k * z)))) + t_1) + t_3) - t_2) + t_4
	else:
		tmp = (y2 * (c * ((x * y0) - (t * y4)))) + t_4
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(Float64(x * y2) - Float64(z * y3)) * Float64(Float64(y0 * c) - Float64(y1 * a)))
	t_2 = Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a)))
	t_3 = Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))
	t_4 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))
	tmp = 0.0
	if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(Float64(x * j) - Float64(z * k)) * Float64(Float64(y0 * b) - Float64(y1 * i)))) + t_1) + t_3) - t_2) + t_4) <= Inf)
		tmp = Float64(Float64(Float64(Float64(Float64(i * Float64(y1 * Float64(Float64(j * x) - Float64(k * z)))) + t_1) + t_3) - t_2) + t_4);
	else
		tmp = Float64(Float64(y2 * Float64(c * Float64(Float64(x * y0) - Float64(t * y4)))) + t_4);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = ((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a));
	t_2 = ((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a));
	t_3 = ((t * j) - (y * k)) * ((y4 * b) - (y5 * i));
	t_4 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
	tmp = 0.0;
	if (((((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + t_1) + t_3) - t_2) + t_4) <= Inf)
		tmp = ((((i * (y1 * ((j * x) - (k * z)))) + t_1) + t_3) - t_2) + t_4;
	else
		tmp = (y2 * (c * ((x * y0) - (t * y4)))) + t_4;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + t$95$3), $MachinePrecision] - t$95$2), $MachinePrecision] + t$95$4), $MachinePrecision], Infinity], N[(N[(N[(N[(N[(i * N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + t$95$3), $MachinePrecision] - t$95$2), $MachinePrecision] + t$95$4), $MachinePrecision], N[(N[(y2 * N[(c * N[(N[(x * y0), $MachinePrecision] - N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\\
t_2 := \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\\
t_3 := \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\\
t_4 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + t\_1\right) + t\_3\right) - t\_2\right) + t\_4 \leq \infty:\\
\;\;\;\;\left(\left(\left(i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right) + t\_1\right) + t\_3\right) - t\_2\right) + t\_4\\

\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + t\_4\\


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

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto \left(\left(\left(i \cdot \color{blue}{\left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)} + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(\left(\left(i \cdot \left(y1 \cdot \color{blue}{\left(j \cdot x - k \cdot z\right)}\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower--.f64N/A

        \[\leadsto \left(\left(\left(i \cdot \left(y1 \cdot \left(j \cdot x - \color{blue}{k \cdot z}\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(\left(\left(i \cdot \left(y1 \cdot \left(j \cdot x - \color{blue}{k} \cdot z\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f6432.1

        \[\leadsto \left(\left(\left(i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot \color{blue}{z}\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites32.1%

      \[\leadsto \left(\left(\left(\color{blue}{i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)} + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]

    if +inf.0 < (+.f64 (-.f64 (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 (*.f64 x y) (*.f64 z t)) (-.f64 (*.f64 a b) (*.f64 c i))) (*.f64 (-.f64 (*.f64 x j) (*.f64 z k)) (-.f64 (*.f64 y0 b) (*.f64 y1 i)))) (*.f64 (-.f64 (*.f64 x y2) (*.f64 z y3)) (-.f64 (*.f64 y0 c) (*.f64 y1 a)))) (*.f64 (-.f64 (*.f64 t j) (*.f64 y k)) (-.f64 (*.f64 y4 b) (*.f64 y5 i)))) (*.f64 (-.f64 (*.f64 t y2) (*.f64 y y3)) (-.f64 (*.f64 y4 c) (*.f64 y5 a)))) (*.f64 (-.f64 (*.f64 k y2) (*.f64 j y3)) (-.f64 (*.f64 y4 y1) (*.f64 y5 y0))))

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in c around inf

      \[\leadsto y2 \cdot \left(c \cdot \color{blue}{\left(x \cdot y0 - t \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - \color{blue}{t \cdot y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot \color{blue}{y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower-*.f6436.5

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites36.5%

      \[\leadsto y2 \cdot \left(c \cdot \color{blue}{\left(x \cdot y0 - t \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 6: 40.5% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ \mathbf{if}\;k \leq -7.2 \cdot 10^{+232}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\ \mathbf{elif}\;k \leq -3.7 \cdot 10^{-31}:\\ \;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + t\_1\\ \mathbf{elif}\;k \leq -5.8 \cdot 10^{-108}:\\ \;\;\;\;c \cdot \left(-1 \cdot \left(y3 \cdot \left(y0 \cdot z - y \cdot y4\right)\right)\right)\\ \mathbf{elif}\;k \leq -1.75 \cdot 10^{-241}:\\ \;\;\;\;x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
   (if (<= k -7.2e+232)
     (* i (* k (- (* y y5) (* y1 z))))
     (if (<= k -3.7e-31)
       (+ (* y2 (* t (- (* a y5) (* c y4)))) t_1)
       (if (<= k -5.8e-108)
         (* c (* -1.0 (* y3 (- (* y0 z) (* y y4)))))
         (if (<= k -1.75e-241)
           (*
            x
            (-
             (fma y (- (* a b) (* c i)) (* y2 (- (* c y0) (* a y1))))
             (* j (- (* b y0) (* i y1)))))
           (+ (* y2 (* c (- (* x y0) (* t y4)))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
	double tmp;
	if (k <= -7.2e+232) {
		tmp = i * (k * ((y * y5) - (y1 * z)));
	} else if (k <= -3.7e-31) {
		tmp = (y2 * (t * ((a * y5) - (c * y4)))) + t_1;
	} else if (k <= -5.8e-108) {
		tmp = c * (-1.0 * (y3 * ((y0 * z) - (y * y4))));
	} else if (k <= -1.75e-241) {
		tmp = x * (fma(y, ((a * b) - (c * i)), (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
	} else {
		tmp = (y2 * (c * ((x * y0) - (t * y4)))) + t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))
	tmp = 0.0
	if (k <= -7.2e+232)
		tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z))));
	elseif (k <= -3.7e-31)
		tmp = Float64(Float64(y2 * Float64(t * Float64(Float64(a * y5) - Float64(c * y4)))) + t_1);
	elseif (k <= -5.8e-108)
		tmp = Float64(c * Float64(-1.0 * Float64(y3 * Float64(Float64(y0 * z) - Float64(y * y4)))));
	elseif (k <= -1.75e-241)
		tmp = Float64(x * Float64(fma(y, Float64(Float64(a * b) - Float64(c * i)), Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1)))));
	else
		tmp = Float64(Float64(y2 * Float64(c * Float64(Float64(x * y0) - Float64(t * y4)))) + t_1);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -7.2e+232], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, -3.7e-31], N[(N[(y2 * N[(t * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[k, -5.8e-108], N[(c * N[(-1.0 * N[(y3 * N[(N[(y0 * z), $MachinePrecision] - N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, -1.75e-241], N[(x * N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y2 * N[(c * N[(N[(x * y0), $MachinePrecision] - N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;k \leq -7.2 \cdot 10^{+232}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\

\mathbf{elif}\;k \leq -3.7 \cdot 10^{-31}:\\
\;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + t\_1\\

\mathbf{elif}\;k \leq -5.8 \cdot 10^{-108}:\\
\;\;\;\;c \cdot \left(-1 \cdot \left(y3 \cdot \left(y0 \cdot z - y \cdot y4\right)\right)\right)\\

\mathbf{elif}\;k \leq -1.75 \cdot 10^{-241}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if k < -7.19999999999999986e232

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    7. Applied rewrites26.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]

    if -7.19999999999999986e232 < k < -3.6999999999999998e-31

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in t around inf

      \[\leadsto y2 \cdot \left(t \cdot \color{blue}{\left(a \cdot y5 - c \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - \color{blue}{c \cdot y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot \color{blue}{y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lift-*.f6437.4

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites37.4%

      \[\leadsto y2 \cdot \left(t \cdot \color{blue}{\left(a \cdot y5 - c \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]

    if -3.6999999999999998e-31 < k < -5.8000000000000002e-108

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in c around inf

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

        \[\leadsto c \cdot \color{blue}{\left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{y4 \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.5%

      \[\leadsto \color{blue}{c \cdot \left(\mathsf{fma}\left(-1, i \cdot \left(x \cdot y - t \cdot z\right), y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    5. Taylor expanded in y3 around -inf

      \[\leadsto c \cdot \left(-1 \cdot \color{blue}{\left(y3 \cdot \left(y0 \cdot z - y \cdot y4\right)\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

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

        \[\leadsto c \cdot \left(-1 \cdot \left(y3 \cdot \left(y0 \cdot z - \color{blue}{y \cdot y4}\right)\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto c \cdot \left(-1 \cdot \left(y3 \cdot \left(y0 \cdot z - y \cdot \color{blue}{y4}\right)\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto c \cdot \left(-1 \cdot \left(y3 \cdot \left(y0 \cdot z - y \cdot y4\right)\right)\right) \]
      5. lower-*.f6426.7

        \[\leadsto c \cdot \left(-1 \cdot \left(y3 \cdot \left(y0 \cdot z - y \cdot y4\right)\right)\right) \]
    7. Applied rewrites26.7%

      \[\leadsto c \cdot \left(-1 \cdot \color{blue}{\left(y3 \cdot \left(y0 \cdot z - y \cdot y4\right)\right)}\right) \]

    if -5.8000000000000002e-108 < k < -1.7499999999999999e-241

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in x around inf

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

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

        \[\leadsto x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{j \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    4. Applied rewrites37.9%

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

    if -1.7499999999999999e-241 < k

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in c around inf

      \[\leadsto y2 \cdot \left(c \cdot \color{blue}{\left(x \cdot y0 - t \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - \color{blue}{t \cdot y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot \color{blue}{y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower-*.f6436.5

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites36.5%

      \[\leadsto y2 \cdot \left(c \cdot \color{blue}{\left(x \cdot y0 - t \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 7: 40.0% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ t_2 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ \mathbf{if}\;b \leq -6.8 \cdot 10^{+18}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{-190}:\\ \;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + t\_2\\ \mathbf{elif}\;b \leq 10^{+161}:\\ \;\;\;\;y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + t\_2\\ \mathbf{elif}\;b \leq 9.5 \cdot 10^{+228}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;y2 \cdot \left(a \cdot \left(t \cdot y5\right)\right) + t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1
         (*
          b
          (-
           (fma a (- (* x y) (* t z)) (* y4 (- (* j t) (* k y))))
           (* y0 (- (* j x) (* k z))))))
        (t_2 (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
   (if (<= b -6.8e+18)
     t_1
     (if (<= b 5.8e-190)
       (+ (* y2 (* t (- (* a y5) (* c y4)))) t_2)
       (if (<= b 1e+161)
         (+ (* y2 (* c (- (* x y0) (* t y4)))) t_2)
         (if (<= b 9.5e+228) t_1 (+ (* y2 (* a (* t y5))) t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = b * (fma(a, ((x * y) - (t * z)), (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))));
	double t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
	double tmp;
	if (b <= -6.8e+18) {
		tmp = t_1;
	} else if (b <= 5.8e-190) {
		tmp = (y2 * (t * ((a * y5) - (c * y4)))) + t_2;
	} else if (b <= 1e+161) {
		tmp = (y2 * (c * ((x * y0) - (t * y4)))) + t_2;
	} else if (b <= 9.5e+228) {
		tmp = t_1;
	} else {
		tmp = (y2 * (a * (t * y5))) + t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(b * Float64(fma(a, Float64(Float64(x * y) - Float64(t * z)), Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z)))))
	t_2 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))
	tmp = 0.0
	if (b <= -6.8e+18)
		tmp = t_1;
	elseif (b <= 5.8e-190)
		tmp = Float64(Float64(y2 * Float64(t * Float64(Float64(a * y5) - Float64(c * y4)))) + t_2);
	elseif (b <= 1e+161)
		tmp = Float64(Float64(y2 * Float64(c * Float64(Float64(x * y0) - Float64(t * y4)))) + t_2);
	elseif (b <= 9.5e+228)
		tmp = t_1;
	else
		tmp = Float64(Float64(y2 * Float64(a * Float64(t * y5))) + t_2);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(b * N[(N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -6.8e+18], t$95$1, If[LessEqual[b, 5.8e-190], N[(N[(y2 * N[(t * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[b, 1e+161], N[(N[(y2 * N[(c * N[(N[(x * y0), $MachinePrecision] - N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[b, 9.5e+228], t$95$1, N[(N[(y2 * N[(a * N[(t * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
t_2 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;b \leq -6.8 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 5.8 \cdot 10^{-190}:\\
\;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + t\_2\\

\mathbf{elif}\;b \leq 10^{+161}:\\
\;\;\;\;y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + t\_2\\

\mathbf{elif}\;b \leq 9.5 \cdot 10^{+228}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(a \cdot \left(t \cdot y5\right)\right) + t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -6.8e18 or 1e161 < b < 9.50000000000000046e228

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in b around inf

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

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

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    4. Applied rewrites36.5%

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

    if -6.8e18 < b < 5.8000000000000004e-190

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in t around inf

      \[\leadsto y2 \cdot \left(t \cdot \color{blue}{\left(a \cdot y5 - c \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - \color{blue}{c \cdot y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot \color{blue}{y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lift-*.f6437.4

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites37.4%

      \[\leadsto y2 \cdot \left(t \cdot \color{blue}{\left(a \cdot y5 - c \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]

    if 5.8000000000000004e-190 < b < 1e161

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in c around inf

      \[\leadsto y2 \cdot \left(c \cdot \color{blue}{\left(x \cdot y0 - t \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - \color{blue}{t \cdot y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot \color{blue}{y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower-*.f6436.5

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites36.5%

      \[\leadsto y2 \cdot \left(c \cdot \color{blue}{\left(x \cdot y0 - t \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]

    if 9.50000000000000046e228 < b

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in y5 around inf

      \[\leadsto y2 \cdot \left(a \cdot \color{blue}{\left(t \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(a \cdot \left(t \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower-*.f6435.9

        \[\leadsto y2 \cdot \left(a \cdot \left(t \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites35.9%

      \[\leadsto y2 \cdot \left(a \cdot \color{blue}{\left(t \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 8: 38.6% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ \mathbf{if}\;z \leq -4.05 \cdot 10^{+158}:\\ \;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-302}:\\ \;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + t\_1\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+219}:\\ \;\;\;\;y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + t\_1\\ \mathbf{else}:\\ \;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
   (if (<= z -4.05e+158)
     (* b (* y0 (- (* k z) (* j x))))
     (if (<= z 2.45e-302)
       (+ (* y2 (* t (- (* a y5) (* c y4)))) t_1)
       (if (<= z 4.2e+219)
         (+ (* y2 (* c (- (* x y0) (* t y4)))) t_1)
         (* y1 (* z (- (* a y3) (* i k)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
	double tmp;
	if (z <= -4.05e+158) {
		tmp = b * (y0 * ((k * z) - (j * x)));
	} else if (z <= 2.45e-302) {
		tmp = (y2 * (t * ((a * y5) - (c * y4)))) + t_1;
	} else if (z <= 4.2e+219) {
		tmp = (y2 * (c * ((x * y0) - (t * y4)))) + t_1;
	} else {
		tmp = y1 * (z * ((a * y3) - (i * k)));
	}
	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, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))
    if (z <= (-4.05d+158)) then
        tmp = b * (y0 * ((k * z) - (j * x)))
    else if (z <= 2.45d-302) then
        tmp = (y2 * (t * ((a * y5) - (c * y4)))) + t_1
    else if (z <= 4.2d+219) then
        tmp = (y2 * (c * ((x * y0) - (t * y4)))) + t_1
    else
        tmp = y1 * (z * ((a * y3) - (i * k)))
    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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
	double tmp;
	if (z <= -4.05e+158) {
		tmp = b * (y0 * ((k * z) - (j * x)));
	} else if (z <= 2.45e-302) {
		tmp = (y2 * (t * ((a * y5) - (c * y4)))) + t_1;
	} else if (z <= 4.2e+219) {
		tmp = (y2 * (c * ((x * y0) - (t * y4)))) + t_1;
	} else {
		tmp = y1 * (z * ((a * y3) - (i * k)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))
	tmp = 0
	if z <= -4.05e+158:
		tmp = b * (y0 * ((k * z) - (j * x)))
	elif z <= 2.45e-302:
		tmp = (y2 * (t * ((a * y5) - (c * y4)))) + t_1
	elif z <= 4.2e+219:
		tmp = (y2 * (c * ((x * y0) - (t * y4)))) + t_1
	else:
		tmp = y1 * (z * ((a * y3) - (i * k)))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))
	tmp = 0.0
	if (z <= -4.05e+158)
		tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x))));
	elseif (z <= 2.45e-302)
		tmp = Float64(Float64(y2 * Float64(t * Float64(Float64(a * y5) - Float64(c * y4)))) + t_1);
	elseif (z <= 4.2e+219)
		tmp = Float64(Float64(y2 * Float64(c * Float64(Float64(x * y0) - Float64(t * y4)))) + t_1);
	else
		tmp = Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
	tmp = 0.0;
	if (z <= -4.05e+158)
		tmp = b * (y0 * ((k * z) - (j * x)));
	elseif (z <= 2.45e-302)
		tmp = (y2 * (t * ((a * y5) - (c * y4)))) + t_1;
	elseif (z <= 4.2e+219)
		tmp = (y2 * (c * ((x * y0) - (t * y4)))) + t_1;
	else
		tmp = y1 * (z * ((a * y3) - (i * k)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.05e+158], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.45e-302], N[(N[(y2 * N[(t * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[z, 4.2e+219], N[(N[(y2 * N[(c * N[(N[(x * y0), $MachinePrecision] - N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;z \leq -4.05 \cdot 10^{+158}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\

\mathbf{elif}\;z \leq 2.45 \cdot 10^{-302}:\\
\;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + t\_1\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{+219}:\\
\;\;\;\;y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + t\_1\\

\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.0499999999999999e158

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in b around inf

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

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

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    4. Applied rewrites36.5%

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

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

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

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

        \[\leadsto b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right) \]
      4. lift-*.f6426.9

        \[\leadsto b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto b \cdot \left(y0 \cdot \color{blue}{\left(k \cdot z - j \cdot x\right)}\right) \]

    if -4.0499999999999999e158 < z < 2.4500000000000002e-302

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in t around inf

      \[\leadsto y2 \cdot \left(t \cdot \color{blue}{\left(a \cdot y5 - c \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - \color{blue}{c \cdot y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot \color{blue}{y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lift-*.f6437.4

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites37.4%

      \[\leadsto y2 \cdot \left(t \cdot \color{blue}{\left(a \cdot y5 - c \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]

    if 2.4500000000000002e-302 < z < 4.19999999999999976e219

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in c around inf

      \[\leadsto y2 \cdot \left(c \cdot \color{blue}{\left(x \cdot y0 - t \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - \color{blue}{t \cdot y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot \color{blue}{y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower-*.f6436.5

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites36.5%

      \[\leadsto y2 \cdot \left(c \cdot \color{blue}{\left(x \cdot y0 - t \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]

    if 4.19999999999999976e219 < z

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in z around inf

      \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - \color{blue}{i \cdot k}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot \color{blue}{k}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
      4. lower-*.f6427.4

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
    7. Applied rewrites27.4%

      \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 9: 38.3% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -6.8 \cdot 10^{+18}:\\ \;\;\;\;b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{elif}\;b \leq 9.6 \cdot 10^{-216}:\\ \;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ \mathbf{else}:\\ \;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= b -6.8e+18)
   (*
    b
    (-
     (fma a (- (* x y) (* t z)) (* y4 (- (* j t) (* k y))))
     (* y0 (- (* j x) (* k z)))))
   (if (<= b 9.6e-216)
     (+
      (* y2 (* t (- (* a y5) (* c y4))))
      (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))
     (*
      y2
      (-
       (fma k (- (* y1 y4) (* y0 y5)) (* x (- (* c y0) (* a y1))))
       (* t (- (* c y4) (* a y5))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (b <= -6.8e+18) {
		tmp = b * (fma(a, ((x * y) - (t * z)), (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))));
	} else if (b <= 9.6e-216) {
		tmp = (y2 * (t * ((a * y5) - (c * y4)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
	} else {
		tmp = y2 * (fma(k, ((y1 * y4) - (y0 * y5)), (x * ((c * y0) - (a * y1)))) - (t * ((c * y4) - (a * y5))));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (b <= -6.8e+18)
		tmp = Float64(b * Float64(fma(a, Float64(Float64(x * y) - Float64(t * z)), Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z)))));
	elseif (b <= 9.6e-216)
		tmp = Float64(Float64(y2 * Float64(t * Float64(Float64(a * y5) - Float64(c * y4)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))));
	else
		tmp = Float64(y2 * Float64(fma(k, Float64(Float64(y1 * y4) - Float64(y0 * y5)), Float64(x * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(t * Float64(Float64(c * y4) - Float64(a * y5)))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[b, -6.8e+18], N[(b * N[(N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.6e-216], N[(N[(y2 * N[(t * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y2 * N[(N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.8 \cdot 10^{+18}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\

\mathbf{elif}\;b \leq 9.6 \cdot 10^{-216}:\\
\;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\

\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\


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

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in b around inf

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

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

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    4. Applied rewrites36.5%

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

    if -6.8e18 < b < 9.60000000000000014e-216

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in t around inf

      \[\leadsto y2 \cdot \left(t \cdot \color{blue}{\left(a \cdot y5 - c \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - \color{blue}{c \cdot y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot \color{blue}{y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lift-*.f6437.4

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites37.4%

      \[\leadsto y2 \cdot \left(t \cdot \color{blue}{\left(a \cdot y5 - c \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]

    if 9.60000000000000014e-216 < b

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites37.7%

      \[\leadsto \color{blue}{y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 10: 38.2% accurate, 3.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\ \mathbf{if}\;j \leq -2.3 \cdot 10^{+192}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq -2.2 \cdot 10^{+79}:\\ \;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\ \mathbf{elif}\;j \leq -0.205:\\ \;\;\;\;c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)\right)\\ \mathbf{elif}\;j \leq -1.06 \cdot 10^{-158}:\\ \;\;\;\;i \cdot \left(k \cdot \left(z \cdot \left(\frac{y \cdot y5}{z} - y1\right)\right)\right)\\ \mathbf{elif}\;j \leq 5 \cdot 10^{-243}:\\ \;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\ \mathbf{elif}\;j \leq 8 \cdot 10^{-96}:\\ \;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\ \mathbf{elif}\;j \leq 5.5 \cdot 10^{+144}:\\ \;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* i (* t (fma -1.0 (* j y5) (* c z))))))
   (if (<= j -2.3e+192)
     t_1
     (if (<= j -2.2e+79)
       (* y1 (* y4 (- (* k y2) (* j y3))))
       (if (<= j -0.205)
         (* c (* z (fma -1.0 (* y0 y3) (* i t))))
         (if (<= j -1.06e-158)
           (* i (* k (* z (- (/ (* y y5) z) y1))))
           (if (<= j 5e-243)
             (* x (* y2 (- (* c y0) (* a y1))))
             (if (<= j 8e-96)
               (* c (* y4 (- (* y y3) (* t y2))))
               (if (<= j 5.5e+144)
                 (* i (* z (- (* c t) (* k y1))))
                 t_1)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = i * (t * fma(-1.0, (j * y5), (c * z)));
	double tmp;
	if (j <= -2.3e+192) {
		tmp = t_1;
	} else if (j <= -2.2e+79) {
		tmp = y1 * (y4 * ((k * y2) - (j * y3)));
	} else if (j <= -0.205) {
		tmp = c * (z * fma(-1.0, (y0 * y3), (i * t)));
	} else if (j <= -1.06e-158) {
		tmp = i * (k * (z * (((y * y5) / z) - y1)));
	} else if (j <= 5e-243) {
		tmp = x * (y2 * ((c * y0) - (a * y1)));
	} else if (j <= 8e-96) {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	} else if (j <= 5.5e+144) {
		tmp = i * (z * ((c * t) - (k * y1)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(i * Float64(t * fma(-1.0, Float64(j * y5), Float64(c * z))))
	tmp = 0.0
	if (j <= -2.3e+192)
		tmp = t_1;
	elseif (j <= -2.2e+79)
		tmp = Float64(y1 * Float64(y4 * Float64(Float64(k * y2) - Float64(j * y3))));
	elseif (j <= -0.205)
		tmp = Float64(c * Float64(z * fma(-1.0, Float64(y0 * y3), Float64(i * t))));
	elseif (j <= -1.06e-158)
		tmp = Float64(i * Float64(k * Float64(z * Float64(Float64(Float64(y * y5) / z) - y1))));
	elseif (j <= 5e-243)
		tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1))));
	elseif (j <= 8e-96)
		tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2))));
	elseif (j <= 5.5e+144)
		tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1))));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(i * N[(t * N[(-1.0 * N[(j * y5), $MachinePrecision] + N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -2.3e+192], t$95$1, If[LessEqual[j, -2.2e+79], N[(y1 * N[(y4 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -0.205], N[(c * N[(z * N[(-1.0 * N[(y0 * y3), $MachinePrecision] + N[(i * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -1.06e-158], N[(i * N[(k * N[(z * N[(N[(N[(y * y5), $MachinePrecision] / z), $MachinePrecision] - y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 5e-243], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 8e-96], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 5.5e+144], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\
\mathbf{if}\;j \leq -2.3 \cdot 10^{+192}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;j \leq -2.2 \cdot 10^{+79}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\

\mathbf{elif}\;j \leq -0.205:\\
\;\;\;\;c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)\right)\\

\mathbf{elif}\;j \leq -1.06 \cdot 10^{-158}:\\
\;\;\;\;i \cdot \left(k \cdot \left(z \cdot \left(\frac{y \cdot y5}{z} - y1\right)\right)\right)\\

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

\mathbf{elif}\;j \leq 8 \cdot 10^{-96}:\\
\;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\

\mathbf{elif}\;j \leq 5.5 \cdot 10^{+144}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if j < -2.2999999999999999e192 or 5.50000000000000022e144 < j

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in t around -inf

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

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

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

        \[\leadsto i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot \color{blue}{y5}, c \cdot z\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right) \]
    7. Applied rewrites26.8%

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

    if -2.2999999999999999e192 < j < -2.1999999999999999e79

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in y3 around inf

      \[\leadsto y1 \cdot \left(y3 \cdot \color{blue}{\left(-1 \cdot \left(j \cdot y4\right) + a \cdot z\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \left(-1 \cdot \left(j \cdot y4\right) + \color{blue}{a \cdot z}\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot \color{blue}{y4}, a \cdot z\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right) \]
      4. lower-*.f6427.0

        \[\leadsto y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right) \]
    7. Applied rewrites27.0%

      \[\leadsto y1 \cdot \left(y3 \cdot \color{blue}{\mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)}\right) \]
    8. Taylor expanded in y4 around inf

      \[\leadsto y1 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y2 - j \cdot y3\right)}\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(y4 \cdot \left(k \cdot y2 - \color{blue}{j \cdot y3}\right)\right) \]
      2. lift--.f64N/A

        \[\leadsto y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot \color{blue}{y3}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) \]
      4. lift-*.f6427.5

        \[\leadsto y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) \]
    10. Applied rewrites27.5%

      \[\leadsto y1 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y2 - j \cdot y3\right)}\right) \]

    if -2.1999999999999999e79 < j < -0.204999999999999988

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in c around inf

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

        \[\leadsto c \cdot \color{blue}{\left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{y4 \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.5%

      \[\leadsto \color{blue}{c \cdot \left(\mathsf{fma}\left(-1, i \cdot \left(x \cdot y - t \cdot z\right), y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    5. Taylor expanded in z around inf

      \[\leadsto c \cdot \left(z \cdot \color{blue}{\left(-1 \cdot \left(y0 \cdot y3\right) + i \cdot t\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(z \cdot \left(-1 \cdot \left(y0 \cdot y3\right) + \color{blue}{i \cdot t}\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot \color{blue}{y3}, i \cdot t\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)\right) \]
      4. lower-*.f6426.4

        \[\leadsto c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)\right) \]
    7. Applied rewrites26.4%

      \[\leadsto c \cdot \left(z \cdot \color{blue}{\mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)}\right) \]

    if -0.204999999999999988 < j < -1.06e-158

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    7. Applied rewrites26.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    8. Taylor expanded in z around inf

      \[\leadsto i \cdot \left(k \cdot \left(z \cdot \left(\frac{y \cdot y5}{z} - \color{blue}{y1}\right)\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(z \cdot \left(\frac{y \cdot y5}{z} - y1\right)\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(z \cdot \left(\frac{y \cdot y5}{z} - y1\right)\right)\right) \]
      3. lower-/.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(z \cdot \left(\frac{y \cdot y5}{z} - y1\right)\right)\right) \]
      4. lift-*.f6429.2

        \[\leadsto i \cdot \left(k \cdot \left(z \cdot \left(\frac{y \cdot y5}{z} - y1\right)\right)\right) \]
    10. Applied rewrites29.2%

      \[\leadsto i \cdot \left(k \cdot \left(z \cdot \left(\frac{y \cdot y5}{z} - \color{blue}{y1}\right)\right)\right) \]

    if -1.06e-158 < j < 5e-243

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites37.7%

      \[\leadsto \color{blue}{y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \color{blue}{\left(c \cdot y0 - a \cdot y1\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - \color{blue}{a \cdot y1}\right)\right) \]
      3. lift--.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot \color{blue}{y1}\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \]
      5. lift-*.f6427.3

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \]
    7. Applied rewrites27.3%

      \[\leadsto x \cdot \color{blue}{\left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)} \]

    if 5e-243 < j < 7.9999999999999993e-96

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in c around inf

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

        \[\leadsto c \cdot \color{blue}{\left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{y4 \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.5%

      \[\leadsto \color{blue}{c \cdot \left(\mathsf{fma}\left(-1, i \cdot \left(x \cdot y - t \cdot z\right), y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    5. Taylor expanded in y4 around inf

      \[\leadsto c \cdot \left(y4 \cdot \color{blue}{\left(y \cdot y3 - t \cdot y2\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - \color{blue}{t \cdot y2}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot \color{blue}{y2}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
      4. lift-*.f6427.2

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
    7. Applied rewrites27.2%

      \[\leadsto c \cdot \left(y4 \cdot \color{blue}{\left(y \cdot y3 - t \cdot y2\right)}\right) \]

    if 7.9999999999999993e-96 < j < 5.50000000000000022e144

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in z around -inf

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

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

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot \color{blue}{y1}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]
  3. Recombined 7 regimes into one program.
  4. Add Preprocessing

Alternative 11: 38.2% accurate, 3.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\ t_2 := y4 \cdot y1 - y5 \cdot y0\\ \mathbf{if}\;z \leq -5 \cdot 10^{+36}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{-286}:\\ \;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + \left(k \cdot y2\right) \cdot t\_2\\ \mathbf{elif}\;z \leq 1.56 \cdot 10^{+52}:\\ \;\;\;\;c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot t\_2\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+156}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* y1 (* z (- (* a y3) (* i k))))) (t_2 (- (* y4 y1) (* y5 y0))))
   (if (<= z -5e+36)
     t_1
     (if (<= z 4.1e-286)
       (+ (* y2 (* t (- (* a y5) (* c y4)))) (* (* k y2) t_2))
       (if (<= z 1.56e+52)
         (+ (* c (* x (* y0 y2))) (* (- (* k y2) (* j y3)) t_2))
         (if (<= z 2.1e+156) (* i (* y1 (- (* j x) (* k z)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y1 * (z * ((a * y3) - (i * k)));
	double t_2 = (y4 * y1) - (y5 * y0);
	double tmp;
	if (z <= -5e+36) {
		tmp = t_1;
	} else if (z <= 4.1e-286) {
		tmp = (y2 * (t * ((a * y5) - (c * y4)))) + ((k * y2) * t_2);
	} else if (z <= 1.56e+52) {
		tmp = (c * (x * (y0 * y2))) + (((k * y2) - (j * y3)) * t_2);
	} else if (z <= 2.1e+156) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} 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, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y1 * (z * ((a * y3) - (i * k)))
    t_2 = (y4 * y1) - (y5 * y0)
    if (z <= (-5d+36)) then
        tmp = t_1
    else if (z <= 4.1d-286) then
        tmp = (y2 * (t * ((a * y5) - (c * y4)))) + ((k * y2) * t_2)
    else if (z <= 1.56d+52) then
        tmp = (c * (x * (y0 * y2))) + (((k * y2) - (j * y3)) * t_2)
    else if (z <= 2.1d+156) then
        tmp = i * (y1 * ((j * x) - (k * z)))
    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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y1 * (z * ((a * y3) - (i * k)));
	double t_2 = (y4 * y1) - (y5 * y0);
	double tmp;
	if (z <= -5e+36) {
		tmp = t_1;
	} else if (z <= 4.1e-286) {
		tmp = (y2 * (t * ((a * y5) - (c * y4)))) + ((k * y2) * t_2);
	} else if (z <= 1.56e+52) {
		tmp = (c * (x * (y0 * y2))) + (((k * y2) - (j * y3)) * t_2);
	} else if (z <= 2.1e+156) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = y1 * (z * ((a * y3) - (i * k)))
	t_2 = (y4 * y1) - (y5 * y0)
	tmp = 0
	if z <= -5e+36:
		tmp = t_1
	elif z <= 4.1e-286:
		tmp = (y2 * (t * ((a * y5) - (c * y4)))) + ((k * y2) * t_2)
	elif z <= 1.56e+52:
		tmp = (c * (x * (y0 * y2))) + (((k * y2) - (j * y3)) * t_2)
	elif z <= 2.1e+156:
		tmp = i * (y1 * ((j * x) - (k * z)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k))))
	t_2 = Float64(Float64(y4 * y1) - Float64(y5 * y0))
	tmp = 0.0
	if (z <= -5e+36)
		tmp = t_1;
	elseif (z <= 4.1e-286)
		tmp = Float64(Float64(y2 * Float64(t * Float64(Float64(a * y5) - Float64(c * y4)))) + Float64(Float64(k * y2) * t_2));
	elseif (z <= 1.56e+52)
		tmp = Float64(Float64(c * Float64(x * Float64(y0 * y2))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * t_2));
	elseif (z <= 2.1e+156)
		tmp = Float64(i * Float64(y1 * Float64(Float64(j * x) - Float64(k * z))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = y1 * (z * ((a * y3) - (i * k)));
	t_2 = (y4 * y1) - (y5 * y0);
	tmp = 0.0;
	if (z <= -5e+36)
		tmp = t_1;
	elseif (z <= 4.1e-286)
		tmp = (y2 * (t * ((a * y5) - (c * y4)))) + ((k * y2) * t_2);
	elseif (z <= 1.56e+52)
		tmp = (c * (x * (y0 * y2))) + (((k * y2) - (j * y3)) * t_2);
	elseif (z <= 2.1e+156)
		tmp = i * (y1 * ((j * x) - (k * z)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e+36], t$95$1, If[LessEqual[z, 4.1e-286], N[(N[(y2 * N[(t * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(k * y2), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.56e+52], N[(N[(c * N[(x * N[(y0 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+156], N[(i * N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\
t_2 := y4 \cdot y1 - y5 \cdot y0\\
\mathbf{if}\;z \leq -5 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4.1 \cdot 10^{-286}:\\
\;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + \left(k \cdot y2\right) \cdot t\_2\\

\mathbf{elif}\;z \leq 1.56 \cdot 10^{+52}:\\
\;\;\;\;c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot t\_2\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{+156}:\\
\;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.99999999999999977e36 or 2.09999999999999981e156 < z

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in z around inf

      \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - \color{blue}{i \cdot k}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot \color{blue}{k}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
      4. lower-*.f6427.4

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
    7. Applied rewrites27.4%

      \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]

    if -4.99999999999999977e36 < z < 4.1e-286

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in t around inf

      \[\leadsto y2 \cdot \left(t \cdot \color{blue}{\left(a \cdot y5 - c \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - \color{blue}{c \cdot y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot \color{blue}{y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lift-*.f6437.4

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites37.4%

      \[\leadsto y2 \cdot \left(t \cdot \color{blue}{\left(a \cdot y5 - c \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    8. Taylor expanded in j around 0

      \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + \color{blue}{\left(k \cdot y2\right)} \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    9. Step-by-step derivation
      1. lift-*.f6430.9

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + \left(k \cdot \color{blue}{y2}\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    10. Applied rewrites30.9%

      \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) + \color{blue}{\left(k \cdot y2\right)} \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]

    if 4.1e-286 < z < 1.55999999999999994e52

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in y0 around inf

      \[\leadsto c \cdot \color{blue}{\left(x \cdot \left(y0 \cdot y2\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f6434.4

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites34.4%

      \[\leadsto c \cdot \color{blue}{\left(x \cdot \left(y0 \cdot y2\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]

    if 1.55999999999999994e52 < z < 2.09999999999999981e156

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in i around inf

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

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

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

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      5. lift-*.f6427.0

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - \color{blue}{k \cdot z}\right)\right) \]
    7. Applied rewrites27.0%

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

Alternative 12: 37.7% accurate, 3.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\ t_2 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ \mathbf{if}\;z \leq -1.15 \cdot 10^{-25}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-303}:\\ \;\;\;\;y2 \cdot \left(a \cdot \left(t \cdot y5\right)\right) + t\_2\\ \mathbf{elif}\;z \leq 1.56 \cdot 10^{+52}:\\ \;\;\;\;c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) + t\_2\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+156}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* y1 (* z (- (* a y3) (* i k)))))
        (t_2 (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
   (if (<= z -1.15e-25)
     t_1
     (if (<= z 4.3e-303)
       (+ (* y2 (* a (* t y5))) t_2)
       (if (<= z 1.56e+52)
         (+ (* c (* x (* y0 y2))) t_2)
         (if (<= z 2.1e+156) (* i (* y1 (- (* j x) (* k z)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y1 * (z * ((a * y3) - (i * k)));
	double t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
	double tmp;
	if (z <= -1.15e-25) {
		tmp = t_1;
	} else if (z <= 4.3e-303) {
		tmp = (y2 * (a * (t * y5))) + t_2;
	} else if (z <= 1.56e+52) {
		tmp = (c * (x * (y0 * y2))) + t_2;
	} else if (z <= 2.1e+156) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} 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, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y1 * (z * ((a * y3) - (i * k)))
    t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))
    if (z <= (-1.15d-25)) then
        tmp = t_1
    else if (z <= 4.3d-303) then
        tmp = (y2 * (a * (t * y5))) + t_2
    else if (z <= 1.56d+52) then
        tmp = (c * (x * (y0 * y2))) + t_2
    else if (z <= 2.1d+156) then
        tmp = i * (y1 * ((j * x) - (k * z)))
    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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y1 * (z * ((a * y3) - (i * k)));
	double t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
	double tmp;
	if (z <= -1.15e-25) {
		tmp = t_1;
	} else if (z <= 4.3e-303) {
		tmp = (y2 * (a * (t * y5))) + t_2;
	} else if (z <= 1.56e+52) {
		tmp = (c * (x * (y0 * y2))) + t_2;
	} else if (z <= 2.1e+156) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = y1 * (z * ((a * y3) - (i * k)))
	t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))
	tmp = 0
	if z <= -1.15e-25:
		tmp = t_1
	elif z <= 4.3e-303:
		tmp = (y2 * (a * (t * y5))) + t_2
	elif z <= 1.56e+52:
		tmp = (c * (x * (y0 * y2))) + t_2
	elif z <= 2.1e+156:
		tmp = i * (y1 * ((j * x) - (k * z)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k))))
	t_2 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))
	tmp = 0.0
	if (z <= -1.15e-25)
		tmp = t_1;
	elseif (z <= 4.3e-303)
		tmp = Float64(Float64(y2 * Float64(a * Float64(t * y5))) + t_2);
	elseif (z <= 1.56e+52)
		tmp = Float64(Float64(c * Float64(x * Float64(y0 * y2))) + t_2);
	elseif (z <= 2.1e+156)
		tmp = Float64(i * Float64(y1 * Float64(Float64(j * x) - Float64(k * z))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = y1 * (z * ((a * y3) - (i * k)));
	t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
	tmp = 0.0;
	if (z <= -1.15e-25)
		tmp = t_1;
	elseif (z <= 4.3e-303)
		tmp = (y2 * (a * (t * y5))) + t_2;
	elseif (z <= 1.56e+52)
		tmp = (c * (x * (y0 * y2))) + t_2;
	elseif (z <= 2.1e+156)
		tmp = i * (y1 * ((j * x) - (k * z)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.15e-25], t$95$1, If[LessEqual[z, 4.3e-303], N[(N[(y2 * N[(a * N[(t * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[z, 1.56e+52], N[(N[(c * N[(x * N[(y0 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[z, 2.1e+156], N[(i * N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\
t_2 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4.3 \cdot 10^{-303}:\\
\;\;\;\;y2 \cdot \left(a \cdot \left(t \cdot y5\right)\right) + t\_2\\

\mathbf{elif}\;z \leq 1.56 \cdot 10^{+52}:\\
\;\;\;\;c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) + t\_2\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{+156}:\\
\;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.15e-25 or 2.09999999999999981e156 < z

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in z around inf

      \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - \color{blue}{i \cdot k}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot \color{blue}{k}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
      4. lower-*.f6427.4

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
    7. Applied rewrites27.4%

      \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]

    if -1.15e-25 < z < 4.29999999999999981e-303

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in y5 around inf

      \[\leadsto y2 \cdot \left(a \cdot \color{blue}{\left(t \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(a \cdot \left(t \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower-*.f6435.9

        \[\leadsto y2 \cdot \left(a \cdot \left(t \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites35.9%

      \[\leadsto y2 \cdot \left(a \cdot \color{blue}{\left(t \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]

    if 4.29999999999999981e-303 < z < 1.55999999999999994e52

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in y0 around inf

      \[\leadsto c \cdot \color{blue}{\left(x \cdot \left(y0 \cdot y2\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f6434.4

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites34.4%

      \[\leadsto c \cdot \color{blue}{\left(x \cdot \left(y0 \cdot y2\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]

    if 1.55999999999999994e52 < z < 2.09999999999999981e156

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in i around inf

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

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

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

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      5. lift-*.f6427.0

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - \color{blue}{k \cdot z}\right)\right) \]
    7. Applied rewrites27.0%

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

Alternative 13: 37.6% accurate, 3.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\ \mathbf{if}\;j \leq -2.3 \cdot 10^{+192}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq -2.2 \cdot 10^{+79}:\\ \;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\ \mathbf{elif}\;j \leq -0.185:\\ \;\;\;\;c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)\right)\\ \mathbf{elif}\;j \leq -1.06 \cdot 10^{-158}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\ \mathbf{elif}\;j \leq 5 \cdot 10^{-243}:\\ \;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\ \mathbf{elif}\;j \leq 8 \cdot 10^{-96}:\\ \;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\ \mathbf{elif}\;j \leq 5.5 \cdot 10^{+144}:\\ \;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* i (* t (fma -1.0 (* j y5) (* c z))))))
   (if (<= j -2.3e+192)
     t_1
     (if (<= j -2.2e+79)
       (* y1 (* y4 (- (* k y2) (* j y3))))
       (if (<= j -0.185)
         (* c (* z (fma -1.0 (* y0 y3) (* i t))))
         (if (<= j -1.06e-158)
           (* i (* k (- (* y y5) (* y1 z))))
           (if (<= j 5e-243)
             (* x (* y2 (- (* c y0) (* a y1))))
             (if (<= j 8e-96)
               (* c (* y4 (- (* y y3) (* t y2))))
               (if (<= j 5.5e+144)
                 (* i (* z (- (* c t) (* k y1))))
                 t_1)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = i * (t * fma(-1.0, (j * y5), (c * z)));
	double tmp;
	if (j <= -2.3e+192) {
		tmp = t_1;
	} else if (j <= -2.2e+79) {
		tmp = y1 * (y4 * ((k * y2) - (j * y3)));
	} else if (j <= -0.185) {
		tmp = c * (z * fma(-1.0, (y0 * y3), (i * t)));
	} else if (j <= -1.06e-158) {
		tmp = i * (k * ((y * y5) - (y1 * z)));
	} else if (j <= 5e-243) {
		tmp = x * (y2 * ((c * y0) - (a * y1)));
	} else if (j <= 8e-96) {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	} else if (j <= 5.5e+144) {
		tmp = i * (z * ((c * t) - (k * y1)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(i * Float64(t * fma(-1.0, Float64(j * y5), Float64(c * z))))
	tmp = 0.0
	if (j <= -2.3e+192)
		tmp = t_1;
	elseif (j <= -2.2e+79)
		tmp = Float64(y1 * Float64(y4 * Float64(Float64(k * y2) - Float64(j * y3))));
	elseif (j <= -0.185)
		tmp = Float64(c * Float64(z * fma(-1.0, Float64(y0 * y3), Float64(i * t))));
	elseif (j <= -1.06e-158)
		tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z))));
	elseif (j <= 5e-243)
		tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1))));
	elseif (j <= 8e-96)
		tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2))));
	elseif (j <= 5.5e+144)
		tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1))));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(i * N[(t * N[(-1.0 * N[(j * y5), $MachinePrecision] + N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -2.3e+192], t$95$1, If[LessEqual[j, -2.2e+79], N[(y1 * N[(y4 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -0.185], N[(c * N[(z * N[(-1.0 * N[(y0 * y3), $MachinePrecision] + N[(i * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -1.06e-158], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 5e-243], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 8e-96], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 5.5e+144], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\
\mathbf{if}\;j \leq -2.3 \cdot 10^{+192}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;j \leq -2.2 \cdot 10^{+79}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\

\mathbf{elif}\;j \leq -0.185:\\
\;\;\;\;c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)\right)\\

\mathbf{elif}\;j \leq -1.06 \cdot 10^{-158}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\

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

\mathbf{elif}\;j \leq 8 \cdot 10^{-96}:\\
\;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\

\mathbf{elif}\;j \leq 5.5 \cdot 10^{+144}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if j < -2.2999999999999999e192 or 5.50000000000000022e144 < j

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in t around -inf

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

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

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

        \[\leadsto i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot \color{blue}{y5}, c \cdot z\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right) \]
    7. Applied rewrites26.8%

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

    if -2.2999999999999999e192 < j < -2.1999999999999999e79

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in y3 around inf

      \[\leadsto y1 \cdot \left(y3 \cdot \color{blue}{\left(-1 \cdot \left(j \cdot y4\right) + a \cdot z\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \left(-1 \cdot \left(j \cdot y4\right) + \color{blue}{a \cdot z}\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot \color{blue}{y4}, a \cdot z\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right) \]
      4. lower-*.f6427.0

        \[\leadsto y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right) \]
    7. Applied rewrites27.0%

      \[\leadsto y1 \cdot \left(y3 \cdot \color{blue}{\mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)}\right) \]
    8. Taylor expanded in y4 around inf

      \[\leadsto y1 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y2 - j \cdot y3\right)}\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(y4 \cdot \left(k \cdot y2 - \color{blue}{j \cdot y3}\right)\right) \]
      2. lift--.f64N/A

        \[\leadsto y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot \color{blue}{y3}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) \]
      4. lift-*.f6427.5

        \[\leadsto y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) \]
    10. Applied rewrites27.5%

      \[\leadsto y1 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y2 - j \cdot y3\right)}\right) \]

    if -2.1999999999999999e79 < j < -0.185

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in c around inf

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

        \[\leadsto c \cdot \color{blue}{\left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{y4 \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.5%

      \[\leadsto \color{blue}{c \cdot \left(\mathsf{fma}\left(-1, i \cdot \left(x \cdot y - t \cdot z\right), y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    5. Taylor expanded in z around inf

      \[\leadsto c \cdot \left(z \cdot \color{blue}{\left(-1 \cdot \left(y0 \cdot y3\right) + i \cdot t\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(z \cdot \left(-1 \cdot \left(y0 \cdot y3\right) + \color{blue}{i \cdot t}\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot \color{blue}{y3}, i \cdot t\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)\right) \]
      4. lower-*.f6426.4

        \[\leadsto c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)\right) \]
    7. Applied rewrites26.4%

      \[\leadsto c \cdot \left(z \cdot \color{blue}{\mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)}\right) \]

    if -0.185 < j < -1.06e-158

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    7. Applied rewrites26.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]

    if -1.06e-158 < j < 5e-243

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites37.7%

      \[\leadsto \color{blue}{y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \color{blue}{\left(c \cdot y0 - a \cdot y1\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - \color{blue}{a \cdot y1}\right)\right) \]
      3. lift--.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot \color{blue}{y1}\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \]
      5. lift-*.f6427.3

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \]
    7. Applied rewrites27.3%

      \[\leadsto x \cdot \color{blue}{\left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)} \]

    if 5e-243 < j < 7.9999999999999993e-96

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in c around inf

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

        \[\leadsto c \cdot \color{blue}{\left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{y4 \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.5%

      \[\leadsto \color{blue}{c \cdot \left(\mathsf{fma}\left(-1, i \cdot \left(x \cdot y - t \cdot z\right), y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    5. Taylor expanded in y4 around inf

      \[\leadsto c \cdot \left(y4 \cdot \color{blue}{\left(y \cdot y3 - t \cdot y2\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - \color{blue}{t \cdot y2}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot \color{blue}{y2}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
      4. lift-*.f6427.2

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
    7. Applied rewrites27.2%

      \[\leadsto c \cdot \left(y4 \cdot \color{blue}{\left(y \cdot y3 - t \cdot y2\right)}\right) \]

    if 7.9999999999999993e-96 < j < 5.50000000000000022e144

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in z around -inf

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

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

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot \color{blue}{y1}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]
  3. Recombined 7 regimes into one program.
  4. Add Preprocessing

Alternative 14: 37.5% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.1 \cdot 10^{+158}:\\ \;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+219}:\\ \;\;\;\;y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ \mathbf{else}:\\ \;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= z -4.1e+158)
   (* b (* y0 (- (* k z) (* j x))))
   (if (<= z 4.2e+219)
     (+
      (* y2 (* c (- (* x y0) (* t y4))))
      (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))
     (* y1 (* z (- (* a y3) (* i k)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (z <= -4.1e+158) {
		tmp = b * (y0 * ((k * z) - (j * x)));
	} else if (z <= 4.2e+219) {
		tmp = (y2 * (c * ((x * y0) - (t * y4)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
	} else {
		tmp = y1 * (z * ((a * y3) - (i * k)));
	}
	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, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (z <= (-4.1d+158)) then
        tmp = b * (y0 * ((k * z) - (j * x)))
    else if (z <= 4.2d+219) then
        tmp = (y2 * (c * ((x * y0) - (t * y4)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
    else
        tmp = y1 * (z * ((a * y3) - (i * k)))
    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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (z <= -4.1e+158) {
		tmp = b * (y0 * ((k * z) - (j * x)));
	} else if (z <= 4.2e+219) {
		tmp = (y2 * (c * ((x * y0) - (t * y4)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
	} else {
		tmp = y1 * (z * ((a * y3) - (i * k)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if z <= -4.1e+158:
		tmp = b * (y0 * ((k * z) - (j * x)))
	elif z <= 4.2e+219:
		tmp = (y2 * (c * ((x * y0) - (t * y4)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
	else:
		tmp = y1 * (z * ((a * y3) - (i * k)))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (z <= -4.1e+158)
		tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x))));
	elseif (z <= 4.2e+219)
		tmp = Float64(Float64(y2 * Float64(c * Float64(Float64(x * y0) - Float64(t * y4)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))));
	else
		tmp = Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (z <= -4.1e+158)
		tmp = b * (y0 * ((k * z) - (j * x)));
	elseif (z <= 4.2e+219)
		tmp = (y2 * (c * ((x * y0) - (t * y4)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
	else
		tmp = y1 * (z * ((a * y3) - (i * k)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[z, -4.1e+158], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e+219], N[(N[(y2 * N[(c * N[(N[(x * y0), $MachinePrecision] - N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+158}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{+219}:\\
\;\;\;\;y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\

\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.10000000000000004e158

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in b around inf

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

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

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    4. Applied rewrites36.5%

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

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

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

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

        \[\leadsto b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right) \]
      4. lift-*.f6426.9

        \[\leadsto b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto b \cdot \left(y0 \cdot \color{blue}{\left(k \cdot z - j \cdot x\right)}\right) \]

    if -4.10000000000000004e158 < z < 4.19999999999999976e219

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in c around inf

      \[\leadsto y2 \cdot \left(c \cdot \color{blue}{\left(x \cdot y0 - t \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - \color{blue}{t \cdot y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot \color{blue}{y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower-*.f6436.5

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites36.5%

      \[\leadsto y2 \cdot \left(c \cdot \color{blue}{\left(x \cdot y0 - t \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]

    if 4.19999999999999976e219 < z

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in z around inf

      \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - \color{blue}{i \cdot k}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot \color{blue}{k}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
      4. lower-*.f6427.4

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
    7. Applied rewrites27.4%

      \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 15: 37.1% accurate, 3.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\ \mathbf{if}\;z \leq -5.2 \cdot 10^{+36}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.02 \cdot 10^{-224}:\\ \;\;\;\;y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \mathbf{elif}\;z \leq 1.56 \cdot 10^{+52}:\\ \;\;\;\;c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+156}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* y1 (* z (- (* a y3) (* i k))))))
   (if (<= z -5.2e+36)
     t_1
     (if (<= z -2.02e-224)
       (* y2 (- (* -1.0 (* a (* x y1))) (* t (- (* c y4) (* a y5)))))
       (if (<= z 1.56e+52)
         (+
          (* c (* x (* y0 y2)))
          (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))
         (if (<= z 2.1e+156) (* i (* y1 (- (* j x) (* k z)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y1 * (z * ((a * y3) - (i * k)));
	double tmp;
	if (z <= -5.2e+36) {
		tmp = t_1;
	} else if (z <= -2.02e-224) {
		tmp = y2 * ((-1.0 * (a * (x * y1))) - (t * ((c * y4) - (a * y5))));
	} else if (z <= 1.56e+52) {
		tmp = (c * (x * (y0 * y2))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
	} else if (z <= 2.1e+156) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} 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, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y1 * (z * ((a * y3) - (i * k)))
    if (z <= (-5.2d+36)) then
        tmp = t_1
    else if (z <= (-2.02d-224)) then
        tmp = y2 * (((-1.0d0) * (a * (x * y1))) - (t * ((c * y4) - (a * y5))))
    else if (z <= 1.56d+52) then
        tmp = (c * (x * (y0 * y2))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
    else if (z <= 2.1d+156) then
        tmp = i * (y1 * ((j * x) - (k * z)))
    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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y1 * (z * ((a * y3) - (i * k)));
	double tmp;
	if (z <= -5.2e+36) {
		tmp = t_1;
	} else if (z <= -2.02e-224) {
		tmp = y2 * ((-1.0 * (a * (x * y1))) - (t * ((c * y4) - (a * y5))));
	} else if (z <= 1.56e+52) {
		tmp = (c * (x * (y0 * y2))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
	} else if (z <= 2.1e+156) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = y1 * (z * ((a * y3) - (i * k)))
	tmp = 0
	if z <= -5.2e+36:
		tmp = t_1
	elif z <= -2.02e-224:
		tmp = y2 * ((-1.0 * (a * (x * y1))) - (t * ((c * y4) - (a * y5))))
	elif z <= 1.56e+52:
		tmp = (c * (x * (y0 * y2))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
	elif z <= 2.1e+156:
		tmp = i * (y1 * ((j * x) - (k * z)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k))))
	tmp = 0.0
	if (z <= -5.2e+36)
		tmp = t_1;
	elseif (z <= -2.02e-224)
		tmp = Float64(y2 * Float64(Float64(-1.0 * Float64(a * Float64(x * y1))) - Float64(t * Float64(Float64(c * y4) - Float64(a * y5)))));
	elseif (z <= 1.56e+52)
		tmp = Float64(Float64(c * Float64(x * Float64(y0 * y2))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))));
	elseif (z <= 2.1e+156)
		tmp = Float64(i * Float64(y1 * Float64(Float64(j * x) - Float64(k * z))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = y1 * (z * ((a * y3) - (i * k)));
	tmp = 0.0;
	if (z <= -5.2e+36)
		tmp = t_1;
	elseif (z <= -2.02e-224)
		tmp = y2 * ((-1.0 * (a * (x * y1))) - (t * ((c * y4) - (a * y5))));
	elseif (z <= 1.56e+52)
		tmp = (c * (x * (y0 * y2))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
	elseif (z <= 2.1e+156)
		tmp = i * (y1 * ((j * x) - (k * z)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e+36], t$95$1, If[LessEqual[z, -2.02e-224], N[(y2 * N[(N[(-1.0 * N[(a * N[(x * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.56e+52], N[(N[(c * N[(x * N[(y0 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+156], N[(i * N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -2.02 \cdot 10^{-224}:\\
\;\;\;\;y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\

\mathbf{elif}\;z \leq 1.56 \cdot 10^{+52}:\\
\;\;\;\;c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{+156}:\\
\;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.2000000000000003e36 or 2.09999999999999981e156 < z

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in z around inf

      \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - \color{blue}{i \cdot k}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot \color{blue}{k}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
      4. lower-*.f6427.4

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
    7. Applied rewrites27.4%

      \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]

    if -5.2000000000000003e36 < z < -2.02e-224

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites37.7%

      \[\leadsto \color{blue}{y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    5. Taylor expanded in a around inf

      \[\leadsto y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1\right)\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      3. lower-*.f6432.5

        \[\leadsto y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
    7. Applied rewrites32.5%

      \[\leadsto y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1\right)\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]

    if -2.02e-224 < z < 1.55999999999999994e52

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in y0 around inf

      \[\leadsto c \cdot \color{blue}{\left(x \cdot \left(y0 \cdot y2\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f6434.4

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites34.4%

      \[\leadsto c \cdot \color{blue}{\left(x \cdot \left(y0 \cdot y2\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]

    if 1.55999999999999994e52 < z < 2.09999999999999981e156

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in i around inf

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

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

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

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      5. lift-*.f6427.0

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - \color{blue}{k \cdot z}\right)\right) \]
    7. Applied rewrites27.0%

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

Alternative 16: 36.0% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\ \mathbf{if}\;z \leq -5.9 \cdot 10^{-15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.65 \cdot 10^{+40}:\\ \;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+219}:\\ \;\;\;\;c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* y1 (* z (- (* a y3) (* i k))))))
   (if (<= z -5.9e-15)
     t_1
     (if (<= z 3.65e+40)
       (+
        (* x (* y2 (- (* c y0) (* a y1))))
        (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))
       (if (<= z 4.2e+219) (* c (* z (fma -1.0 (* y0 y3) (* i t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y1 * (z * ((a * y3) - (i * k)));
	double tmp;
	if (z <= -5.9e-15) {
		tmp = t_1;
	} else if (z <= 3.65e+40) {
		tmp = (x * (y2 * ((c * y0) - (a * y1)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
	} else if (z <= 4.2e+219) {
		tmp = c * (z * fma(-1.0, (y0 * y3), (i * t)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k))))
	tmp = 0.0
	if (z <= -5.9e-15)
		tmp = t_1;
	elseif (z <= 3.65e+40)
		tmp = Float64(Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))));
	elseif (z <= 4.2e+219)
		tmp = Float64(c * Float64(z * fma(-1.0, Float64(y0 * y3), Float64(i * t))));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.9e-15], t$95$1, If[LessEqual[z, 3.65e+40], N[(N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e+219], N[(c * N[(z * N[(-1.0 * N[(y0 * y3), $MachinePrecision] + N[(i * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\
\mathbf{if}\;z \leq -5.9 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3.65 \cdot 10^{+40}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{+219}:\\
\;\;\;\;c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.89999999999999963e-15 or 4.19999999999999976e219 < z

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in z around inf

      \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - \color{blue}{i \cdot k}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot \color{blue}{k}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
      4. lower-*.f6427.4

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
    7. Applied rewrites27.4%

      \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]

    if -5.89999999999999963e-15 < z < 3.6500000000000002e40

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \color{blue}{\left(c \cdot y0 - a \cdot y1\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - \color{blue}{a \cdot y1}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lift--.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot \color{blue}{y1}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lift-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lift-*.f6435.7

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites35.7%

      \[\leadsto x \cdot \color{blue}{\left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]

    if 3.6500000000000002e40 < z < 4.19999999999999976e219

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in c around inf

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

        \[\leadsto c \cdot \color{blue}{\left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{y4 \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.5%

      \[\leadsto \color{blue}{c \cdot \left(\mathsf{fma}\left(-1, i \cdot \left(x \cdot y - t \cdot z\right), y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    5. Taylor expanded in z around inf

      \[\leadsto c \cdot \left(z \cdot \color{blue}{\left(-1 \cdot \left(y0 \cdot y3\right) + i \cdot t\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(z \cdot \left(-1 \cdot \left(y0 \cdot y3\right) + \color{blue}{i \cdot t}\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot \color{blue}{y3}, i \cdot t\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)\right) \]
      4. lower-*.f6426.4

        \[\leadsto c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)\right) \]
    7. Applied rewrites26.4%

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

Alternative 17: 34.5% accurate, 3.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\ \mathbf{if}\;j \leq -1 \cdot 10^{+186}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq -0.2:\\ \;\;\;\;y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \mathbf{elif}\;j \leq -1.06 \cdot 10^{-158}:\\ \;\;\;\;i \cdot \left(k \cdot \left(z \cdot \left(\frac{y \cdot y5}{z} - y1\right)\right)\right)\\ \mathbf{elif}\;j \leq 5 \cdot 10^{-243}:\\ \;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\ \mathbf{elif}\;j \leq 8 \cdot 10^{-96}:\\ \;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\ \mathbf{elif}\;j \leq 5.5 \cdot 10^{+144}:\\ \;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* i (* t (fma -1.0 (* j y5) (* c z))))))
   (if (<= j -1e+186)
     t_1
     (if (<= j -0.2)
       (* y2 (- (* -1.0 (* a (* x y1))) (* t (- (* c y4) (* a y5)))))
       (if (<= j -1.06e-158)
         (* i (* k (* z (- (/ (* y y5) z) y1))))
         (if (<= j 5e-243)
           (* x (* y2 (- (* c y0) (* a y1))))
           (if (<= j 8e-96)
             (* c (* y4 (- (* y y3) (* t y2))))
             (if (<= j 5.5e+144) (* i (* z (- (* c t) (* k y1)))) t_1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = i * (t * fma(-1.0, (j * y5), (c * z)));
	double tmp;
	if (j <= -1e+186) {
		tmp = t_1;
	} else if (j <= -0.2) {
		tmp = y2 * ((-1.0 * (a * (x * y1))) - (t * ((c * y4) - (a * y5))));
	} else if (j <= -1.06e-158) {
		tmp = i * (k * (z * (((y * y5) / z) - y1)));
	} else if (j <= 5e-243) {
		tmp = x * (y2 * ((c * y0) - (a * y1)));
	} else if (j <= 8e-96) {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	} else if (j <= 5.5e+144) {
		tmp = i * (z * ((c * t) - (k * y1)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(i * Float64(t * fma(-1.0, Float64(j * y5), Float64(c * z))))
	tmp = 0.0
	if (j <= -1e+186)
		tmp = t_1;
	elseif (j <= -0.2)
		tmp = Float64(y2 * Float64(Float64(-1.0 * Float64(a * Float64(x * y1))) - Float64(t * Float64(Float64(c * y4) - Float64(a * y5)))));
	elseif (j <= -1.06e-158)
		tmp = Float64(i * Float64(k * Float64(z * Float64(Float64(Float64(y * y5) / z) - y1))));
	elseif (j <= 5e-243)
		tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1))));
	elseif (j <= 8e-96)
		tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2))));
	elseif (j <= 5.5e+144)
		tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1))));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(i * N[(t * N[(-1.0 * N[(j * y5), $MachinePrecision] + N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1e+186], t$95$1, If[LessEqual[j, -0.2], N[(y2 * N[(N[(-1.0 * N[(a * N[(x * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -1.06e-158], N[(i * N[(k * N[(z * N[(N[(N[(y * y5), $MachinePrecision] / z), $MachinePrecision] - y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 5e-243], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 8e-96], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 5.5e+144], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\
\mathbf{if}\;j \leq -1 \cdot 10^{+186}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;j \leq -0.2:\\
\;\;\;\;y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\

\mathbf{elif}\;j \leq -1.06 \cdot 10^{-158}:\\
\;\;\;\;i \cdot \left(k \cdot \left(z \cdot \left(\frac{y \cdot y5}{z} - y1\right)\right)\right)\\

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

\mathbf{elif}\;j \leq 8 \cdot 10^{-96}:\\
\;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\

\mathbf{elif}\;j \leq 5.5 \cdot 10^{+144}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if j < -9.9999999999999998e185 or 5.50000000000000022e144 < j

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in t around -inf

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

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

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

        \[\leadsto i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot \color{blue}{y5}, c \cdot z\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right) \]
    7. Applied rewrites26.8%

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

    if -9.9999999999999998e185 < j < -0.20000000000000001

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites37.7%

      \[\leadsto \color{blue}{y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    5. Taylor expanded in a around inf

      \[\leadsto y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1\right)\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      3. lower-*.f6432.5

        \[\leadsto y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
    7. Applied rewrites32.5%

      \[\leadsto y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1\right)\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]

    if -0.20000000000000001 < j < -1.06e-158

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    7. Applied rewrites26.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    8. Taylor expanded in z around inf

      \[\leadsto i \cdot \left(k \cdot \left(z \cdot \left(\frac{y \cdot y5}{z} - \color{blue}{y1}\right)\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(z \cdot \left(\frac{y \cdot y5}{z} - y1\right)\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(z \cdot \left(\frac{y \cdot y5}{z} - y1\right)\right)\right) \]
      3. lower-/.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(z \cdot \left(\frac{y \cdot y5}{z} - y1\right)\right)\right) \]
      4. lift-*.f6429.2

        \[\leadsto i \cdot \left(k \cdot \left(z \cdot \left(\frac{y \cdot y5}{z} - y1\right)\right)\right) \]
    10. Applied rewrites29.2%

      \[\leadsto i \cdot \left(k \cdot \left(z \cdot \left(\frac{y \cdot y5}{z} - \color{blue}{y1}\right)\right)\right) \]

    if -1.06e-158 < j < 5e-243

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites37.7%

      \[\leadsto \color{blue}{y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \color{blue}{\left(c \cdot y0 - a \cdot y1\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - \color{blue}{a \cdot y1}\right)\right) \]
      3. lift--.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot \color{blue}{y1}\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \]
      5. lift-*.f6427.3

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \]
    7. Applied rewrites27.3%

      \[\leadsto x \cdot \color{blue}{\left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)} \]

    if 5e-243 < j < 7.9999999999999993e-96

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in c around inf

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

        \[\leadsto c \cdot \color{blue}{\left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{y4 \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.5%

      \[\leadsto \color{blue}{c \cdot \left(\mathsf{fma}\left(-1, i \cdot \left(x \cdot y - t \cdot z\right), y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    5. Taylor expanded in y4 around inf

      \[\leadsto c \cdot \left(y4 \cdot \color{blue}{\left(y \cdot y3 - t \cdot y2\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - \color{blue}{t \cdot y2}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot \color{blue}{y2}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
      4. lift-*.f6427.2

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
    7. Applied rewrites27.2%

      \[\leadsto c \cdot \left(y4 \cdot \color{blue}{\left(y \cdot y3 - t \cdot y2\right)}\right) \]

    if 7.9999999999999993e-96 < j < 5.50000000000000022e144

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in z around -inf

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

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

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot \color{blue}{y1}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]
  3. Recombined 6 regimes into one program.
  4. Add Preprocessing

Alternative 18: 32.3% accurate, 3.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\ \mathbf{if}\;z \leq -3.9 \cdot 10^{-15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{+46}:\\ \;\;\;\;y2 \cdot \left(c \cdot \left(x \cdot y0\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+156}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* y1 (* z (- (* a y3) (* i k))))))
   (if (<= z -3.9e-15)
     t_1
     (if (<= z 2.15e+46)
       (+
        (* y2 (* c (* x y0)))
        (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))
       (if (<= z 2.1e+156) (* i (* y1 (- (* j x) (* k z)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y1 * (z * ((a * y3) - (i * k)));
	double tmp;
	if (z <= -3.9e-15) {
		tmp = t_1;
	} else if (z <= 2.15e+46) {
		tmp = (y2 * (c * (x * y0))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
	} else if (z <= 2.1e+156) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} 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, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y1 * (z * ((a * y3) - (i * k)))
    if (z <= (-3.9d-15)) then
        tmp = t_1
    else if (z <= 2.15d+46) then
        tmp = (y2 * (c * (x * y0))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
    else if (z <= 2.1d+156) then
        tmp = i * (y1 * ((j * x) - (k * z)))
    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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y1 * (z * ((a * y3) - (i * k)));
	double tmp;
	if (z <= -3.9e-15) {
		tmp = t_1;
	} else if (z <= 2.15e+46) {
		tmp = (y2 * (c * (x * y0))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
	} else if (z <= 2.1e+156) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = y1 * (z * ((a * y3) - (i * k)))
	tmp = 0
	if z <= -3.9e-15:
		tmp = t_1
	elif z <= 2.15e+46:
		tmp = (y2 * (c * (x * y0))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
	elif z <= 2.1e+156:
		tmp = i * (y1 * ((j * x) - (k * z)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k))))
	tmp = 0.0
	if (z <= -3.9e-15)
		tmp = t_1;
	elseif (z <= 2.15e+46)
		tmp = Float64(Float64(y2 * Float64(c * Float64(x * y0))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))));
	elseif (z <= 2.1e+156)
		tmp = Float64(i * Float64(y1 * Float64(Float64(j * x) - Float64(k * z))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = y1 * (z * ((a * y3) - (i * k)));
	tmp = 0.0;
	if (z <= -3.9e-15)
		tmp = t_1;
	elseif (z <= 2.15e+46)
		tmp = (y2 * (c * (x * y0))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
	elseif (z <= 2.1e+156)
		tmp = i * (y1 * ((j * x) - (k * z)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.9e-15], t$95$1, If[LessEqual[z, 2.15e+46], N[(N[(y2 * N[(c * N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+156], N[(i * N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\
\mathbf{if}\;z \leq -3.9 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.15 \cdot 10^{+46}:\\
\;\;\;\;y2 \cdot \left(c \cdot \left(x \cdot y0\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{+156}:\\
\;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.90000000000000026e-15 or 2.09999999999999981e156 < z

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in z around inf

      \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - \color{blue}{i \cdot k}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot \color{blue}{k}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
      4. lower-*.f6427.4

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
    7. Applied rewrites27.4%

      \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]

    if -3.90000000000000026e-15 < z < 2.15000000000000002e46

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in c around inf

      \[\leadsto y2 \cdot \left(c \cdot \color{blue}{\left(x \cdot y0 - t \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - \color{blue}{t \cdot y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot \color{blue}{y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower-*.f6436.5

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites36.5%

      \[\leadsto y2 \cdot \left(c \cdot \color{blue}{\left(x \cdot y0 - t \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    8. Taylor expanded in x around inf

      \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot \color{blue}{y0}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lift-*.f6436.0

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    10. Applied rewrites36.0%

      \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot \color{blue}{y0}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]

    if 2.15000000000000002e46 < z < 2.09999999999999981e156

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in i around inf

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

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

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

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      5. lift-*.f6427.0

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - \color{blue}{k \cdot z}\right)\right) \]
    7. Applied rewrites27.0%

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

Alternative 19: 32.3% accurate, 3.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y0 \leq -3.3 \cdot 10^{+40}:\\ \;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\ \mathbf{elif}\;y0 \leq 1.8 \cdot 10^{-220}:\\ \;\;\;\;y1 \cdot \left(\mathsf{fma}\left(a, y3 \cdot z, y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - i \cdot \left(k \cdot z\right)\right)\\ \mathbf{elif}\;y0 \leq 5.1 \cdot 10^{-8}:\\ \;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\ \mathbf{elif}\;y0 \leq 2.9 \cdot 10^{+121}:\\ \;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= y0 -3.3e+40)
   (* c (* y0 (- (* x y2) (* y3 z))))
   (if (<= y0 1.8e-220)
     (* y1 (- (fma a (* y3 z) (* y4 (- (* k y2) (* j y3)))) (* i (* k z))))
     (if (<= y0 5.1e-8)
       (* y2 (* t (- (* a y5) (* c y4))))
       (if (<= y0 2.9e+121)
         (* i (* t (fma -1.0 (* j y5) (* c z))))
         (* x (* y2 (- (* c y0) (* a y1)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y0 <= -3.3e+40) {
		tmp = c * (y0 * ((x * y2) - (y3 * z)));
	} else if (y0 <= 1.8e-220) {
		tmp = y1 * (fma(a, (y3 * z), (y4 * ((k * y2) - (j * y3)))) - (i * (k * z)));
	} else if (y0 <= 5.1e-8) {
		tmp = y2 * (t * ((a * y5) - (c * y4)));
	} else if (y0 <= 2.9e+121) {
		tmp = i * (t * fma(-1.0, (j * y5), (c * z)));
	} else {
		tmp = x * (y2 * ((c * y0) - (a * y1)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (y0 <= -3.3e+40)
		tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z))));
	elseif (y0 <= 1.8e-220)
		tmp = Float64(y1 * Float64(fma(a, Float64(y3 * z), Float64(y4 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(i * Float64(k * z))));
	elseif (y0 <= 5.1e-8)
		tmp = Float64(y2 * Float64(t * Float64(Float64(a * y5) - Float64(c * y4))));
	elseif (y0 <= 2.9e+121)
		tmp = Float64(i * Float64(t * fma(-1.0, Float64(j * y5), Float64(c * z))));
	else
		tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y0, -3.3e+40], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 1.8e-220], N[(y1 * N[(N[(a * N[(y3 * z), $MachinePrecision] + N[(y4 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 5.1e-8], N[(y2 * N[(t * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 2.9e+121], N[(i * N[(t * N[(-1.0 * N[(j * y5), $MachinePrecision] + N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y0 \leq -3.3 \cdot 10^{+40}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\

\mathbf{elif}\;y0 \leq 1.8 \cdot 10^{-220}:\\
\;\;\;\;y1 \cdot \left(\mathsf{fma}\left(a, y3 \cdot z, y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - i \cdot \left(k \cdot z\right)\right)\\

\mathbf{elif}\;y0 \leq 5.1 \cdot 10^{-8}:\\
\;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\

\mathbf{elif}\;y0 \leq 2.9 \cdot 10^{+121}:\\
\;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y0 < -3.2999999999999998e40

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in c around inf

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

        \[\leadsto c \cdot \color{blue}{\left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{y4 \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.5%

      \[\leadsto \color{blue}{c \cdot \left(\mathsf{fma}\left(-1, i \cdot \left(x \cdot y - t \cdot z\right), y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    5. Taylor expanded in y0 around inf

      \[\leadsto c \cdot \color{blue}{\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \color{blue}{\left(x \cdot y2 - y3 \cdot z\right)}\right) \]
      2. lift--.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot \color{blue}{z}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \]
      5. lift-*.f6426.9

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - \color{blue}{y3 \cdot z}\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto c \cdot \color{blue}{\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)} \]

    if -3.2999999999999998e40 < y0 < 1.8000000000000001e-220

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in x around 0

      \[\leadsto y1 \cdot \left(\left(a \cdot \left(y3 \cdot z\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{i \cdot \left(k \cdot z\right)}\right) \]
    6. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(a \cdot \left(y3 \cdot z\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - i \cdot \color{blue}{\left(k \cdot z\right)}\right) \]
      2. lower-fma.f64N/A

        \[\leadsto y1 \cdot \left(\mathsf{fma}\left(a, y3 \cdot z, y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - i \cdot \left(\color{blue}{k} \cdot z\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto y1 \cdot \left(\mathsf{fma}\left(a, y3 \cdot z, y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - i \cdot \left(k \cdot z\right)\right) \]
      4. lift--.f64N/A

        \[\leadsto y1 \cdot \left(\mathsf{fma}\left(a, y3 \cdot z, y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - i \cdot \left(k \cdot z\right)\right) \]
      5. lift-*.f64N/A

        \[\leadsto y1 \cdot \left(\mathsf{fma}\left(a, y3 \cdot z, y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - i \cdot \left(k \cdot z\right)\right) \]
      6. lift-*.f64N/A

        \[\leadsto y1 \cdot \left(\mathsf{fma}\left(a, y3 \cdot z, y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - i \cdot \left(k \cdot z\right)\right) \]
      7. lift-*.f64N/A

        \[\leadsto y1 \cdot \left(\mathsf{fma}\left(a, y3 \cdot z, y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - i \cdot \left(k \cdot z\right)\right) \]
      8. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(\mathsf{fma}\left(a, y3 \cdot z, y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - i \cdot \left(k \cdot \color{blue}{z}\right)\right) \]
      9. lift-*.f6433.6

        \[\leadsto y1 \cdot \left(\mathsf{fma}\left(a, y3 \cdot z, y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - i \cdot \left(k \cdot z\right)\right) \]
    7. Applied rewrites33.6%

      \[\leadsto y1 \cdot \left(\mathsf{fma}\left(a, y3 \cdot z, y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{i \cdot \left(k \cdot z\right)}\right) \]

    if 1.8000000000000001e-220 < y0 < 5.10000000000000001e-8

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites37.7%

      \[\leadsto \color{blue}{y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    5. Taylor expanded in t around inf

      \[\leadsto y2 \cdot \left(t \cdot \color{blue}{\left(a \cdot y5 - c \cdot y4\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - \color{blue}{c \cdot y4}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot \color{blue}{y4}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) \]
      4. lift-*.f6427.7

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) \]
    7. Applied rewrites27.7%

      \[\leadsto y2 \cdot \left(t \cdot \color{blue}{\left(a \cdot y5 - c \cdot y4\right)}\right) \]

    if 5.10000000000000001e-8 < y0 < 2.8999999999999999e121

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in t around -inf

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

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

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

        \[\leadsto i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot \color{blue}{y5}, c \cdot z\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right) \]
    7. Applied rewrites26.8%

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

    if 2.8999999999999999e121 < y0

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites37.7%

      \[\leadsto \color{blue}{y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \color{blue}{\left(c \cdot y0 - a \cdot y1\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - \color{blue}{a \cdot y1}\right)\right) \]
      3. lift--.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot \color{blue}{y1}\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \]
      5. lift-*.f6427.3

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \]
    7. Applied rewrites27.3%

      \[\leadsto x \cdot \color{blue}{\left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)} \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 20: 32.2% accurate, 3.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\ \mathbf{if}\;z \leq -5.2 \cdot 10^{+36}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{-286}:\\ \;\;\;\;y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+38}:\\ \;\;\;\;y2 \cdot \left(c \cdot \left(x \cdot y0\right)\right) + \left(-1 \cdot \left(j \cdot y3\right)\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+219}:\\ \;\;\;\;c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* y1 (* z (- (* a y3) (* i k))))))
   (if (<= z -5.2e+36)
     t_1
     (if (<= z 4.1e-286)
       (* y2 (- (* -1.0 (* a (* x y1))) (* t (- (* c y4) (* a y5)))))
       (if (<= z 4.2e+38)
         (+
          (* y2 (* c (* x y0)))
          (* (* -1.0 (* j y3)) (- (* y4 y1) (* y5 y0))))
         (if (<= z 4.2e+219) (* c (* z (fma -1.0 (* y0 y3) (* i t)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y1 * (z * ((a * y3) - (i * k)));
	double tmp;
	if (z <= -5.2e+36) {
		tmp = t_1;
	} else if (z <= 4.1e-286) {
		tmp = y2 * ((-1.0 * (a * (x * y1))) - (t * ((c * y4) - (a * y5))));
	} else if (z <= 4.2e+38) {
		tmp = (y2 * (c * (x * y0))) + ((-1.0 * (j * y3)) * ((y4 * y1) - (y5 * y0)));
	} else if (z <= 4.2e+219) {
		tmp = c * (z * fma(-1.0, (y0 * y3), (i * t)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k))))
	tmp = 0.0
	if (z <= -5.2e+36)
		tmp = t_1;
	elseif (z <= 4.1e-286)
		tmp = Float64(y2 * Float64(Float64(-1.0 * Float64(a * Float64(x * y1))) - Float64(t * Float64(Float64(c * y4) - Float64(a * y5)))));
	elseif (z <= 4.2e+38)
		tmp = Float64(Float64(y2 * Float64(c * Float64(x * y0))) + Float64(Float64(-1.0 * Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))));
	elseif (z <= 4.2e+219)
		tmp = Float64(c * Float64(z * fma(-1.0, Float64(y0 * y3), Float64(i * t))));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e+36], t$95$1, If[LessEqual[z, 4.1e-286], N[(y2 * N[(N[(-1.0 * N[(a * N[(x * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e+38], N[(N[(y2 * N[(c * N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 * N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e+219], N[(c * N[(z * N[(-1.0 * N[(y0 * y3), $MachinePrecision] + N[(i * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4.1 \cdot 10^{-286}:\\
\;\;\;\;y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{+38}:\\
\;\;\;\;y2 \cdot \left(c \cdot \left(x \cdot y0\right)\right) + \left(-1 \cdot \left(j \cdot y3\right)\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{+219}:\\
\;\;\;\;c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.2000000000000003e36 or 4.19999999999999976e219 < z

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in z around inf

      \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - \color{blue}{i \cdot k}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot \color{blue}{k}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
      4. lower-*.f6427.4

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
    7. Applied rewrites27.4%

      \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]

    if -5.2000000000000003e36 < z < 4.1e-286

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites37.7%

      \[\leadsto \color{blue}{y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    5. Taylor expanded in a around inf

      \[\leadsto y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1\right)\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      3. lower-*.f6432.5

        \[\leadsto y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
    7. Applied rewrites32.5%

      \[\leadsto y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1\right)\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]

    if 4.1e-286 < z < 4.2e38

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - \color{blue}{t} \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      7. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \color{blue}{\left(c \cdot y4 - a \cdot y5\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      8. lower--.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a \cdot y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      9. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - \color{blue}{a} \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      10. lower-*.f6436.9

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot \color{blue}{y5}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in c around inf

      \[\leadsto y2 \cdot \left(c \cdot \color{blue}{\left(x \cdot y0 - t \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - \color{blue}{t \cdot y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot \color{blue}{y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower-*.f6436.5

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites36.5%

      \[\leadsto y2 \cdot \left(c \cdot \color{blue}{\left(x \cdot y0 - t \cdot y4\right)}\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    8. Taylor expanded in x around inf

      \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot \color{blue}{y0}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lift-*.f6436.0

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    10. Applied rewrites36.0%

      \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot \color{blue}{y0}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    11. Taylor expanded in j around inf

      \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0\right)\right) + \color{blue}{\left(-1 \cdot \left(j \cdot y3\right)\right)} \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    12. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0\right)\right) + \left(-1 \cdot \color{blue}{\left(j \cdot y3\right)}\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lift-*.f6429.1

        \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0\right)\right) + \left(-1 \cdot \left(j \cdot \color{blue}{y3}\right)\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    13. Applied rewrites29.1%

      \[\leadsto y2 \cdot \left(c \cdot \left(x \cdot y0\right)\right) + \color{blue}{\left(-1 \cdot \left(j \cdot y3\right)\right)} \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]

    if 4.2e38 < z < 4.19999999999999976e219

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in c around inf

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

        \[\leadsto c \cdot \color{blue}{\left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{y4 \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.5%

      \[\leadsto \color{blue}{c \cdot \left(\mathsf{fma}\left(-1, i \cdot \left(x \cdot y - t \cdot z\right), y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    5. Taylor expanded in z around inf

      \[\leadsto c \cdot \left(z \cdot \color{blue}{\left(-1 \cdot \left(y0 \cdot y3\right) + i \cdot t\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(z \cdot \left(-1 \cdot \left(y0 \cdot y3\right) + \color{blue}{i \cdot t}\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot \color{blue}{y3}, i \cdot t\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)\right) \]
      4. lower-*.f6426.4

        \[\leadsto c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)\right) \]
    7. Applied rewrites26.4%

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

Alternative 21: 31.7% accurate, 4.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y0 \leq -5.9 \cdot 10^{+31}:\\ \;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\ \mathbf{elif}\;y0 \leq 2.6 \cdot 10^{-245}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y1 \cdot \left(\frac{y \cdot y5}{y1} - z\right)\right)\right)\\ \mathbf{elif}\;y0 \leq 5.1 \cdot 10^{-8}:\\ \;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\ \mathbf{elif}\;y0 \leq 2.9 \cdot 10^{+121}:\\ \;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= y0 -5.9e+31)
   (* c (* y0 (- (* x y2) (* y3 z))))
   (if (<= y0 2.6e-245)
     (* i (* k (* y1 (- (/ (* y y5) y1) z))))
     (if (<= y0 5.1e-8)
       (* y2 (* t (- (* a y5) (* c y4))))
       (if (<= y0 2.9e+121)
         (* i (* t (fma -1.0 (* j y5) (* c z))))
         (* x (* y2 (- (* c y0) (* a y1)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y0 <= -5.9e+31) {
		tmp = c * (y0 * ((x * y2) - (y3 * z)));
	} else if (y0 <= 2.6e-245) {
		tmp = i * (k * (y1 * (((y * y5) / y1) - z)));
	} else if (y0 <= 5.1e-8) {
		tmp = y2 * (t * ((a * y5) - (c * y4)));
	} else if (y0 <= 2.9e+121) {
		tmp = i * (t * fma(-1.0, (j * y5), (c * z)));
	} else {
		tmp = x * (y2 * ((c * y0) - (a * y1)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (y0 <= -5.9e+31)
		tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z))));
	elseif (y0 <= 2.6e-245)
		tmp = Float64(i * Float64(k * Float64(y1 * Float64(Float64(Float64(y * y5) / y1) - z))));
	elseif (y0 <= 5.1e-8)
		tmp = Float64(y2 * Float64(t * Float64(Float64(a * y5) - Float64(c * y4))));
	elseif (y0 <= 2.9e+121)
		tmp = Float64(i * Float64(t * fma(-1.0, Float64(j * y5), Float64(c * z))));
	else
		tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y0, -5.9e+31], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 2.6e-245], N[(i * N[(k * N[(y1 * N[(N[(N[(y * y5), $MachinePrecision] / y1), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 5.1e-8], N[(y2 * N[(t * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 2.9e+121], N[(i * N[(t * N[(-1.0 * N[(j * y5), $MachinePrecision] + N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y0 \leq -5.9 \cdot 10^{+31}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\

\mathbf{elif}\;y0 \leq 2.6 \cdot 10^{-245}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y1 \cdot \left(\frac{y \cdot y5}{y1} - z\right)\right)\right)\\

\mathbf{elif}\;y0 \leq 5.1 \cdot 10^{-8}:\\
\;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\

\mathbf{elif}\;y0 \leq 2.9 \cdot 10^{+121}:\\
\;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y0 < -5.9000000000000004e31

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in c around inf

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

        \[\leadsto c \cdot \color{blue}{\left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{y4 \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.5%

      \[\leadsto \color{blue}{c \cdot \left(\mathsf{fma}\left(-1, i \cdot \left(x \cdot y - t \cdot z\right), y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    5. Taylor expanded in y0 around inf

      \[\leadsto c \cdot \color{blue}{\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \color{blue}{\left(x \cdot y2 - y3 \cdot z\right)}\right) \]
      2. lift--.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot \color{blue}{z}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \]
      5. lift-*.f6426.9

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - \color{blue}{y3 \cdot z}\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto c \cdot \color{blue}{\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)} \]

    if -5.9000000000000004e31 < y0 < 2.60000000000000006e-245

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    7. Applied rewrites26.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    8. Taylor expanded in y1 around inf

      \[\leadsto i \cdot \left(k \cdot \left(y1 \cdot \left(\frac{y \cdot y5}{y1} - \color{blue}{z}\right)\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y1 \cdot \left(\frac{y \cdot y5}{y1} - z\right)\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y1 \cdot \left(\frac{y \cdot y5}{y1} - z\right)\right)\right) \]
      3. lower-/.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y1 \cdot \left(\frac{y \cdot y5}{y1} - z\right)\right)\right) \]
      4. lift-*.f6429.2

        \[\leadsto i \cdot \left(k \cdot \left(y1 \cdot \left(\frac{y \cdot y5}{y1} - z\right)\right)\right) \]
    10. Applied rewrites29.2%

      \[\leadsto i \cdot \left(k \cdot \left(y1 \cdot \left(\frac{y \cdot y5}{y1} - \color{blue}{z}\right)\right)\right) \]

    if 2.60000000000000006e-245 < y0 < 5.10000000000000001e-8

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites37.7%

      \[\leadsto \color{blue}{y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    5. Taylor expanded in t around inf

      \[\leadsto y2 \cdot \left(t \cdot \color{blue}{\left(a \cdot y5 - c \cdot y4\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - \color{blue}{c \cdot y4}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot \color{blue}{y4}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) \]
      4. lift-*.f6427.7

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) \]
    7. Applied rewrites27.7%

      \[\leadsto y2 \cdot \left(t \cdot \color{blue}{\left(a \cdot y5 - c \cdot y4\right)}\right) \]

    if 5.10000000000000001e-8 < y0 < 2.8999999999999999e121

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in t around -inf

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

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

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

        \[\leadsto i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot \color{blue}{y5}, c \cdot z\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right) \]
    7. Applied rewrites26.8%

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

    if 2.8999999999999999e121 < y0

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites37.7%

      \[\leadsto \color{blue}{y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \color{blue}{\left(c \cdot y0 - a \cdot y1\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - \color{blue}{a \cdot y1}\right)\right) \]
      3. lift--.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot \color{blue}{y1}\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \]
      5. lift-*.f6427.3

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \]
    7. Applied rewrites27.3%

      \[\leadsto x \cdot \color{blue}{\left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)} \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 22: 31.4% accurate, 4.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y0 \leq -5.5 \cdot 10^{+31}:\\ \;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\ \mathbf{elif}\;y0 \leq 2.6 \cdot 10^{-245}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\ \mathbf{elif}\;y0 \leq 5.1 \cdot 10^{-8}:\\ \;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\ \mathbf{elif}\;y0 \leq 2.9 \cdot 10^{+121}:\\ \;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= y0 -5.5e+31)
   (* c (* y0 (- (* x y2) (* y3 z))))
   (if (<= y0 2.6e-245)
     (* i (* k (- (* y y5) (* y1 z))))
     (if (<= y0 5.1e-8)
       (* y2 (* t (- (* a y5) (* c y4))))
       (if (<= y0 2.9e+121)
         (* i (* t (fma -1.0 (* j y5) (* c z))))
         (* x (* y2 (- (* c y0) (* a y1)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y0 <= -5.5e+31) {
		tmp = c * (y0 * ((x * y2) - (y3 * z)));
	} else if (y0 <= 2.6e-245) {
		tmp = i * (k * ((y * y5) - (y1 * z)));
	} else if (y0 <= 5.1e-8) {
		tmp = y2 * (t * ((a * y5) - (c * y4)));
	} else if (y0 <= 2.9e+121) {
		tmp = i * (t * fma(-1.0, (j * y5), (c * z)));
	} else {
		tmp = x * (y2 * ((c * y0) - (a * y1)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (y0 <= -5.5e+31)
		tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z))));
	elseif (y0 <= 2.6e-245)
		tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z))));
	elseif (y0 <= 5.1e-8)
		tmp = Float64(y2 * Float64(t * Float64(Float64(a * y5) - Float64(c * y4))));
	elseif (y0 <= 2.9e+121)
		tmp = Float64(i * Float64(t * fma(-1.0, Float64(j * y5), Float64(c * z))));
	else
		tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y0, -5.5e+31], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 2.6e-245], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 5.1e-8], N[(y2 * N[(t * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 2.9e+121], N[(i * N[(t * N[(-1.0 * N[(j * y5), $MachinePrecision] + N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y0 \leq -5.5 \cdot 10^{+31}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\

\mathbf{elif}\;y0 \leq 2.6 \cdot 10^{-245}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\

\mathbf{elif}\;y0 \leq 5.1 \cdot 10^{-8}:\\
\;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\

\mathbf{elif}\;y0 \leq 2.9 \cdot 10^{+121}:\\
\;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y0 < -5.50000000000000002e31

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in c around inf

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

        \[\leadsto c \cdot \color{blue}{\left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{y4 \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.5%

      \[\leadsto \color{blue}{c \cdot \left(\mathsf{fma}\left(-1, i \cdot \left(x \cdot y - t \cdot z\right), y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    5. Taylor expanded in y0 around inf

      \[\leadsto c \cdot \color{blue}{\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \color{blue}{\left(x \cdot y2 - y3 \cdot z\right)}\right) \]
      2. lift--.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot \color{blue}{z}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \]
      5. lift-*.f6426.9

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - \color{blue}{y3 \cdot z}\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto c \cdot \color{blue}{\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)} \]

    if -5.50000000000000002e31 < y0 < 2.60000000000000006e-245

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    7. Applied rewrites26.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]

    if 2.60000000000000006e-245 < y0 < 5.10000000000000001e-8

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites37.7%

      \[\leadsto \color{blue}{y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    5. Taylor expanded in t around inf

      \[\leadsto y2 \cdot \left(t \cdot \color{blue}{\left(a \cdot y5 - c \cdot y4\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - \color{blue}{c \cdot y4}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot \color{blue}{y4}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) \]
      4. lift-*.f6427.7

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) \]
    7. Applied rewrites27.7%

      \[\leadsto y2 \cdot \left(t \cdot \color{blue}{\left(a \cdot y5 - c \cdot y4\right)}\right) \]

    if 5.10000000000000001e-8 < y0 < 2.8999999999999999e121

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in t around -inf

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

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

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

        \[\leadsto i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot \color{blue}{y5}, c \cdot z\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right) \]
    7. Applied rewrites26.8%

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

    if 2.8999999999999999e121 < y0

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites37.7%

      \[\leadsto \color{blue}{y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \color{blue}{\left(c \cdot y0 - a \cdot y1\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - \color{blue}{a \cdot y1}\right)\right) \]
      3. lift--.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot \color{blue}{y1}\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \]
      5. lift-*.f6427.3

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \]
    7. Applied rewrites27.3%

      \[\leadsto x \cdot \color{blue}{\left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)} \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 23: 31.1% accurate, 4.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\ t_2 := c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\ \mathbf{if}\;y0 \leq -5.5 \cdot 10^{+31}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y0 \leq 5.2 \cdot 10^{-246}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y0 \leq 10^{+57}:\\ \;\;\;\;t \cdot \left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\ \mathbf{elif}\;y0 \leq 6.5 \cdot 10^{+103}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* i (* k (- (* y y5) (* y1 z)))))
        (t_2 (* c (* y0 (- (* x y2) (* y3 z))))))
   (if (<= y0 -5.5e+31)
     t_2
     (if (<= y0 5.2e-246)
       t_1
       (if (<= y0 1e+57)
         (* t (* y2 (- (* a y5) (* c y4))))
         (if (<= y0 6.5e+103) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = i * (k * ((y * y5) - (y1 * z)));
	double t_2 = c * (y0 * ((x * y2) - (y3 * z)));
	double tmp;
	if (y0 <= -5.5e+31) {
		tmp = t_2;
	} else if (y0 <= 5.2e-246) {
		tmp = t_1;
	} else if (y0 <= 1e+57) {
		tmp = t * (y2 * ((a * y5) - (c * y4)));
	} else if (y0 <= 6.5e+103) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = i * (k * ((y * y5) - (y1 * z)))
    t_2 = c * (y0 * ((x * y2) - (y3 * z)))
    if (y0 <= (-5.5d+31)) then
        tmp = t_2
    else if (y0 <= 5.2d-246) then
        tmp = t_1
    else if (y0 <= 1d+57) then
        tmp = t * (y2 * ((a * y5) - (c * y4)))
    else if (y0 <= 6.5d+103) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = i * (k * ((y * y5) - (y1 * z)));
	double t_2 = c * (y0 * ((x * y2) - (y3 * z)));
	double tmp;
	if (y0 <= -5.5e+31) {
		tmp = t_2;
	} else if (y0 <= 5.2e-246) {
		tmp = t_1;
	} else if (y0 <= 1e+57) {
		tmp = t * (y2 * ((a * y5) - (c * y4)));
	} else if (y0 <= 6.5e+103) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = i * (k * ((y * y5) - (y1 * z)))
	t_2 = c * (y0 * ((x * y2) - (y3 * z)))
	tmp = 0
	if y0 <= -5.5e+31:
		tmp = t_2
	elif y0 <= 5.2e-246:
		tmp = t_1
	elif y0 <= 1e+57:
		tmp = t * (y2 * ((a * y5) - (c * y4)))
	elif y0 <= 6.5e+103:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z))))
	t_2 = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z))))
	tmp = 0.0
	if (y0 <= -5.5e+31)
		tmp = t_2;
	elseif (y0 <= 5.2e-246)
		tmp = t_1;
	elseif (y0 <= 1e+57)
		tmp = Float64(t * Float64(y2 * Float64(Float64(a * y5) - Float64(c * y4))));
	elseif (y0 <= 6.5e+103)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = i * (k * ((y * y5) - (y1 * z)));
	t_2 = c * (y0 * ((x * y2) - (y3 * z)));
	tmp = 0.0;
	if (y0 <= -5.5e+31)
		tmp = t_2;
	elseif (y0 <= 5.2e-246)
		tmp = t_1;
	elseif (y0 <= 1e+57)
		tmp = t * (y2 * ((a * y5) - (c * y4)));
	elseif (y0 <= 6.5e+103)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y0, -5.5e+31], t$95$2, If[LessEqual[y0, 5.2e-246], t$95$1, If[LessEqual[y0, 1e+57], N[(t * N[(y2 * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 6.5e+103], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
t_2 := c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\
\mathbf{if}\;y0 \leq -5.5 \cdot 10^{+31}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y0 \leq 5.2 \cdot 10^{-246}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y0 \leq 10^{+57}:\\
\;\;\;\;t \cdot \left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\

\mathbf{elif}\;y0 \leq 6.5 \cdot 10^{+103}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y0 < -5.50000000000000002e31 or 6.50000000000000001e103 < y0

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in c around inf

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

        \[\leadsto c \cdot \color{blue}{\left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{y4 \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.5%

      \[\leadsto \color{blue}{c \cdot \left(\mathsf{fma}\left(-1, i \cdot \left(x \cdot y - t \cdot z\right), y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    5. Taylor expanded in y0 around inf

      \[\leadsto c \cdot \color{blue}{\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \color{blue}{\left(x \cdot y2 - y3 \cdot z\right)}\right) \]
      2. lift--.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot \color{blue}{z}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \]
      5. lift-*.f6426.9

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - \color{blue}{y3 \cdot z}\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto c \cdot \color{blue}{\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)} \]

    if -5.50000000000000002e31 < y0 < 5.1999999999999997e-246 or 1.00000000000000005e57 < y0 < 6.50000000000000001e103

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    7. Applied rewrites26.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]

    if 5.1999999999999997e-246 < y0 < 1.00000000000000005e57

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites37.7%

      \[\leadsto \color{blue}{y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    5. Taylor expanded in t around inf

      \[\leadsto t \cdot \color{blue}{\left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto t \cdot \left(y2 \cdot \color{blue}{\left(a \cdot y5 - c \cdot y4\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto t \cdot \left(y2 \cdot \left(a \cdot y5 - \color{blue}{c \cdot y4}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto t \cdot \left(y2 \cdot \left(a \cdot y5 - c \cdot \color{blue}{y4}\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto t \cdot \left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right) \]
      5. lift-*.f6428.0

        \[\leadsto t \cdot \left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right) \]
    7. Applied rewrites28.0%

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

Alternative 24: 30.9% accurate, 5.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y0 \leq -5.5 \cdot 10^{+31}:\\ \;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\ \mathbf{elif}\;y0 \leq 6.2 \cdot 10^{-246}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\ \mathbf{elif}\;y0 \leq 7.8 \cdot 10^{+117}:\\ \;\;\;\;c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= y0 -5.5e+31)
   (* c (* y0 (- (* x y2) (* y3 z))))
   (if (<= y0 6.2e-246)
     (* i (* k (- (* y y5) (* y1 z))))
     (if (<= y0 7.8e+117)
       (* c (* t (- (* i z) (* y2 y4))))
       (* x (* y2 (- (* c y0) (* a y1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y0 <= -5.5e+31) {
		tmp = c * (y0 * ((x * y2) - (y3 * z)));
	} else if (y0 <= 6.2e-246) {
		tmp = i * (k * ((y * y5) - (y1 * z)));
	} else if (y0 <= 7.8e+117) {
		tmp = c * (t * ((i * z) - (y2 * y4)));
	} else {
		tmp = x * (y2 * ((c * y0) - (a * y1)));
	}
	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, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (y0 <= (-5.5d+31)) then
        tmp = c * (y0 * ((x * y2) - (y3 * z)))
    else if (y0 <= 6.2d-246) then
        tmp = i * (k * ((y * y5) - (y1 * z)))
    else if (y0 <= 7.8d+117) then
        tmp = c * (t * ((i * z) - (y2 * y4)))
    else
        tmp = x * (y2 * ((c * y0) - (a * y1)))
    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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y0 <= -5.5e+31) {
		tmp = c * (y0 * ((x * y2) - (y3 * z)));
	} else if (y0 <= 6.2e-246) {
		tmp = i * (k * ((y * y5) - (y1 * z)));
	} else if (y0 <= 7.8e+117) {
		tmp = c * (t * ((i * z) - (y2 * y4)));
	} else {
		tmp = x * (y2 * ((c * y0) - (a * y1)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y0 <= -5.5e+31:
		tmp = c * (y0 * ((x * y2) - (y3 * z)))
	elif y0 <= 6.2e-246:
		tmp = i * (k * ((y * y5) - (y1 * z)))
	elif y0 <= 7.8e+117:
		tmp = c * (t * ((i * z) - (y2 * y4)))
	else:
		tmp = x * (y2 * ((c * y0) - (a * y1)))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (y0 <= -5.5e+31)
		tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z))));
	elseif (y0 <= 6.2e-246)
		tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z))));
	elseif (y0 <= 7.8e+117)
		tmp = Float64(c * Float64(t * Float64(Float64(i * z) - Float64(y2 * y4))));
	else
		tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (y0 <= -5.5e+31)
		tmp = c * (y0 * ((x * y2) - (y3 * z)));
	elseif (y0 <= 6.2e-246)
		tmp = i * (k * ((y * y5) - (y1 * z)));
	elseif (y0 <= 7.8e+117)
		tmp = c * (t * ((i * z) - (y2 * y4)));
	else
		tmp = x * (y2 * ((c * y0) - (a * y1)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y0, -5.5e+31], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 6.2e-246], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 7.8e+117], N[(c * N[(t * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y0 \leq -5.5 \cdot 10^{+31}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\

\mathbf{elif}\;y0 \leq 6.2 \cdot 10^{-246}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\

\mathbf{elif}\;y0 \leq 7.8 \cdot 10^{+117}:\\
\;\;\;\;c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y0 < -5.50000000000000002e31

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in c around inf

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

        \[\leadsto c \cdot \color{blue}{\left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{y4 \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.5%

      \[\leadsto \color{blue}{c \cdot \left(\mathsf{fma}\left(-1, i \cdot \left(x \cdot y - t \cdot z\right), y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    5. Taylor expanded in y0 around inf

      \[\leadsto c \cdot \color{blue}{\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \color{blue}{\left(x \cdot y2 - y3 \cdot z\right)}\right) \]
      2. lift--.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot \color{blue}{z}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \]
      5. lift-*.f6426.9

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - \color{blue}{y3 \cdot z}\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto c \cdot \color{blue}{\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)} \]

    if -5.50000000000000002e31 < y0 < 6.2000000000000001e-246

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    7. Applied rewrites26.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]

    if 6.2000000000000001e-246 < y0 < 7.79999999999999981e117

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in c around inf

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

        \[\leadsto c \cdot \color{blue}{\left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{y4 \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.5%

      \[\leadsto \color{blue}{c \cdot \left(\mathsf{fma}\left(-1, i \cdot \left(x \cdot y - t \cdot z\right), y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    5. Taylor expanded in t around inf

      \[\leadsto c \cdot \left(t \cdot \color{blue}{\left(i \cdot z - y2 \cdot y4\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(t \cdot \left(i \cdot z - \color{blue}{y2 \cdot y4}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot \color{blue}{y4}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right) \]
      4. lower-*.f6426.9

        \[\leadsto c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto c \cdot \left(t \cdot \color{blue}{\left(i \cdot z - y2 \cdot y4\right)}\right) \]

    if 7.79999999999999981e117 < y0

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites37.7%

      \[\leadsto \color{blue}{y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \color{blue}{\left(c \cdot y0 - a \cdot y1\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - \color{blue}{a \cdot y1}\right)\right) \]
      3. lift--.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot \color{blue}{y1}\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \]
      5. lift-*.f6427.3

        \[\leadsto x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \]
    7. Applied rewrites27.3%

      \[\leadsto x \cdot \color{blue}{\left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 25: 30.6% accurate, 5.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\ \mathbf{if}\;y0 \leq -5.5 \cdot 10^{+31}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y0 \leq 10^{-243}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\ \mathbf{elif}\;y0 \leq 1.42 \cdot 10^{+128}:\\ \;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* c (* y0 (- (* x y2) (* y3 z))))))
   (if (<= y0 -5.5e+31)
     t_1
     (if (<= y0 1e-243)
       (* i (* k (- (* y y5) (* y1 z))))
       (if (<= y0 1.42e+128) (* i (* z (- (* c t) (* k y1)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = c * (y0 * ((x * y2) - (y3 * z)));
	double tmp;
	if (y0 <= -5.5e+31) {
		tmp = t_1;
	} else if (y0 <= 1e-243) {
		tmp = i * (k * ((y * y5) - (y1 * z)));
	} else if (y0 <= 1.42e+128) {
		tmp = i * (z * ((c * t) - (k * y1)));
	} 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, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = c * (y0 * ((x * y2) - (y3 * z)))
    if (y0 <= (-5.5d+31)) then
        tmp = t_1
    else if (y0 <= 1d-243) then
        tmp = i * (k * ((y * y5) - (y1 * z)))
    else if (y0 <= 1.42d+128) then
        tmp = i * (z * ((c * t) - (k * y1)))
    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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = c * (y0 * ((x * y2) - (y3 * z)));
	double tmp;
	if (y0 <= -5.5e+31) {
		tmp = t_1;
	} else if (y0 <= 1e-243) {
		tmp = i * (k * ((y * y5) - (y1 * z)));
	} else if (y0 <= 1.42e+128) {
		tmp = i * (z * ((c * t) - (k * y1)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = c * (y0 * ((x * y2) - (y3 * z)))
	tmp = 0
	if y0 <= -5.5e+31:
		tmp = t_1
	elif y0 <= 1e-243:
		tmp = i * (k * ((y * y5) - (y1 * z)))
	elif y0 <= 1.42e+128:
		tmp = i * (z * ((c * t) - (k * y1)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z))))
	tmp = 0.0
	if (y0 <= -5.5e+31)
		tmp = t_1;
	elseif (y0 <= 1e-243)
		tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z))));
	elseif (y0 <= 1.42e+128)
		tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = c * (y0 * ((x * y2) - (y3 * z)));
	tmp = 0.0;
	if (y0 <= -5.5e+31)
		tmp = t_1;
	elseif (y0 <= 1e-243)
		tmp = i * (k * ((y * y5) - (y1 * z)));
	elseif (y0 <= 1.42e+128)
		tmp = i * (z * ((c * t) - (k * y1)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y0, -5.5e+31], t$95$1, If[LessEqual[y0, 1e-243], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 1.42e+128], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\
\mathbf{if}\;y0 \leq -5.5 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y0 \leq 10^{-243}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\

\mathbf{elif}\;y0 \leq 1.42 \cdot 10^{+128}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y0 < -5.50000000000000002e31 or 1.4199999999999999e128 < y0

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in c around inf

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

        \[\leadsto c \cdot \color{blue}{\left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{y4 \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.5%

      \[\leadsto \color{blue}{c \cdot \left(\mathsf{fma}\left(-1, i \cdot \left(x \cdot y - t \cdot z\right), y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    5. Taylor expanded in y0 around inf

      \[\leadsto c \cdot \color{blue}{\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \color{blue}{\left(x \cdot y2 - y3 \cdot z\right)}\right) \]
      2. lift--.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot \color{blue}{z}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \]
      5. lift-*.f6426.9

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - \color{blue}{y3 \cdot z}\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto c \cdot \color{blue}{\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)} \]

    if -5.50000000000000002e31 < y0 < 9.99999999999999995e-244

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    7. Applied rewrites26.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]

    if 9.99999999999999995e-244 < y0 < 1.4199999999999999e128

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in z around -inf

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

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

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot \color{blue}{y1}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
    7. Applied rewrites26.9%

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

Alternative 26: 30.6% accurate, 5.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\ \mathbf{if}\;c \leq -2.65 \cdot 10^{+47}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq 3.4 \cdot 10^{-85}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\ \mathbf{elif}\;c \leq 1.25 \cdot 10^{+88}:\\ \;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* i (* z (- (* c t) (* k y1))))))
   (if (<= c -2.65e+47)
     t_1
     (if (<= c 3.4e-85)
       (* i (* k (- (* y y5) (* y1 z))))
       (if (<= c 1.25e+88) (* b (* y4 (- (* j t) (* k y)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = i * (z * ((c * t) - (k * y1)));
	double tmp;
	if (c <= -2.65e+47) {
		tmp = t_1;
	} else if (c <= 3.4e-85) {
		tmp = i * (k * ((y * y5) - (y1 * z)));
	} else if (c <= 1.25e+88) {
		tmp = b * (y4 * ((j * t) - (k * 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, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = i * (z * ((c * t) - (k * y1)))
    if (c <= (-2.65d+47)) then
        tmp = t_1
    else if (c <= 3.4d-85) then
        tmp = i * (k * ((y * y5) - (y1 * z)))
    else if (c <= 1.25d+88) then
        tmp = b * (y4 * ((j * t) - (k * 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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = i * (z * ((c * t) - (k * y1)));
	double tmp;
	if (c <= -2.65e+47) {
		tmp = t_1;
	} else if (c <= 3.4e-85) {
		tmp = i * (k * ((y * y5) - (y1 * z)));
	} else if (c <= 1.25e+88) {
		tmp = b * (y4 * ((j * t) - (k * y)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = i * (z * ((c * t) - (k * y1)))
	tmp = 0
	if c <= -2.65e+47:
		tmp = t_1
	elif c <= 3.4e-85:
		tmp = i * (k * ((y * y5) - (y1 * z)))
	elif c <= 1.25e+88:
		tmp = b * (y4 * ((j * t) - (k * y)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1))))
	tmp = 0.0
	if (c <= -2.65e+47)
		tmp = t_1;
	elseif (c <= 3.4e-85)
		tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z))));
	elseif (c <= 1.25e+88)
		tmp = Float64(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = i * (z * ((c * t) - (k * y1)));
	tmp = 0.0;
	if (c <= -2.65e+47)
		tmp = t_1;
	elseif (c <= 3.4e-85)
		tmp = i * (k * ((y * y5) - (y1 * z)));
	elseif (c <= 1.25e+88)
		tmp = b * (y4 * ((j * t) - (k * y)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.65e+47], t$95$1, If[LessEqual[c, 3.4e-85], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.25e+88], N[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\
\mathbf{if}\;c \leq -2.65 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq 3.4 \cdot 10^{-85}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\

\mathbf{elif}\;c \leq 1.25 \cdot 10^{+88}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -2.65e47 or 1.24999999999999999e88 < c

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in z around -inf

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

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

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot \color{blue}{y1}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]

    if -2.65e47 < c < 3.4e-85

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    7. Applied rewrites26.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]

    if 3.4e-85 < c < 1.24999999999999999e88

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in b around inf

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

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

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    4. Applied rewrites36.5%

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

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

        \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
      2. lift--.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot \color{blue}{y}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      5. lift-*.f6426.9

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - \color{blue}{k \cdot y}\right)\right) \]
    7. Applied rewrites26.9%

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

Alternative 27: 30.5% accurate, 5.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\ \mathbf{if}\;c \leq -2.65 \cdot 10^{+47}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq 4.8 \cdot 10^{+54}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* i (* z (- (* c t) (* k y1))))))
   (if (<= c -2.65e+47)
     t_1
     (if (<= c 4.8e+54) (* i (* k (- (* y y5) (* y1 z)))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = i * (z * ((c * t) - (k * y1)));
	double tmp;
	if (c <= -2.65e+47) {
		tmp = t_1;
	} else if (c <= 4.8e+54) {
		tmp = i * (k * ((y * y5) - (y1 * z)));
	} 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, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = i * (z * ((c * t) - (k * y1)))
    if (c <= (-2.65d+47)) then
        tmp = t_1
    else if (c <= 4.8d+54) then
        tmp = i * (k * ((y * y5) - (y1 * z)))
    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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = i * (z * ((c * t) - (k * y1)));
	double tmp;
	if (c <= -2.65e+47) {
		tmp = t_1;
	} else if (c <= 4.8e+54) {
		tmp = i * (k * ((y * y5) - (y1 * z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = i * (z * ((c * t) - (k * y1)))
	tmp = 0
	if c <= -2.65e+47:
		tmp = t_1
	elif c <= 4.8e+54:
		tmp = i * (k * ((y * y5) - (y1 * z)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1))))
	tmp = 0.0
	if (c <= -2.65e+47)
		tmp = t_1;
	elseif (c <= 4.8e+54)
		tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = i * (z * ((c * t) - (k * y1)));
	tmp = 0.0;
	if (c <= -2.65e+47)
		tmp = t_1;
	elseif (c <= 4.8e+54)
		tmp = i * (k * ((y * y5) - (y1 * z)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.65e+47], t$95$1, If[LessEqual[c, 4.8e+54], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\
\mathbf{if}\;c \leq -2.65 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq 4.8 \cdot 10^{+54}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -2.65e47 or 4.79999999999999997e54 < c

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in z around -inf

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

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

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot \color{blue}{y1}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]

    if -2.65e47 < c < 4.79999999999999997e54

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    7. Applied rewrites26.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 28: 28.7% accurate, 5.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y1 \cdot \left(y3 \cdot \left(-1 \cdot \left(j \cdot y4\right)\right)\right)\\ \mathbf{if}\;y4 \leq -1 \cdot 10^{+133}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y4 \leq 9.8 \cdot 10^{+125}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* y1 (* y3 (* -1.0 (* j y4))))))
   (if (<= y4 -1e+133)
     t_1
     (if (<= y4 9.8e+125) (* i (* k (- (* y y5) (* y1 z)))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y1 * (y3 * (-1.0 * (j * y4)));
	double tmp;
	if (y4 <= -1e+133) {
		tmp = t_1;
	} else if (y4 <= 9.8e+125) {
		tmp = i * (k * ((y * y5) - (y1 * z)));
	} 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, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y1 * (y3 * ((-1.0d0) * (j * y4)))
    if (y4 <= (-1d+133)) then
        tmp = t_1
    else if (y4 <= 9.8d+125) then
        tmp = i * (k * ((y * y5) - (y1 * z)))
    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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y1 * (y3 * (-1.0 * (j * y4)));
	double tmp;
	if (y4 <= -1e+133) {
		tmp = t_1;
	} else if (y4 <= 9.8e+125) {
		tmp = i * (k * ((y * y5) - (y1 * z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = y1 * (y3 * (-1.0 * (j * y4)))
	tmp = 0
	if y4 <= -1e+133:
		tmp = t_1
	elif y4 <= 9.8e+125:
		tmp = i * (k * ((y * y5) - (y1 * z)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(y1 * Float64(y3 * Float64(-1.0 * Float64(j * y4))))
	tmp = 0.0
	if (y4 <= -1e+133)
		tmp = t_1;
	elseif (y4 <= 9.8e+125)
		tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = y1 * (y3 * (-1.0 * (j * y4)));
	tmp = 0.0;
	if (y4 <= -1e+133)
		tmp = t_1;
	elseif (y4 <= 9.8e+125)
		tmp = i * (k * ((y * y5) - (y1 * z)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y1 * N[(y3 * N[(-1.0 * N[(j * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -1e+133], t$95$1, If[LessEqual[y4, 9.8e+125], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y1 \cdot \left(y3 \cdot \left(-1 \cdot \left(j \cdot y4\right)\right)\right)\\
\mathbf{if}\;y4 \leq -1 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y4 \leq 9.8 \cdot 10^{+125}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y4 < -1e133 or 9.80000000000000032e125 < y4

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in y3 around inf

      \[\leadsto y1 \cdot \left(y3 \cdot \color{blue}{\left(-1 \cdot \left(j \cdot y4\right) + a \cdot z\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \left(-1 \cdot \left(j \cdot y4\right) + \color{blue}{a \cdot z}\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot \color{blue}{y4}, a \cdot z\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right) \]
      4. lower-*.f6427.0

        \[\leadsto y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right) \]
    7. Applied rewrites27.0%

      \[\leadsto y1 \cdot \left(y3 \cdot \color{blue}{\mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)}\right) \]
    8. Taylor expanded in z around 0

      \[\leadsto y1 \cdot \left(y3 \cdot \left(-1 \cdot \left(j \cdot \color{blue}{y4}\right)\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \left(-1 \cdot \left(j \cdot y4\right)\right)\right) \]
      2. lift-*.f6417.1

        \[\leadsto y1 \cdot \left(y3 \cdot \left(-1 \cdot \left(j \cdot y4\right)\right)\right) \]
    10. Applied rewrites17.1%

      \[\leadsto y1 \cdot \left(y3 \cdot \left(-1 \cdot \left(j \cdot \color{blue}{y4}\right)\right)\right) \]

    if -1e133 < y4 < 9.80000000000000032e125

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    7. Applied rewrites26.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 29: 22.7% accurate, 5.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+26}:\\ \;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-182}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+40}:\\ \;\;\;\;y1 \cdot \left(-1 \cdot \left(j \cdot \left(y3 \cdot y4\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(k \cdot \left(-1 \cdot \left(y1 \cdot z\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= z -2.1e+26)
   (* y1 (* a (* y3 z)))
   (if (<= z 2.9e-182)
     (* i (* k (* y y5)))
     (if (<= z 4.8e+40)
       (* y1 (* -1.0 (* j (* y3 y4))))
       (* i (* k (* -1.0 (* y1 z))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (z <= -2.1e+26) {
		tmp = y1 * (a * (y3 * z));
	} else if (z <= 2.9e-182) {
		tmp = i * (k * (y * y5));
	} else if (z <= 4.8e+40) {
		tmp = y1 * (-1.0 * (j * (y3 * y4)));
	} else {
		tmp = i * (k * (-1.0 * (y1 * 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, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (z <= (-2.1d+26)) then
        tmp = y1 * (a * (y3 * z))
    else if (z <= 2.9d-182) then
        tmp = i * (k * (y * y5))
    else if (z <= 4.8d+40) then
        tmp = y1 * ((-1.0d0) * (j * (y3 * y4)))
    else
        tmp = i * (k * ((-1.0d0) * (y1 * 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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (z <= -2.1e+26) {
		tmp = y1 * (a * (y3 * z));
	} else if (z <= 2.9e-182) {
		tmp = i * (k * (y * y5));
	} else if (z <= 4.8e+40) {
		tmp = y1 * (-1.0 * (j * (y3 * y4)));
	} else {
		tmp = i * (k * (-1.0 * (y1 * z)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if z <= -2.1e+26:
		tmp = y1 * (a * (y3 * z))
	elif z <= 2.9e-182:
		tmp = i * (k * (y * y5))
	elif z <= 4.8e+40:
		tmp = y1 * (-1.0 * (j * (y3 * y4)))
	else:
		tmp = i * (k * (-1.0 * (y1 * z)))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (z <= -2.1e+26)
		tmp = Float64(y1 * Float64(a * Float64(y3 * z)));
	elseif (z <= 2.9e-182)
		tmp = Float64(i * Float64(k * Float64(y * y5)));
	elseif (z <= 4.8e+40)
		tmp = Float64(y1 * Float64(-1.0 * Float64(j * Float64(y3 * y4))));
	else
		tmp = Float64(i * Float64(k * Float64(-1.0 * Float64(y1 * z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (z <= -2.1e+26)
		tmp = y1 * (a * (y3 * z));
	elseif (z <= 2.9e-182)
		tmp = i * (k * (y * y5));
	elseif (z <= 4.8e+40)
		tmp = y1 * (-1.0 * (j * (y3 * y4)));
	else
		tmp = i * (k * (-1.0 * (y1 * z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[z, -2.1e+26], N[(y1 * N[(a * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e-182], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.8e+40], N[(y1 * N[(-1.0 * N[(j * N[(y3 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(k * N[(-1.0 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+26}:\\
\;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\

\mathbf{elif}\;z \leq 2.9 \cdot 10^{-182}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\

\mathbf{elif}\;z \leq 4.8 \cdot 10^{+40}:\\
\;\;\;\;y1 \cdot \left(-1 \cdot \left(j \cdot \left(y3 \cdot y4\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;i \cdot \left(k \cdot \left(-1 \cdot \left(y1 \cdot z\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.1000000000000001e26

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in y3 around inf

      \[\leadsto y1 \cdot \left(y3 \cdot \color{blue}{\left(-1 \cdot \left(j \cdot y4\right) + a \cdot z\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \left(-1 \cdot \left(j \cdot y4\right) + \color{blue}{a \cdot z}\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot \color{blue}{y4}, a \cdot z\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right) \]
      4. lower-*.f6427.0

        \[\leadsto y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right) \]
    7. Applied rewrites27.0%

      \[\leadsto y1 \cdot \left(y3 \cdot \color{blue}{\mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)}\right) \]
    8. Taylor expanded in z around inf

      \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right) \]
      2. lower-*.f6417.8

        \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right) \]
    10. Applied rewrites17.8%

      \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]

    if -2.1000000000000001e26 < z < 2.89999999999999987e-182

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    7. Applied rewrites26.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    8. Taylor expanded in y around inf

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

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
      2. lift-*.f6417.3

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
    10. Applied rewrites17.3%

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot \color{blue}{y5}\right)\right) \]

    if 2.89999999999999987e-182 < z < 4.8e40

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in y3 around inf

      \[\leadsto y1 \cdot \left(y3 \cdot \color{blue}{\left(-1 \cdot \left(j \cdot y4\right) + a \cdot z\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \left(-1 \cdot \left(j \cdot y4\right) + \color{blue}{a \cdot z}\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot \color{blue}{y4}, a \cdot z\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right) \]
      4. lower-*.f6427.0

        \[\leadsto y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right) \]
    7. Applied rewrites27.0%

      \[\leadsto y1 \cdot \left(y3 \cdot \color{blue}{\mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)}\right) \]
    8. Taylor expanded in z around 0

      \[\leadsto y1 \cdot \left(-1 \cdot \left(j \cdot \color{blue}{\left(y3 \cdot y4\right)}\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(-1 \cdot \left(j \cdot \left(y3 \cdot \color{blue}{y4}\right)\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(-1 \cdot \left(j \cdot \left(y3 \cdot y4\right)\right)\right) \]
      3. lower-*.f6417.3

        \[\leadsto y1 \cdot \left(-1 \cdot \left(j \cdot \left(y3 \cdot y4\right)\right)\right) \]
    10. Applied rewrites17.3%

      \[\leadsto y1 \cdot \left(-1 \cdot \left(j \cdot \color{blue}{\left(y3 \cdot y4\right)}\right)\right) \]

    if 4.8e40 < z

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    7. Applied rewrites26.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    8. Taylor expanded in y around 0

      \[\leadsto i \cdot \left(k \cdot \left(-1 \cdot \left(y1 \cdot \color{blue}{z}\right)\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(-1 \cdot \left(y1 \cdot z\right)\right)\right) \]
      2. lift-*.f6417.0

        \[\leadsto i \cdot \left(k \cdot \left(-1 \cdot \left(y1 \cdot z\right)\right)\right) \]
    10. Applied rewrites17.0%

      \[\leadsto i \cdot \left(k \cdot \left(-1 \cdot \left(y1 \cdot \color{blue}{z}\right)\right)\right) \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 30: 22.5% accurate, 6.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+26}:\\ \;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+48}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(k \cdot \left(-1 \cdot \left(y1 \cdot z\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= z -2.1e+26)
   (* y1 (* a (* y3 z)))
   (if (<= z 2.3e+48) (* i (* k (* y y5))) (* i (* k (* -1.0 (* y1 z)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (z <= -2.1e+26) {
		tmp = y1 * (a * (y3 * z));
	} else if (z <= 2.3e+48) {
		tmp = i * (k * (y * y5));
	} else {
		tmp = i * (k * (-1.0 * (y1 * 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, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (z <= (-2.1d+26)) then
        tmp = y1 * (a * (y3 * z))
    else if (z <= 2.3d+48) then
        tmp = i * (k * (y * y5))
    else
        tmp = i * (k * ((-1.0d0) * (y1 * 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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (z <= -2.1e+26) {
		tmp = y1 * (a * (y3 * z));
	} else if (z <= 2.3e+48) {
		tmp = i * (k * (y * y5));
	} else {
		tmp = i * (k * (-1.0 * (y1 * z)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if z <= -2.1e+26:
		tmp = y1 * (a * (y3 * z))
	elif z <= 2.3e+48:
		tmp = i * (k * (y * y5))
	else:
		tmp = i * (k * (-1.0 * (y1 * z)))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (z <= -2.1e+26)
		tmp = Float64(y1 * Float64(a * Float64(y3 * z)));
	elseif (z <= 2.3e+48)
		tmp = Float64(i * Float64(k * Float64(y * y5)));
	else
		tmp = Float64(i * Float64(k * Float64(-1.0 * Float64(y1 * z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (z <= -2.1e+26)
		tmp = y1 * (a * (y3 * z));
	elseif (z <= 2.3e+48)
		tmp = i * (k * (y * y5));
	else
		tmp = i * (k * (-1.0 * (y1 * z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[z, -2.1e+26], N[(y1 * N[(a * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e+48], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(k * N[(-1.0 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+26}:\\
\;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\

\mathbf{elif}\;z \leq 2.3 \cdot 10^{+48}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\

\mathbf{else}:\\
\;\;\;\;i \cdot \left(k \cdot \left(-1 \cdot \left(y1 \cdot z\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.1000000000000001e26

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in y3 around inf

      \[\leadsto y1 \cdot \left(y3 \cdot \color{blue}{\left(-1 \cdot \left(j \cdot y4\right) + a \cdot z\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \left(-1 \cdot \left(j \cdot y4\right) + \color{blue}{a \cdot z}\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot \color{blue}{y4}, a \cdot z\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right) \]
      4. lower-*.f6427.0

        \[\leadsto y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right) \]
    7. Applied rewrites27.0%

      \[\leadsto y1 \cdot \left(y3 \cdot \color{blue}{\mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)}\right) \]
    8. Taylor expanded in z around inf

      \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right) \]
      2. lower-*.f6417.8

        \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right) \]
    10. Applied rewrites17.8%

      \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]

    if -2.1000000000000001e26 < z < 2.3e48

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    7. Applied rewrites26.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    8. Taylor expanded in y around inf

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

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
      2. lift-*.f6417.3

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
    10. Applied rewrites17.3%

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot \color{blue}{y5}\right)\right) \]

    if 2.3e48 < z

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    7. Applied rewrites26.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    8. Taylor expanded in y around 0

      \[\leadsto i \cdot \left(k \cdot \left(-1 \cdot \left(y1 \cdot \color{blue}{z}\right)\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(-1 \cdot \left(y1 \cdot z\right)\right)\right) \]
      2. lift-*.f6417.0

        \[\leadsto i \cdot \left(k \cdot \left(-1 \cdot \left(y1 \cdot z\right)\right)\right) \]
    10. Applied rewrites17.0%

      \[\leadsto i \cdot \left(k \cdot \left(-1 \cdot \left(y1 \cdot \color{blue}{z}\right)\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 31: 22.4% accurate, 6.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\ \mathbf{if}\;z \leq -2.1 \cdot 10^{+26}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+44}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{+202}:\\ \;\;\;\;c \cdot \left(i \cdot \left(t \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* y1 (* a (* y3 z)))))
   (if (<= z -2.1e+26)
     t_1
     (if (<= z 6e+44)
       (* i (* k (* y y5)))
       (if (<= z 1.08e+202) (* c (* i (* t z))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y1 * (a * (y3 * z));
	double tmp;
	if (z <= -2.1e+26) {
		tmp = t_1;
	} else if (z <= 6e+44) {
		tmp = i * (k * (y * y5));
	} else if (z <= 1.08e+202) {
		tmp = c * (i * (t * z));
	} 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, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y1 * (a * (y3 * z))
    if (z <= (-2.1d+26)) then
        tmp = t_1
    else if (z <= 6d+44) then
        tmp = i * (k * (y * y5))
    else if (z <= 1.08d+202) then
        tmp = c * (i * (t * z))
    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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y1 * (a * (y3 * z));
	double tmp;
	if (z <= -2.1e+26) {
		tmp = t_1;
	} else if (z <= 6e+44) {
		tmp = i * (k * (y * y5));
	} else if (z <= 1.08e+202) {
		tmp = c * (i * (t * z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = y1 * (a * (y3 * z))
	tmp = 0
	if z <= -2.1e+26:
		tmp = t_1
	elif z <= 6e+44:
		tmp = i * (k * (y * y5))
	elif z <= 1.08e+202:
		tmp = c * (i * (t * z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(y1 * Float64(a * Float64(y3 * z)))
	tmp = 0.0
	if (z <= -2.1e+26)
		tmp = t_1;
	elseif (z <= 6e+44)
		tmp = Float64(i * Float64(k * Float64(y * y5)));
	elseif (z <= 1.08e+202)
		tmp = Float64(c * Float64(i * Float64(t * z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = y1 * (a * (y3 * z));
	tmp = 0.0;
	if (z <= -2.1e+26)
		tmp = t_1;
	elseif (z <= 6e+44)
		tmp = i * (k * (y * y5));
	elseif (z <= 1.08e+202)
		tmp = c * (i * (t * z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y1 * N[(a * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1e+26], t$95$1, If[LessEqual[z, 6e+44], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.08e+202], N[(c * N[(i * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 6 \cdot 10^{+44}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\

\mathbf{elif}\;z \leq 1.08 \cdot 10^{+202}:\\
\;\;\;\;c \cdot \left(i \cdot \left(t \cdot z\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.1000000000000001e26 or 1.08e202 < z

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in y3 around inf

      \[\leadsto y1 \cdot \left(y3 \cdot \color{blue}{\left(-1 \cdot \left(j \cdot y4\right) + a \cdot z\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \left(-1 \cdot \left(j \cdot y4\right) + \color{blue}{a \cdot z}\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot \color{blue}{y4}, a \cdot z\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right) \]
      4. lower-*.f6427.0

        \[\leadsto y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right) \]
    7. Applied rewrites27.0%

      \[\leadsto y1 \cdot \left(y3 \cdot \color{blue}{\mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)}\right) \]
    8. Taylor expanded in z around inf

      \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right) \]
      2. lower-*.f6417.8

        \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right) \]
    10. Applied rewrites17.8%

      \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]

    if -2.1000000000000001e26 < z < 5.99999999999999974e44

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    7. Applied rewrites26.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    8. Taylor expanded in y around inf

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

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
      2. lift-*.f6417.3

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
    10. Applied rewrites17.3%

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot \color{blue}{y5}\right)\right) \]

    if 5.99999999999999974e44 < z < 1.08e202

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in c around inf

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

        \[\leadsto c \cdot \color{blue}{\left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{y4 \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.5%

      \[\leadsto \color{blue}{c \cdot \left(\mathsf{fma}\left(-1, i \cdot \left(x \cdot y - t \cdot z\right), y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    5. Taylor expanded in t around inf

      \[\leadsto c \cdot \left(t \cdot \color{blue}{\left(i \cdot z - y2 \cdot y4\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(t \cdot \left(i \cdot z - \color{blue}{y2 \cdot y4}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot \color{blue}{y4}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right) \]
      4. lower-*.f6426.9

        \[\leadsto c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto c \cdot \left(t \cdot \color{blue}{\left(i \cdot z - y2 \cdot y4\right)}\right) \]
    8. Taylor expanded in z around inf

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

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      2. lower-*.f6417.0

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
    10. Applied rewrites17.0%

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

Alternative 32: 22.4% accurate, 5.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y1 \cdot \left(k \cdot \left(y2 \cdot y4\right)\right)\\ \mathbf{if}\;y1 \leq -2.05 \cdot 10^{+76}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y1 \leq -1.3 \cdot 10^{-113}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\ \mathbf{elif}\;y1 \leq 1.1 \cdot 10^{-124}:\\ \;\;\;\;c \cdot \left(i \cdot \left(t \cdot z\right)\right)\\ \mathbf{elif}\;y1 \leq 8 \cdot 10^{+36}:\\ \;\;\;\;b \cdot \left(a \cdot \left(x \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* y1 (* k (* y2 y4)))))
   (if (<= y1 -2.05e+76)
     t_1
     (if (<= y1 -1.3e-113)
       (* i (* k (* y y5)))
       (if (<= y1 1.1e-124)
         (* c (* i (* t z)))
         (if (<= y1 8e+36) (* b (* a (* x y))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y1 * (k * (y2 * y4));
	double tmp;
	if (y1 <= -2.05e+76) {
		tmp = t_1;
	} else if (y1 <= -1.3e-113) {
		tmp = i * (k * (y * y5));
	} else if (y1 <= 1.1e-124) {
		tmp = c * (i * (t * z));
	} else if (y1 <= 8e+36) {
		tmp = b * (a * (x * 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, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y1 * (k * (y2 * y4))
    if (y1 <= (-2.05d+76)) then
        tmp = t_1
    else if (y1 <= (-1.3d-113)) then
        tmp = i * (k * (y * y5))
    else if (y1 <= 1.1d-124) then
        tmp = c * (i * (t * z))
    else if (y1 <= 8d+36) then
        tmp = b * (a * (x * 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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y1 * (k * (y2 * y4));
	double tmp;
	if (y1 <= -2.05e+76) {
		tmp = t_1;
	} else if (y1 <= -1.3e-113) {
		tmp = i * (k * (y * y5));
	} else if (y1 <= 1.1e-124) {
		tmp = c * (i * (t * z));
	} else if (y1 <= 8e+36) {
		tmp = b * (a * (x * y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = y1 * (k * (y2 * y4))
	tmp = 0
	if y1 <= -2.05e+76:
		tmp = t_1
	elif y1 <= -1.3e-113:
		tmp = i * (k * (y * y5))
	elif y1 <= 1.1e-124:
		tmp = c * (i * (t * z))
	elif y1 <= 8e+36:
		tmp = b * (a * (x * y))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(y1 * Float64(k * Float64(y2 * y4)))
	tmp = 0.0
	if (y1 <= -2.05e+76)
		tmp = t_1;
	elseif (y1 <= -1.3e-113)
		tmp = Float64(i * Float64(k * Float64(y * y5)));
	elseif (y1 <= 1.1e-124)
		tmp = Float64(c * Float64(i * Float64(t * z)));
	elseif (y1 <= 8e+36)
		tmp = Float64(b * Float64(a * Float64(x * y)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = y1 * (k * (y2 * y4));
	tmp = 0.0;
	if (y1 <= -2.05e+76)
		tmp = t_1;
	elseif (y1 <= -1.3e-113)
		tmp = i * (k * (y * y5));
	elseif (y1 <= 1.1e-124)
		tmp = c * (i * (t * z));
	elseif (y1 <= 8e+36)
		tmp = b * (a * (x * y));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y1 * N[(k * N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y1, -2.05e+76], t$95$1, If[LessEqual[y1, -1.3e-113], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 1.1e-124], N[(c * N[(i * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 8e+36], N[(b * N[(a * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y1 \cdot \left(k \cdot \left(y2 \cdot y4\right)\right)\\
\mathbf{if}\;y1 \leq -2.05 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y1 \leq -1.3 \cdot 10^{-113}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\

\mathbf{elif}\;y1 \leq 1.1 \cdot 10^{-124}:\\
\;\;\;\;c \cdot \left(i \cdot \left(t \cdot z\right)\right)\\

\mathbf{elif}\;y1 \leq 8 \cdot 10^{+36}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y1 < -2.0499999999999999e76 or 8.00000000000000034e36 < y1

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y1 around inf

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

        \[\leadsto y1 \cdot \color{blue}{\left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y1 \cdot \left(\left(-1 \cdot \left(a \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in y2 around inf

      \[\leadsto y1 \cdot \left(y2 \cdot \color{blue}{\left(-1 \cdot \left(a \cdot x\right) + k \cdot y4\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(y2 \cdot \left(-1 \cdot \left(a \cdot x\right) + \color{blue}{k \cdot y4}\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto y1 \cdot \left(y2 \cdot \mathsf{fma}\left(-1, a \cdot \color{blue}{x}, k \cdot y4\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(y2 \cdot \mathsf{fma}\left(-1, a \cdot x, k \cdot y4\right)\right) \]
      4. lower-*.f6427.5

        \[\leadsto y1 \cdot \left(y2 \cdot \mathsf{fma}\left(-1, a \cdot x, k \cdot y4\right)\right) \]
    7. Applied rewrites27.5%

      \[\leadsto y1 \cdot \left(y2 \cdot \color{blue}{\mathsf{fma}\left(-1, a \cdot x, k \cdot y4\right)}\right) \]
    8. Taylor expanded in x around 0

      \[\leadsto y1 \cdot \left(k \cdot \left(y2 \cdot \color{blue}{y4}\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(k \cdot \left(y2 \cdot y4\right)\right) \]
      2. lower-*.f6417.9

        \[\leadsto y1 \cdot \left(k \cdot \left(y2 \cdot y4\right)\right) \]
    10. Applied rewrites17.9%

      \[\leadsto y1 \cdot \left(k \cdot \left(y2 \cdot \color{blue}{y4}\right)\right) \]

    if -2.0499999999999999e76 < y1 < -1.3e-113

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    7. Applied rewrites26.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    8. Taylor expanded in y around inf

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

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
      2. lift-*.f6417.3

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
    10. Applied rewrites17.3%

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot \color{blue}{y5}\right)\right) \]

    if -1.3e-113 < y1 < 1.0999999999999999e-124

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in c around inf

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

        \[\leadsto c \cdot \color{blue}{\left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{y4 \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.5%

      \[\leadsto \color{blue}{c \cdot \left(\mathsf{fma}\left(-1, i \cdot \left(x \cdot y - t \cdot z\right), y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    5. Taylor expanded in t around inf

      \[\leadsto c \cdot \left(t \cdot \color{blue}{\left(i \cdot z - y2 \cdot y4\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(t \cdot \left(i \cdot z - \color{blue}{y2 \cdot y4}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot \color{blue}{y4}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right) \]
      4. lower-*.f6426.9

        \[\leadsto c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto c \cdot \left(t \cdot \color{blue}{\left(i \cdot z - y2 \cdot y4\right)}\right) \]
    8. Taylor expanded in z around inf

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

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      2. lower-*.f6417.0

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
    10. Applied rewrites17.0%

      \[\leadsto c \cdot \left(i \cdot \left(t \cdot \color{blue}{z}\right)\right) \]

    if 1.0999999999999999e-124 < y1 < 8.00000000000000034e36

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in b around inf

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

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

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    4. Applied rewrites36.5%

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

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

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

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

        \[\leadsto b \cdot \left(x \cdot \left(a \cdot y - j \cdot y0\right)\right) \]
      4. lower-*.f6426.3

        \[\leadsto b \cdot \left(x \cdot \left(a \cdot y - j \cdot y0\right)\right) \]
    7. Applied rewrites26.3%

      \[\leadsto b \cdot \left(x \cdot \color{blue}{\left(a \cdot y - j \cdot y0\right)}\right) \]
    8. Taylor expanded in y around inf

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

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y\right)\right) \]
      2. lower-*.f6417.2

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y\right)\right) \]
    10. Applied rewrites17.2%

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

Alternative 33: 21.3% accurate, 7.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c \cdot \left(i \cdot \left(t \cdot z\right)\right)\\ \mathbf{if}\;z \leq -7.4 \cdot 10^{+212}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+44}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* c (* i (* t z)))))
   (if (<= z -7.4e+212) t_1 (if (<= z 6e+44) (* i (* k (* y y5))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = c * (i * (t * z));
	double tmp;
	if (z <= -7.4e+212) {
		tmp = t_1;
	} else if (z <= 6e+44) {
		tmp = i * (k * (y * y5));
	} 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, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = c * (i * (t * z))
    if (z <= (-7.4d+212)) then
        tmp = t_1
    else if (z <= 6d+44) then
        tmp = i * (k * (y * y5))
    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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = c * (i * (t * z));
	double tmp;
	if (z <= -7.4e+212) {
		tmp = t_1;
	} else if (z <= 6e+44) {
		tmp = i * (k * (y * y5));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = c * (i * (t * z))
	tmp = 0
	if z <= -7.4e+212:
		tmp = t_1
	elif z <= 6e+44:
		tmp = i * (k * (y * y5))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(c * Float64(i * Float64(t * z)))
	tmp = 0.0
	if (z <= -7.4e+212)
		tmp = t_1;
	elseif (z <= 6e+44)
		tmp = Float64(i * Float64(k * Float64(y * y5)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = c * (i * (t * z));
	tmp = 0.0;
	if (z <= -7.4e+212)
		tmp = t_1;
	elseif (z <= 6e+44)
		tmp = i * (k * (y * y5));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(c * N[(i * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.4e+212], t$95$1, If[LessEqual[z, 6e+44], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := c \cdot \left(i \cdot \left(t \cdot z\right)\right)\\
\mathbf{if}\;z \leq -7.4 \cdot 10^{+212}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 6 \cdot 10^{+44}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.3999999999999993e212 or 5.99999999999999974e44 < z

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in c around inf

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

        \[\leadsto c \cdot \color{blue}{\left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{y4 \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.5%

      \[\leadsto \color{blue}{c \cdot \left(\mathsf{fma}\left(-1, i \cdot \left(x \cdot y - t \cdot z\right), y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    5. Taylor expanded in t around inf

      \[\leadsto c \cdot \left(t \cdot \color{blue}{\left(i \cdot z - y2 \cdot y4\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(t \cdot \left(i \cdot z - \color{blue}{y2 \cdot y4}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot \color{blue}{y4}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right) \]
      4. lower-*.f6426.9

        \[\leadsto c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto c \cdot \left(t \cdot \color{blue}{\left(i \cdot z - y2 \cdot y4\right)}\right) \]
    8. Taylor expanded in z around inf

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

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      2. lower-*.f6417.0

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
    10. Applied rewrites17.0%

      \[\leadsto c \cdot \left(i \cdot \left(t \cdot \color{blue}{z}\right)\right) \]

    if -7.3999999999999993e212 < z < 5.99999999999999974e44

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    7. Applied rewrites26.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    8. Taylor expanded in y around inf

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

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
      2. lift-*.f6417.3

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
    10. Applied rewrites17.3%

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

Alternative 34: 20.6% accurate, 7.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(a \cdot \left(x \cdot y\right)\right)\\ \mathbf{if}\;x \leq -1.8 \cdot 10^{+46}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{+100}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* b (* a (* x y)))))
   (if (<= x -1.8e+46) t_1 (if (<= x 1.5e+100) (* i (* k (* y y5))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = b * (a * (x * y));
	double tmp;
	if (x <= -1.8e+46) {
		tmp = t_1;
	} else if (x <= 1.5e+100) {
		tmp = i * (k * (y * y5));
	} 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, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = b * (a * (x * y))
    if (x <= (-1.8d+46)) then
        tmp = t_1
    else if (x <= 1.5d+100) then
        tmp = i * (k * (y * y5))
    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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = b * (a * (x * y));
	double tmp;
	if (x <= -1.8e+46) {
		tmp = t_1;
	} else if (x <= 1.5e+100) {
		tmp = i * (k * (y * y5));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = b * (a * (x * y))
	tmp = 0
	if x <= -1.8e+46:
		tmp = t_1
	elif x <= 1.5e+100:
		tmp = i * (k * (y * y5))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(b * Float64(a * Float64(x * y)))
	tmp = 0.0
	if (x <= -1.8e+46)
		tmp = t_1;
	elseif (x <= 1.5e+100)
		tmp = Float64(i * Float64(k * Float64(y * y5)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = b * (a * (x * y));
	tmp = 0.0;
	if (x <= -1.8e+46)
		tmp = t_1;
	elseif (x <= 1.5e+100)
		tmp = i * (k * (y * y5));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(b * N[(a * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.8e+46], t$95$1, If[LessEqual[x, 1.5e+100], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot \left(x \cdot y\right)\right)\\
\mathbf{if}\;x \leq -1.8 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 1.5 \cdot 10^{+100}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.7999999999999999e46 or 1.49999999999999993e100 < x

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in b around inf

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

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

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    4. Applied rewrites36.5%

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

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

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

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

        \[\leadsto b \cdot \left(x \cdot \left(a \cdot y - j \cdot y0\right)\right) \]
      4. lower-*.f6426.3

        \[\leadsto b \cdot \left(x \cdot \left(a \cdot y - j \cdot y0\right)\right) \]
    7. Applied rewrites26.3%

      \[\leadsto b \cdot \left(x \cdot \color{blue}{\left(a \cdot y - j \cdot y0\right)}\right) \]
    8. Taylor expanded in y around inf

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

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y\right)\right) \]
      2. lower-*.f6417.2

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y\right)\right) \]
    10. Applied rewrites17.2%

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

    if -1.7999999999999999e46 < x < 1.49999999999999993e100

    1. Initial program 29.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6426.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    7. Applied rewrites26.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    8. Taylor expanded in y around inf

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

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
      2. lift-*.f6417.3

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
    10. Applied rewrites17.3%

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

Alternative 35: 17.3% accurate, 13.6× speedup?

\[\begin{array}{l} \\ i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (* i (* k (* y y5))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return i * (k * (y * y5));
}
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, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    code = i * (k * (y * y5))
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 k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return i * (k * (y * y5));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	return i * (k * (y * y5))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	return Float64(i * Float64(k * Float64(y * y5)))
end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = i * (k * (y * y5));
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
i \cdot \left(k \cdot \left(y \cdot y5\right)\right)
\end{array}
Derivation
  1. Initial program 29.5%

    \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
  2. Taylor expanded in i around -inf

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

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

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

      \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
  4. Applied rewrites37.8%

    \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
  5. Taylor expanded in k around -inf

    \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
  6. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
    2. lower-*.f64N/A

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
    3. lower--.f64N/A

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
    4. lower-*.f64N/A

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    5. lower-*.f6426.8

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
  7. Applied rewrites26.8%

    \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
  8. Taylor expanded in y around inf

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

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
    2. lift-*.f6417.3

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
  10. Applied rewrites17.3%

    \[\leadsto i \cdot \left(k \cdot \left(y \cdot \color{blue}{y5}\right)\right) \]
  11. Add Preprocessing

Reproduce

?
herbie shell --seed 2025131 
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :name "Linear.Matrix:det44 from linear-1.19.1.3"
  :precision binary64
  (+ (- (+ (+ (- (* (- (* x y) (* z t)) (- (* a b) (* c i))) (* (- (* x j) (* z k)) (- (* y0 b) (* y1 i)))) (* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a)))) (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i)))) (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a)))) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))