Linear.Matrix:det44 from linear-1.19.1.3

Percentage Accurate: 29.3% → 53.3%
Time: 22.4s
Alternatives: 30
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 30 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.3% 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.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot y0 - i \cdot y1\\ t_2 := y0 \cdot \left(j \cdot x - k \cdot z\right)\\ t_3 := b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - t\_2\right)\\ t_4 := c \cdot y0 - a \cdot y1\\ t_5 := x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot t\_4\right) - j \cdot t\_1\right)\\ t_6 := y1 \cdot y4 - y0 \cdot y5\\ \mathbf{if}\;b \leq -9.6 \cdot 10^{+166}:\\ \;\;\;\;b \cdot \left(a \cdot \left(x \cdot y\right) - t\_2\right)\\ \mathbf{elif}\;b \leq -2 \cdot 10^{+81}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;b \leq -2.1 \cdot 10^{-83}:\\ \;\;\;\;t\_5\\ \mathbf{elif}\;b \leq -1.25 \cdot 10^{-189}:\\ \;\;\;\;j \cdot \left(\mathsf{fma}\left(-1, y3 \cdot t\_6, t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot t\_1\right)\\ \mathbf{elif}\;b \leq 8.5 \cdot 10^{-164}:\\ \;\;\;\;-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, t\_6, z \cdot t\_4\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{+78}:\\ \;\;\;\;t\_5\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \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 y0) (* i y1)))
        (t_2 (* y0 (- (* j x) (* k z))))
        (t_3
         (* b (- (fma a (- (* x y) (* t z)) (* y4 (- (* j t) (* k y)))) t_2)))
        (t_4 (- (* c y0) (* a y1)))
        (t_5 (* x (- (fma y (- (* a b) (* c i)) (* y2 t_4)) (* j t_1))))
        (t_6 (- (* y1 y4) (* y0 y5))))
   (if (<= b -9.6e+166)
     (* b (- (* a (* x y)) t_2))
     (if (<= b -2e+81)
       t_3
       (if (<= b -2.1e-83)
         t_5
         (if (<= b -1.25e-189)
           (*
            j
            (- (fma -1.0 (* y3 t_6) (* t (- (* b y4) (* i y5)))) (* x t_1)))
           (if (<= b 8.5e-164)
             (*
              -1.0
              (* y3 (- (fma j t_6 (* z t_4)) (* y (- (* c y4) (* a y5))))))
             (if (<= b 2.3e+78) t_5 t_3))))))))
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 * y0) - (i * y1);
	double t_2 = y0 * ((j * x) - (k * z));
	double t_3 = b * (fma(a, ((x * y) - (t * z)), (y4 * ((j * t) - (k * y)))) - t_2);
	double t_4 = (c * y0) - (a * y1);
	double t_5 = x * (fma(y, ((a * b) - (c * i)), (y2 * t_4)) - (j * t_1));
	double t_6 = (y1 * y4) - (y0 * y5);
	double tmp;
	if (b <= -9.6e+166) {
		tmp = b * ((a * (x * y)) - t_2);
	} else if (b <= -2e+81) {
		tmp = t_3;
	} else if (b <= -2.1e-83) {
		tmp = t_5;
	} else if (b <= -1.25e-189) {
		tmp = j * (fma(-1.0, (y3 * t_6), (t * ((b * y4) - (i * y5)))) - (x * t_1));
	} else if (b <= 8.5e-164) {
		tmp = -1.0 * (y3 * (fma(j, t_6, (z * t_4)) - (y * ((c * y4) - (a * y5)))));
	} else if (b <= 2.3e+78) {
		tmp = t_5;
	} else {
		tmp = t_3;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(b * y0) - Float64(i * y1))
	t_2 = Float64(y0 * Float64(Float64(j * x) - Float64(k * z)))
	t_3 = Float64(b * Float64(fma(a, Float64(Float64(x * y) - Float64(t * z)), Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))) - t_2))
	t_4 = Float64(Float64(c * y0) - Float64(a * y1))
	t_5 = Float64(x * Float64(fma(y, Float64(Float64(a * b) - Float64(c * i)), Float64(y2 * t_4)) - Float64(j * t_1)))
	t_6 = Float64(Float64(y1 * y4) - Float64(y0 * y5))
	tmp = 0.0
	if (b <= -9.6e+166)
		tmp = Float64(b * Float64(Float64(a * Float64(x * y)) - t_2));
	elseif (b <= -2e+81)
		tmp = t_3;
	elseif (b <= -2.1e-83)
		tmp = t_5;
	elseif (b <= -1.25e-189)
		tmp = Float64(j * Float64(fma(-1.0, Float64(y3 * t_6), Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))) - Float64(x * t_1)));
	elseif (b <= 8.5e-164)
		tmp = Float64(-1.0 * Float64(y3 * Float64(fma(j, t_6, Float64(z * t_4)) - Float64(y * Float64(Float64(c * y4) - Float64(a * y5))))));
	elseif (b <= 2.3e+78)
		tmp = t_5;
	else
		tmp = t_3;
	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[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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] - t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x * N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(y2 * t$95$4), $MachinePrecision]), $MachinePrecision] - N[(j * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9.6e+166], N[(b * N[(N[(a * N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2e+81], t$95$3, If[LessEqual[b, -2.1e-83], t$95$5, If[LessEqual[b, -1.25e-189], N[(j * N[(N[(-1.0 * N[(y3 * t$95$6), $MachinePrecision] + N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.5e-164], N[(-1.0 * N[(y3 * N[(N[(j * t$95$6 + N[(z * t$95$4), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.3e+78], t$95$5, t$95$3]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -2 \cdot 10^{+81}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \leq -2.1 \cdot 10^{-83}:\\
\;\;\;\;t\_5\\

\mathbf{elif}\;b \leq -1.25 \cdot 10^{-189}:\\
\;\;\;\;j \cdot \left(\mathsf{fma}\left(-1, y3 \cdot t\_6, t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot t\_1\right)\\

\mathbf{elif}\;b \leq 8.5 \cdot 10^{-164}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, t\_6, z \cdot t\_4\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)\\

\mathbf{elif}\;b \leq 2.3 \cdot 10^{+78}:\\
\;\;\;\;t\_5\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -9.59999999999999969e166

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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(a \cdot \left(x \cdot y\right) - \color{blue}{y0} \cdot \left(j \cdot x - k \cdot z\right)\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      2. lift-*.f6431.3

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right) \]
    7. Applied rewrites31.3%

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

    if -9.59999999999999969e166 < b < -1.99999999999999984e81 or 2.3000000000000002e78 < b

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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 -1.99999999999999984e81 < b < -2.0999999999999999e-83 or 8.50000000000000035e-164 < b < 2.3000000000000002e78

    1. Initial program 29.3%

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

      \[\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 -2.0999999999999999e-83 < b < -1.2499999999999999e-189

    1. Initial program 29.3%

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

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

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

        \[\leadsto j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - \color{blue}{x \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    4. Applied rewrites36.7%

      \[\leadsto \color{blue}{j \cdot \left(\mathsf{fma}\left(-1, y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right), t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]

    if -1.2499999999999999e-189 < b < 8.50000000000000035e-164

    1. Initial program 29.3%

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

      \[\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)} \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 2: 44.4% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot y - t \cdot z\\ t_2 := j \cdot x - k \cdot z\\ t_3 := y0 \cdot t\_2\\ t_4 := j \cdot t - k \cdot y\\ t_5 := b \cdot \left(\mathsf{fma}\left(a, t\_1, y4 \cdot t\_4\right) - t\_3\right)\\ t_6 := c \cdot y0 - a \cdot y1\\ t_7 := x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot t\_6\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\ \mathbf{if}\;b \leq -9.6 \cdot 10^{+166}:\\ \;\;\;\;b \cdot \left(a \cdot \left(x \cdot y\right) - t\_3\right)\\ \mathbf{elif}\;b \leq -2 \cdot 10^{+81}:\\ \;\;\;\;t\_5\\ \mathbf{elif}\;b \leq -6.8 \cdot 10^{-10}:\\ \;\;\;\;t\_7\\ \mathbf{elif}\;b \leq -9.5 \cdot 10^{-115}:\\ \;\;\;\;-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, t\_1, y5 \cdot t\_4\right) - y1 \cdot t\_2\right)\right)\\ \mathbf{elif}\;b \leq 8.5 \cdot 10^{-164}:\\ \;\;\;\;-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot t\_6\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{+78}:\\ \;\;\;\;t\_7\\ \mathbf{else}:\\ \;\;\;\;t\_5\\ \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 y) (* t z)))
        (t_2 (- (* j x) (* k z)))
        (t_3 (* y0 t_2))
        (t_4 (- (* j t) (* k y)))
        (t_5 (* b (- (fma a t_1 (* y4 t_4)) t_3)))
        (t_6 (- (* c y0) (* a y1)))
        (t_7
         (*
          x
          (-
           (fma y (- (* a b) (* c i)) (* y2 t_6))
           (* j (- (* b y0) (* i y1)))))))
   (if (<= b -9.6e+166)
     (* b (- (* a (* x y)) t_3))
     (if (<= b -2e+81)
       t_5
       (if (<= b -6.8e-10)
         t_7
         (if (<= b -9.5e-115)
           (* -1.0 (* i (- (fma c t_1 (* y5 t_4)) (* y1 t_2))))
           (if (<= b 8.5e-164)
             (*
              -1.0
              (*
               y3
               (-
                (fma j (- (* y1 y4) (* y0 y5)) (* z t_6))
                (* y (- (* c y4) (* a y5))))))
             (if (<= b 2.3e+78) t_7 t_5))))))))
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 * y) - (t * z);
	double t_2 = (j * x) - (k * z);
	double t_3 = y0 * t_2;
	double t_4 = (j * t) - (k * y);
	double t_5 = b * (fma(a, t_1, (y4 * t_4)) - t_3);
	double t_6 = (c * y0) - (a * y1);
	double t_7 = x * (fma(y, ((a * b) - (c * i)), (y2 * t_6)) - (j * ((b * y0) - (i * y1))));
	double tmp;
	if (b <= -9.6e+166) {
		tmp = b * ((a * (x * y)) - t_3);
	} else if (b <= -2e+81) {
		tmp = t_5;
	} else if (b <= -6.8e-10) {
		tmp = t_7;
	} else if (b <= -9.5e-115) {
		tmp = -1.0 * (i * (fma(c, t_1, (y5 * t_4)) - (y1 * t_2)));
	} else if (b <= 8.5e-164) {
		tmp = -1.0 * (y3 * (fma(j, ((y1 * y4) - (y0 * y5)), (z * t_6)) - (y * ((c * y4) - (a * y5)))));
	} else if (b <= 2.3e+78) {
		tmp = t_7;
	} else {
		tmp = t_5;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(x * y) - Float64(t * z))
	t_2 = Float64(Float64(j * x) - Float64(k * z))
	t_3 = Float64(y0 * t_2)
	t_4 = Float64(Float64(j * t) - Float64(k * y))
	t_5 = Float64(b * Float64(fma(a, t_1, Float64(y4 * t_4)) - t_3))
	t_6 = Float64(Float64(c * y0) - Float64(a * y1))
	t_7 = Float64(x * Float64(fma(y, Float64(Float64(a * b) - Float64(c * i)), Float64(y2 * t_6)) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1)))))
	tmp = 0.0
	if (b <= -9.6e+166)
		tmp = Float64(b * Float64(Float64(a * Float64(x * y)) - t_3));
	elseif (b <= -2e+81)
		tmp = t_5;
	elseif (b <= -6.8e-10)
		tmp = t_7;
	elseif (b <= -9.5e-115)
		tmp = Float64(-1.0 * Float64(i * Float64(fma(c, t_1, Float64(y5 * t_4)) - Float64(y1 * t_2))));
	elseif (b <= 8.5e-164)
		tmp = Float64(-1.0 * Float64(y3 * Float64(fma(j, Float64(Float64(y1 * y4) - Float64(y0 * y5)), Float64(z * t_6)) - Float64(y * Float64(Float64(c * y4) - Float64(a * y5))))));
	elseif (b <= 2.3e+78)
		tmp = t_7;
	else
		tmp = t_5;
	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[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y0 * t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(b * N[(N[(a * t$95$1 + N[(y4 * t$95$4), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(x * N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(y2 * t$95$6), $MachinePrecision]), $MachinePrecision] - N[(j * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9.6e+166], N[(b * N[(N[(a * N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2e+81], t$95$5, If[LessEqual[b, -6.8e-10], t$95$7, If[LessEqual[b, -9.5e-115], N[(-1.0 * N[(i * N[(N[(c * t$95$1 + N[(y5 * t$95$4), $MachinePrecision]), $MachinePrecision] - N[(y1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.5e-164], N[(-1.0 * N[(y3 * N[(N[(j * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision] + N[(z * t$95$6), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.3e+78], t$95$7, t$95$5]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot y - t \cdot z\\
t_2 := j \cdot x - k \cdot z\\
t_3 := y0 \cdot t\_2\\
t_4 := j \cdot t - k \cdot y\\
t_5 := b \cdot \left(\mathsf{fma}\left(a, t\_1, y4 \cdot t\_4\right) - t\_3\right)\\
t_6 := c \cdot y0 - a \cdot y1\\
t_7 := x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot t\_6\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\mathbf{if}\;b \leq -9.6 \cdot 10^{+166}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y\right) - t\_3\right)\\

\mathbf{elif}\;b \leq -2 \cdot 10^{+81}:\\
\;\;\;\;t\_5\\

\mathbf{elif}\;b \leq -6.8 \cdot 10^{-10}:\\
\;\;\;\;t\_7\\

\mathbf{elif}\;b \leq -9.5 \cdot 10^{-115}:\\
\;\;\;\;-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, t\_1, y5 \cdot t\_4\right) - y1 \cdot t\_2\right)\right)\\

\mathbf{elif}\;b \leq 8.5 \cdot 10^{-164}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot t\_6\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)\\

\mathbf{elif}\;b \leq 2.3 \cdot 10^{+78}:\\
\;\;\;\;t\_7\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -9.59999999999999969e166

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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(a \cdot \left(x \cdot y\right) - \color{blue}{y0} \cdot \left(j \cdot x - k \cdot z\right)\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      2. lift-*.f6431.3

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right) \]
    7. Applied rewrites31.3%

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

    if -9.59999999999999969e166 < b < -1.99999999999999984e81 or 2.3000000000000002e78 < b

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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 -1.99999999999999984e81 < b < -6.8000000000000003e-10 or 8.50000000000000035e-164 < b < 2.3000000000000002e78

    1. Initial program 29.3%

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

      \[\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 -6.8000000000000003e-10 < b < -9.4999999999999996e-115

    1. Initial program 29.3%

      \[\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 rewrites38.1%

      \[\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 -9.4999999999999996e-115 < b < 8.50000000000000035e-164

    1. Initial program 29.3%

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

      \[\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)} \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 3: 43.5% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 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)\\ t_2 := y0 \cdot \left(j \cdot x - k \cdot z\right)\\ t_3 := j \cdot t - k \cdot y\\ t_4 := b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot t\_3\right) - t\_2\right)\\ \mathbf{if}\;b \leq -9.6 \cdot 10^{+166}:\\ \;\;\;\;b \cdot \left(a \cdot \left(x \cdot y\right) - t\_2\right)\\ \mathbf{elif}\;b \leq -2 \cdot 10^{+81}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;b \leq -3.7 \cdot 10^{-82}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 3.8 \cdot 10^{-297}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\ \mathbf{elif}\;b \leq 3.3 \cdot 10^{-164}:\\ \;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, t\_3, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{+78}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;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
          (-
           (fma y (- (* a b) (* c i)) (* y2 (- (* c y0) (* a y1))))
           (* j (- (* b y0) (* i y1))))))
        (t_2 (* y0 (- (* j x) (* k z))))
        (t_3 (- (* j t) (* k y)))
        (t_4 (* b (- (fma a (- (* x y) (* t z)) (* y4 t_3)) t_2))))
   (if (<= b -9.6e+166)
     (* b (- (* a (* x y)) t_2))
     (if (<= b -2e+81)
       t_4
       (if (<= b -3.7e-82)
         t_1
         (if (<= b 3.8e-297)
           (* a (* y3 (- (* y1 z) (* y y5))))
           (if (<= b 3.3e-164)
             (*
              y4
              (-
               (fma b t_3 (* y1 (- (* k y2) (* j y3))))
               (* c (- (* t y2) (* y y3)))))
             (if (<= b 2.3e+78) t_1 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 * (fma(y, ((a * b) - (c * i)), (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
	double t_2 = y0 * ((j * x) - (k * z));
	double t_3 = (j * t) - (k * y);
	double t_4 = b * (fma(a, ((x * y) - (t * z)), (y4 * t_3)) - t_2);
	double tmp;
	if (b <= -9.6e+166) {
		tmp = b * ((a * (x * y)) - t_2);
	} else if (b <= -2e+81) {
		tmp = t_4;
	} else if (b <= -3.7e-82) {
		tmp = t_1;
	} else if (b <= 3.8e-297) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else if (b <= 3.3e-164) {
		tmp = y4 * (fma(b, t_3, (y1 * ((k * y2) - (j * y3)))) - (c * ((t * y2) - (y * y3))));
	} else if (b <= 2.3e+78) {
		tmp = t_1;
	} else {
		tmp = 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(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)))))
	t_2 = Float64(y0 * Float64(Float64(j * x) - Float64(k * z)))
	t_3 = Float64(Float64(j * t) - Float64(k * y))
	t_4 = Float64(b * Float64(fma(a, Float64(Float64(x * y) - Float64(t * z)), Float64(y4 * t_3)) - t_2))
	tmp = 0.0
	if (b <= -9.6e+166)
		tmp = Float64(b * Float64(Float64(a * Float64(x * y)) - t_2));
	elseif (b <= -2e+81)
		tmp = t_4;
	elseif (b <= -3.7e-82)
		tmp = t_1;
	elseif (b <= 3.8e-297)
		tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * y5))));
	elseif (b <= 3.3e-164)
		tmp = Float64(y4 * Float64(fma(b, t_3, Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3)))));
	elseif (b <= 2.3e+78)
		tmp = t_1;
	else
		tmp = t_4;
	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[(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]}, Block[{t$95$2 = N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(b * N[(N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y4 * t$95$3), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9.6e+166], N[(b * N[(N[(a * N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2e+81], t$95$4, If[LessEqual[b, -3.7e-82], t$95$1, If[LessEqual[b, 3.8e-297], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.3e-164], N[(y4 * N[(N[(b * t$95$3 + N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.3e+78], t$95$1, t$95$4]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := 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)\\
t_2 := y0 \cdot \left(j \cdot x - k \cdot z\right)\\
t_3 := j \cdot t - k \cdot y\\
t_4 := b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot t\_3\right) - t\_2\right)\\
\mathbf{if}\;b \leq -9.6 \cdot 10^{+166}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y\right) - t\_2\right)\\

\mathbf{elif}\;b \leq -2 \cdot 10^{+81}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;b \leq -3.7 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 3.8 \cdot 10^{-297}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\

\mathbf{elif}\;b \leq 3.3 \cdot 10^{-164}:\\
\;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, t\_3, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\

\mathbf{elif}\;b \leq 2.3 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -9.59999999999999969e166

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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(a \cdot \left(x \cdot y\right) - \color{blue}{y0} \cdot \left(j \cdot x - k \cdot z\right)\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      2. lift-*.f6431.3

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right) \]
    7. Applied rewrites31.3%

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

    if -9.59999999999999969e166 < b < -1.99999999999999984e81 or 2.3000000000000002e78 < b

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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 -1.99999999999999984e81 < b < -3.7000000000000001e-82 or 3.3e-164 < b < 2.3000000000000002e78

    1. Initial program 29.3%

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

      \[\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 -3.7000000000000001e-82 < b < 3.80000000000000005e-297

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in a around -inf

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

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

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

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

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    7. Applied rewrites26.9%

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

    if 3.80000000000000005e-297 < b < 3.3e-164

    1. Initial program 29.3%

      \[\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 y4 around inf

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

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

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.8%

      \[\leadsto \color{blue}{y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 4: 43.3% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 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)\\ t_2 := j \cdot t - k \cdot y\\ t_3 := x \cdot y - t \cdot z\\ t_4 := -1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, t\_3, y5 \cdot t\_2\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)\\ \mathbf{if}\;i \leq -4.2 \cdot 10^{+76}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;i \leq -2.1 \cdot 10^{-151}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;i \leq 4.1 \cdot 10^{-128}:\\ \;\;\;\;\mathsf{fma}\left(b, y0 \cdot \left(k \cdot z - j \cdot x\right), b \cdot \mathsf{fma}\left(a, t\_3, y4 \cdot t\_2\right)\right)\\ \mathbf{elif}\;i \leq 8.6 \cdot 10^{+61}:\\ \;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, t\_2, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \mathbf{elif}\;i \leq 4.3 \cdot 10^{+111}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;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
          (-
           (fma y (- (* a b) (* c i)) (* y2 (- (* c y0) (* a y1))))
           (* j (- (* b y0) (* i y1))))))
        (t_2 (- (* j t) (* k y)))
        (t_3 (- (* x y) (* t z)))
        (t_4
         (* -1.0 (* i (- (fma c t_3 (* y5 t_2)) (* y1 (- (* j x) (* k z))))))))
   (if (<= i -4.2e+76)
     t_4
     (if (<= i -2.1e-151)
       t_1
       (if (<= i 4.1e-128)
         (fma b (* y0 (- (* k z) (* j x))) (* b (fma a t_3 (* y4 t_2))))
         (if (<= i 8.6e+61)
           (*
            y4
            (-
             (fma b t_2 (* y1 (- (* k y2) (* j y3))))
             (* c (- (* t y2) (* y y3)))))
           (if (<= i 4.3e+111) t_1 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 * (fma(y, ((a * b) - (c * i)), (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
	double t_2 = (j * t) - (k * y);
	double t_3 = (x * y) - (t * z);
	double t_4 = -1.0 * (i * (fma(c, t_3, (y5 * t_2)) - (y1 * ((j * x) - (k * z)))));
	double tmp;
	if (i <= -4.2e+76) {
		tmp = t_4;
	} else if (i <= -2.1e-151) {
		tmp = t_1;
	} else if (i <= 4.1e-128) {
		tmp = fma(b, (y0 * ((k * z) - (j * x))), (b * fma(a, t_3, (y4 * t_2))));
	} else if (i <= 8.6e+61) {
		tmp = y4 * (fma(b, t_2, (y1 * ((k * y2) - (j * y3)))) - (c * ((t * y2) - (y * y3))));
	} else if (i <= 4.3e+111) {
		tmp = t_1;
	} else {
		tmp = 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(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)))))
	t_2 = Float64(Float64(j * t) - Float64(k * y))
	t_3 = Float64(Float64(x * y) - Float64(t * z))
	t_4 = Float64(-1.0 * Float64(i * Float64(fma(c, t_3, Float64(y5 * t_2)) - Float64(y1 * Float64(Float64(j * x) - Float64(k * z))))))
	tmp = 0.0
	if (i <= -4.2e+76)
		tmp = t_4;
	elseif (i <= -2.1e-151)
		tmp = t_1;
	elseif (i <= 4.1e-128)
		tmp = fma(b, Float64(y0 * Float64(Float64(k * z) - Float64(j * x))), Float64(b * fma(a, t_3, Float64(y4 * t_2))));
	elseif (i <= 8.6e+61)
		tmp = Float64(y4 * Float64(fma(b, t_2, Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3)))));
	elseif (i <= 4.3e+111)
		tmp = t_1;
	else
		tmp = t_4;
	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[(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]}, Block[{t$95$2 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(-1.0 * N[(i * N[(N[(c * t$95$3 + 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[i, -4.2e+76], t$95$4, If[LessEqual[i, -2.1e-151], t$95$1, If[LessEqual[i, 4.1e-128], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * t$95$3 + N[(y4 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 8.6e+61], N[(y4 * N[(N[(b * t$95$2 + N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 4.3e+111], t$95$1, t$95$4]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := 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)\\
t_2 := j \cdot t - k \cdot y\\
t_3 := x \cdot y - t \cdot z\\
t_4 := -1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, t\_3, y5 \cdot t\_2\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)\\
\mathbf{if}\;i \leq -4.2 \cdot 10^{+76}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;i \leq -2.1 \cdot 10^{-151}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;i \leq 4.1 \cdot 10^{-128}:\\
\;\;\;\;\mathsf{fma}\left(b, y0 \cdot \left(k \cdot z - j \cdot x\right), b \cdot \mathsf{fma}\left(a, t\_3, y4 \cdot t\_2\right)\right)\\

\mathbf{elif}\;i \leq 8.6 \cdot 10^{+61}:\\
\;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, t\_2, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\

\mathbf{elif}\;i \leq 4.3 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if i < -4.20000000000000013e76 or 4.29999999999999993e111 < i

    1. Initial program 29.3%

      \[\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 rewrites38.1%

      \[\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.20000000000000013e76 < i < -2.0999999999999999e-151 or 8.6000000000000003e61 < i < 4.29999999999999993e111

    1. Initial program 29.3%

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

      \[\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 -2.0999999999999999e-151 < i < 4.1e-128

    1. Initial program 29.3%

      \[\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 rewrites37.9%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(b, y0 \cdot \left(k \cdot z - j \cdot \color{blue}{x}\right), b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, y0 \cdot \left(k \cdot z - j \cdot x\right), b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\right) \]
      5. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, y0 \cdot \left(k \cdot z - j \cdot x\right), b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\right) \]
      6. lower-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(b, y0 \cdot \left(k \cdot z - j \cdot x\right), b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\right) \]
      8. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, y0 \cdot \left(k \cdot z - j \cdot x\right), b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\right) \]
      9. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, y0 \cdot \left(k \cdot z - j \cdot x\right), b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\right) \]
      10. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(b, y0 \cdot \left(k \cdot z - j \cdot x\right), b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\right) \]
      11. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, y0 \cdot \left(k \cdot z - j \cdot x\right), b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, y0 \cdot \left(k \cdot z - j \cdot x\right), b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\right) \]
    7. Applied rewrites36.6%

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

    if 4.1e-128 < i < 8.6000000000000003e61

    1. Initial program 29.3%

      \[\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 y4 around inf

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

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

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.8%

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

Alternative 5: 43.1% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 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)\\ t_2 := y0 \cdot \left(j \cdot x - k \cdot z\right)\\ t_3 := b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - t\_2\right)\\ \mathbf{if}\;b \leq -9.6 \cdot 10^{+166}:\\ \;\;\;\;b \cdot \left(a \cdot \left(x \cdot y\right) - t\_2\right)\\ \mathbf{elif}\;b \leq -2 \cdot 10^{+81}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;b \leq -6 \cdot 10^{-82}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -2.2 \cdot 10^{-300}:\\ \;\;\;\;k \cdot \left(i \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\ \mathbf{elif}\;b \leq 3.3 \cdot 10^{-164}:\\ \;\;\;\;y \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{+78}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \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
          (-
           (fma y (- (* a b) (* c i)) (* y2 (- (* c y0) (* a y1))))
           (* j (- (* b y0) (* i y1))))))
        (t_2 (* y0 (- (* j x) (* k z))))
        (t_3
         (* b (- (fma a (- (* x y) (* t z)) (* y4 (- (* j t) (* k y)))) t_2))))
   (if (<= b -9.6e+166)
     (* b (- (* a (* x y)) t_2))
     (if (<= b -2e+81)
       t_3
       (if (<= b -6e-82)
         t_1
         (if (<= b -2.2e-300)
           (* k (* i (- (* y y5) (* y1 z))))
           (if (<= b 3.3e-164)
             (* y (* y3 (- (* c y4) (* a y5))))
             (if (<= b 2.3e+78) t_1 t_3))))))))
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 * (fma(y, ((a * b) - (c * i)), (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
	double t_2 = y0 * ((j * x) - (k * z));
	double t_3 = b * (fma(a, ((x * y) - (t * z)), (y4 * ((j * t) - (k * y)))) - t_2);
	double tmp;
	if (b <= -9.6e+166) {
		tmp = b * ((a * (x * y)) - t_2);
	} else if (b <= -2e+81) {
		tmp = t_3;
	} else if (b <= -6e-82) {
		tmp = t_1;
	} else if (b <= -2.2e-300) {
		tmp = k * (i * ((y * y5) - (y1 * z)));
	} else if (b <= 3.3e-164) {
		tmp = y * (y3 * ((c * y4) - (a * y5)));
	} else if (b <= 2.3e+78) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = 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)))))
	t_2 = Float64(y0 * Float64(Float64(j * x) - Float64(k * z)))
	t_3 = Float64(b * Float64(fma(a, Float64(Float64(x * y) - Float64(t * z)), Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))) - t_2))
	tmp = 0.0
	if (b <= -9.6e+166)
		tmp = Float64(b * Float64(Float64(a * Float64(x * y)) - t_2));
	elseif (b <= -2e+81)
		tmp = t_3;
	elseif (b <= -6e-82)
		tmp = t_1;
	elseif (b <= -2.2e-300)
		tmp = Float64(k * Float64(i * Float64(Float64(y * y5) - Float64(y1 * z))));
	elseif (b <= 3.3e-164)
		tmp = Float64(y * Float64(y3 * Float64(Float64(c * y4) - Float64(a * y5))));
	elseif (b <= 2.3e+78)
		tmp = t_1;
	else
		tmp = t_3;
	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[(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]}, Block[{t$95$2 = N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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] - t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9.6e+166], N[(b * N[(N[(a * N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2e+81], t$95$3, If[LessEqual[b, -6e-82], t$95$1, If[LessEqual[b, -2.2e-300], N[(k * N[(i * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.3e-164], N[(y * N[(y3 * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.3e+78], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := 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)\\
t_2 := y0 \cdot \left(j \cdot x - k \cdot z\right)\\
t_3 := b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - t\_2\right)\\
\mathbf{if}\;b \leq -9.6 \cdot 10^{+166}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y\right) - t\_2\right)\\

\mathbf{elif}\;b \leq -2 \cdot 10^{+81}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \leq -6 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -2.2 \cdot 10^{-300}:\\
\;\;\;\;k \cdot \left(i \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\

\mathbf{elif}\;b \leq 3.3 \cdot 10^{-164}:\\
\;\;\;\;y \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\

\mathbf{elif}\;b \leq 2.3 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -9.59999999999999969e166

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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(a \cdot \left(x \cdot y\right) - \color{blue}{y0} \cdot \left(j \cdot x - k \cdot z\right)\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      2. lift-*.f6431.3

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right) \]
    7. Applied rewrites31.3%

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

    if -9.59999999999999969e166 < b < -1.99999999999999984e81 or 2.3000000000000002e78 < b

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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 -1.99999999999999984e81 < b < -5.9999999999999998e-82 or 3.3e-164 < b < 2.3000000000000002e78

    1. Initial program 29.3%

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

      \[\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 -5.9999999999999998e-82 < b < -2.20000000000000002e-300

    1. Initial program 29.3%

      \[\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 k around inf

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

        \[\leadsto k \cdot \color{blue}{\left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - \color{blue}{-1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{k \cdot \left(\mathsf{fma}\left(-1, y \cdot \left(b \cdot y4 - i \cdot y5\right), y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    5. Taylor expanded in i around inf

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

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

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

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

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

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

    if -2.20000000000000002e-300 < b < 3.3e-164

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in y around -inf

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

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

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

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

        \[\leadsto y \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      5. lift-*.f6426.8

        \[\leadsto y \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
    7. Applied rewrites26.8%

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

Alternative 6: 40.7% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y1 \cdot y4 - y0 \cdot y5\\ \mathbf{if}\;i \leq -1.9 \cdot 10^{+80}:\\ \;\;\;\;-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{elif}\;i \leq -1.9 \cdot 10^{-32}:\\ \;\;\;\;k \cdot \left(\mathsf{fma}\left(-1, y \cdot \left(b \cdot y4 - i \cdot y5\right), y2 \cdot t\_1\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)\\ \mathbf{elif}\;i \leq 7.4 \cdot 10^{+133}:\\ \;\;\;\;-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, t\_1, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(i \cdot \left(y \cdot y5 - y1 \cdot z\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 (- (* y1 y4) (* y0 y5))))
   (if (<= i -1.9e+80)
     (*
      -1.0
      (*
       i
       (-
        (fma c (- (* x y) (* t z)) (* y5 (- (* j t) (* k y))))
        (* y1 (- (* j x) (* k z))))))
     (if (<= i -1.9e-32)
       (*
        k
        (-
         (fma -1.0 (* y (- (* b y4) (* i y5))) (* y2 t_1))
         (* -1.0 (* z (- (* b y0) (* i y1))))))
       (if (<= i 7.4e+133)
         (*
          -1.0
          (*
           y3
           (-
            (fma j t_1 (* z (- (* c y0) (* a y1))))
            (* y (- (* c y4) (* a y5))))))
         (* k (* i (- (* y y5) (* 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 t_1 = (y1 * y4) - (y0 * y5);
	double tmp;
	if (i <= -1.9e+80) {
		tmp = -1.0 * (i * (fma(c, ((x * y) - (t * z)), (y5 * ((j * t) - (k * y)))) - (y1 * ((j * x) - (k * z)))));
	} else if (i <= -1.9e-32) {
		tmp = k * (fma(-1.0, (y * ((b * y4) - (i * y5))), (y2 * t_1)) - (-1.0 * (z * ((b * y0) - (i * y1)))));
	} else if (i <= 7.4e+133) {
		tmp = -1.0 * (y3 * (fma(j, t_1, (z * ((c * y0) - (a * y1)))) - (y * ((c * y4) - (a * y5)))));
	} else {
		tmp = k * (i * ((y * y5) - (y1 * z)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(y1 * y4) - Float64(y0 * y5))
	tmp = 0.0
	if (i <= -1.9e+80)
		tmp = 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))))));
	elseif (i <= -1.9e-32)
		tmp = Float64(k * Float64(fma(-1.0, Float64(y * Float64(Float64(b * y4) - Float64(i * y5))), Float64(y2 * t_1)) - Float64(-1.0 * Float64(z * Float64(Float64(b * y0) - Float64(i * y1))))));
	elseif (i <= 7.4e+133)
		tmp = Float64(-1.0 * Float64(y3 * Float64(fma(j, t_1, Float64(z * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(y * Float64(Float64(c * y4) - Float64(a * y5))))));
	else
		tmp = Float64(k * Float64(i * Float64(Float64(y * y5) - Float64(y1 * z))));
	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[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.9e+80], 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, -1.9e-32], N[(k * N[(N[(-1.0 * N[(y * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y2 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(-1.0 * N[(z * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 7.4e+133], N[(-1.0 * N[(y3 * N[(N[(j * t$95$1 + N[(z * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(i * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y1 \cdot y4 - y0 \cdot y5\\
\mathbf{if}\;i \leq -1.9 \cdot 10^{+80}:\\
\;\;\;\;-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{elif}\;i \leq -1.9 \cdot 10^{-32}:\\
\;\;\;\;k \cdot \left(\mathsf{fma}\left(-1, y \cdot \left(b \cdot y4 - i \cdot y5\right), y2 \cdot t\_1\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)\\

\mathbf{elif}\;i \leq 7.4 \cdot 10^{+133}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, t\_1, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if i < -1.89999999999999999e80

    1. Initial program 29.3%

      \[\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 rewrites38.1%

      \[\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 -1.89999999999999999e80 < i < -1.90000000000000004e-32

    1. Initial program 29.3%

      \[\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 k around inf

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

        \[\leadsto k \cdot \color{blue}{\left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - \color{blue}{-1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{k \cdot \left(\mathsf{fma}\left(-1, y \cdot \left(b \cdot y4 - i \cdot y5\right), y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]

    if -1.90000000000000004e-32 < i < 7.40000000000000047e133

    1. Initial program 29.3%

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

      \[\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 7.40000000000000047e133 < i

    1. Initial program 29.3%

      \[\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 k around inf

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

        \[\leadsto k \cdot \color{blue}{\left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - \color{blue}{-1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{k \cdot \left(\mathsf{fma}\left(-1, y \cdot \left(b \cdot y4 - i \cdot y5\right), y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    5. Taylor expanded in i around inf

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

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

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

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

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

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

Alternative 7: 39.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \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)\\ \mathbf{if}\;t\_1 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;-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)\\ \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 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))))))
   (if (<= t_1 INFINITY)
     t_1
     (*
      -1.0
      (*
       y3
       (-
        (fma j (- (* y1 y4) (* y0 y5)) (* z (- (* c y0) (* a y1))))
        (* y (- (* 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 t_1 = (((((((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 tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = -1.0 * (y3 * (fma(j, ((y1 * y4) - (y0 * y5)), (z * ((c * y0) - (a * y1)))) - (y * ((c * y4) - (a * y5)))));
	}
	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(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))))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(-1.0 * Float64(y3 * Float64(fma(j, Float64(Float64(y1 * y4) - Float64(y0 * y5)), Float64(z * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(y * 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_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(-1.0 * N[(y3 * N[(N[(j * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \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)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;-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)\\


\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.3%

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

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

      \[\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)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 8: 35.8% accurate, 3.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y5 \leq -1.3 \cdot 10^{+226}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right)\\ \mathbf{elif}\;y5 \leq -2.1 \cdot 10^{+89}:\\ \;\;\;\;t \cdot \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\ \mathbf{elif}\;y5 \leq -2.1 \cdot 10^{-95}:\\ \;\;\;\;y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right)\\ \mathbf{elif}\;y5 \leq -7.5 \cdot 10^{-153}:\\ \;\;\;\;x \cdot \left(y \cdot \left(a \cdot b - c \cdot i\right)\right)\\ \mathbf{elif}\;y5 \leq 3.3 \cdot 10^{-280}:\\ \;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4 - i \cdot z\right)\right)\\ \mathbf{elif}\;y5 \leq 1.05 \cdot 10^{+45}:\\ \;\;\;\;b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \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 (<= y5 -1.3e+226)
   (* a (* y3 (* -1.0 (* y y5))))
   (if (<= y5 -2.1e+89)
     (* t (* j (- (* b y4) (* i y5))))
     (if (<= y5 -2.1e-95)
       (* y1 (* y3 (fma -1.0 (* j y4) (* a z))))
       (if (<= y5 -7.5e-153)
         (* x (* y (- (* a b) (* c i))))
         (if (<= y5 3.3e-280)
           (* k (* y1 (- (* y2 y4) (* i z))))
           (if (<= y5 1.05e+45)
             (* b (* -1.0 (* z (- (* a t) (* k y0)))))
             (* a (* y3 (- (* y1 z) (* 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) {
	double tmp;
	if (y5 <= -1.3e+226) {
		tmp = a * (y3 * (-1.0 * (y * y5)));
	} else if (y5 <= -2.1e+89) {
		tmp = t * (j * ((b * y4) - (i * y5)));
	} else if (y5 <= -2.1e-95) {
		tmp = y1 * (y3 * fma(-1.0, (j * y4), (a * z)));
	} else if (y5 <= -7.5e-153) {
		tmp = x * (y * ((a * b) - (c * i)));
	} else if (y5 <= 3.3e-280) {
		tmp = k * (y1 * ((y2 * y4) - (i * z)));
	} else if (y5 <= 1.05e+45) {
		tmp = b * (-1.0 * (z * ((a * t) - (k * y0))));
	} else {
		tmp = a * (y3 * ((y1 * z) - (y * 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 (y5 <= -1.3e+226)
		tmp = Float64(a * Float64(y3 * Float64(-1.0 * Float64(y * y5))));
	elseif (y5 <= -2.1e+89)
		tmp = Float64(t * Float64(j * Float64(Float64(b * y4) - Float64(i * y5))));
	elseif (y5 <= -2.1e-95)
		tmp = Float64(y1 * Float64(y3 * fma(-1.0, Float64(j * y4), Float64(a * z))));
	elseif (y5 <= -7.5e-153)
		tmp = Float64(x * Float64(y * Float64(Float64(a * b) - Float64(c * i))));
	elseif (y5 <= 3.3e-280)
		tmp = Float64(k * Float64(y1 * Float64(Float64(y2 * y4) - Float64(i * z))));
	elseif (y5 <= 1.05e+45)
		tmp = Float64(b * Float64(-1.0 * Float64(z * Float64(Float64(a * t) - Float64(k * y0)))));
	else
		tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * y5))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y5, -1.3e+226], N[(a * N[(y3 * N[(-1.0 * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -2.1e+89], N[(t * N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -2.1e-95], N[(y1 * N[(y3 * N[(-1.0 * N[(j * y4), $MachinePrecision] + N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -7.5e-153], N[(x * N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 3.3e-280], N[(k * N[(y1 * N[(N[(y2 * y4), $MachinePrecision] - N[(i * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 1.05e+45], N[(b * N[(-1.0 * N[(z * N[(N[(a * t), $MachinePrecision] - N[(k * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -1.3 \cdot 10^{+226}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right)\\

\mathbf{elif}\;y5 \leq -2.1 \cdot 10^{+89}:\\
\;\;\;\;t \cdot \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\

\mathbf{elif}\;y5 \leq -2.1 \cdot 10^{-95}:\\
\;\;\;\;y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right)\\

\mathbf{elif}\;y5 \leq -7.5 \cdot 10^{-153}:\\
\;\;\;\;x \cdot \left(y \cdot \left(a \cdot b - c \cdot i\right)\right)\\

\mathbf{elif}\;y5 \leq 3.3 \cdot 10^{-280}:\\
\;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4 - i \cdot z\right)\right)\\

\mathbf{elif}\;y5 \leq 1.05 \cdot 10^{+45}:\\
\;\;\;\;b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if y5 < -1.3000000000000001e226

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in a around -inf

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

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

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

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

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    7. Applied rewrites26.9%

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

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

        \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right) \]
      2. lift-*.f6416.9

        \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right) \]
    10. Applied rewrites16.9%

      \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot \color{blue}{y5}\right)\right)\right) \]

    if -1.3000000000000001e226 < y5 < -2.09999999999999986e89

    1. Initial program 29.3%

      \[\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 t around inf

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

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

        \[\leadsto t \cdot \left(\left(-1 \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right) + j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - \color{blue}{y2 \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites35.9%

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

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

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

        \[\leadsto t \cdot \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto t \cdot \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \]
      4. lift-*.f6426.6

        \[\leadsto t \cdot \left(j \cdot \left(b \cdot y4 - \color{blue}{i \cdot y5}\right)\right) \]
    7. Applied rewrites26.6%

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

    if -2.09999999999999986e89 < y5 < -2.1e-95

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in y1 around -inf

      \[\leadsto y1 \cdot \color{blue}{\left(y3 \cdot \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 \color{blue}{\left(-1 \cdot \left(j \cdot y4\right) + a \cdot z\right)}\right) \]
      2. lower-*.f64N/A

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

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

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

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

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

    if -2.1e-95 < y5 < -7.5e-153

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in y around inf

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

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

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

        \[\leadsto x \cdot \left(y \cdot \left(a \cdot b - c \cdot i\right)\right) \]
      4. lift-*.f6427.0

        \[\leadsto x \cdot \left(y \cdot \left(a \cdot b - c \cdot i\right)\right) \]
    7. Applied rewrites27.0%

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

    if -7.5e-153 < y5 < 3.29999999999999991e-280

    1. Initial program 29.3%

      \[\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 k around inf

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

        \[\leadsto k \cdot \color{blue}{\left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - \color{blue}{-1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{k \cdot \left(\mathsf{fma}\left(-1, y \cdot \left(b \cdot y4 - i \cdot y5\right), y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    5. Taylor expanded in y1 around inf

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

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

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

        \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot y4 - i \cdot z\right)\right) \]
      4. lower-*.f6426.6

        \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot y4 - i \cdot z\right)\right) \]
    7. Applied rewrites26.6%

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

    if 3.29999999999999991e-280 < y5 < 1.04999999999999997e45

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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 z around -inf

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

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

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

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot \color{blue}{y0}\right)\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right) \]
      5. lower-*.f6426.6

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right) \]
    7. Applied rewrites26.6%

      \[\leadsto b \cdot \left(-1 \cdot \color{blue}{\left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)}\right) \]

    if 1.04999999999999997e45 < y5

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in a around -inf

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

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

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

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

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    7. Applied rewrites26.9%

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

Alternative 9: 32.7% accurate, 3.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y5 \leq -1.3 \cdot 10^{+226}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right)\\ \mathbf{elif}\;y5 \leq -2.1 \cdot 10^{+89}:\\ \;\;\;\;t \cdot \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\ \mathbf{elif}\;y5 \leq -2.1 \cdot 10^{-95}:\\ \;\;\;\;y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right)\\ \mathbf{elif}\;y5 \leq -7.5 \cdot 10^{-153}:\\ \;\;\;\;x \cdot \left(y \cdot \left(a \cdot b - c \cdot i\right)\right)\\ \mathbf{elif}\;y5 \leq 5.8 \cdot 10^{-280}:\\ \;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4 - i \cdot z\right)\right)\\ \mathbf{elif}\;y5 \leq 1.46 \cdot 10^{-186}:\\ \;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\ \mathbf{elif}\;y5 \leq 1.5 \cdot 10^{+91}:\\ \;\;\;\;c \cdot \left(x \cdot \mathsf{fma}\left(-1, i \cdot y, y0 \cdot y2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \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 (<= y5 -1.3e+226)
   (* a (* y3 (* -1.0 (* y y5))))
   (if (<= y5 -2.1e+89)
     (* t (* j (- (* b y4) (* i y5))))
     (if (<= y5 -2.1e-95)
       (* y1 (* y3 (fma -1.0 (* j y4) (* a z))))
       (if (<= y5 -7.5e-153)
         (* x (* y (- (* a b) (* c i))))
         (if (<= y5 5.8e-280)
           (* k (* y1 (- (* y2 y4) (* i z))))
           (if (<= y5 1.46e-186)
             (* a (* b (- (* x y) (* t z))))
             (if (<= y5 1.5e+91)
               (* c (* x (fma -1.0 (* i y) (* y0 y2))))
               (* a (* y3 (- (* y1 z) (* 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) {
	double tmp;
	if (y5 <= -1.3e+226) {
		tmp = a * (y3 * (-1.0 * (y * y5)));
	} else if (y5 <= -2.1e+89) {
		tmp = t * (j * ((b * y4) - (i * y5)));
	} else if (y5 <= -2.1e-95) {
		tmp = y1 * (y3 * fma(-1.0, (j * y4), (a * z)));
	} else if (y5 <= -7.5e-153) {
		tmp = x * (y * ((a * b) - (c * i)));
	} else if (y5 <= 5.8e-280) {
		tmp = k * (y1 * ((y2 * y4) - (i * z)));
	} else if (y5 <= 1.46e-186) {
		tmp = a * (b * ((x * y) - (t * z)));
	} else if (y5 <= 1.5e+91) {
		tmp = c * (x * fma(-1.0, (i * y), (y0 * y2)));
	} else {
		tmp = a * (y3 * ((y1 * z) - (y * 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 (y5 <= -1.3e+226)
		tmp = Float64(a * Float64(y3 * Float64(-1.0 * Float64(y * y5))));
	elseif (y5 <= -2.1e+89)
		tmp = Float64(t * Float64(j * Float64(Float64(b * y4) - Float64(i * y5))));
	elseif (y5 <= -2.1e-95)
		tmp = Float64(y1 * Float64(y3 * fma(-1.0, Float64(j * y4), Float64(a * z))));
	elseif (y5 <= -7.5e-153)
		tmp = Float64(x * Float64(y * Float64(Float64(a * b) - Float64(c * i))));
	elseif (y5 <= 5.8e-280)
		tmp = Float64(k * Float64(y1 * Float64(Float64(y2 * y4) - Float64(i * z))));
	elseif (y5 <= 1.46e-186)
		tmp = Float64(a * Float64(b * Float64(Float64(x * y) - Float64(t * z))));
	elseif (y5 <= 1.5e+91)
		tmp = Float64(c * Float64(x * fma(-1.0, Float64(i * y), Float64(y0 * y2))));
	else
		tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * y5))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y5, -1.3e+226], N[(a * N[(y3 * N[(-1.0 * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -2.1e+89], N[(t * N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -2.1e-95], N[(y1 * N[(y3 * N[(-1.0 * N[(j * y4), $MachinePrecision] + N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -7.5e-153], N[(x * N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 5.8e-280], N[(k * N[(y1 * N[(N[(y2 * y4), $MachinePrecision] - N[(i * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 1.46e-186], N[(a * N[(b * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 1.5e+91], N[(c * N[(x * N[(-1.0 * N[(i * y), $MachinePrecision] + N[(y0 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -1.3 \cdot 10^{+226}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right)\\

\mathbf{elif}\;y5 \leq -2.1 \cdot 10^{+89}:\\
\;\;\;\;t \cdot \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\

\mathbf{elif}\;y5 \leq -2.1 \cdot 10^{-95}:\\
\;\;\;\;y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right)\\

\mathbf{elif}\;y5 \leq -7.5 \cdot 10^{-153}:\\
\;\;\;\;x \cdot \left(y \cdot \left(a \cdot b - c \cdot i\right)\right)\\

\mathbf{elif}\;y5 \leq 5.8 \cdot 10^{-280}:\\
\;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4 - i \cdot z\right)\right)\\

\mathbf{elif}\;y5 \leq 1.46 \cdot 10^{-186}:\\
\;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\

\mathbf{elif}\;y5 \leq 1.5 \cdot 10^{+91}:\\
\;\;\;\;c \cdot \left(x \cdot \mathsf{fma}\left(-1, i \cdot y, y0 \cdot y2\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if y5 < -1.3000000000000001e226

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in a around -inf

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

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

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

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

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    7. Applied rewrites26.9%

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

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

        \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right) \]
      2. lift-*.f6416.9

        \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right) \]
    10. Applied rewrites16.9%

      \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot \color{blue}{y5}\right)\right)\right) \]

    if -1.3000000000000001e226 < y5 < -2.09999999999999986e89

    1. Initial program 29.3%

      \[\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 t around inf

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

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

        \[\leadsto t \cdot \left(\left(-1 \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right) + j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - \color{blue}{y2 \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites35.9%

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

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

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

        \[\leadsto t \cdot \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto t \cdot \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \]
      4. lift-*.f6426.6

        \[\leadsto t \cdot \left(j \cdot \left(b \cdot y4 - \color{blue}{i \cdot y5}\right)\right) \]
    7. Applied rewrites26.6%

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

    if -2.09999999999999986e89 < y5 < -2.1e-95

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in y1 around -inf

      \[\leadsto y1 \cdot \color{blue}{\left(y3 \cdot \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 \color{blue}{\left(-1 \cdot \left(j \cdot y4\right) + a \cdot z\right)}\right) \]
      2. lower-*.f64N/A

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

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

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

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

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

    if -2.1e-95 < y5 < -7.5e-153

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in y around inf

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

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

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

        \[\leadsto x \cdot \left(y \cdot \left(a \cdot b - c \cdot i\right)\right) \]
      4. lift-*.f6427.0

        \[\leadsto x \cdot \left(y \cdot \left(a \cdot b - c \cdot i\right)\right) \]
    7. Applied rewrites27.0%

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

    if -7.5e-153 < y5 < 5.8e-280

    1. Initial program 29.3%

      \[\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 k around inf

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

        \[\leadsto k \cdot \color{blue}{\left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - \color{blue}{-1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{k \cdot \left(\mathsf{fma}\left(-1, y \cdot \left(b \cdot y4 - i \cdot y5\right), y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    5. Taylor expanded in y1 around inf

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

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

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

        \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot y4 - i \cdot z\right)\right) \]
      4. lower-*.f6426.6

        \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot y4 - i \cdot z\right)\right) \]
    7. Applied rewrites26.6%

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

    if 5.8e-280 < y5 < 1.46e-186

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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 a around inf

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

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

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

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

        \[\leadsto a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right) \]
      5. lift-*.f6427.3

        \[\leadsto a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right) \]
    7. Applied rewrites27.3%

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

    if 1.46e-186 < y5 < 1.50000000000000003e91

    1. Initial program 29.3%

      \[\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 rewrites37.2%

      \[\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 x around inf

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

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

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

        \[\leadsto c \cdot \left(x \cdot \mathsf{fma}\left(-1, i \cdot y, y0 \cdot y2\right)\right) \]
      4. lower-*.f6427.1

        \[\leadsto c \cdot \left(x \cdot \mathsf{fma}\left(-1, i \cdot y, y0 \cdot y2\right)\right) \]
    7. Applied rewrites27.1%

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

    if 1.50000000000000003e91 < y5

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in a around -inf

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

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

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

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

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    7. Applied rewrites26.9%

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

Alternative 10: 32.7% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y0 \cdot \left(j \cdot x - k \cdot z\right)\\ \mathbf{if}\;b \leq -1.9 \cdot 10^{+97}:\\ \;\;\;\;b \cdot \left(a \cdot \left(x \cdot y\right) - t\_1\right)\\ \mathbf{elif}\;b \leq -2.8 \cdot 10^{-13}:\\ \;\;\;\;b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right)\\ \mathbf{elif}\;b \leq -1.1 \cdot 10^{-106}:\\ \;\;\;\;t \cdot \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\ \mathbf{elif}\;b \leq 1.75 \cdot 10^{-87}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - t\_1\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 (* y0 (- (* j x) (* k z)))))
   (if (<= b -1.9e+97)
     (* b (- (* a (* x y)) t_1))
     (if (<= b -2.8e-13)
       (* b (* -1.0 (* z (- (* a t) (* k y0)))))
       (if (<= b -1.1e-106)
         (* t (* j (- (* b y4) (* i y5))))
         (if (<= b 1.75e-87)
           (* a (* y3 (- (* y1 z) (* y y5))))
           (*
            b
            (-
             (fma a (- (* x y) (* t z)) (* 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 = y0 * ((j * x) - (k * z));
	double tmp;
	if (b <= -1.9e+97) {
		tmp = b * ((a * (x * y)) - t_1);
	} else if (b <= -2.8e-13) {
		tmp = b * (-1.0 * (z * ((a * t) - (k * y0))));
	} else if (b <= -1.1e-106) {
		tmp = t * (j * ((b * y4) - (i * y5)));
	} else if (b <= 1.75e-87) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else {
		tmp = b * (fma(a, ((x * y) - (t * z)), (y4 * ((j * t) - (k * y)))) - 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(y0 * Float64(Float64(j * x) - Float64(k * z)))
	tmp = 0.0
	if (b <= -1.9e+97)
		tmp = Float64(b * Float64(Float64(a * Float64(x * y)) - t_1));
	elseif (b <= -2.8e-13)
		tmp = Float64(b * Float64(-1.0 * Float64(z * Float64(Float64(a * t) - Float64(k * y0)))));
	elseif (b <= -1.1e-106)
		tmp = Float64(t * Float64(j * Float64(Float64(b * y4) - Float64(i * y5))));
	elseif (b <= 1.75e-87)
		tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * y5))));
	else
		tmp = Float64(b * Float64(fma(a, Float64(Float64(x * y) - Float64(t * z)), Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))) - 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[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.9e+97], N[(b * N[(N[(a * N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.8e-13], N[(b * N[(-1.0 * N[(z * N[(N[(a * t), $MachinePrecision] - N[(k * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.1e-106], N[(t * N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.75e-87], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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] - t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y0 \cdot \left(j \cdot x - k \cdot z\right)\\
\mathbf{if}\;b \leq -1.9 \cdot 10^{+97}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y\right) - t\_1\right)\\

\mathbf{elif}\;b \leq -2.8 \cdot 10^{-13}:\\
\;\;\;\;b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right)\\

\mathbf{elif}\;b \leq -1.1 \cdot 10^{-106}:\\
\;\;\;\;t \cdot \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\

\mathbf{elif}\;b \leq 1.75 \cdot 10^{-87}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -1.90000000000000018e97

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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(a \cdot \left(x \cdot y\right) - \color{blue}{y0} \cdot \left(j \cdot x - k \cdot z\right)\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      2. lift-*.f6431.3

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right) \]
    7. Applied rewrites31.3%

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

    if -1.90000000000000018e97 < b < -2.8000000000000002e-13

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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 z around -inf

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

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

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

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot \color{blue}{y0}\right)\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right) \]
      5. lower-*.f6426.6

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right) \]
    7. Applied rewrites26.6%

      \[\leadsto b \cdot \left(-1 \cdot \color{blue}{\left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)}\right) \]

    if -2.8000000000000002e-13 < b < -1.09999999999999997e-106

    1. Initial program 29.3%

      \[\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 t around inf

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

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

        \[\leadsto t \cdot \left(\left(-1 \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right) + j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - \color{blue}{y2 \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites35.9%

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

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

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

        \[\leadsto t \cdot \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto t \cdot \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \]
      4. lift-*.f6426.6

        \[\leadsto t \cdot \left(j \cdot \left(b \cdot y4 - \color{blue}{i \cdot y5}\right)\right) \]
    7. Applied rewrites26.6%

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

    if -1.09999999999999997e-106 < b < 1.75000000000000006e-87

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in a around -inf

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

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

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

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

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    7. Applied rewrites26.9%

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

    if 1.75000000000000006e-87 < b

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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)} \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 11: 32.7% accurate, 3.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y0 \leq -1.2 \cdot 10^{+82}:\\ \;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\ \mathbf{elif}\;y0 \leq 3.9 \cdot 10^{-302}:\\ \;\;\;\;x \cdot \left(y \cdot \left(a \cdot b - c \cdot i\right)\right)\\ \mathbf{elif}\;y0 \leq 3.3 \cdot 10^{-231}:\\ \;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\ \mathbf{elif}\;y0 \leq 2.7 \cdot 10^{-87}:\\ \;\;\;\;t \cdot \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\ \mathbf{elif}\;y0 \leq 2.3 \cdot 10^{-10}:\\ \;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\\ \mathbf{elif}\;y0 \leq 9.5 \cdot 10^{+19}:\\ \;\;\;\;y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\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 -1.2e+82)
   (* c (* y0 (- (* x y2) (* y3 z))))
   (if (<= y0 3.9e-302)
     (* x (* y (- (* a b) (* c i))))
     (if (<= y0 3.3e-231)
       (* y1 (* y4 (- (* k y2) (* j y3))))
       (if (<= y0 2.7e-87)
         (* t (* j (- (* b y4) (* i y5))))
         (if (<= y0 2.3e-10)
           (* k (* y2 (- (* y1 y4) (* y0 y5))))
           (if (<= y0 9.5e+19)
             (* y1 (* y3 (fma -1.0 (* j y4) (* a z))))
             (* b (* y0 (- (* k z) (* j x)))))))))))
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 <= -1.2e+82) {
		tmp = c * (y0 * ((x * y2) - (y3 * z)));
	} else if (y0 <= 3.9e-302) {
		tmp = x * (y * ((a * b) - (c * i)));
	} else if (y0 <= 3.3e-231) {
		tmp = y1 * (y4 * ((k * y2) - (j * y3)));
	} else if (y0 <= 2.7e-87) {
		tmp = t * (j * ((b * y4) - (i * y5)));
	} else if (y0 <= 2.3e-10) {
		tmp = k * (y2 * ((y1 * y4) - (y0 * y5)));
	} else if (y0 <= 9.5e+19) {
		tmp = y1 * (y3 * fma(-1.0, (j * y4), (a * z)));
	} else {
		tmp = b * (y0 * ((k * z) - (j * x)));
	}
	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 <= -1.2e+82)
		tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z))));
	elseif (y0 <= 3.9e-302)
		tmp = Float64(x * Float64(y * Float64(Float64(a * b) - Float64(c * i))));
	elseif (y0 <= 3.3e-231)
		tmp = Float64(y1 * Float64(y4 * Float64(Float64(k * y2) - Float64(j * y3))));
	elseif (y0 <= 2.7e-87)
		tmp = Float64(t * Float64(j * Float64(Float64(b * y4) - Float64(i * y5))));
	elseif (y0 <= 2.3e-10)
		tmp = Float64(k * Float64(y2 * Float64(Float64(y1 * y4) - Float64(y0 * y5))));
	elseif (y0 <= 9.5e+19)
		tmp = Float64(y1 * Float64(y3 * fma(-1.0, Float64(j * y4), Float64(a * z))));
	else
		tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y0, -1.2e+82], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 3.9e-302], N[(x * N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 3.3e-231], N[(y1 * N[(y4 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 2.7e-87], N[(t * N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 2.3e-10], N[(k * N[(y2 * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 9.5e+19], N[(y1 * N[(y3 * N[(-1.0 * N[(j * y4), $MachinePrecision] + N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y0 \leq -1.2 \cdot 10^{+82}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\

\mathbf{elif}\;y0 \leq 3.9 \cdot 10^{-302}:\\
\;\;\;\;x \cdot \left(y \cdot \left(a \cdot b - c \cdot i\right)\right)\\

\mathbf{elif}\;y0 \leq 3.3 \cdot 10^{-231}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\

\mathbf{elif}\;y0 \leq 2.7 \cdot 10^{-87}:\\
\;\;\;\;t \cdot \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\

\mathbf{elif}\;y0 \leq 2.3 \cdot 10^{-10}:\\
\;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\\

\mathbf{elif}\;y0 \leq 9.5 \cdot 10^{+19}:\\
\;\;\;\;y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if y0 < -1.19999999999999999e82

    1. Initial program 29.3%

      \[\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 rewrites37.2%

      \[\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 \left(y0 \cdot \color{blue}{\left(x \cdot y2 - y3 \cdot z\right)}\right) \]
    6. Step-by-step derivation
      1. lift--.f64N/A

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

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \]
      4. lift-*.f6426.8

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - \color{blue}{y3 \cdot z}\right)\right) \]
    7. Applied rewrites26.8%

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

    if -1.19999999999999999e82 < y0 < 3.8999999999999999e-302

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in y around inf

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

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

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

        \[\leadsto x \cdot \left(y \cdot \left(a \cdot b - c \cdot i\right)\right) \]
      4. lift-*.f6427.0

        \[\leadsto x \cdot \left(y \cdot \left(a \cdot b - c \cdot i\right)\right) \]
    7. Applied rewrites27.0%

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

    if 3.8999999999999999e-302 < y0 < 3.30000000000000028e-231

    1. Initial program 29.3%

      \[\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 y4 around inf

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

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

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.8%

      \[\leadsto \color{blue}{y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    5. Taylor expanded in y1 around inf

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

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

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

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

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

        \[\leadsto y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) \]
    7. Applied rewrites25.9%

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

    if 3.30000000000000028e-231 < y0 < 2.69999999999999984e-87

    1. Initial program 29.3%

      \[\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 t around inf

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

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

        \[\leadsto t \cdot \left(\left(-1 \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right) + j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - \color{blue}{y2 \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites35.9%

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

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

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

        \[\leadsto t \cdot \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto t \cdot \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \]
      4. lift-*.f6426.6

        \[\leadsto t \cdot \left(j \cdot \left(b \cdot y4 - \color{blue}{i \cdot y5}\right)\right) \]
    7. Applied rewrites26.6%

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

    if 2.69999999999999984e-87 < y0 < 2.30000000000000007e-10

    1. Initial program 29.3%

      \[\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 k around inf

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

        \[\leadsto k \cdot \color{blue}{\left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - \color{blue}{-1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{k \cdot \left(\mathsf{fma}\left(-1, y \cdot \left(b \cdot y4 - i \cdot y5\right), y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    5. Taylor expanded in y2 around inf

      \[\leadsto k \cdot \left(y2 \cdot \color{blue}{\left(y1 \cdot y4 - y0 \cdot y5\right)}\right) \]
    6. Step-by-step derivation
      1. lift--.f64N/A

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

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) \]
      4. lift-*.f6425.9

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - \color{blue}{y0 \cdot y5}\right)\right) \]
    7. Applied rewrites25.9%

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

    if 2.30000000000000007e-10 < y0 < 9.5e19

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in y1 around -inf

      \[\leadsto y1 \cdot \color{blue}{\left(y3 \cdot \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 \color{blue}{\left(-1 \cdot \left(j \cdot y4\right) + a \cdot z\right)}\right) \]
      2. lower-*.f64N/A

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

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

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

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

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

    if 9.5e19 < y0

    1. Initial program 29.3%

      \[\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 rewrites37.9%

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

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

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

Alternative 12: 32.4% 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)\\ \mathbf{if}\;k \leq -2.7 \cdot 10^{+17}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;k \leq 5.5 \cdot 10^{-255}:\\ \;\;\;\;x \cdot \left(c \cdot \mathsf{fma}\left(-1, i \cdot y, y0 \cdot y2\right)\right)\\ \mathbf{elif}\;k \leq 2 \cdot 10^{+114}:\\ \;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\ \mathbf{elif}\;k \leq 4.2 \cdot 10^{+224}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\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 (* i (* k (- (* y y5) (* y1 z))))))
   (if (<= k -2.7e+17)
     t_1
     (if (<= k 5.5e-255)
       (* x (* c (fma -1.0 (* i y) (* y0 y2))))
       (if (<= k 2e+114)
         (* a (* b (- (* x y) (* t z))))
         (if (<= k 4.2e+224) t_1 (* b (* y0 (- (* k z) (* j x))))))))))
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 tmp;
	if (k <= -2.7e+17) {
		tmp = t_1;
	} else if (k <= 5.5e-255) {
		tmp = x * (c * fma(-1.0, (i * y), (y0 * y2)));
	} else if (k <= 2e+114) {
		tmp = a * (b * ((x * y) - (t * z)));
	} else if (k <= 4.2e+224) {
		tmp = t_1;
	} else {
		tmp = b * (y0 * ((k * z) - (j * x)));
	}
	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))))
	tmp = 0.0
	if (k <= -2.7e+17)
		tmp = t_1;
	elseif (k <= 5.5e-255)
		tmp = Float64(x * Float64(c * fma(-1.0, Float64(i * y), Float64(y0 * y2))));
	elseif (k <= 2e+114)
		tmp = Float64(a * Float64(b * Float64(Float64(x * y) - Float64(t * z))));
	elseif (k <= 4.2e+224)
		tmp = t_1;
	else
		tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x))));
	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[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -2.7e+17], t$95$1, If[LessEqual[k, 5.5e-255], N[(x * N[(c * N[(-1.0 * N[(i * y), $MachinePrecision] + N[(y0 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2e+114], N[(a * N[(b * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4.2e+224], t$95$1, N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\mathbf{if}\;k \leq -2.7 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;k \leq 5.5 \cdot 10^{-255}:\\
\;\;\;\;x \cdot \left(c \cdot \mathsf{fma}\left(-1, i \cdot y, y0 \cdot y2\right)\right)\\

\mathbf{elif}\;k \leq 2 \cdot 10^{+114}:\\
\;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\

\mathbf{elif}\;k \leq 4.2 \cdot 10^{+224}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if k < -2.7e17 or 2e114 < k < 4.2000000000000003e224

    1. Initial program 29.3%

      \[\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 k around inf

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

        \[\leadsto k \cdot \color{blue}{\left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - \color{blue}{-1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{k \cdot \left(\mathsf{fma}\left(-1, y \cdot \left(b \cdot y4 - i \cdot y5\right), y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    5. Taylor expanded in i 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.4

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

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

    if -2.7e17 < k < 5.5000000000000003e-255

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in c around inf

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

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

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

        \[\leadsto x \cdot \left(c \cdot \mathsf{fma}\left(-1, i \cdot y, y0 \cdot y2\right)\right) \]
      4. lower-*.f6426.8

        \[\leadsto x \cdot \left(c \cdot \mathsf{fma}\left(-1, i \cdot y, y0 \cdot y2\right)\right) \]
    7. Applied rewrites26.8%

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

    if 5.5000000000000003e-255 < k < 2e114

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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 a around inf

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

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

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

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

        \[\leadsto a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right) \]
      5. lift-*.f6427.3

        \[\leadsto a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right) \]
    7. Applied rewrites27.3%

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

    if 4.2000000000000003e224 < k

    1. Initial program 29.3%

      \[\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 rewrites37.9%

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

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

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

Alternative 13: 32.4% accurate, 4.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\ \mathbf{if}\;b \leq -8.5 \cdot 10^{-13}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -1.1 \cdot 10^{-106}:\\ \;\;\;\;t \cdot \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\ \mathbf{elif}\;b \leq 5 \cdot 10^{-197}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\ \mathbf{elif}\;b \leq 1.45 \cdot 10^{-103}:\\ \;\;\;\;k \cdot \left(i \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 (* a (* b (- (* x y) (* t z))))))
   (if (<= b -8.5e-13)
     t_1
     (if (<= b -1.1e-106)
       (* t (* j (- (* b y4) (* i y5))))
       (if (<= b 5e-197)
         (* a (* y3 (- (* y1 z) (* y y5))))
         (if (<= b 1.45e-103) (* k (* i (- (* 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 = a * (b * ((x * y) - (t * z)));
	double tmp;
	if (b <= -8.5e-13) {
		tmp = t_1;
	} else if (b <= -1.1e-106) {
		tmp = t * (j * ((b * y4) - (i * y5)));
	} else if (b <= 5e-197) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else if (b <= 1.45e-103) {
		tmp = k * (i * ((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 = a * (b * ((x * y) - (t * z)))
    if (b <= (-8.5d-13)) then
        tmp = t_1
    else if (b <= (-1.1d-106)) then
        tmp = t * (j * ((b * y4) - (i * y5)))
    else if (b <= 5d-197) then
        tmp = a * (y3 * ((y1 * z) - (y * y5)))
    else if (b <= 1.45d-103) then
        tmp = k * (i * ((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 = a * (b * ((x * y) - (t * z)));
	double tmp;
	if (b <= -8.5e-13) {
		tmp = t_1;
	} else if (b <= -1.1e-106) {
		tmp = t * (j * ((b * y4) - (i * y5)));
	} else if (b <= 5e-197) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else if (b <= 1.45e-103) {
		tmp = k * (i * ((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 = a * (b * ((x * y) - (t * z)))
	tmp = 0
	if b <= -8.5e-13:
		tmp = t_1
	elif b <= -1.1e-106:
		tmp = t * (j * ((b * y4) - (i * y5)))
	elif b <= 5e-197:
		tmp = a * (y3 * ((y1 * z) - (y * y5)))
	elif b <= 1.45e-103:
		tmp = k * (i * ((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(a * Float64(b * Float64(Float64(x * y) - Float64(t * z))))
	tmp = 0.0
	if (b <= -8.5e-13)
		tmp = t_1;
	elseif (b <= -1.1e-106)
		tmp = Float64(t * Float64(j * Float64(Float64(b * y4) - Float64(i * y5))));
	elseif (b <= 5e-197)
		tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * y5))));
	elseif (b <= 1.45e-103)
		tmp = Float64(k * Float64(i * 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 = a * (b * ((x * y) - (t * z)));
	tmp = 0.0;
	if (b <= -8.5e-13)
		tmp = t_1;
	elseif (b <= -1.1e-106)
		tmp = t * (j * ((b * y4) - (i * y5)));
	elseif (b <= 5e-197)
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	elseif (b <= 1.45e-103)
		tmp = k * (i * ((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[(a * N[(b * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8.5e-13], t$95$1, If[LessEqual[b, -1.1e-106], N[(t * N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5e-197], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.45e-103], N[(k * N[(i * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\mathbf{if}\;b \leq -8.5 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -1.1 \cdot 10^{-106}:\\
\;\;\;\;t \cdot \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\

\mathbf{elif}\;b \leq 5 \cdot 10^{-197}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\

\mathbf{elif}\;b \leq 1.45 \cdot 10^{-103}:\\
\;\;\;\;k \cdot \left(i \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -8.5000000000000001e-13 or 1.4499999999999999e-103 < b

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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 a around inf

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

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

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

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

        \[\leadsto a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right) \]
      5. lift-*.f6427.3

        \[\leadsto a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right) \]
    7. Applied rewrites27.3%

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

    if -8.5000000000000001e-13 < b < -1.09999999999999997e-106

    1. Initial program 29.3%

      \[\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 t around inf

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

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

        \[\leadsto t \cdot \left(\left(-1 \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right) + j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - \color{blue}{y2 \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    4. Applied rewrites35.9%

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

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

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

        \[\leadsto t \cdot \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto t \cdot \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \]
      4. lift-*.f6426.6

        \[\leadsto t \cdot \left(j \cdot \left(b \cdot y4 - \color{blue}{i \cdot y5}\right)\right) \]
    7. Applied rewrites26.6%

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

    if -1.09999999999999997e-106 < b < 5.0000000000000002e-197

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in a around -inf

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

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

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

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

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    7. Applied rewrites26.9%

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

    if 5.0000000000000002e-197 < b < 1.4499999999999999e-103

    1. Initial program 29.3%

      \[\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 k around inf

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

        \[\leadsto k \cdot \color{blue}{\left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - \color{blue}{-1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{k \cdot \left(\mathsf{fma}\left(-1, y \cdot \left(b \cdot y4 - i \cdot y5\right), y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    5. Taylor expanded in i around inf

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

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

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

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

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

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

Alternative 14: 32.1% accurate, 4.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := k \cdot \left(i \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\ t_2 := a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\ \mathbf{if}\;b \leq -1.25 \cdot 10^{-16}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq -3.2 \cdot 10^{-145}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 5 \cdot 10^{-197}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\ \mathbf{elif}\;b \leq 1.45 \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 (* k (* i (- (* y y5) (* y1 z)))))
        (t_2 (* a (* b (- (* x y) (* t z))))))
   (if (<= b -1.25e-16)
     t_2
     (if (<= b -3.2e-145)
       t_1
       (if (<= b 5e-197)
         (* a (* y3 (- (* y1 z) (* y y5))))
         (if (<= b 1.45e-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 = k * (i * ((y * y5) - (y1 * z)));
	double t_2 = a * (b * ((x * y) - (t * z)));
	double tmp;
	if (b <= -1.25e-16) {
		tmp = t_2;
	} else if (b <= -3.2e-145) {
		tmp = t_1;
	} else if (b <= 5e-197) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else if (b <= 1.45e-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 = k * (i * ((y * y5) - (y1 * z)))
    t_2 = a * (b * ((x * y) - (t * z)))
    if (b <= (-1.25d-16)) then
        tmp = t_2
    else if (b <= (-3.2d-145)) then
        tmp = t_1
    else if (b <= 5d-197) then
        tmp = a * (y3 * ((y1 * z) - (y * y5)))
    else if (b <= 1.45d-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 = k * (i * ((y * y5) - (y1 * z)));
	double t_2 = a * (b * ((x * y) - (t * z)));
	double tmp;
	if (b <= -1.25e-16) {
		tmp = t_2;
	} else if (b <= -3.2e-145) {
		tmp = t_1;
	} else if (b <= 5e-197) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else if (b <= 1.45e-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 = k * (i * ((y * y5) - (y1 * z)))
	t_2 = a * (b * ((x * y) - (t * z)))
	tmp = 0
	if b <= -1.25e-16:
		tmp = t_2
	elif b <= -3.2e-145:
		tmp = t_1
	elif b <= 5e-197:
		tmp = a * (y3 * ((y1 * z) - (y * y5)))
	elif b <= 1.45e-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(k * Float64(i * Float64(Float64(y * y5) - Float64(y1 * z))))
	t_2 = Float64(a * Float64(b * Float64(Float64(x * y) - Float64(t * z))))
	tmp = 0.0
	if (b <= -1.25e-16)
		tmp = t_2;
	elseif (b <= -3.2e-145)
		tmp = t_1;
	elseif (b <= 5e-197)
		tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * y5))));
	elseif (b <= 1.45e-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 = k * (i * ((y * y5) - (y1 * z)));
	t_2 = a * (b * ((x * y) - (t * z)));
	tmp = 0.0;
	if (b <= -1.25e-16)
		tmp = t_2;
	elseif (b <= -3.2e-145)
		tmp = t_1;
	elseif (b <= 5e-197)
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	elseif (b <= 1.45e-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[(k * N[(i * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(b * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.25e-16], t$95$2, If[LessEqual[b, -3.2e-145], t$95$1, If[LessEqual[b, 5e-197], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.45e-103], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := k \cdot \left(i \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
t_2 := a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\mathbf{if}\;b \leq -1.25 \cdot 10^{-16}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq -3.2 \cdot 10^{-145}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 5 \cdot 10^{-197}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\

\mathbf{elif}\;b \leq 1.45 \cdot 10^{-103}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.2500000000000001e-16 or 1.4499999999999999e-103 < b

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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 a around inf

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

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

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

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

        \[\leadsto a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right) \]
      5. lift-*.f6427.3

        \[\leadsto a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right) \]
    7. Applied rewrites27.3%

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

    if -1.2500000000000001e-16 < b < -3.20000000000000008e-145 or 5.0000000000000002e-197 < b < 1.4499999999999999e-103

    1. Initial program 29.3%

      \[\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 k around inf

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

        \[\leadsto k \cdot \color{blue}{\left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - \color{blue}{-1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{k \cdot \left(\mathsf{fma}\left(-1, y \cdot \left(b \cdot y4 - i \cdot y5\right), y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    5. Taylor expanded in i around inf

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

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

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

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

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

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

    if -3.20000000000000008e-145 < b < 5.0000000000000002e-197

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in a around -inf

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

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

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

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

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    7. Applied rewrites26.9%

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

Alternative 15: 32.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)\\ \mathbf{if}\;k \leq -1.65 \cdot 10^{+16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;k \leq -3.6 \cdot 10^{-124}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\ \mathbf{elif}\;k \leq 2 \cdot 10^{+114}:\\ \;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\ \mathbf{elif}\;k \leq 4.2 \cdot 10^{+224}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\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 (* i (* k (- (* y y5) (* y1 z))))))
   (if (<= k -1.65e+16)
     t_1
     (if (<= k -3.6e-124)
       (* a (* y3 (- (* y1 z) (* y y5))))
       (if (<= k 2e+114)
         (* a (* b (- (* x y) (* t z))))
         (if (<= k 4.2e+224) t_1 (* b (* y0 (- (* k z) (* j x))))))))))
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 tmp;
	if (k <= -1.65e+16) {
		tmp = t_1;
	} else if (k <= -3.6e-124) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else if (k <= 2e+114) {
		tmp = a * (b * ((x * y) - (t * z)));
	} else if (k <= 4.2e+224) {
		tmp = t_1;
	} else {
		tmp = b * (y0 * ((k * z) - (j * x)));
	}
	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 * (k * ((y * y5) - (y1 * z)))
    if (k <= (-1.65d+16)) then
        tmp = t_1
    else if (k <= (-3.6d-124)) then
        tmp = a * (y3 * ((y1 * z) - (y * y5)))
    else if (k <= 2d+114) then
        tmp = a * (b * ((x * y) - (t * z)))
    else if (k <= 4.2d+224) then
        tmp = t_1
    else
        tmp = b * (y0 * ((k * z) - (j * x)))
    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 tmp;
	if (k <= -1.65e+16) {
		tmp = t_1;
	} else if (k <= -3.6e-124) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else if (k <= 2e+114) {
		tmp = a * (b * ((x * y) - (t * z)));
	} else if (k <= 4.2e+224) {
		tmp = t_1;
	} else {
		tmp = b * (y0 * ((k * z) - (j * x)));
	}
	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)))
	tmp = 0
	if k <= -1.65e+16:
		tmp = t_1
	elif k <= -3.6e-124:
		tmp = a * (y3 * ((y1 * z) - (y * y5)))
	elif k <= 2e+114:
		tmp = a * (b * ((x * y) - (t * z)))
	elif k <= 4.2e+224:
		tmp = t_1
	else:
		tmp = b * (y0 * ((k * z) - (j * x)))
	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))))
	tmp = 0.0
	if (k <= -1.65e+16)
		tmp = t_1;
	elseif (k <= -3.6e-124)
		tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * y5))));
	elseif (k <= 2e+114)
		tmp = Float64(a * Float64(b * Float64(Float64(x * y) - Float64(t * z))));
	elseif (k <= 4.2e+224)
		tmp = t_1;
	else
		tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x))));
	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)));
	tmp = 0.0;
	if (k <= -1.65e+16)
		tmp = t_1;
	elseif (k <= -3.6e-124)
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	elseif (k <= 2e+114)
		tmp = a * (b * ((x * y) - (t * z)));
	elseif (k <= 4.2e+224)
		tmp = t_1;
	else
		tmp = b * (y0 * ((k * z) - (j * x)));
	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]}, If[LessEqual[k, -1.65e+16], t$95$1, If[LessEqual[k, -3.6e-124], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2e+114], N[(a * N[(b * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4.2e+224], t$95$1, N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\mathbf{if}\;k \leq -1.65 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;k \leq -3.6 \cdot 10^{-124}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\

\mathbf{elif}\;k \leq 2 \cdot 10^{+114}:\\
\;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\

\mathbf{elif}\;k \leq 4.2 \cdot 10^{+224}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if k < -1.65e16 or 2e114 < k < 4.2000000000000003e224

    1. Initial program 29.3%

      \[\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 k around inf

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

        \[\leadsto k \cdot \color{blue}{\left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - \color{blue}{-1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{k \cdot \left(\mathsf{fma}\left(-1, y \cdot \left(b \cdot y4 - i \cdot y5\right), y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    5. Taylor expanded in i 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.4

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

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

    if -1.65e16 < k < -3.6000000000000001e-124

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in a around -inf

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

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

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

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

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    7. Applied rewrites26.9%

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

    if -3.6000000000000001e-124 < k < 2e114

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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 a around inf

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

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

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

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

        \[\leadsto a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right) \]
      5. lift-*.f6427.3

        \[\leadsto a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right) \]
    7. Applied rewrites27.3%

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

    if 4.2000000000000003e224 < k

    1. Initial program 29.3%

      \[\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 rewrites37.9%

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

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

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

Alternative 16: 30.2% accurate, 5.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\ \mathbf{if}\;k \leq -1.65 \cdot 10^{+16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;k \leq -3.6 \cdot 10^{-124}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\ \mathbf{elif}\;k \leq 2 \cdot 10^{+114}:\\ \;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - 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 (* i (* k (- (* y y5) (* y1 z))))))
   (if (<= k -1.65e+16)
     t_1
     (if (<= k -3.6e-124)
       (* a (* y3 (- (* y1 z) (* y y5))))
       (if (<= k 2e+114) (* a (* b (- (* x y) (* 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 = i * (k * ((y * y5) - (y1 * z)));
	double tmp;
	if (k <= -1.65e+16) {
		tmp = t_1;
	} else if (k <= -3.6e-124) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else if (k <= 2e+114) {
		tmp = a * (b * ((x * y) - (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 = i * (k * ((y * y5) - (y1 * z)))
    if (k <= (-1.65d+16)) then
        tmp = t_1
    else if (k <= (-3.6d-124)) then
        tmp = a * (y3 * ((y1 * z) - (y * y5)))
    else if (k <= 2d+114) then
        tmp = a * (b * ((x * y) - (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 = i * (k * ((y * y5) - (y1 * z)));
	double tmp;
	if (k <= -1.65e+16) {
		tmp = t_1;
	} else if (k <= -3.6e-124) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else if (k <= 2e+114) {
		tmp = a * (b * ((x * y) - (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 = i * (k * ((y * y5) - (y1 * z)))
	tmp = 0
	if k <= -1.65e+16:
		tmp = t_1
	elif k <= -3.6e-124:
		tmp = a * (y3 * ((y1 * z) - (y * y5)))
	elif k <= 2e+114:
		tmp = a * (b * ((x * y) - (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(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z))))
	tmp = 0.0
	if (k <= -1.65e+16)
		tmp = t_1;
	elseif (k <= -3.6e-124)
		tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * y5))));
	elseif (k <= 2e+114)
		tmp = Float64(a * Float64(b * Float64(Float64(x * y) - 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 = i * (k * ((y * y5) - (y1 * z)));
	tmp = 0.0;
	if (k <= -1.65e+16)
		tmp = t_1;
	elseif (k <= -3.6e-124)
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	elseif (k <= 2e+114)
		tmp = a * (b * ((x * y) - (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[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -1.65e+16], t$95$1, If[LessEqual[k, -3.6e-124], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2e+114], N[(a * N[(b * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\mathbf{if}\;k \leq -1.65 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;k \leq -3.6 \cdot 10^{-124}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\

\mathbf{elif}\;k \leq 2 \cdot 10^{+114}:\\
\;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < -1.65e16 or 2e114 < k

    1. Initial program 29.3%

      \[\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 k around inf

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

        \[\leadsto k \cdot \color{blue}{\left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - \color{blue}{-1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{k \cdot \left(\mathsf{fma}\left(-1, y \cdot \left(b \cdot y4 - i \cdot y5\right), y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    5. Taylor expanded in i 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.4

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

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

    if -1.65e16 < k < -3.6000000000000001e-124

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in a around -inf

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

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

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

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

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    7. Applied rewrites26.9%

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

    if -3.6000000000000001e-124 < k < 2e114

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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 a around inf

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

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

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

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

        \[\leadsto a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right) \]
      5. lift-*.f6427.3

        \[\leadsto a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right) \]
    7. Applied rewrites27.3%

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

Alternative 17: 30.1% accurate, 5.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\ \mathbf{if}\;b \leq -3.1 \cdot 10^{-18}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 5.5 \cdot 10^{-95}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - 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 (* a (* b (- (* x y) (* t z))))))
   (if (<= b -3.1e-18)
     t_1
     (if (<= b 5.5e-95) (* a (* y3 (- (* y1 z) (* 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 = a * (b * ((x * y) - (t * z)));
	double tmp;
	if (b <= -3.1e-18) {
		tmp = t_1;
	} else if (b <= 5.5e-95) {
		tmp = a * (y3 * ((y1 * z) - (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 = a * (b * ((x * y) - (t * z)))
    if (b <= (-3.1d-18)) then
        tmp = t_1
    else if (b <= 5.5d-95) then
        tmp = a * (y3 * ((y1 * z) - (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 = a * (b * ((x * y) - (t * z)));
	double tmp;
	if (b <= -3.1e-18) {
		tmp = t_1;
	} else if (b <= 5.5e-95) {
		tmp = a * (y3 * ((y1 * z) - (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 = a * (b * ((x * y) - (t * z)))
	tmp = 0
	if b <= -3.1e-18:
		tmp = t_1
	elif b <= 5.5e-95:
		tmp = a * (y3 * ((y1 * z) - (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(a * Float64(b * Float64(Float64(x * y) - Float64(t * z))))
	tmp = 0.0
	if (b <= -3.1e-18)
		tmp = t_1;
	elseif (b <= 5.5e-95)
		tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - 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 = a * (b * ((x * y) - (t * z)));
	tmp = 0.0;
	if (b <= -3.1e-18)
		tmp = t_1;
	elseif (b <= 5.5e-95)
		tmp = a * (y3 * ((y1 * z) - (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[(a * N[(b * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.1e-18], t$95$1, If[LessEqual[b, 5.5e-95], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\mathbf{if}\;b \leq -3.1 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 5.5 \cdot 10^{-95}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -3.10000000000000007e-18 or 5.50000000000000003e-95 < b

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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 a around inf

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

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

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

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

        \[\leadsto a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right) \]
      5. lift-*.f6427.3

        \[\leadsto a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right) \]
    7. Applied rewrites27.3%

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

    if -3.10000000000000007e-18 < b < 5.50000000000000003e-95

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in a around -inf

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

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

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

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

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    7. Applied rewrites26.9%

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

Alternative 18: 27.9% accurate, 5.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq -7 \cdot 10^{+276}:\\ \;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right)\\ \mathbf{elif}\;k \leq -2.45 \cdot 10^{-42}:\\ \;\;\;\;y \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \mathbf{elif}\;k \leq 1.8 \cdot 10^{+211}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(k \cdot \left(y0 \cdot z\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 (<= k -7e+276)
   (* k (* y1 (* y2 y4)))
   (if (<= k -2.45e-42)
     (* y (* y3 (- (* c y4) (* a y5))))
     (if (<= k 1.8e+211)
       (* a (* y3 (- (* y1 z) (* y y5))))
       (* b (* k (* y0 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 (k <= -7e+276) {
		tmp = k * (y1 * (y2 * y4));
	} else if (k <= -2.45e-42) {
		tmp = y * (y3 * ((c * y4) - (a * y5)));
	} else if (k <= 1.8e+211) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else {
		tmp = b * (k * (y0 * 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 (k <= (-7d+276)) then
        tmp = k * (y1 * (y2 * y4))
    else if (k <= (-2.45d-42)) then
        tmp = y * (y3 * ((c * y4) - (a * y5)))
    else if (k <= 1.8d+211) then
        tmp = a * (y3 * ((y1 * z) - (y * y5)))
    else
        tmp = b * (k * (y0 * 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 (k <= -7e+276) {
		tmp = k * (y1 * (y2 * y4));
	} else if (k <= -2.45e-42) {
		tmp = y * (y3 * ((c * y4) - (a * y5)));
	} else if (k <= 1.8e+211) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else {
		tmp = b * (k * (y0 * z));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if k <= -7e+276:
		tmp = k * (y1 * (y2 * y4))
	elif k <= -2.45e-42:
		tmp = y * (y3 * ((c * y4) - (a * y5)))
	elif k <= 1.8e+211:
		tmp = a * (y3 * ((y1 * z) - (y * y5)))
	else:
		tmp = b * (k * (y0 * 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 (k <= -7e+276)
		tmp = Float64(k * Float64(y1 * Float64(y2 * y4)));
	elseif (k <= -2.45e-42)
		tmp = Float64(y * Float64(y3 * Float64(Float64(c * y4) - Float64(a * y5))));
	elseif (k <= 1.8e+211)
		tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * y5))));
	else
		tmp = Float64(b * Float64(k * Float64(y0 * 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 (k <= -7e+276)
		tmp = k * (y1 * (y2 * y4));
	elseif (k <= -2.45e-42)
		tmp = y * (y3 * ((c * y4) - (a * y5)));
	elseif (k <= 1.8e+211)
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	else
		tmp = b * (k * (y0 * 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[k, -7e+276], N[(k * N[(y1 * N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, -2.45e-42], N[(y * N[(y3 * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.8e+211], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(k * N[(y0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;k \leq -7 \cdot 10^{+276}:\\
\;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right)\\

\mathbf{elif}\;k \leq -2.45 \cdot 10^{-42}:\\
\;\;\;\;y \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\

\mathbf{elif}\;k \leq 1.8 \cdot 10^{+211}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot \left(k \cdot \left(y0 \cdot z\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if k < -6.99999999999999963e276

    1. Initial program 29.3%

      \[\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 k around inf

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

        \[\leadsto k \cdot \color{blue}{\left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - \color{blue}{-1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{k \cdot \left(\mathsf{fma}\left(-1, y \cdot \left(b \cdot y4 - i \cdot y5\right), y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    5. Taylor expanded in y2 around inf

      \[\leadsto k \cdot \left(y2 \cdot \color{blue}{\left(y1 \cdot y4 - y0 \cdot y5\right)}\right) \]
    6. Step-by-step derivation
      1. lift--.f64N/A

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

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) \]
      4. lift-*.f6425.9

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - \color{blue}{y0 \cdot y5}\right)\right) \]
    7. Applied rewrites25.9%

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

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

        \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right) \]
      2. lower-*.f6416.6

        \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right) \]
    10. Applied rewrites16.6%

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

    if -6.99999999999999963e276 < k < -2.45e-42

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in y around -inf

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

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

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

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

        \[\leadsto y \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      5. lift-*.f6426.8

        \[\leadsto y \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
    7. Applied rewrites26.8%

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

    if -2.45e-42 < k < 1.80000000000000001e211

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in a around -inf

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

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

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

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

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    7. Applied rewrites26.9%

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

    if 1.80000000000000001e211 < k

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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 z around -inf

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

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

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

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot \color{blue}{y0}\right)\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right) \]
      5. lower-*.f6426.6

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right) \]
    7. Applied rewrites26.6%

      \[\leadsto b \cdot \left(-1 \cdot \color{blue}{\left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)}\right) \]
    8. Taylor expanded in t around 0

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

        \[\leadsto b \cdot \left(k \cdot \left(y0 \cdot z\right)\right) \]
      2. lower-*.f6417.2

        \[\leadsto b \cdot \left(k \cdot \left(y0 \cdot z\right)\right) \]
    10. Applied rewrites17.2%

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

Alternative 19: 27.8% accurate, 4.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right)\\ \mathbf{if}\;y5 \leq -6 \cdot 10^{+225}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y5 \leq -3.5 \cdot 10^{+73}:\\ \;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4\right)\right)\\ \mathbf{elif}\;y5 \leq -5.2 \cdot 10^{-158}:\\ \;\;\;\;b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t\right)\right)\right)\\ \mathbf{elif}\;y5 \leq 3.4 \cdot 10^{-280}:\\ \;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right)\\ \mathbf{elif}\;y5 \leq 1.9 \cdot 10^{+45}:\\ \;\;\;\;b \cdot \left(k \cdot \left(y0 \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 (* a (* y3 (* -1.0 (* y y5))))))
   (if (<= y5 -6e+225)
     t_1
     (if (<= y5 -3.5e+73)
       (* k (* y2 (* y1 y4)))
       (if (<= y5 -5.2e-158)
         (* b (* -1.0 (* z (* a t))))
         (if (<= y5 3.4e-280)
           (* k (* y1 (* y2 y4)))
           (if (<= y5 1.9e+45) (* b (* k (* y0 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 = a * (y3 * (-1.0 * (y * y5)));
	double tmp;
	if (y5 <= -6e+225) {
		tmp = t_1;
	} else if (y5 <= -3.5e+73) {
		tmp = k * (y2 * (y1 * y4));
	} else if (y5 <= -5.2e-158) {
		tmp = b * (-1.0 * (z * (a * t)));
	} else if (y5 <= 3.4e-280) {
		tmp = k * (y1 * (y2 * y4));
	} else if (y5 <= 1.9e+45) {
		tmp = b * (k * (y0 * 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 = a * (y3 * ((-1.0d0) * (y * y5)))
    if (y5 <= (-6d+225)) then
        tmp = t_1
    else if (y5 <= (-3.5d+73)) then
        tmp = k * (y2 * (y1 * y4))
    else if (y5 <= (-5.2d-158)) then
        tmp = b * ((-1.0d0) * (z * (a * t)))
    else if (y5 <= 3.4d-280) then
        tmp = k * (y1 * (y2 * y4))
    else if (y5 <= 1.9d+45) then
        tmp = b * (k * (y0 * 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 = a * (y3 * (-1.0 * (y * y5)));
	double tmp;
	if (y5 <= -6e+225) {
		tmp = t_1;
	} else if (y5 <= -3.5e+73) {
		tmp = k * (y2 * (y1 * y4));
	} else if (y5 <= -5.2e-158) {
		tmp = b * (-1.0 * (z * (a * t)));
	} else if (y5 <= 3.4e-280) {
		tmp = k * (y1 * (y2 * y4));
	} else if (y5 <= 1.9e+45) {
		tmp = b * (k * (y0 * 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 = a * (y3 * (-1.0 * (y * y5)))
	tmp = 0
	if y5 <= -6e+225:
		tmp = t_1
	elif y5 <= -3.5e+73:
		tmp = k * (y2 * (y1 * y4))
	elif y5 <= -5.2e-158:
		tmp = b * (-1.0 * (z * (a * t)))
	elif y5 <= 3.4e-280:
		tmp = k * (y1 * (y2 * y4))
	elif y5 <= 1.9e+45:
		tmp = b * (k * (y0 * 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(a * Float64(y3 * Float64(-1.0 * Float64(y * y5))))
	tmp = 0.0
	if (y5 <= -6e+225)
		tmp = t_1;
	elseif (y5 <= -3.5e+73)
		tmp = Float64(k * Float64(y2 * Float64(y1 * y4)));
	elseif (y5 <= -5.2e-158)
		tmp = Float64(b * Float64(-1.0 * Float64(z * Float64(a * t))));
	elseif (y5 <= 3.4e-280)
		tmp = Float64(k * Float64(y1 * Float64(y2 * y4)));
	elseif (y5 <= 1.9e+45)
		tmp = Float64(b * Float64(k * Float64(y0 * 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 = a * (y3 * (-1.0 * (y * y5)));
	tmp = 0.0;
	if (y5 <= -6e+225)
		tmp = t_1;
	elseif (y5 <= -3.5e+73)
		tmp = k * (y2 * (y1 * y4));
	elseif (y5 <= -5.2e-158)
		tmp = b * (-1.0 * (z * (a * t)));
	elseif (y5 <= 3.4e-280)
		tmp = k * (y1 * (y2 * y4));
	elseif (y5 <= 1.9e+45)
		tmp = b * (k * (y0 * 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[(a * N[(y3 * N[(-1.0 * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y5, -6e+225], t$95$1, If[LessEqual[y5, -3.5e+73], N[(k * N[(y2 * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -5.2e-158], N[(b * N[(-1.0 * N[(z * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 3.4e-280], N[(k * N[(y1 * N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 1.9e+45], N[(b * N[(k * N[(y0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right)\\
\mathbf{if}\;y5 \leq -6 \cdot 10^{+225}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y5 \leq -3.5 \cdot 10^{+73}:\\
\;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4\right)\right)\\

\mathbf{elif}\;y5 \leq -5.2 \cdot 10^{-158}:\\
\;\;\;\;b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t\right)\right)\right)\\

\mathbf{elif}\;y5 \leq 3.4 \cdot 10^{-280}:\\
\;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right)\\

\mathbf{elif}\;y5 \leq 1.9 \cdot 10^{+45}:\\
\;\;\;\;b \cdot \left(k \cdot \left(y0 \cdot z\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y5 < -6.000000000000001e225 or 1.9000000000000001e45 < y5

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in a around -inf

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

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

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

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

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    7. Applied rewrites26.9%

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

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

        \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right) \]
      2. lift-*.f6416.9

        \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right) \]
    10. Applied rewrites16.9%

      \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot \color{blue}{y5}\right)\right)\right) \]

    if -6.000000000000001e225 < y5 < -3.50000000000000002e73

    1. Initial program 29.3%

      \[\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 k around inf

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

        \[\leadsto k \cdot \color{blue}{\left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - \color{blue}{-1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{k \cdot \left(\mathsf{fma}\left(-1, y \cdot \left(b \cdot y4 - i \cdot y5\right), y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    5. Taylor expanded in y2 around inf

      \[\leadsto k \cdot \left(y2 \cdot \color{blue}{\left(y1 \cdot y4 - y0 \cdot y5\right)}\right) \]
    6. Step-by-step derivation
      1. lift--.f64N/A

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

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) \]
      4. lift-*.f6425.9

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - \color{blue}{y0 \cdot y5}\right)\right) \]
    7. Applied rewrites25.9%

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

      \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4\right)\right) \]
    9. Step-by-step derivation
      1. lift-*.f6416.4

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4\right)\right) \]
    10. Applied rewrites16.4%

      \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4\right)\right) \]

    if -3.50000000000000002e73 < y5 < -5.2000000000000001e-158

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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 z around -inf

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

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

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

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot \color{blue}{y0}\right)\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right) \]
      5. lower-*.f6426.6

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right) \]
    7. Applied rewrites26.6%

      \[\leadsto b \cdot \left(-1 \cdot \color{blue}{\left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)}\right) \]
    8. Taylor expanded in t around inf

      \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t\right)\right)\right) \]
    9. Step-by-step derivation
      1. lift-*.f6416.8

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t\right)\right)\right) \]
    10. Applied rewrites16.8%

      \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t\right)\right)\right) \]

    if -5.2000000000000001e-158 < y5 < 3.3999999999999998e-280

    1. Initial program 29.3%

      \[\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 k around inf

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

        \[\leadsto k \cdot \color{blue}{\left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - \color{blue}{-1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{k \cdot \left(\mathsf{fma}\left(-1, y \cdot \left(b \cdot y4 - i \cdot y5\right), y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    5. Taylor expanded in y2 around inf

      \[\leadsto k \cdot \left(y2 \cdot \color{blue}{\left(y1 \cdot y4 - y0 \cdot y5\right)}\right) \]
    6. Step-by-step derivation
      1. lift--.f64N/A

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

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) \]
      4. lift-*.f6425.9

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - \color{blue}{y0 \cdot y5}\right)\right) \]
    7. Applied rewrites25.9%

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

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

        \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right) \]
      2. lower-*.f6416.6

        \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right) \]
    10. Applied rewrites16.6%

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

    if 3.3999999999999998e-280 < y5 < 1.9000000000000001e45

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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 z around -inf

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

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

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

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot \color{blue}{y0}\right)\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right) \]
      5. lower-*.f6426.6

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right) \]
    7. Applied rewrites26.6%

      \[\leadsto b \cdot \left(-1 \cdot \color{blue}{\left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)}\right) \]
    8. Taylor expanded in t around 0

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

        \[\leadsto b \cdot \left(k \cdot \left(y0 \cdot z\right)\right) \]
      2. lower-*.f6417.2

        \[\leadsto b \cdot \left(k \cdot \left(y0 \cdot z\right)\right) \]
    10. Applied rewrites17.2%

      \[\leadsto b \cdot \left(k \cdot \left(y0 \cdot \color{blue}{z}\right)\right) \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 20: 23.1% accurate, 5.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq -4.7 \cdot 10^{+269}:\\ \;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right)\\ \mathbf{elif}\;k \leq 1.8 \cdot 10^{+211}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(k \cdot \left(y0 \cdot z\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 (<= k -4.7e+269)
   (* k (* y1 (* y2 y4)))
   (if (<= k 1.8e+211)
     (* a (* y3 (- (* y1 z) (* y y5))))
     (* b (* k (* y0 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 (k <= -4.7e+269) {
		tmp = k * (y1 * (y2 * y4));
	} else if (k <= 1.8e+211) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else {
		tmp = b * (k * (y0 * 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 (k <= (-4.7d+269)) then
        tmp = k * (y1 * (y2 * y4))
    else if (k <= 1.8d+211) then
        tmp = a * (y3 * ((y1 * z) - (y * y5)))
    else
        tmp = b * (k * (y0 * 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 (k <= -4.7e+269) {
		tmp = k * (y1 * (y2 * y4));
	} else if (k <= 1.8e+211) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else {
		tmp = b * (k * (y0 * z));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if k <= -4.7e+269:
		tmp = k * (y1 * (y2 * y4))
	elif k <= 1.8e+211:
		tmp = a * (y3 * ((y1 * z) - (y * y5)))
	else:
		tmp = b * (k * (y0 * 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 (k <= -4.7e+269)
		tmp = Float64(k * Float64(y1 * Float64(y2 * y4)));
	elseif (k <= 1.8e+211)
		tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * y5))));
	else
		tmp = Float64(b * Float64(k * Float64(y0 * 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 (k <= -4.7e+269)
		tmp = k * (y1 * (y2 * y4));
	elseif (k <= 1.8e+211)
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	else
		tmp = b * (k * (y0 * 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[k, -4.7e+269], N[(k * N[(y1 * N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.8e+211], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(k * N[(y0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;k \leq -4.7 \cdot 10^{+269}:\\
\;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right)\\

\mathbf{elif}\;k \leq 1.8 \cdot 10^{+211}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot \left(k \cdot \left(y0 \cdot z\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < -4.7e269

    1. Initial program 29.3%

      \[\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 k around inf

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

        \[\leadsto k \cdot \color{blue}{\left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - \color{blue}{-1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{k \cdot \left(\mathsf{fma}\left(-1, y \cdot \left(b \cdot y4 - i \cdot y5\right), y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    5. Taylor expanded in y2 around inf

      \[\leadsto k \cdot \left(y2 \cdot \color{blue}{\left(y1 \cdot y4 - y0 \cdot y5\right)}\right) \]
    6. Step-by-step derivation
      1. lift--.f64N/A

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

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) \]
      4. lift-*.f6425.9

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - \color{blue}{y0 \cdot y5}\right)\right) \]
    7. Applied rewrites25.9%

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

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

        \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right) \]
      2. lower-*.f6416.6

        \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right) \]
    10. Applied rewrites16.6%

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

    if -4.7e269 < k < 1.80000000000000001e211

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in a around -inf

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

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

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

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

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    7. Applied rewrites26.9%

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

    if 1.80000000000000001e211 < k

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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 z around -inf

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

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

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

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot \color{blue}{y0}\right)\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right) \]
      5. lower-*.f6426.6

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right) \]
    7. Applied rewrites26.6%

      \[\leadsto b \cdot \left(-1 \cdot \color{blue}{\left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)}\right) \]
    8. Taylor expanded in t around 0

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

        \[\leadsto b \cdot \left(k \cdot \left(y0 \cdot z\right)\right) \]
      2. lower-*.f6417.2

        \[\leadsto b \cdot \left(k \cdot \left(y0 \cdot z\right)\right) \]
    10. Applied rewrites17.2%

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

Alternative 21: 23.1% accurate, 5.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{+144}:\\ \;\;\;\;b \cdot \left(x \cdot \left(a \cdot y\right)\right)\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{-299}:\\ \;\;\;\;c \cdot \left(t \cdot \left(-1 \cdot \left(y2 \cdot y4\right)\right)\right)\\ \mathbf{elif}\;y \leq 24000000000000:\\ \;\;\;\;b \cdot \left(-1 \cdot \left(a \cdot \left(t \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\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 (<= y -6.5e+144)
   (* b (* x (* a y)))
   (if (<= y -1.6e-299)
     (* c (* t (* -1.0 (* y2 y4))))
     (if (<= y 24000000000000.0)
       (* b (* -1.0 (* a (* t z))))
       (* a (* y3 (* -1.0 (* 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) {
	double tmp;
	if (y <= -6.5e+144) {
		tmp = b * (x * (a * y));
	} else if (y <= -1.6e-299) {
		tmp = c * (t * (-1.0 * (y2 * y4)));
	} else if (y <= 24000000000000.0) {
		tmp = b * (-1.0 * (a * (t * z)));
	} else {
		tmp = a * (y3 * (-1.0 * (y * y5)));
	}
	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 (y <= (-6.5d+144)) then
        tmp = b * (x * (a * y))
    else if (y <= (-1.6d-299)) then
        tmp = c * (t * ((-1.0d0) * (y2 * y4)))
    else if (y <= 24000000000000.0d0) then
        tmp = b * ((-1.0d0) * (a * (t * z)))
    else
        tmp = a * (y3 * ((-1.0d0) * (y * y5)))
    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 (y <= -6.5e+144) {
		tmp = b * (x * (a * y));
	} else if (y <= -1.6e-299) {
		tmp = c * (t * (-1.0 * (y2 * y4)));
	} else if (y <= 24000000000000.0) {
		tmp = b * (-1.0 * (a * (t * z)));
	} else {
		tmp = a * (y3 * (-1.0 * (y * y5)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y <= -6.5e+144:
		tmp = b * (x * (a * y))
	elif y <= -1.6e-299:
		tmp = c * (t * (-1.0 * (y2 * y4)))
	elif y <= 24000000000000.0:
		tmp = b * (-1.0 * (a * (t * z)))
	else:
		tmp = a * (y3 * (-1.0 * (y * 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 (y <= -6.5e+144)
		tmp = Float64(b * Float64(x * Float64(a * y)));
	elseif (y <= -1.6e-299)
		tmp = Float64(c * Float64(t * Float64(-1.0 * Float64(y2 * y4))));
	elseif (y <= 24000000000000.0)
		tmp = Float64(b * Float64(-1.0 * Float64(a * Float64(t * z))));
	else
		tmp = Float64(a * Float64(y3 * Float64(-1.0 * Float64(y * y5))));
	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 (y <= -6.5e+144)
		tmp = b * (x * (a * y));
	elseif (y <= -1.6e-299)
		tmp = c * (t * (-1.0 * (y2 * y4)));
	elseif (y <= 24000000000000.0)
		tmp = b * (-1.0 * (a * (t * z)));
	else
		tmp = a * (y3 * (-1.0 * (y * y5)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y, -6.5e+144], N[(b * N[(x * N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.6e-299], N[(c * N[(t * N[(-1.0 * N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 24000000000000.0], N[(b * N[(-1.0 * N[(a * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(y3 * N[(-1.0 * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+144}:\\
\;\;\;\;b \cdot \left(x \cdot \left(a \cdot y\right)\right)\\

\mathbf{elif}\;y \leq -1.6 \cdot 10^{-299}:\\
\;\;\;\;c \cdot \left(t \cdot \left(-1 \cdot \left(y2 \cdot y4\right)\right)\right)\\

\mathbf{elif}\;y \leq 24000000000000:\\
\;\;\;\;b \cdot \left(-1 \cdot \left(a \cdot \left(t \cdot z\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.50000000000000007e144

    1. Initial program 29.3%

      \[\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 rewrites37.9%

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

        \[\leadsto b \cdot \left(x \cdot \left(a \cdot y - j \cdot y0\right)\right) \]
    7. Applied rewrites26.7%

      \[\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(x \cdot \left(a \cdot y\right)\right) \]
    9. Step-by-step derivation
      1. lift-*.f6417.4

        \[\leadsto b \cdot \left(x \cdot \left(a \cdot y\right)\right) \]
    10. Applied rewrites17.4%

      \[\leadsto b \cdot \left(x \cdot \left(a \cdot y\right)\right) \]

    if -6.50000000000000007e144 < y < -1.60000000000000004e-299

    1. Initial program 29.3%

      \[\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 rewrites37.2%

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

        \[\leadsto c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right) \]
    7. Applied rewrites27.3%

      \[\leadsto c \cdot \left(t \cdot \color{blue}{\left(i \cdot z - y2 \cdot y4\right)}\right) \]
    8. Taylor expanded in z around 0

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

        \[\leadsto c \cdot \left(t \cdot \left(-1 \cdot \left(y2 \cdot y4\right)\right)\right) \]
      2. lift-*.f6417.7

        \[\leadsto c \cdot \left(t \cdot \left(-1 \cdot \left(y2 \cdot y4\right)\right)\right) \]
    10. Applied rewrites17.7%

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

    if -1.60000000000000004e-299 < y < 2.4e13

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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 z around -inf

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

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

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

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot \color{blue}{y0}\right)\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right) \]
      5. lower-*.f6426.6

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right) \]
    7. Applied rewrites26.6%

      \[\leadsto b \cdot \left(-1 \cdot \color{blue}{\left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)}\right) \]
    8. Taylor expanded in t around inf

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

        \[\leadsto b \cdot \left(-1 \cdot \left(a \cdot \left(t \cdot z\right)\right)\right) \]
      2. lower-*.f6417.0

        \[\leadsto b \cdot \left(-1 \cdot \left(a \cdot \left(t \cdot z\right)\right)\right) \]
    10. Applied rewrites17.0%

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

    if 2.4e13 < y

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in a around -inf

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

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

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

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

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    7. Applied rewrites26.9%

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

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

        \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right) \]
      2. lift-*.f6416.9

        \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right) \]
    10. Applied rewrites16.9%

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

Alternative 22: 22.4% accurate, 5.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right)\\ \mathbf{if}\;y5 \leq -6 \cdot 10^{+225}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y5 \leq 3.4 \cdot 10^{-280}:\\ \;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4\right)\right)\\ \mathbf{elif}\;y5 \leq 1.5 \cdot 10^{+40}:\\ \;\;\;\;b \cdot \left(k \cdot \left(y0 \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 (* a (* y3 (* -1.0 (* y y5))))))
   (if (<= y5 -6e+225)
     t_1
     (if (<= y5 3.4e-280)
       (* k (* y2 (* y1 y4)))
       (if (<= y5 1.5e+40) (* b (* k (* y0 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 = a * (y3 * (-1.0 * (y * y5)));
	double tmp;
	if (y5 <= -6e+225) {
		tmp = t_1;
	} else if (y5 <= 3.4e-280) {
		tmp = k * (y2 * (y1 * y4));
	} else if (y5 <= 1.5e+40) {
		tmp = b * (k * (y0 * 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 = a * (y3 * ((-1.0d0) * (y * y5)))
    if (y5 <= (-6d+225)) then
        tmp = t_1
    else if (y5 <= 3.4d-280) then
        tmp = k * (y2 * (y1 * y4))
    else if (y5 <= 1.5d+40) then
        tmp = b * (k * (y0 * 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 = a * (y3 * (-1.0 * (y * y5)));
	double tmp;
	if (y5 <= -6e+225) {
		tmp = t_1;
	} else if (y5 <= 3.4e-280) {
		tmp = k * (y2 * (y1 * y4));
	} else if (y5 <= 1.5e+40) {
		tmp = b * (k * (y0 * 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 = a * (y3 * (-1.0 * (y * y5)))
	tmp = 0
	if y5 <= -6e+225:
		tmp = t_1
	elif y5 <= 3.4e-280:
		tmp = k * (y2 * (y1 * y4))
	elif y5 <= 1.5e+40:
		tmp = b * (k * (y0 * 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(a * Float64(y3 * Float64(-1.0 * Float64(y * y5))))
	tmp = 0.0
	if (y5 <= -6e+225)
		tmp = t_1;
	elseif (y5 <= 3.4e-280)
		tmp = Float64(k * Float64(y2 * Float64(y1 * y4)));
	elseif (y5 <= 1.5e+40)
		tmp = Float64(b * Float64(k * Float64(y0 * 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 = a * (y3 * (-1.0 * (y * y5)));
	tmp = 0.0;
	if (y5 <= -6e+225)
		tmp = t_1;
	elseif (y5 <= 3.4e-280)
		tmp = k * (y2 * (y1 * y4));
	elseif (y5 <= 1.5e+40)
		tmp = b * (k * (y0 * 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[(a * N[(y3 * N[(-1.0 * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y5, -6e+225], t$95$1, If[LessEqual[y5, 3.4e-280], N[(k * N[(y2 * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 1.5e+40], N[(b * N[(k * N[(y0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right)\\
\mathbf{if}\;y5 \leq -6 \cdot 10^{+225}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y5 \leq 3.4 \cdot 10^{-280}:\\
\;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4\right)\right)\\

\mathbf{elif}\;y5 \leq 1.5 \cdot 10^{+40}:\\
\;\;\;\;b \cdot \left(k \cdot \left(y0 \cdot z\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y5 < -6.000000000000001e225 or 1.5000000000000001e40 < y5

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in a around -inf

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

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

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

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

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6426.9

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    7. Applied rewrites26.9%

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

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

        \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right) \]
      2. lift-*.f6416.9

        \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right) \]
    10. Applied rewrites16.9%

      \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot \color{blue}{y5}\right)\right)\right) \]

    if -6.000000000000001e225 < y5 < 3.3999999999999998e-280

    1. Initial program 29.3%

      \[\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 k around inf

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

        \[\leadsto k \cdot \color{blue}{\left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - \color{blue}{-1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{k \cdot \left(\mathsf{fma}\left(-1, y \cdot \left(b \cdot y4 - i \cdot y5\right), y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    5. Taylor expanded in y2 around inf

      \[\leadsto k \cdot \left(y2 \cdot \color{blue}{\left(y1 \cdot y4 - y0 \cdot y5\right)}\right) \]
    6. Step-by-step derivation
      1. lift--.f64N/A

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

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) \]
      4. lift-*.f6425.9

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - \color{blue}{y0 \cdot y5}\right)\right) \]
    7. Applied rewrites25.9%

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

      \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4\right)\right) \]
    9. Step-by-step derivation
      1. lift-*.f6416.4

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4\right)\right) \]
    10. Applied rewrites16.4%

      \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4\right)\right) \]

    if 3.3999999999999998e-280 < y5 < 1.5000000000000001e40

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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 z around -inf

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

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

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

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot \color{blue}{y0}\right)\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right) \]
      5. lower-*.f6426.6

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right) \]
    7. Applied rewrites26.6%

      \[\leadsto b \cdot \left(-1 \cdot \color{blue}{\left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)}\right) \]
    8. Taylor expanded in t around 0

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

        \[\leadsto b \cdot \left(k \cdot \left(y0 \cdot z\right)\right) \]
      2. lower-*.f6417.2

        \[\leadsto b \cdot \left(k \cdot \left(y0 \cdot z\right)\right) \]
    10. Applied rewrites17.2%

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

Alternative 23: 22.0% accurate, 7.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := k \cdot \left(y2 \cdot \left(y1 \cdot y4\right)\right)\\ \mathbf{if}\;y4 \leq -6 \cdot 10^{-74}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y4 \leq 9.5 \cdot 10^{+217}:\\ \;\;\;\;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 (* k (* y2 (* y1 y4)))))
   (if (<= y4 -6e-74) t_1 (if (<= y4 9.5e+217) (* 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 = k * (y2 * (y1 * y4));
	double tmp;
	if (y4 <= -6e-74) {
		tmp = t_1;
	} else if (y4 <= 9.5e+217) {
		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 = k * (y2 * (y1 * y4))
    if (y4 <= (-6d-74)) then
        tmp = t_1
    else if (y4 <= 9.5d+217) 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 = k * (y2 * (y1 * y4));
	double tmp;
	if (y4 <= -6e-74) {
		tmp = t_1;
	} else if (y4 <= 9.5e+217) {
		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 = k * (y2 * (y1 * y4))
	tmp = 0
	if y4 <= -6e-74:
		tmp = t_1
	elif y4 <= 9.5e+217:
		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(k * Float64(y2 * Float64(y1 * y4)))
	tmp = 0.0
	if (y4 <= -6e-74)
		tmp = t_1;
	elseif (y4 <= 9.5e+217)
		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 = k * (y2 * (y1 * y4));
	tmp = 0.0;
	if (y4 <= -6e-74)
		tmp = t_1;
	elseif (y4 <= 9.5e+217)
		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[(k * N[(y2 * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -6e-74], t$95$1, If[LessEqual[y4, 9.5e+217], N[(b * N[(a * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := k \cdot \left(y2 \cdot \left(y1 \cdot y4\right)\right)\\
\mathbf{if}\;y4 \leq -6 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y4 \leq 9.5 \cdot 10^{+217}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y4 < -6.00000000000000014e-74 or 9.5000000000000003e217 < y4

    1. Initial program 29.3%

      \[\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 k around inf

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

        \[\leadsto k \cdot \color{blue}{\left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(y \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - \color{blue}{-1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
    4. Applied rewrites36.0%

      \[\leadsto \color{blue}{k \cdot \left(\mathsf{fma}\left(-1, y \cdot \left(b \cdot y4 - i \cdot y5\right), y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) - -1 \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    5. Taylor expanded in y2 around inf

      \[\leadsto k \cdot \left(y2 \cdot \color{blue}{\left(y1 \cdot y4 - y0 \cdot y5\right)}\right) \]
    6. Step-by-step derivation
      1. lift--.f64N/A

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

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) \]
      4. lift-*.f6425.9

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - \color{blue}{y0 \cdot y5}\right)\right) \]
    7. Applied rewrites25.9%

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

      \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4\right)\right) \]
    9. Step-by-step derivation
      1. lift-*.f6416.4

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4\right)\right) \]
    10. Applied rewrites16.4%

      \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4\right)\right) \]

    if -6.00000000000000014e-74 < y4 < 9.5000000000000003e217

    1. Initial program 29.3%

      \[\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 rewrites37.9%

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

        \[\leadsto b \cdot \left(x \cdot \left(a \cdot y - j \cdot y0\right)\right) \]
    7. Applied rewrites26.7%

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

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y\right)\right) \]
    10. Applied rewrites17.3%

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

Alternative 24: 21.1% accurate, 7.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -10000:\\ \;\;\;\;b \cdot \left(x \cdot \left(a \cdot y\right)\right)\\ \mathbf{elif}\;y \leq 27000000000000:\\ \;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a \cdot \left(x \cdot y\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 (<= y -10000.0)
   (* b (* x (* a y)))
   (if (<= y 27000000000000.0) (* y1 (* a (* y3 z))) (* b (* a (* x y))))))
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 (y <= -10000.0) {
		tmp = b * (x * (a * y));
	} else if (y <= 27000000000000.0) {
		tmp = y1 * (a * (y3 * z));
	} else {
		tmp = b * (a * (x * y));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, 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 (y <= (-10000.0d0)) then
        tmp = b * (x * (a * y))
    else if (y <= 27000000000000.0d0) then
        tmp = y1 * (a * (y3 * z))
    else
        tmp = b * (a * (x * y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y <= -10000.0) {
		tmp = b * (x * (a * y));
	} else if (y <= 27000000000000.0) {
		tmp = y1 * (a * (y3 * z));
	} else {
		tmp = b * (a * (x * y));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y <= -10000.0:
		tmp = b * (x * (a * y))
	elif y <= 27000000000000.0:
		tmp = y1 * (a * (y3 * z))
	else:
		tmp = b * (a * (x * y))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (y <= -10000.0)
		tmp = Float64(b * Float64(x * Float64(a * y)));
	elseif (y <= 27000000000000.0)
		tmp = Float64(y1 * Float64(a * Float64(y3 * z)));
	else
		tmp = Float64(b * Float64(a * Float64(x * y)));
	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 (y <= -10000.0)
		tmp = b * (x * (a * y));
	elseif (y <= 27000000000000.0)
		tmp = y1 * (a * (y3 * z));
	else
		tmp = b * (a * (x * y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y, -10000.0], N[(b * N[(x * N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 27000000000000.0], N[(y1 * N[(a * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(a * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -10000:\\
\;\;\;\;b \cdot \left(x \cdot \left(a \cdot y\right)\right)\\

\mathbf{elif}\;y \leq 27000000000000:\\
\;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1e4

    1. Initial program 29.3%

      \[\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 rewrites37.9%

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

        \[\leadsto b \cdot \left(x \cdot \left(a \cdot y - j \cdot y0\right)\right) \]
    7. Applied rewrites26.7%

      \[\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(x \cdot \left(a \cdot y\right)\right) \]
    9. Step-by-step derivation
      1. lift-*.f6417.4

        \[\leadsto b \cdot \left(x \cdot \left(a \cdot y\right)\right) \]
    10. Applied rewrites17.4%

      \[\leadsto b \cdot \left(x \cdot \left(a \cdot y\right)\right) \]

    if -1e4 < y < 2.7e13

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in y1 around -inf

      \[\leadsto y1 \cdot \color{blue}{\left(y3 \cdot \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 \color{blue}{\left(-1 \cdot \left(j \cdot y4\right) + a \cdot z\right)}\right) \]
      2. lower-*.f64N/A

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

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

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

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

      \[\leadsto y1 \cdot \color{blue}{\left(y3 \cdot \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. lift-*.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.7e13 < y

    1. Initial program 29.3%

      \[\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 rewrites37.9%

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

        \[\leadsto b \cdot \left(x \cdot \left(a \cdot y - j \cdot y0\right)\right) \]
    7. Applied rewrites26.7%

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

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y\right)\right) \]
    10. Applied rewrites17.3%

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

Alternative 25: 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}\;y \leq -10000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 27000000000000:\\ \;\;\;\;y1 \cdot \left(a \cdot \left(y3 \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 (* b (* a (* x y)))))
   (if (<= y -10000.0)
     t_1
     (if (<= y 27000000000000.0) (* y1 (* a (* y3 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 = b * (a * (x * y));
	double tmp;
	if (y <= -10000.0) {
		tmp = t_1;
	} else if (y <= 27000000000000.0) {
		tmp = y1 * (a * (y3 * 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 = b * (a * (x * y))
    if (y <= (-10000.0d0)) then
        tmp = t_1
    else if (y <= 27000000000000.0d0) then
        tmp = y1 * (a * (y3 * 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 = b * (a * (x * y));
	double tmp;
	if (y <= -10000.0) {
		tmp = t_1;
	} else if (y <= 27000000000000.0) {
		tmp = y1 * (a * (y3 * 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 = b * (a * (x * y))
	tmp = 0
	if y <= -10000.0:
		tmp = t_1
	elif y <= 27000000000000.0:
		tmp = y1 * (a * (y3 * 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(b * Float64(a * Float64(x * y)))
	tmp = 0.0
	if (y <= -10000.0)
		tmp = t_1;
	elseif (y <= 27000000000000.0)
		tmp = Float64(y1 * Float64(a * Float64(y3 * 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 = b * (a * (x * y));
	tmp = 0.0;
	if (y <= -10000.0)
		tmp = t_1;
	elseif (y <= 27000000000000.0)
		tmp = y1 * (a * (y3 * 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[(b * N[(a * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -10000.0], t$95$1, If[LessEqual[y, 27000000000000.0], N[(y1 * N[(a * N[(y3 * z), $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}\;y \leq -10000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 27000000000000:\\
\;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1e4 or 2.7e13 < y

    1. Initial program 29.3%

      \[\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 rewrites37.9%

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

        \[\leadsto b \cdot \left(x \cdot \left(a \cdot y - j \cdot y0\right)\right) \]
    7. Applied rewrites26.7%

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

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y\right)\right) \]
    10. Applied rewrites17.3%

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

    if -1e4 < y < 2.7e13

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in y1 around -inf

      \[\leadsto y1 \cdot \color{blue}{\left(y3 \cdot \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 \color{blue}{\left(-1 \cdot \left(j \cdot y4\right) + a \cdot z\right)}\right) \]
      2. lower-*.f64N/A

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

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

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

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

      \[\leadsto y1 \cdot \color{blue}{\left(y3 \cdot \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. lift-*.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) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 26: 20.2% accurate, 7.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(k \cdot \left(y0 \cdot z\right)\right)\\ \mathbf{if}\;y0 \leq -2 \cdot 10^{-94}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y0 \leq 4.8 \cdot 10^{+34}:\\ \;\;\;\;y1 \cdot \left(y3 \cdot \left(a \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 (* b (* k (* y0 z)))))
   (if (<= y0 -2e-94) t_1 (if (<= y0 4.8e+34) (* y1 (* y3 (* a 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 = b * (k * (y0 * z));
	double tmp;
	if (y0 <= -2e-94) {
		tmp = t_1;
	} else if (y0 <= 4.8e+34) {
		tmp = y1 * (y3 * (a * 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 = b * (k * (y0 * z))
    if (y0 <= (-2d-94)) then
        tmp = t_1
    else if (y0 <= 4.8d+34) then
        tmp = y1 * (y3 * (a * 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 = b * (k * (y0 * z));
	double tmp;
	if (y0 <= -2e-94) {
		tmp = t_1;
	} else if (y0 <= 4.8e+34) {
		tmp = y1 * (y3 * (a * 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 = b * (k * (y0 * z))
	tmp = 0
	if y0 <= -2e-94:
		tmp = t_1
	elif y0 <= 4.8e+34:
		tmp = y1 * (y3 * (a * 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(b * Float64(k * Float64(y0 * z)))
	tmp = 0.0
	if (y0 <= -2e-94)
		tmp = t_1;
	elseif (y0 <= 4.8e+34)
		tmp = Float64(y1 * Float64(y3 * Float64(a * 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 = b * (k * (y0 * z));
	tmp = 0.0;
	if (y0 <= -2e-94)
		tmp = t_1;
	elseif (y0 <= 4.8e+34)
		tmp = y1 * (y3 * (a * 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[(b * N[(k * N[(y0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y0, -2e-94], t$95$1, If[LessEqual[y0, 4.8e+34], N[(y1 * N[(y3 * N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot \left(k \cdot \left(y0 \cdot z\right)\right)\\
\mathbf{if}\;y0 \leq -2 \cdot 10^{-94}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y0 \leq 4.8 \cdot 10^{+34}:\\
\;\;\;\;y1 \cdot \left(y3 \cdot \left(a \cdot z\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y0 < -1.9999999999999999e-94 or 4.79999999999999974e34 < y0

    1. Initial program 29.3%

      \[\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 rewrites37.9%

      \[\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 z around -inf

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

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

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

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot \color{blue}{y0}\right)\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right) \]
      5. lower-*.f6426.6

        \[\leadsto b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right) \]
    7. Applied rewrites26.6%

      \[\leadsto b \cdot \left(-1 \cdot \color{blue}{\left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)}\right) \]
    8. Taylor expanded in t around 0

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

        \[\leadsto b \cdot \left(k \cdot \left(y0 \cdot z\right)\right) \]
      2. lower-*.f6417.2

        \[\leadsto b \cdot \left(k \cdot \left(y0 \cdot z\right)\right) \]
    10. Applied rewrites17.2%

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

    if -1.9999999999999999e-94 < y0 < 4.79999999999999974e34

    1. Initial program 29.3%

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

      \[\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)} \]
    5. Taylor expanded in y1 around -inf

      \[\leadsto y1 \cdot \color{blue}{\left(y3 \cdot \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 \color{blue}{\left(-1 \cdot \left(j \cdot y4\right) + a \cdot z\right)}\right) \]
      2. lower-*.f64N/A

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

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

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

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

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

      \[\leadsto y1 \cdot \left(y3 \cdot \left(a \cdot z\right)\right) \]
    9. Step-by-step derivation
      1. lift-*.f6417.5

        \[\leadsto y1 \cdot \left(y3 \cdot \left(a \cdot z\right)\right) \]
    10. Applied rewrites17.5%

      \[\leadsto y1 \cdot \left(y3 \cdot \left(a \cdot z\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 27: 17.8% accurate, 13.6× speedup?

\[\begin{array}{l} \\ y1 \cdot \left(y3 \cdot \left(a \cdot z\right)\right) \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (* y1 (* y3 (* a 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) {
	return y1 * (y3 * (a * z));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\\
y1 \cdot \left(y3 \cdot \left(a \cdot z\right)\right)
\end{array}
Derivation
  1. Initial program 29.3%

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

    \[\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)} \]
  5. Taylor expanded in y1 around -inf

    \[\leadsto y1 \cdot \color{blue}{\left(y3 \cdot \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 \color{blue}{\left(-1 \cdot \left(j \cdot y4\right) + a \cdot z\right)}\right) \]
    2. lower-*.f64N/A

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

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

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

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

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

    \[\leadsto y1 \cdot \left(y3 \cdot \left(a \cdot z\right)\right) \]
  9. Step-by-step derivation
    1. lift-*.f6417.5

      \[\leadsto y1 \cdot \left(y3 \cdot \left(a \cdot z\right)\right) \]
  10. Applied rewrites17.5%

    \[\leadsto y1 \cdot \left(y3 \cdot \left(a \cdot z\right)\right) \]
  11. Add Preprocessing

Alternative 28: 17.6% accurate, 13.6× speedup?

\[\begin{array}{l} \\ y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right) \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (* y1 (* a (* y3 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) {
	return y1 * (a * (y3 * z));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\\
y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)
\end{array}
Derivation
  1. Initial program 29.3%

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

    \[\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)} \]
  5. Taylor expanded in y1 around -inf

    \[\leadsto y1 \cdot \color{blue}{\left(y3 \cdot \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 \color{blue}{\left(-1 \cdot \left(j \cdot y4\right) + a \cdot z\right)}\right) \]
    2. lower-*.f64N/A

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

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

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

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

    \[\leadsto y1 \cdot \color{blue}{\left(y3 \cdot \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. lift-*.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) \]
  11. Add Preprocessing

Alternative 29: 17.5% accurate, 13.6× speedup?

\[\begin{array}{l} \\ a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (* a (* y3 (* 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) {
	return a * (y3 * (y1 * z));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\\
a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)
\end{array}
Derivation
  1. Initial program 29.3%

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

    \[\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)} \]
  5. Taylor expanded in a around -inf

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

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

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

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

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    5. lower-*.f6426.9

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
  7. Applied rewrites26.9%

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

    \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
  9. Step-by-step derivation
    1. lift-*.f6417.5

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
  10. Applied rewrites17.5%

    \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
  11. Add Preprocessing

Alternative 30: 17.5% accurate, 13.6× speedup?

\[\begin{array}{l} \\ a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (* a (* y1 (* y3 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) {
	return a * (y1 * (y3 * z));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\\
a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)
\end{array}
Derivation
  1. Initial program 29.3%

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

    \[\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)} \]
  5. Taylor expanded in a around -inf

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

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

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

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

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    5. lower-*.f6426.9

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
  7. Applied rewrites26.9%

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

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

      \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
    2. lower-*.f6417.6

      \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
  10. Applied rewrites17.6%

    \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
  11. Add Preprocessing

Reproduce

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