Linear.Matrix:det44 from linear-1.19.1.3

Percentage Accurate: 30.2% → 53.8%
Time: 23.2s
Alternatives: 25
Speedup: 5.6×

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}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 25 alternatives:

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

Initial Program: 30.2% 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.8% 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}:\\ \;\;\;\;\left(-y3\right) \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)\\ \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
     (*
      (- 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 = -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(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[((-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]]]
\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}:\\
\;\;\;\;\left(-y3\right) \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)\\


\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 92.6%

      \[\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. Add Preprocessing

    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 0.0%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites42.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot 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) \leq \infty:\\ \;\;\;\;\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{else}:\\ \;\;\;\;\left(-y3\right) \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)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 40.8% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot t - k \cdot y\\ t_2 := x \cdot y - t \cdot z\\ \mathbf{if}\;b \leq -2.1 \cdot 10^{+97}:\\ \;\;\;\;k \cdot \mathsf{fma}\left(b, \left(-y\right) \cdot y4 + y0 \cdot z, \frac{b \cdot \left(\mathsf{fma}\left(a, t\_2, j \cdot \left(t \cdot y4\right)\right) - j \cdot \left(x \cdot y0\right)\right)}{k}\right)\\ \mathbf{elif}\;b \leq 2.55 \cdot 10^{-55}:\\ \;\;\;\;\left(-y3\right) \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)\\ \mathbf{elif}\;b \leq 6 \cdot 10^{+65}:\\ \;\;\;\;c \cdot \mathsf{fma}\left(y4, y \cdot y3 - t \cdot y2, \frac{y4 \cdot \mathsf{fma}\left(b, t\_1, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)}{c}\right)\\ \mathbf{elif}\;b \leq 6.2 \cdot 10^{+205}:\\ \;\;\;\;\left(-i\right) \cdot \left(\mathsf{fma}\left(c, t\_2, y5 \cdot t\_1\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\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 (- (* j t) (* k y))) (t_2 (- (* x y) (* t z))))
   (if (<= b -2.1e+97)
     (*
      k
      (fma
       b
       (+ (* (- y) y4) (* y0 z))
       (/ (* b (- (fma a t_2 (* j (* t y4))) (* j (* x y0)))) k)))
     (if (<= b 2.55e-55)
       (*
        (- y3)
        (-
         (fma j (- (* y1 y4) (* y0 y5)) (* z (- (* c y0) (* a y1))))
         (* y (- (* c y4) (* a y5)))))
       (if (<= b 6e+65)
         (*
          c
          (fma
           y4
           (- (* y y3) (* t y2))
           (/ (* y4 (fma b t_1 (* y1 (- (* k y2) (* j y3))))) c)))
         (if (<= b 6.2e+205)
           (* (- i) (- (fma c t_2 (* y5 t_1)) (* y1 (- (* j x) (* k z)))))
           (* k (* y4 (fma -1.0 (* b y) (* y1 y2))))))))))
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 = (j * t) - (k * y);
	double t_2 = (x * y) - (t * z);
	double tmp;
	if (b <= -2.1e+97) {
		tmp = k * fma(b, ((-y * y4) + (y0 * z)), ((b * (fma(a, t_2, (j * (t * y4))) - (j * (x * y0)))) / k));
	} else if (b <= 2.55e-55) {
		tmp = -y3 * (fma(j, ((y1 * y4) - (y0 * y5)), (z * ((c * y0) - (a * y1)))) - (y * ((c * y4) - (a * y5))));
	} else if (b <= 6e+65) {
		tmp = c * fma(y4, ((y * y3) - (t * y2)), ((y4 * fma(b, t_1, (y1 * ((k * y2) - (j * y3))))) / c));
	} else if (b <= 6.2e+205) {
		tmp = -i * (fma(c, t_2, (y5 * t_1)) - (y1 * ((j * x) - (k * z))));
	} else {
		tmp = k * (y4 * fma(-1.0, (b * y), (y1 * y2)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(j * t) - Float64(k * y))
	t_2 = Float64(Float64(x * y) - Float64(t * z))
	tmp = 0.0
	if (b <= -2.1e+97)
		tmp = Float64(k * fma(b, Float64(Float64(Float64(-y) * y4) + Float64(y0 * z)), Float64(Float64(b * Float64(fma(a, t_2, Float64(j * Float64(t * y4))) - Float64(j * Float64(x * y0)))) / k)));
	elseif (b <= 2.55e-55)
		tmp = Float64(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)))));
	elseif (b <= 6e+65)
		tmp = Float64(c * fma(y4, Float64(Float64(y * y3) - Float64(t * y2)), Float64(Float64(y4 * fma(b, t_1, Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3))))) / c)));
	elseif (b <= 6.2e+205)
		tmp = Float64(Float64(-i) * Float64(fma(c, t_2, Float64(y5 * t_1)) - Float64(y1 * Float64(Float64(j * x) - Float64(k * z)))));
	else
		tmp = Float64(k * Float64(y4 * fma(-1.0, Float64(b * y), Float64(y1 * y2))));
	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[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.1e+97], N[(k * N[(b * N[(N[((-y) * y4), $MachinePrecision] + N[(y0 * z), $MachinePrecision]), $MachinePrecision] + N[(N[(b * N[(N[(a * t$95$2 + N[(j * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.55e-55], 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], If[LessEqual[b, 6e+65], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision] + N[(N[(y4 * N[(b * t$95$1 + N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.2e+205], N[((-i) * N[(N[(c * t$95$2 + N[(y5 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(y4 * N[(-1.0 * N[(b * y), $MachinePrecision] + N[(y1 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot t - k \cdot y\\
t_2 := x \cdot y - t \cdot z\\
\mathbf{if}\;b \leq -2.1 \cdot 10^{+97}:\\
\;\;\;\;k \cdot \mathsf{fma}\left(b, \left(-y\right) \cdot y4 + y0 \cdot z, \frac{b \cdot \left(\mathsf{fma}\left(a, t\_2, j \cdot \left(t \cdot y4\right)\right) - j \cdot \left(x \cdot y0\right)\right)}{k}\right)\\

\mathbf{elif}\;b \leq 2.55 \cdot 10^{-55}:\\
\;\;\;\;\left(-y3\right) \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)\\

\mathbf{elif}\;b \leq 6 \cdot 10^{+65}:\\
\;\;\;\;c \cdot \mathsf{fma}\left(y4, y \cdot y3 - t \cdot y2, \frac{y4 \cdot \mathsf{fma}\left(b, t\_1, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)}{c}\right)\\

\mathbf{elif}\;b \leq 6.2 \cdot 10^{+205}:\\
\;\;\;\;\left(-i\right) \cdot \left(\mathsf{fma}\left(c, t\_2, y5 \cdot t\_1\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right)\\


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

    1. Initial program 29.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) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites71.4%

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

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

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

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

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

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

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

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

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

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

    if -2.10000000000000012e97 < b < 2.54999999999999998e-55

    1. Initial program 34.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites51.9%

      \[\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 2.54999999999999998e-55 < b < 6.0000000000000004e65

    1. Initial program 8.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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites50.9%

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

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

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

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

        \[\leadsto c \cdot \mathsf{fma}\left(y4, y \cdot y3 - t \cdot \color{blue}{y2}, \frac{y4 \cdot \left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)}{c}\right) \]
      4. lift-*.f64N/A

        \[\leadsto c \cdot \mathsf{fma}\left(y4, y \cdot y3 - t \cdot y2, \frac{y4 \cdot \left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)}{c}\right) \]
      5. lift-*.f64N/A

        \[\leadsto c \cdot \mathsf{fma}\left(y4, y \cdot y3 - t \cdot y2, \frac{y4 \cdot \left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)}{c}\right) \]
      6. lower-/.f64N/A

        \[\leadsto c \cdot \mathsf{fma}\left(y4, y \cdot y3 - t \cdot y2, \frac{y4 \cdot \left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)}{c}\right) \]
    8. Applied rewrites55.1%

      \[\leadsto c \cdot \color{blue}{\mathsf{fma}\left(y4, y \cdot y3 - t \cdot y2, \frac{y4 \cdot \mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)}{c}\right)} \]

    if 6.0000000000000004e65 < b < 6.20000000000000035e205

    1. Initial program 39.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) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites61.3%

      \[\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 6.20000000000000035e205 < b

    1. Initial program 53.2%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites46.6%

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

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

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

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + \color{blue}{y1 \cdot y2}\right)\right) \]
      3. lower-fma.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot \color{blue}{y}, y1 \cdot y2\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right) \]
      5. lower-*.f6473.5

        \[\leadsto k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right) \]
    8. Applied rewrites73.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification58.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.1 \cdot 10^{+97}:\\ \;\;\;\;k \cdot \mathsf{fma}\left(b, \left(-y\right) \cdot y4 + y0 \cdot z, \frac{b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, j \cdot \left(t \cdot y4\right)\right) - j \cdot \left(x \cdot y0\right)\right)}{k}\right)\\ \mathbf{elif}\;b \leq 2.55 \cdot 10^{-55}:\\ \;\;\;\;\left(-y3\right) \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)\\ \mathbf{elif}\;b \leq 6 \cdot 10^{+65}:\\ \;\;\;\;c \cdot \mathsf{fma}\left(y4, y \cdot y3 - t \cdot y2, \frac{y4 \cdot \mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)}{c}\right)\\ \mathbf{elif}\;b \leq 6.2 \cdot 10^{+205}:\\ \;\;\;\;\left(-i\right) \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)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 41.6% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot t - k \cdot y\\ t_2 := x \cdot y - t \cdot z\\ t_3 := j \cdot x - k \cdot z\\ \mathbf{if}\;b \leq -1.42 \cdot 10^{+97}:\\ \;\;\;\;b \cdot \left(\mathsf{fma}\left(a, t\_2, y4 \cdot t\_1\right) - y0 \cdot t\_3\right)\\ \mathbf{elif}\;b \leq 2.55 \cdot 10^{-55}:\\ \;\;\;\;\left(-y3\right) \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)\\ \mathbf{elif}\;b \leq 6 \cdot 10^{+65}:\\ \;\;\;\;c \cdot \mathsf{fma}\left(y4, y \cdot y3 - t \cdot y2, \frac{y4 \cdot \mathsf{fma}\left(b, t\_1, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)}{c}\right)\\ \mathbf{elif}\;b \leq 6.2 \cdot 10^{+205}:\\ \;\;\;\;\left(-i\right) \cdot \left(\mathsf{fma}\left(c, t\_2, y5 \cdot t\_1\right) - y1 \cdot t\_3\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\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 (- (* j t) (* k y)))
        (t_2 (- (* x y) (* t z)))
        (t_3 (- (* j x) (* k z))))
   (if (<= b -1.42e+97)
     (* b (- (fma a t_2 (* y4 t_1)) (* y0 t_3)))
     (if (<= b 2.55e-55)
       (*
        (- y3)
        (-
         (fma j (- (* y1 y4) (* y0 y5)) (* z (- (* c y0) (* a y1))))
         (* y (- (* c y4) (* a y5)))))
       (if (<= b 6e+65)
         (*
          c
          (fma
           y4
           (- (* y y3) (* t y2))
           (/ (* y4 (fma b t_1 (* y1 (- (* k y2) (* j y3))))) c)))
         (if (<= b 6.2e+205)
           (* (- i) (- (fma c t_2 (* y5 t_1)) (* y1 t_3)))
           (* k (* y4 (fma -1.0 (* b y) (* y1 y2))))))))))
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 = (j * t) - (k * y);
	double t_2 = (x * y) - (t * z);
	double t_3 = (j * x) - (k * z);
	double tmp;
	if (b <= -1.42e+97) {
		tmp = b * (fma(a, t_2, (y4 * t_1)) - (y0 * t_3));
	} else if (b <= 2.55e-55) {
		tmp = -y3 * (fma(j, ((y1 * y4) - (y0 * y5)), (z * ((c * y0) - (a * y1)))) - (y * ((c * y4) - (a * y5))));
	} else if (b <= 6e+65) {
		tmp = c * fma(y4, ((y * y3) - (t * y2)), ((y4 * fma(b, t_1, (y1 * ((k * y2) - (j * y3))))) / c));
	} else if (b <= 6.2e+205) {
		tmp = -i * (fma(c, t_2, (y5 * t_1)) - (y1 * t_3));
	} else {
		tmp = k * (y4 * fma(-1.0, (b * y), (y1 * y2)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(j * t) - Float64(k * y))
	t_2 = Float64(Float64(x * y) - Float64(t * z))
	t_3 = Float64(Float64(j * x) - Float64(k * z))
	tmp = 0.0
	if (b <= -1.42e+97)
		tmp = Float64(b * Float64(fma(a, t_2, Float64(y4 * t_1)) - Float64(y0 * t_3)));
	elseif (b <= 2.55e-55)
		tmp = Float64(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)))));
	elseif (b <= 6e+65)
		tmp = Float64(c * fma(y4, Float64(Float64(y * y3) - Float64(t * y2)), Float64(Float64(y4 * fma(b, t_1, Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3))))) / c)));
	elseif (b <= 6.2e+205)
		tmp = Float64(Float64(-i) * Float64(fma(c, t_2, Float64(y5 * t_1)) - Float64(y1 * t_3)));
	else
		tmp = Float64(k * Float64(y4 * fma(-1.0, Float64(b * y), Float64(y1 * y2))));
	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[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.42e+97], N[(b * N[(N[(a * t$95$2 + N[(y4 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.55e-55], 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], If[LessEqual[b, 6e+65], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision] + N[(N[(y4 * N[(b * t$95$1 + N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.2e+205], N[((-i) * N[(N[(c * t$95$2 + N[(y5 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y1 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(y4 * N[(-1.0 * N[(b * y), $MachinePrecision] + N[(y1 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot t - k \cdot y\\
t_2 := x \cdot y - t \cdot z\\
t_3 := j \cdot x - k \cdot z\\
\mathbf{if}\;b \leq -1.42 \cdot 10^{+97}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, t\_2, y4 \cdot t\_1\right) - y0 \cdot t\_3\right)\\

\mathbf{elif}\;b \leq 2.55 \cdot 10^{-55}:\\
\;\;\;\;\left(-y3\right) \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)\\

\mathbf{elif}\;b \leq 6 \cdot 10^{+65}:\\
\;\;\;\;c \cdot \mathsf{fma}\left(y4, y \cdot y3 - t \cdot y2, \frac{y4 \cdot \mathsf{fma}\left(b, t\_1, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)}{c}\right)\\

\mathbf{elif}\;b \leq 6.2 \cdot 10^{+205}:\\
\;\;\;\;\left(-i\right) \cdot \left(\mathsf{fma}\left(c, t\_2, y5 \cdot t\_1\right) - y1 \cdot t\_3\right)\\

\mathbf{else}:\\
\;\;\;\;k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right)\\


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

    1. Initial program 29.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) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites71.4%

      \[\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.41999999999999991e97 < b < 2.54999999999999998e-55

    1. Initial program 34.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites51.9%

      \[\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 2.54999999999999998e-55 < b < 6.0000000000000004e65

    1. Initial program 8.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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites50.9%

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

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

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

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

        \[\leadsto c \cdot \mathsf{fma}\left(y4, y \cdot y3 - t \cdot \color{blue}{y2}, \frac{y4 \cdot \left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)}{c}\right) \]
      4. lift-*.f64N/A

        \[\leadsto c \cdot \mathsf{fma}\left(y4, y \cdot y3 - t \cdot y2, \frac{y4 \cdot \left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)}{c}\right) \]
      5. lift-*.f64N/A

        \[\leadsto c \cdot \mathsf{fma}\left(y4, y \cdot y3 - t \cdot y2, \frac{y4 \cdot \left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)}{c}\right) \]
      6. lower-/.f64N/A

        \[\leadsto c \cdot \mathsf{fma}\left(y4, y \cdot y3 - t \cdot y2, \frac{y4 \cdot \left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)}{c}\right) \]
    8. Applied rewrites55.1%

      \[\leadsto c \cdot \color{blue}{\mathsf{fma}\left(y4, y \cdot y3 - t \cdot y2, \frac{y4 \cdot \mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)}{c}\right)} \]

    if 6.0000000000000004e65 < b < 6.20000000000000035e205

    1. Initial program 39.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) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites61.3%

      \[\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 6.20000000000000035e205 < b

    1. Initial program 53.2%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites46.6%

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

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

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

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + \color{blue}{y1 \cdot y2}\right)\right) \]
      3. lower-fma.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot \color{blue}{y}, y1 \cdot y2\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right) \]
      5. lower-*.f6473.5

        \[\leadsto k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right) \]
    8. Applied rewrites73.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification58.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.42 \cdot 10^{+97}:\\ \;\;\;\;b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{elif}\;b \leq 2.55 \cdot 10^{-55}:\\ \;\;\;\;\left(-y3\right) \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)\\ \mathbf{elif}\;b \leq 6 \cdot 10^{+65}:\\ \;\;\;\;c \cdot \mathsf{fma}\left(y4, y \cdot y3 - t \cdot y2, \frac{y4 \cdot \mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)}{c}\right)\\ \mathbf{elif}\;b \leq 6.2 \cdot 10^{+205}:\\ \;\;\;\;\left(-i\right) \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)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 38.8% accurate, 2.1× speedup?

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

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

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

\mathbf{elif}\;b \leq 6.9 \cdot 10^{-214}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\

\mathbf{elif}\;b \leq 1.05 \cdot 10^{-50}:\\
\;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -5.2999999999999999e85 or 8.9999999999999993e82 < b

    1. Initial program 35.2%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites65.2%

      \[\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 -5.2999999999999999e85 < b < -8.0000000000000003e-173

    1. Initial program 36.6%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites48.7%

      \[\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)} \]
    6. 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)} \]
    7. 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-*.f6444.8

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

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

    if -8.0000000000000003e-173 < b < 6.89999999999999991e-214

    1. Initial program 28.8%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites51.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)} \]
    6. Taylor expanded in y5 around -inf

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

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

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

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

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
      5. lower-*.f6447.7

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
    8. Applied rewrites47.7%

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

    if 6.89999999999999991e-214 < b < 1.05e-50

    1. Initial program 33.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites42.3%

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

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

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

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

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

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
      5. lift-*.f6448.3

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
    8. Applied rewrites48.3%

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

    if 1.05e-50 < b < 8.9999999999999993e82

    1. Initial program 20.0%

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

Alternative 5: 41.6% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot t - k \cdot y\\ t_2 := x \cdot y - t \cdot z\\ t_3 := j \cdot x - k \cdot z\\ \mathbf{if}\;b \leq -1.42 \cdot 10^{+97}:\\ \;\;\;\;b \cdot \left(\mathsf{fma}\left(a, t\_2, y4 \cdot t\_1\right) - y0 \cdot t\_3\right)\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{-55}:\\ \;\;\;\;\left(-y3\right) \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)\\ \mathbf{elif}\;b \leq 1.95 \cdot 10^{+54}:\\ \;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, t\_1, 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 6.2 \cdot 10^{+205}:\\ \;\;\;\;\left(-i\right) \cdot \left(\mathsf{fma}\left(c, t\_2, y5 \cdot t\_1\right) - y1 \cdot t\_3\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\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 (- (* j t) (* k y)))
        (t_2 (- (* x y) (* t z)))
        (t_3 (- (* j x) (* k z))))
   (if (<= b -1.42e+97)
     (* b (- (fma a t_2 (* y4 t_1)) (* y0 t_3)))
     (if (<= b 1.15e-55)
       (*
        (- y3)
        (-
         (fma j (- (* y1 y4) (* y0 y5)) (* z (- (* c y0) (* a y1))))
         (* y (- (* c y4) (* a y5)))))
       (if (<= b 1.95e+54)
         (*
          y4
          (-
           (fma b t_1 (* y1 (- (* k y2) (* j y3))))
           (* c (- (* t y2) (* y y3)))))
         (if (<= b 6.2e+205)
           (* (- i) (- (fma c t_2 (* y5 t_1)) (* y1 t_3)))
           (* k (* y4 (fma -1.0 (* b y) (* y1 y2))))))))))
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 = (j * t) - (k * y);
	double t_2 = (x * y) - (t * z);
	double t_3 = (j * x) - (k * z);
	double tmp;
	if (b <= -1.42e+97) {
		tmp = b * (fma(a, t_2, (y4 * t_1)) - (y0 * t_3));
	} else if (b <= 1.15e-55) {
		tmp = -y3 * (fma(j, ((y1 * y4) - (y0 * y5)), (z * ((c * y0) - (a * y1)))) - (y * ((c * y4) - (a * y5))));
	} else if (b <= 1.95e+54) {
		tmp = y4 * (fma(b, t_1, (y1 * ((k * y2) - (j * y3)))) - (c * ((t * y2) - (y * y3))));
	} else if (b <= 6.2e+205) {
		tmp = -i * (fma(c, t_2, (y5 * t_1)) - (y1 * t_3));
	} else {
		tmp = k * (y4 * fma(-1.0, (b * y), (y1 * y2)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(j * t) - Float64(k * y))
	t_2 = Float64(Float64(x * y) - Float64(t * z))
	t_3 = Float64(Float64(j * x) - Float64(k * z))
	tmp = 0.0
	if (b <= -1.42e+97)
		tmp = Float64(b * Float64(fma(a, t_2, Float64(y4 * t_1)) - Float64(y0 * t_3)));
	elseif (b <= 1.15e-55)
		tmp = Float64(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)))));
	elseif (b <= 1.95e+54)
		tmp = Float64(y4 * Float64(fma(b, t_1, Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3)))));
	elseif (b <= 6.2e+205)
		tmp = Float64(Float64(-i) * Float64(fma(c, t_2, Float64(y5 * t_1)) - Float64(y1 * t_3)));
	else
		tmp = Float64(k * Float64(y4 * fma(-1.0, Float64(b * y), Float64(y1 * y2))));
	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[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.42e+97], N[(b * N[(N[(a * t$95$2 + N[(y4 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.15e-55], 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], If[LessEqual[b, 1.95e+54], N[(y4 * N[(N[(b * t$95$1 + 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, 6.2e+205], N[((-i) * N[(N[(c * t$95$2 + N[(y5 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y1 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(y4 * N[(-1.0 * N[(b * y), $MachinePrecision] + N[(y1 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot t - k \cdot y\\
t_2 := x \cdot y - t \cdot z\\
t_3 := j \cdot x - k \cdot z\\
\mathbf{if}\;b \leq -1.42 \cdot 10^{+97}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, t\_2, y4 \cdot t\_1\right) - y0 \cdot t\_3\right)\\

\mathbf{elif}\;b \leq 1.15 \cdot 10^{-55}:\\
\;\;\;\;\left(-y3\right) \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)\\

\mathbf{elif}\;b \leq 1.95 \cdot 10^{+54}:\\
\;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, t\_1, 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 6.2 \cdot 10^{+205}:\\
\;\;\;\;\left(-i\right) \cdot \left(\mathsf{fma}\left(c, t\_2, y5 \cdot t\_1\right) - y1 \cdot t\_3\right)\\

\mathbf{else}:\\
\;\;\;\;k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right)\\


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

    1. Initial program 29.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) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites71.4%

      \[\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.41999999999999991e97 < b < 1.15000000000000006e-55

    1. Initial program 34.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites51.9%

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

    if 1.15000000000000006e-55 < b < 1.9500000000000001e54

    1. Initial program 4.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites55.3%

      \[\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)} \]

    if 1.9500000000000001e54 < b < 6.20000000000000035e205

    1. Initial program 39.9%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites60.6%

      \[\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 6.20000000000000035e205 < b

    1. Initial program 53.2%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites46.6%

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

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

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

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + \color{blue}{y1 \cdot y2}\right)\right) \]
      3. lower-fma.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot \color{blue}{y}, y1 \cdot y2\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right) \]
      5. lower-*.f6473.5

        \[\leadsto k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right) \]
    8. Applied rewrites73.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification58.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.42 \cdot 10^{+97}:\\ \;\;\;\;b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{-55}:\\ \;\;\;\;\left(-y3\right) \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)\\ \mathbf{elif}\;b \leq 1.95 \cdot 10^{+54}:\\ \;\;\;\;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)\\ \mathbf{elif}\;b \leq 6.2 \cdot 10^{+205}:\\ \;\;\;\;\left(-i\right) \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)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 37.9% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{if}\;b \leq -5.3 \cdot 10^{+85}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -8 \cdot 10^{-173}:\\ \;\;\;\;y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right)\\ \mathbf{elif}\;b \leq 6.9 \cdot 10^{-214}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{elif}\;b \leq 1500:\\ \;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\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
          (-
           (fma a (- (* x y) (* t z)) (* y4 (- (* j t) (* k y))))
           (* y0 (- (* j x) (* k z)))))))
   (if (<= b -5.3e+85)
     t_1
     (if (<= b -8e-173)
       (* y1 (* y3 (fma -1.0 (* j y4) (* a z))))
       (if (<= b 6.9e-214)
         (* y3 (* y5 (- (* j y0) (* a y))))
         (if (<= b 1500.0) (* c (* y4 (- (* y y3) (* t y2)))) 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 * (fma(a, ((x * y) - (t * z)), (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))));
	double tmp;
	if (b <= -5.3e+85) {
		tmp = t_1;
	} else if (b <= -8e-173) {
		tmp = y1 * (y3 * fma(-1.0, (j * y4), (a * z)));
	} else if (b <= 6.9e-214) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else if (b <= 1500.0) {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	} 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(fma(a, Float64(Float64(x * y) - Float64(t * z)), Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z)))))
	tmp = 0.0
	if (b <= -5.3e+85)
		tmp = t_1;
	elseif (b <= -8e-173)
		tmp = Float64(y1 * Float64(y3 * fma(-1.0, Float64(j * y4), Float64(a * z))));
	elseif (b <= 6.9e-214)
		tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))));
	elseif (b <= 1500.0)
		tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2))));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(b * N[(N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.3e+85], t$95$1, If[LessEqual[b, -8e-173], N[(y1 * N[(y3 * N[(-1.0 * N[(j * y4), $MachinePrecision] + N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.9e-214], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1500.0], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;b \leq 6.9 \cdot 10^{-214}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\

\mathbf{elif}\;b \leq 1500:\\
\;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -5.2999999999999999e85 or 1500 < b

    1. Initial program 34.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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites61.5%

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

    if -5.2999999999999999e85 < b < -8.0000000000000003e-173

    1. Initial program 36.6%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites48.7%

      \[\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)} \]
    6. 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)} \]
    7. 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-*.f6444.8

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

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

    if -8.0000000000000003e-173 < b < 6.89999999999999991e-214

    1. Initial program 28.8%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites51.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)} \]
    6. Taylor expanded in y5 around -inf

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

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

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

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

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
      5. lower-*.f6447.7

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
    8. Applied rewrites47.7%

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

    if 6.89999999999999991e-214 < b < 1500

    1. Initial program 27.4%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites46.0%

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

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

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

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

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

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
      5. lift-*.f6442.1

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
    8. Applied rewrites42.1%

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

Alternative 7: 43.5% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{if}\;b \leq -5.8 \cdot 10^{+90}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -4.9 \cdot 10^{-29}:\\ \;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\ \mathbf{elif}\;b \leq 4.1 \cdot 10^{+118}:\\ \;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \mathbf{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
          (-
           (fma a (- (* x y) (* t z)) (* y4 (- (* j t) (* k y))))
           (* y0 (- (* j x) (* k z)))))))
   (if (<= b -5.8e+90)
     t_1
     (if (<= b -4.9e-29)
       (* y1 (* y4 (- (* k y2) (* j y3))))
       (if (<= b 4.1e+118)
         (*
          y2
          (-
           (fma k (- (* y1 y4) (* y0 y5)) (* x (- (* c y0) (* a y1))))
           (* t (- (* c y4) (* a y5)))))
         t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = b * (fma(a, ((x * y) - (t * z)), (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))));
	double tmp;
	if (b <= -5.8e+90) {
		tmp = t_1;
	} else if (b <= -4.9e-29) {
		tmp = y1 * (y4 * ((k * y2) - (j * y3)));
	} else if (b <= 4.1e+118) {
		tmp = y2 * (fma(k, ((y1 * y4) - (y0 * y5)), (x * ((c * y0) - (a * y1)))) - (t * ((c * y4) - (a * y5))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(b * Float64(fma(a, Float64(Float64(x * y) - Float64(t * z)), Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z)))))
	tmp = 0.0
	if (b <= -5.8e+90)
		tmp = t_1;
	elseif (b <= -4.9e-29)
		tmp = Float64(y1 * Float64(y4 * Float64(Float64(k * y2) - Float64(j * y3))));
	elseif (b <= 4.1e+118)
		tmp = Float64(y2 * Float64(fma(k, Float64(Float64(y1 * y4) - Float64(y0 * y5)), Float64(x * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(t * Float64(Float64(c * y4) - Float64(a * y5)))));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(b * N[(N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.8e+90], t$95$1, If[LessEqual[b, -4.9e-29], N[(y1 * N[(y4 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.1e+118], N[(y2 * N[(N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -4.9 \cdot 10^{-29}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -5.8000000000000003e90 or 4.0999999999999997e118 < b

    1. Initial program 35.8%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites68.1%

      \[\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 -5.8000000000000003e90 < b < -4.8999999999999998e-29

    1. Initial program 28.6%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites46.6%

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

      \[\leadsto y1 \cdot \color{blue}{\left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)} \]
    7. 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 y3\right)\right) \]
      4. lift-*.f64N/A

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

        \[\leadsto y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot \color{blue}{y3}\right)\right) \]
    8. Applied rewrites50.5%

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

    if -4.8999999999999998e-29 < b < 4.0999999999999997e118

    1. Initial program 31.4%

      \[\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. Add Preprocessing
    3. Taylor expanded in y2 around inf

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

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

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

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

Alternative 8: 30.3% accurate, 3.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{+203}:\\ \;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\ \mathbf{elif}\;b \leq -3.3 \cdot 10^{+123}:\\ \;\;\;\;y4 \cdot \left(\left(-y\right) \cdot \left(b \cdot k\right)\right)\\ \mathbf{elif}\;b \leq -9 \cdot 10^{+24}:\\ \;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\ \mathbf{elif}\;b \leq -8 \cdot 10^{-173}:\\ \;\;\;\;y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right)\\ \mathbf{elif}\;b \leq 6.9 \cdot 10^{-214}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-51}:\\ \;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\ \mathbf{elif}\;b \leq 4.4 \cdot 10^{+54}:\\ \;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\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 (<= b -5e+203)
   (* b (* j (- (* t y4) (* x y0))))
   (if (<= b -3.3e+123)
     (* y4 (* (- y) (* b k)))
     (if (<= b -9e+24)
       (* y1 (* y4 (- (* k y2) (* j y3))))
       (if (<= b -8e-173)
         (* y1 (* y3 (fma -1.0 (* j y4) (* a z))))
         (if (<= b 6.9e-214)
           (* y3 (* y5 (- (* j y0) (* a y))))
           (if (<= b 7.8e-51)
             (* c (* y4 (- (* y y3) (* t y2))))
             (if (<= b 4.4e+54)
               (* k (* y2 (- (* y1 y4) (* y0 y5))))
               (* 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 (b <= -5e+203) {
		tmp = b * (j * ((t * y4) - (x * y0)));
	} else if (b <= -3.3e+123) {
		tmp = y4 * (-y * (b * k));
	} else if (b <= -9e+24) {
		tmp = y1 * (y4 * ((k * y2) - (j * y3)));
	} else if (b <= -8e-173) {
		tmp = y1 * (y3 * fma(-1.0, (j * y4), (a * z)));
	} else if (b <= 6.9e-214) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else if (b <= 7.8e-51) {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	} else if (b <= 4.4e+54) {
		tmp = k * (y2 * ((y1 * y4) - (y0 * y5)));
	} 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 (b <= -5e+203)
		tmp = Float64(b * Float64(j * Float64(Float64(t * y4) - Float64(x * y0))));
	elseif (b <= -3.3e+123)
		tmp = Float64(y4 * Float64(Float64(-y) * Float64(b * k)));
	elseif (b <= -9e+24)
		tmp = Float64(y1 * Float64(y4 * Float64(Float64(k * y2) - Float64(j * y3))));
	elseif (b <= -8e-173)
		tmp = Float64(y1 * Float64(y3 * fma(-1.0, Float64(j * y4), Float64(a * z))));
	elseif (b <= 6.9e-214)
		tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))));
	elseif (b <= 7.8e-51)
		tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2))));
	elseif (b <= 4.4e+54)
		tmp = Float64(k * Float64(y2 * Float64(Float64(y1 * y4) - Float64(y0 * y5))));
	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[b, -5e+203], N[(b * N[(j * N[(N[(t * y4), $MachinePrecision] - N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3.3e+123], N[(y4 * N[((-y) * N[(b * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -9e+24], N[(y1 * N[(y4 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -8e-173], N[(y1 * N[(y3 * N[(-1.0 * N[(j * y4), $MachinePrecision] + N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.9e-214], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.8e-51], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.4e+54], N[(k * N[(y2 * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $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}\;b \leq -5 \cdot 10^{+203}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\

\mathbf{elif}\;b \leq -3.3 \cdot 10^{+123}:\\
\;\;\;\;y4 \cdot \left(\left(-y\right) \cdot \left(b \cdot k\right)\right)\\

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

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

\mathbf{elif}\;b \leq 6.9 \cdot 10^{-214}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\

\mathbf{elif}\;b \leq 7.8 \cdot 10^{-51}:\\
\;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\

\mathbf{elif}\;b \leq 4.4 \cdot 10^{+54}:\\
\;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\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 8 regimes
  2. if b < -4.99999999999999994e203

    1. Initial program 29.4%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites66.8%

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

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

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

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

        \[\leadsto b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right) \]
      4. lower-*.f6467.8

        \[\leadsto b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right) \]
    8. Applied rewrites67.8%

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

    if -4.99999999999999994e203 < b < -3.30000000000000003e123

    1. Initial program 21.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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites42.9%

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

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

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

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

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

        \[\leadsto y4 \cdot \left(-1 \cdot \left(y \cdot \left(b \cdot k - c \cdot y3\right)\right)\right) \]
      5. lower-*.f6459.3

        \[\leadsto y4 \cdot \left(-1 \cdot \left(y \cdot \left(b \cdot k - c \cdot y3\right)\right)\right) \]
    8. Applied rewrites59.3%

      \[\leadsto y4 \cdot \left(-1 \cdot \color{blue}{\left(y \cdot \left(b \cdot k - c \cdot y3\right)\right)}\right) \]
    9. Taylor expanded in b around inf

      \[\leadsto y4 \cdot \left(-1 \cdot \left(y \cdot \left(b \cdot k\right)\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6464.4

        \[\leadsto y4 \cdot \left(-1 \cdot \left(y \cdot \left(b \cdot k\right)\right)\right) \]
    11. Applied rewrites64.4%

      \[\leadsto y4 \cdot \left(-1 \cdot \left(y \cdot \left(b \cdot k\right)\right)\right) \]

    if -3.30000000000000003e123 < b < -9.00000000000000039e24

    1. Initial program 29.6%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites48.3%

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

      \[\leadsto y1 \cdot \color{blue}{\left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)} \]
    7. 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 y3\right)\right) \]
      4. lift-*.f64N/A

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

        \[\leadsto y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot \color{blue}{y3}\right)\right) \]
    8. Applied rewrites55.9%

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

    if -9.00000000000000039e24 < b < -8.0000000000000003e-173

    1. Initial program 45.0%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites46.4%

      \[\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)} \]
    6. 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)} \]
    7. 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-*.f6451.2

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

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

    if -8.0000000000000003e-173 < b < 6.89999999999999991e-214

    1. Initial program 28.8%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites51.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)} \]
    6. Taylor expanded in y5 around -inf

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

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

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

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

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
      5. lower-*.f6447.7

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
    8. Applied rewrites47.7%

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

    if 6.89999999999999991e-214 < b < 7.7999999999999995e-51

    1. Initial program 34.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites43.5%

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

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

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

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

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

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
      5. lift-*.f6449.6

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
    8. Applied rewrites49.6%

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

    if 7.7999999999999995e-51 < b < 4.3999999999999998e54

    1. Initial program 5.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. Add Preprocessing
    3. Taylor expanded in y2 around inf

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

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

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

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

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

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

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - \color{blue}{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-*.f64N/A

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) \]
      5. lift--.f6448.0

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot \color{blue}{y5}\right)\right) \]
    8. Applied rewrites48.0%

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

    if 4.3999999999999998e54 < b

    1. Initial program 44.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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites51.7%

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

      \[\leadsto b \cdot \left(y0 \cdot \color{blue}{\left(k \cdot z - j \cdot x\right)}\right) \]
    7. 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-*.f6445.4

        \[\leadsto b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right) \]
    8. Applied rewrites45.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{+203}:\\ \;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\ \mathbf{elif}\;b \leq -3.3 \cdot 10^{+123}:\\ \;\;\;\;y4 \cdot \left(\left(-y\right) \cdot \left(b \cdot k\right)\right)\\ \mathbf{elif}\;b \leq -9 \cdot 10^{+24}:\\ \;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\ \mathbf{elif}\;b \leq -8 \cdot 10^{-173}:\\ \;\;\;\;y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right)\\ \mathbf{elif}\;b \leq 6.9 \cdot 10^{-214}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-51}:\\ \;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\ \mathbf{elif}\;b \leq 4.4 \cdot 10^{+54}:\\ \;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 30.2% accurate, 3.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{+203}:\\ \;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\ \mathbf{elif}\;b \leq -3.3 \cdot 10^{+123}:\\ \;\;\;\;y4 \cdot \left(\left(-y\right) \cdot \left(b \cdot k\right)\right)\\ \mathbf{elif}\;b \leq -5.6 \cdot 10^{-105}:\\ \;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\ \mathbf{elif}\;b \leq 6.9 \cdot 10^{-214}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-51}:\\ \;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\ \mathbf{elif}\;b \leq 4.4 \cdot 10^{+54}:\\ \;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\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 (<= b -5e+203)
   (* b (* j (- (* t y4) (* x y0))))
   (if (<= b -3.3e+123)
     (* y4 (* (- y) (* b k)))
     (if (<= b -5.6e-105)
       (* y1 (* y4 (- (* k y2) (* j y3))))
       (if (<= b 6.9e-214)
         (* y3 (* y5 (- (* j y0) (* a y))))
         (if (<= b 7.8e-51)
           (* c (* y4 (- (* y y3) (* t y2))))
           (if (<= b 4.4e+54)
             (* k (* y2 (- (* y1 y4) (* y0 y5))))
             (* 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 (b <= -5e+203) {
		tmp = b * (j * ((t * y4) - (x * y0)));
	} else if (b <= -3.3e+123) {
		tmp = y4 * (-y * (b * k));
	} else if (b <= -5.6e-105) {
		tmp = y1 * (y4 * ((k * y2) - (j * y3)));
	} else if (b <= 6.9e-214) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else if (b <= 7.8e-51) {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	} else if (b <= 4.4e+54) {
		tmp = k * (y2 * ((y1 * y4) - (y0 * y5)));
	} 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) :: tmp
    if (b <= (-5d+203)) then
        tmp = b * (j * ((t * y4) - (x * y0)))
    else if (b <= (-3.3d+123)) then
        tmp = y4 * (-y * (b * k))
    else if (b <= (-5.6d-105)) then
        tmp = y1 * (y4 * ((k * y2) - (j * y3)))
    else if (b <= 6.9d-214) then
        tmp = y3 * (y5 * ((j * y0) - (a * y)))
    else if (b <= 7.8d-51) then
        tmp = c * (y4 * ((y * y3) - (t * y2)))
    else if (b <= 4.4d+54) then
        tmp = k * (y2 * ((y1 * y4) - (y0 * y5)))
    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 tmp;
	if (b <= -5e+203) {
		tmp = b * (j * ((t * y4) - (x * y0)));
	} else if (b <= -3.3e+123) {
		tmp = y4 * (-y * (b * k));
	} else if (b <= -5.6e-105) {
		tmp = y1 * (y4 * ((k * y2) - (j * y3)));
	} else if (b <= 6.9e-214) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else if (b <= 7.8e-51) {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	} else if (b <= 4.4e+54) {
		tmp = k * (y2 * ((y1 * y4) - (y0 * y5)));
	} 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):
	tmp = 0
	if b <= -5e+203:
		tmp = b * (j * ((t * y4) - (x * y0)))
	elif b <= -3.3e+123:
		tmp = y4 * (-y * (b * k))
	elif b <= -5.6e-105:
		tmp = y1 * (y4 * ((k * y2) - (j * y3)))
	elif b <= 6.9e-214:
		tmp = y3 * (y5 * ((j * y0) - (a * y)))
	elif b <= 7.8e-51:
		tmp = c * (y4 * ((y * y3) - (t * y2)))
	elif b <= 4.4e+54:
		tmp = k * (y2 * ((y1 * y4) - (y0 * y5)))
	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 (b <= -5e+203)
		tmp = Float64(b * Float64(j * Float64(Float64(t * y4) - Float64(x * y0))));
	elseif (b <= -3.3e+123)
		tmp = Float64(y4 * Float64(Float64(-y) * Float64(b * k)));
	elseif (b <= -5.6e-105)
		tmp = Float64(y1 * Float64(y4 * Float64(Float64(k * y2) - Float64(j * y3))));
	elseif (b <= 6.9e-214)
		tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))));
	elseif (b <= 7.8e-51)
		tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2))));
	elseif (b <= 4.4e+54)
		tmp = Float64(k * Float64(y2 * Float64(Float64(y1 * y4) - Float64(y0 * y5))));
	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)
	tmp = 0.0;
	if (b <= -5e+203)
		tmp = b * (j * ((t * y4) - (x * y0)));
	elseif (b <= -3.3e+123)
		tmp = y4 * (-y * (b * k));
	elseif (b <= -5.6e-105)
		tmp = y1 * (y4 * ((k * y2) - (j * y3)));
	elseif (b <= 6.9e-214)
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	elseif (b <= 7.8e-51)
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	elseif (b <= 4.4e+54)
		tmp = k * (y2 * ((y1 * y4) - (y0 * y5)));
	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_] := If[LessEqual[b, -5e+203], N[(b * N[(j * N[(N[(t * y4), $MachinePrecision] - N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3.3e+123], N[(y4 * N[((-y) * N[(b * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -5.6e-105], N[(y1 * N[(y4 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.9e-214], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.8e-51], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.4e+54], N[(k * N[(y2 * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $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}\;b \leq -5 \cdot 10^{+203}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\

\mathbf{elif}\;b \leq -3.3 \cdot 10^{+123}:\\
\;\;\;\;y4 \cdot \left(\left(-y\right) \cdot \left(b \cdot k\right)\right)\\

\mathbf{elif}\;b \leq -5.6 \cdot 10^{-105}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\

\mathbf{elif}\;b \leq 6.9 \cdot 10^{-214}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\

\mathbf{elif}\;b \leq 7.8 \cdot 10^{-51}:\\
\;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\

\mathbf{elif}\;b \leq 4.4 \cdot 10^{+54}:\\
\;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\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 b < -4.99999999999999994e203

    1. Initial program 29.4%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites66.8%

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

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

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

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

        \[\leadsto b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right) \]
      4. lower-*.f6467.8

        \[\leadsto b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right) \]
    8. Applied rewrites67.8%

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

    if -4.99999999999999994e203 < b < -3.30000000000000003e123

    1. Initial program 21.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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites42.9%

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

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

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

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

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

        \[\leadsto y4 \cdot \left(-1 \cdot \left(y \cdot \left(b \cdot k - c \cdot y3\right)\right)\right) \]
      5. lower-*.f6459.3

        \[\leadsto y4 \cdot \left(-1 \cdot \left(y \cdot \left(b \cdot k - c \cdot y3\right)\right)\right) \]
    8. Applied rewrites59.3%

      \[\leadsto y4 \cdot \left(-1 \cdot \color{blue}{\left(y \cdot \left(b \cdot k - c \cdot y3\right)\right)}\right) \]
    9. Taylor expanded in b around inf

      \[\leadsto y4 \cdot \left(-1 \cdot \left(y \cdot \left(b \cdot k\right)\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6464.4

        \[\leadsto y4 \cdot \left(-1 \cdot \left(y \cdot \left(b \cdot k\right)\right)\right) \]
    11. Applied rewrites64.4%

      \[\leadsto y4 \cdot \left(-1 \cdot \left(y \cdot \left(b \cdot k\right)\right)\right) \]

    if -3.30000000000000003e123 < b < -5.6e-105

    1. Initial program 39.6%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites42.1%

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

      \[\leadsto y1 \cdot \color{blue}{\left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)} \]
    7. 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 y3\right)\right) \]
      4. lift-*.f64N/A

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

        \[\leadsto y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot \color{blue}{y3}\right)\right) \]
    8. Applied rewrites49.9%

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

    if -5.6e-105 < b < 6.89999999999999991e-214

    1. Initial program 29.9%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites49.8%

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

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

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

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

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

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
      5. lower-*.f6443.6

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
    8. Applied rewrites43.6%

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

    if 6.89999999999999991e-214 < b < 7.7999999999999995e-51

    1. Initial program 34.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites43.5%

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

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

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

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

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

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
      5. lift-*.f6449.6

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
    8. Applied rewrites49.6%

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

    if 7.7999999999999995e-51 < b < 4.3999999999999998e54

    1. Initial program 5.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. Add Preprocessing
    3. Taylor expanded in y2 around inf

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

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

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

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

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

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

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - \color{blue}{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-*.f64N/A

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) \]
      5. lift--.f6448.0

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot \color{blue}{y5}\right)\right) \]
    8. Applied rewrites48.0%

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

    if 4.3999999999999998e54 < b

    1. Initial program 44.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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites51.7%

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

      \[\leadsto b \cdot \left(y0 \cdot \color{blue}{\left(k \cdot z - j \cdot x\right)}\right) \]
    7. 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-*.f6445.4

        \[\leadsto b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right) \]
    8. Applied rewrites45.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{+203}:\\ \;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\ \mathbf{elif}\;b \leq -3.3 \cdot 10^{+123}:\\ \;\;\;\;y4 \cdot \left(\left(-y\right) \cdot \left(b \cdot k\right)\right)\\ \mathbf{elif}\;b \leq -5.6 \cdot 10^{-105}:\\ \;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\ \mathbf{elif}\;b \leq 6.9 \cdot 10^{-214}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-51}:\\ \;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\ \mathbf{elif}\;b \leq 4.4 \cdot 10^{+54}:\\ \;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 29.3% accurate, 4.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \leq -3.4 \cdot 10^{+78}:\\ \;\;\;\;\left(-i\right) \cdot \left(x \cdot \left(c \cdot y - j \cdot y1\right)\right)\\ \mathbf{elif}\;c \leq -1.55 \cdot 10^{-86}:\\ \;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\ \mathbf{elif}\;c \leq 4.5 \cdot 10^{-296}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{elif}\;c \leq 1.25 \cdot 10^{+131}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\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 (<= c -3.4e+78)
   (* (- i) (* x (- (* c y) (* j y1))))
   (if (<= c -1.55e-86)
     (* c (* y4 (- (* y y3) (* t y2))))
     (if (<= c 4.5e-296)
       (* y3 (* y5 (- (* j y0) (* a y))))
       (if (<= c 1.25e+131)
         (* i (* y1 (- (* j x) (* k z))))
         (* c (* z (fma -1.0 (* y0 y3) (* i t)))))))))
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 (c <= -3.4e+78) {
		tmp = -i * (x * ((c * y) - (j * y1)));
	} else if (c <= -1.55e-86) {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	} else if (c <= 4.5e-296) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else if (c <= 1.25e+131) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else {
		tmp = c * (z * fma(-1.0, (y0 * y3), (i * t)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (c <= -3.4e+78)
		tmp = Float64(Float64(-i) * Float64(x * Float64(Float64(c * y) - Float64(j * y1))));
	elseif (c <= -1.55e-86)
		tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2))));
	elseif (c <= 4.5e-296)
		tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))));
	elseif (c <= 1.25e+131)
		tmp = Float64(i * Float64(y1 * Float64(Float64(j * x) - Float64(k * z))));
	else
		tmp = Float64(c * Float64(z * fma(-1.0, Float64(y0 * y3), Float64(i * t))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[c, -3.4e+78], N[((-i) * N[(x * N[(N[(c * y), $MachinePrecision] - N[(j * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -1.55e-86], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.5e-296], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.25e+131], N[(i * N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(z * N[(-1.0 * N[(y0 * y3), $MachinePrecision] + N[(i * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;c \leq -3.4 \cdot 10^{+78}:\\
\;\;\;\;\left(-i\right) \cdot \left(x \cdot \left(c \cdot y - j \cdot y1\right)\right)\\

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

\mathbf{elif}\;c \leq 4.5 \cdot 10^{-296}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c < -3.40000000000000007e78

    1. Initial program 28.2%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites54.7%

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

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(x \cdot \left(c \cdot y - j \cdot y1\right)\right)\right) \]
      4. lower-*.f6450.9

        \[\leadsto -1 \cdot \left(i \cdot \left(x \cdot \left(c \cdot y - j \cdot y1\right)\right)\right) \]
    8. Applied rewrites50.9%

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

    if -3.40000000000000007e78 < c < -1.54999999999999994e-86

    1. Initial program 35.6%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites44.9%

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

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

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

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

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

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
      5. lift-*.f6447.7

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

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

    if -1.54999999999999994e-86 < c < 4.5000000000000002e-296

    1. Initial program 34.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites42.6%

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

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

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

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

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

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
      5. lower-*.f6447.1

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
    8. Applied rewrites47.1%

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

    if 4.5000000000000002e-296 < c < 1.24999999999999999e131

    1. Initial program 36.9%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites39.0%

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

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

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

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

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

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot \color{blue}{z}\right)\right) \]
      5. lift-*.f6439.5

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - \color{blue}{k \cdot z}\right)\right) \]
    8. Applied rewrites39.5%

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

    if 1.24999999999999999e131 < c

    1. Initial program 20.8%

      \[\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. Add Preprocessing
    3. Taylor expanded in z around -inf

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto c \cdot \color{blue}{\left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)\right)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification47.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -3.4 \cdot 10^{+78}:\\ \;\;\;\;\left(-i\right) \cdot \left(x \cdot \left(c \cdot y - j \cdot y1\right)\right)\\ \mathbf{elif}\;c \leq -1.55 \cdot 10^{-86}:\\ \;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\ \mathbf{elif}\;c \leq 4.5 \cdot 10^{-296}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{elif}\;c \leq 1.25 \cdot 10^{+131}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 31.7% accurate, 4.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{+203}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\

\mathbf{elif}\;b \leq -3.3 \cdot 10^{+123}:\\
\;\;\;\;y4 \cdot \left(\left(-y\right) \cdot \left(b \cdot k\right)\right)\\

\mathbf{elif}\;b \leq -5.6 \cdot 10^{-105}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\

\mathbf{elif}\;b \leq 5.8 \cdot 10^{+81}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\

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


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

    1. Initial program 29.4%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites66.8%

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

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

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

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

        \[\leadsto b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right) \]
      4. lower-*.f6467.8

        \[\leadsto b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right) \]
    8. Applied rewrites67.8%

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

    if -4.99999999999999994e203 < b < -3.30000000000000003e123

    1. Initial program 21.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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites42.9%

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

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

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

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

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

        \[\leadsto y4 \cdot \left(-1 \cdot \left(y \cdot \left(b \cdot k - c \cdot y3\right)\right)\right) \]
      5. lower-*.f6459.3

        \[\leadsto y4 \cdot \left(-1 \cdot \left(y \cdot \left(b \cdot k - c \cdot y3\right)\right)\right) \]
    8. Applied rewrites59.3%

      \[\leadsto y4 \cdot \left(-1 \cdot \color{blue}{\left(y \cdot \left(b \cdot k - c \cdot y3\right)\right)}\right) \]
    9. Taylor expanded in b around inf

      \[\leadsto y4 \cdot \left(-1 \cdot \left(y \cdot \left(b \cdot k\right)\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6464.4

        \[\leadsto y4 \cdot \left(-1 \cdot \left(y \cdot \left(b \cdot k\right)\right)\right) \]
    11. Applied rewrites64.4%

      \[\leadsto y4 \cdot \left(-1 \cdot \left(y \cdot \left(b \cdot k\right)\right)\right) \]

    if -3.30000000000000003e123 < b < -5.6e-105

    1. Initial program 39.6%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites42.1%

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

      \[\leadsto y1 \cdot \color{blue}{\left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)} \]
    7. 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 y3\right)\right) \]
      4. lift-*.f64N/A

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

        \[\leadsto y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot \color{blue}{y3}\right)\right) \]
    8. Applied rewrites49.9%

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

    if -5.6e-105 < b < 5.7999999999999999e81

    1. Initial program 28.9%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites46.7%

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

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

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

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

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

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
      5. lower-*.f6437.9

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
    8. Applied rewrites37.9%

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

    if 5.7999999999999999e81 < b

    1. Initial program 42.0%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites55.7%

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

      \[\leadsto a \cdot \color{blue}{\left(b \cdot \left(x \cdot y - t \cdot z\right)\right)} \]
    7. 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 z\right)\right) \]
      4. lift-*.f64N/A

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

        \[\leadsto a \cdot \left(b \cdot \left(x \cdot y - t \cdot \color{blue}{z}\right)\right) \]
    8. Applied rewrites45.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{+203}:\\ \;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\ \mathbf{elif}\;b \leq -3.3 \cdot 10^{+123}:\\ \;\;\;\;y4 \cdot \left(\left(-y\right) \cdot \left(b \cdot k\right)\right)\\ \mathbf{elif}\;b \leq -5.6 \cdot 10^{-105}:\\ \;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{+81}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 21.6% accurate, 4.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y1 \leq -5.3 \cdot 10^{+155}:\\ \;\;\;\;y4 \cdot \left(k \cdot \left(y1 \cdot y2\right)\right)\\ \mathbf{elif}\;y1 \leq -3.6 \cdot 10^{-106}:\\ \;\;\;\;a \cdot \left(\left(-y\right) \cdot \left(y3 \cdot y5\right)\right)\\ \mathbf{elif}\;y1 \leq 1.5 \cdot 10^{-294}:\\ \;\;\;\;y4 \cdot \left(y2 \cdot \left(\left(-c\right) \cdot t\right)\right)\\ \mathbf{elif}\;y1 \leq 2 \cdot 10^{-32}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(\left(-y\right) \cdot y5\right)\right)\\ \mathbf{elif}\;y1 \leq 3.8 \cdot 10^{+53}:\\ \;\;\;\;y0 \cdot \left(y3 \cdot \left(j \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(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
 (if (<= y1 -5.3e+155)
   (* y4 (* k (* y1 y2)))
   (if (<= y1 -3.6e-106)
     (* a (* (- y) (* y3 y5)))
     (if (<= y1 1.5e-294)
       (* y4 (* y2 (* (- c) t)))
       (if (<= y1 2e-32)
         (* a (* y3 (* (- y) y5)))
         (if (<= y1 3.8e+53) (* y0 (* y3 (* j y5))) (* 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) {
	double tmp;
	if (y1 <= -5.3e+155) {
		tmp = y4 * (k * (y1 * y2));
	} else if (y1 <= -3.6e-106) {
		tmp = a * (-y * (y3 * y5));
	} else if (y1 <= 1.5e-294) {
		tmp = y4 * (y2 * (-c * t));
	} else if (y1 <= 2e-32) {
		tmp = a * (y3 * (-y * y5));
	} else if (y1 <= 3.8e+53) {
		tmp = y0 * (y3 * (j * y5));
	} else {
		tmp = a * (y3 * (y1 * z));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (y1 <= (-5.3d+155)) then
        tmp = y4 * (k * (y1 * y2))
    else if (y1 <= (-3.6d-106)) then
        tmp = a * (-y * (y3 * y5))
    else if (y1 <= 1.5d-294) then
        tmp = y4 * (y2 * (-c * t))
    else if (y1 <= 2d-32) then
        tmp = a * (y3 * (-y * y5))
    else if (y1 <= 3.8d+53) then
        tmp = y0 * (y3 * (j * y5))
    else
        tmp = a * (y3 * (y1 * z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y1 <= -5.3e+155) {
		tmp = y4 * (k * (y1 * y2));
	} else if (y1 <= -3.6e-106) {
		tmp = a * (-y * (y3 * y5));
	} else if (y1 <= 1.5e-294) {
		tmp = y4 * (y2 * (-c * t));
	} else if (y1 <= 2e-32) {
		tmp = a * (y3 * (-y * y5));
	} else if (y1 <= 3.8e+53) {
		tmp = y0 * (y3 * (j * y5));
	} else {
		tmp = a * (y3 * (y1 * z));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y1 <= -5.3e+155:
		tmp = y4 * (k * (y1 * y2))
	elif y1 <= -3.6e-106:
		tmp = a * (-y * (y3 * y5))
	elif y1 <= 1.5e-294:
		tmp = y4 * (y2 * (-c * t))
	elif y1 <= 2e-32:
		tmp = a * (y3 * (-y * y5))
	elif y1 <= 3.8e+53:
		tmp = y0 * (y3 * (j * y5))
	else:
		tmp = a * (y3 * (y1 * z))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (y1 <= -5.3e+155)
		tmp = Float64(y4 * Float64(k * Float64(y1 * y2)));
	elseif (y1 <= -3.6e-106)
		tmp = Float64(a * Float64(Float64(-y) * Float64(y3 * y5)));
	elseif (y1 <= 1.5e-294)
		tmp = Float64(y4 * Float64(y2 * Float64(Float64(-c) * t)));
	elseif (y1 <= 2e-32)
		tmp = Float64(a * Float64(y3 * Float64(Float64(-y) * y5)));
	elseif (y1 <= 3.8e+53)
		tmp = Float64(y0 * Float64(y3 * Float64(j * y5)));
	else
		tmp = Float64(a * Float64(y3 * Float64(y1 * z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (y1 <= -5.3e+155)
		tmp = y4 * (k * (y1 * y2));
	elseif (y1 <= -3.6e-106)
		tmp = a * (-y * (y3 * y5));
	elseif (y1 <= 1.5e-294)
		tmp = y4 * (y2 * (-c * t));
	elseif (y1 <= 2e-32)
		tmp = a * (y3 * (-y * y5));
	elseif (y1 <= 3.8e+53)
		tmp = y0 * (y3 * (j * y5));
	else
		tmp = a * (y3 * (y1 * z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y1, -5.3e+155], N[(y4 * N[(k * N[(y1 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, -3.6e-106], N[(a * N[((-y) * N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 1.5e-294], N[(y4 * N[(y2 * N[((-c) * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 2e-32], N[(a * N[(y3 * N[((-y) * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 3.8e+53], N[(y0 * N[(y3 * N[(j * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(y3 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y1 \leq 1.5 \cdot 10^{-294}:\\
\;\;\;\;y4 \cdot \left(y2 \cdot \left(\left(-c\right) \cdot t\right)\right)\\

\mathbf{elif}\;y1 \leq 2 \cdot 10^{-32}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(\left(-y\right) \cdot y5\right)\right)\\

\mathbf{elif}\;y1 \leq 3.8 \cdot 10^{+53}:\\
\;\;\;\;y0 \cdot \left(y3 \cdot \left(j \cdot y5\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y1 < -5.29999999999999965e155

    1. Initial program 16.8%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites38.5%

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

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

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

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

        \[\leadsto y4 \cdot \left(y2 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
      4. lower-*.f6441.1

        \[\leadsto y4 \cdot \left(y2 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    8. Applied rewrites41.1%

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

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

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

        \[\leadsto y4 \cdot \left(k \cdot \left(y1 \cdot y2\right)\right) \]
    11. Applied rewrites55.3%

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

    if -5.29999999999999965e155 < y1 < -3.60000000000000013e-106

    1. Initial program 30.9%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites46.0%

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

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. 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-*.f6434.0

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites34.0%

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

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

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

        \[\leadsto a \cdot \left(-1 \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right) \]
      3. lower-*.f6427.6

        \[\leadsto a \cdot \left(-1 \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right) \]
    11. Applied rewrites27.6%

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

    if -3.60000000000000013e-106 < y1 < 1.4999999999999999e-294

    1. Initial program 43.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) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites41.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)} \]
    6. Taylor expanded in y2 around inf

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

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

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

        \[\leadsto y4 \cdot \left(y2 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
      4. lower-*.f6439.6

        \[\leadsto y4 \cdot \left(y2 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    8. Applied rewrites39.6%

      \[\leadsto y4 \cdot \left(y2 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    9. Taylor expanded in t around inf

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

        \[\leadsto y4 \cdot \left(y2 \cdot \left(-1 \cdot \left(c \cdot t\right)\right)\right) \]
      2. lift-*.f6435.1

        \[\leadsto y4 \cdot \left(y2 \cdot \left(-1 \cdot \left(c \cdot t\right)\right)\right) \]
    11. Applied rewrites35.1%

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

    if 1.4999999999999999e-294 < y1 < 2.00000000000000011e-32

    1. Initial program 35.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites39.3%

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

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. 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-*.f6424.8

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites24.8%

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

      \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot \color{blue}{y5}\right)\right)\right) \]
    10. 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-*.f6424.6

        \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right) \]
    11. Applied rewrites24.6%

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

    if 2.00000000000000011e-32 < y1 < 3.79999999999999997e53

    1. Initial program 26.6%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites60.2%

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

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

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

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

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

        \[\leadsto y0 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right) \]
      5. lower-*.f6454.1

        \[\leadsto y0 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right) \]
    8. Applied rewrites54.1%

      \[\leadsto y0 \cdot \color{blue}{\left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right)} \]
    9. Taylor expanded in z around 0

      \[\leadsto y0 \cdot \left(y3 \cdot \left(j \cdot y5\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6454.0

        \[\leadsto y0 \cdot \left(y3 \cdot \left(j \cdot y5\right)\right) \]
    11. Applied rewrites54.0%

      \[\leadsto y0 \cdot \left(y3 \cdot \left(j \cdot y5\right)\right) \]

    if 3.79999999999999997e53 < y1

    1. Initial program 37.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) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites46.3%

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

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. 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-*.f6435.2

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites35.2%

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

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6441.4

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    11. Applied rewrites41.4%

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
  3. Recombined 6 regimes into one program.
  4. Final simplification36.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y1 \leq -5.3 \cdot 10^{+155}:\\ \;\;\;\;y4 \cdot \left(k \cdot \left(y1 \cdot y2\right)\right)\\ \mathbf{elif}\;y1 \leq -3.6 \cdot 10^{-106}:\\ \;\;\;\;a \cdot \left(\left(-y\right) \cdot \left(y3 \cdot y5\right)\right)\\ \mathbf{elif}\;y1 \leq 1.5 \cdot 10^{-294}:\\ \;\;\;\;y4 \cdot \left(y2 \cdot \left(\left(-c\right) \cdot t\right)\right)\\ \mathbf{elif}\;y1 \leq 2 \cdot 10^{-32}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(\left(-y\right) \cdot y5\right)\right)\\ \mathbf{elif}\;y1 \leq 3.8 \cdot 10^{+53}:\\ \;\;\;\;y0 \cdot \left(y3 \cdot \left(j \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 29.3% accurate, 4.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \leq -1.55 \cdot 10^{-86}:\\ \;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\ \mathbf{elif}\;c \leq 4.5 \cdot 10^{-296}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{elif}\;c \leq 9 \cdot 10^{+127}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= c -1.55e-86)
   (* c (* y4 (- (* y y3) (* t y2))))
   (if (<= c 4.5e-296)
     (* y3 (* y5 (- (* j y0) (* a y))))
     (if (<= c 9e+127)
       (* i (* y1 (- (* j x) (* k z))))
       (* i (* z (- (* c t) (* k y1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (c <= -1.55e-86) {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	} else if (c <= 4.5e-296) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else if (c <= 9e+127) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else {
		tmp = i * (z * ((c * t) - (k * y1)));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (c <= (-1.55d-86)) then
        tmp = c * (y4 * ((y * y3) - (t * y2)))
    else if (c <= 4.5d-296) then
        tmp = y3 * (y5 * ((j * y0) - (a * y)))
    else if (c <= 9d+127) then
        tmp = i * (y1 * ((j * x) - (k * z)))
    else
        tmp = i * (z * ((c * t) - (k * y1)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (c <= -1.55e-86) {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	} else if (c <= 4.5e-296) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else if (c <= 9e+127) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else {
		tmp = i * (z * ((c * t) - (k * y1)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if c <= -1.55e-86:
		tmp = c * (y4 * ((y * y3) - (t * y2)))
	elif c <= 4.5e-296:
		tmp = y3 * (y5 * ((j * y0) - (a * y)))
	elif c <= 9e+127:
		tmp = i * (y1 * ((j * x) - (k * z)))
	else:
		tmp = i * (z * ((c * t) - (k * y1)))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (c <= -1.55e-86)
		tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2))));
	elseif (c <= 4.5e-296)
		tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))));
	elseif (c <= 9e+127)
		tmp = Float64(i * Float64(y1 * Float64(Float64(j * x) - Float64(k * z))));
	else
		tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (c <= -1.55e-86)
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	elseif (c <= 4.5e-296)
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	elseif (c <= 9e+127)
		tmp = i * (y1 * ((j * x) - (k * z)));
	else
		tmp = i * (z * ((c * t) - (k * y1)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[c, -1.55e-86], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.5e-296], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 9e+127], N[(i * N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.55 \cdot 10^{-86}:\\
\;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\

\mathbf{elif}\;c \leq 4.5 \cdot 10^{-296}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -1.54999999999999994e-86

    1. Initial program 31.9%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites44.5%

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

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

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

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

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

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
      5. lift-*.f6443.0

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
    8. Applied rewrites43.0%

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

    if -1.54999999999999994e-86 < c < 4.5000000000000002e-296

    1. Initial program 34.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites42.6%

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

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

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

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

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

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
      5. lower-*.f6447.1

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
    8. Applied rewrites47.1%

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

    if 4.5000000000000002e-296 < c < 9.00000000000000068e127

    1. Initial program 37.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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites39.4%

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

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

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

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

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

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot \color{blue}{z}\right)\right) \]
      5. lift-*.f6439.9

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - \color{blue}{k \cdot z}\right)\right) \]
    8. Applied rewrites39.9%

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

    if 9.00000000000000068e127 < c

    1. Initial program 20.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
    8. Applied rewrites54.8%

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

Alternative 14: 31.9% accurate, 4.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{if}\;y5 \leq -1.1 \cdot 10^{-75}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y5 \leq 1.22 \cdot 10^{-229}:\\ \;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\ \mathbf{elif}\;y5 \leq 1.2 \cdot 10^{+46}:\\ \;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* y3 (* y5 (- (* j y0) (* a y))))))
   (if (<= y5 -1.1e-75)
     t_1
     (if (<= y5 1.22e-229)
       (* k (* z (- (* b y0) (* i y1))))
       (if (<= y5 1.2e+46) (* i (* z (- (* c t) (* k y1)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y3 * (y5 * ((j * y0) - (a * y)));
	double tmp;
	if (y5 <= -1.1e-75) {
		tmp = t_1;
	} else if (y5 <= 1.22e-229) {
		tmp = k * (z * ((b * y0) - (i * y1)));
	} else if (y5 <= 1.2e+46) {
		tmp = i * (z * ((c * t) - (k * y1)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y3 * (y5 * ((j * y0) - (a * y)))
    if (y5 <= (-1.1d-75)) then
        tmp = t_1
    else if (y5 <= 1.22d-229) then
        tmp = k * (z * ((b * y0) - (i * y1)))
    else if (y5 <= 1.2d+46) then
        tmp = i * (z * ((c * t) - (k * y1)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y3 * (y5 * ((j * y0) - (a * y)));
	double tmp;
	if (y5 <= -1.1e-75) {
		tmp = t_1;
	} else if (y5 <= 1.22e-229) {
		tmp = k * (z * ((b * y0) - (i * y1)));
	} else if (y5 <= 1.2e+46) {
		tmp = i * (z * ((c * t) - (k * y1)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = y3 * (y5 * ((j * y0) - (a * y)))
	tmp = 0
	if y5 <= -1.1e-75:
		tmp = t_1
	elif y5 <= 1.22e-229:
		tmp = k * (z * ((b * y0) - (i * y1)))
	elif y5 <= 1.2e+46:
		tmp = i * (z * ((c * t) - (k * y1)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))))
	tmp = 0.0
	if (y5 <= -1.1e-75)
		tmp = t_1;
	elseif (y5 <= 1.22e-229)
		tmp = Float64(k * Float64(z * Float64(Float64(b * y0) - Float64(i * y1))));
	elseif (y5 <= 1.2e+46)
		tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = y3 * (y5 * ((j * y0) - (a * y)));
	tmp = 0.0;
	if (y5 <= -1.1e-75)
		tmp = t_1;
	elseif (y5 <= 1.22e-229)
		tmp = k * (z * ((b * y0) - (i * y1)));
	elseif (y5 <= 1.2e+46)
		tmp = i * (z * ((c * t) - (k * y1)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y5, -1.1e-75], t$95$1, If[LessEqual[y5, 1.22e-229], N[(k * N[(z * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 1.2e+46], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{if}\;y5 \leq -1.1 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y5 \leq 1.22 \cdot 10^{-229}:\\
\;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\

\mathbf{elif}\;y5 \leq 1.2 \cdot 10^{+46}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y5 < -1.10000000000000003e-75 or 1.20000000000000004e46 < y5

    1. Initial program 26.4%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites47.3%

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

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

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

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

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

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
      5. lower-*.f6446.9

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
    8. Applied rewrites46.9%

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

    if -1.10000000000000003e-75 < y5 < 1.21999999999999991e-229

    1. Initial program 42.7%

      \[\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. Add Preprocessing
    3. Taylor expanded in z around -inf

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

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

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

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

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

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

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

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

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

        \[\leadsto k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right) \]
      5. lift--.f6436.1

        \[\leadsto k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot \color{blue}{y1}\right)\right) \]
    8. Applied rewrites36.1%

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

    if 1.21999999999999991e-229 < y5 < 1.20000000000000004e46

    1. Initial program 34.6%

      \[\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. Add Preprocessing
    3. Taylor expanded in z around -inf

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

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

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

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

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

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

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

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

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

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

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
    8. Applied rewrites38.8%

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

Alternative 15: 30.9% accurate, 4.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{if}\;y5 \leq -3100000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y5 \leq -5.8 \cdot 10^{-177}:\\ \;\;\;\;y4 \cdot \left(-b \cdot \left(k \cdot y\right)\right)\\ \mathbf{elif}\;y5 \leq 1.75 \cdot 10^{+22}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* y3 (* y5 (- (* j y0) (* a y))))))
   (if (<= y5 -3100000000000.0)
     t_1
     (if (<= y5 -5.8e-177)
       (* y4 (- (* b (* k y))))
       (if (<= y5 1.75e+22) (* i (* y1 (- (* j x) (* k z)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y3 * (y5 * ((j * y0) - (a * y)));
	double tmp;
	if (y5 <= -3100000000000.0) {
		tmp = t_1;
	} else if (y5 <= -5.8e-177) {
		tmp = y4 * -(b * (k * y));
	} else if (y5 <= 1.75e+22) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y3 * (y5 * ((j * y0) - (a * y)))
    if (y5 <= (-3100000000000.0d0)) then
        tmp = t_1
    else if (y5 <= (-5.8d-177)) then
        tmp = y4 * -(b * (k * y))
    else if (y5 <= 1.75d+22) then
        tmp = i * (y1 * ((j * x) - (k * z)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y3 * (y5 * ((j * y0) - (a * y)));
	double tmp;
	if (y5 <= -3100000000000.0) {
		tmp = t_1;
	} else if (y5 <= -5.8e-177) {
		tmp = y4 * -(b * (k * y));
	} else if (y5 <= 1.75e+22) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = y3 * (y5 * ((j * y0) - (a * y)))
	tmp = 0
	if y5 <= -3100000000000.0:
		tmp = t_1
	elif y5 <= -5.8e-177:
		tmp = y4 * -(b * (k * y))
	elif y5 <= 1.75e+22:
		tmp = i * (y1 * ((j * x) - (k * z)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))))
	tmp = 0.0
	if (y5 <= -3100000000000.0)
		tmp = t_1;
	elseif (y5 <= -5.8e-177)
		tmp = Float64(y4 * Float64(-Float64(b * Float64(k * y))));
	elseif (y5 <= 1.75e+22)
		tmp = Float64(i * Float64(y1 * Float64(Float64(j * x) - Float64(k * z))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = y3 * (y5 * ((j * y0) - (a * y)));
	tmp = 0.0;
	if (y5 <= -3100000000000.0)
		tmp = t_1;
	elseif (y5 <= -5.8e-177)
		tmp = y4 * -(b * (k * y));
	elseif (y5 <= 1.75e+22)
		tmp = i * (y1 * ((j * x) - (k * z)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y5, -3100000000000.0], t$95$1, If[LessEqual[y5, -5.8e-177], N[(y4 * (-N[(b * N[(k * y), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], If[LessEqual[y5, 1.75e+22], N[(i * N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{if}\;y5 \leq -3100000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y5 \leq -5.8 \cdot 10^{-177}:\\
\;\;\;\;y4 \cdot \left(-b \cdot \left(k \cdot y\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y5 < -3.1e12 or 1.75e22 < y5

    1. Initial program 24.4%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites49.6%

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

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

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

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

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

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
      5. lower-*.f6447.4

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
    8. Applied rewrites47.4%

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

    if -3.1e12 < y5 < -5.79999999999999994e-177

    1. Initial program 40.9%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites41.4%

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

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

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

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

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

        \[\leadsto y4 \cdot \left(-1 \cdot \left(y \cdot \left(b \cdot k - c \cdot y3\right)\right)\right) \]
      5. lower-*.f6440.1

        \[\leadsto y4 \cdot \left(-1 \cdot \left(y \cdot \left(b \cdot k - c \cdot y3\right)\right)\right) \]
    8. Applied rewrites40.1%

      \[\leadsto y4 \cdot \left(-1 \cdot \color{blue}{\left(y \cdot \left(b \cdot k - c \cdot y3\right)\right)}\right) \]
    9. Taylor expanded in b around inf

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

        \[\leadsto y4 \cdot \left(-1 \cdot \left(b \cdot \left(k \cdot y\right)\right)\right) \]
      2. lower-*.f6440.0

        \[\leadsto y4 \cdot \left(-1 \cdot \left(b \cdot \left(k \cdot y\right)\right)\right) \]
    11. Applied rewrites40.0%

      \[\leadsto y4 \cdot \left(-1 \cdot \left(b \cdot \left(k \cdot \color{blue}{y}\right)\right)\right) \]

    if -5.79999999999999994e-177 < y5 < 1.75e22

    1. Initial program 39.0%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites41.7%

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

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

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

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

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

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot \color{blue}{z}\right)\right) \]
      5. lift-*.f6434.8

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y5 \leq -3100000000000:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{elif}\;y5 \leq -5.8 \cdot 10^{-177}:\\ \;\;\;\;y4 \cdot \left(-b \cdot \left(k \cdot y\right)\right)\\ \mathbf{elif}\;y5 \leq 1.75 \cdot 10^{+22}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 30.0% accurate, 4.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\ \mathbf{if}\;y3 \leq -1.1 \cdot 10^{+264}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y3 \leq 3.2 \cdot 10^{+48}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{elif}\;y3 \leq 4.8 \cdot 10^{+254}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;y4 \cdot \left(c \cdot \left(y \cdot y3\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 (* a (* y3 (- (* y1 z) (* y y5))))))
   (if (<= y3 -1.1e+264)
     t_1
     (if (<= y3 3.2e+48)
       (* i (* y1 (- (* j x) (* k z))))
       (if (<= y3 4.8e+254) t_1 (* y4 (* c (* y y3))))))))
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 * ((y1 * z) - (y * y5)));
	double tmp;
	if (y3 <= -1.1e+264) {
		tmp = t_1;
	} else if (y3 <= 3.2e+48) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else if (y3 <= 4.8e+254) {
		tmp = t_1;
	} else {
		tmp = y4 * (c * (y * y3));
	}
	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 * ((y1 * z) - (y * y5)))
    if (y3 <= (-1.1d+264)) then
        tmp = t_1
    else if (y3 <= 3.2d+48) then
        tmp = i * (y1 * ((j * x) - (k * z)))
    else if (y3 <= 4.8d+254) then
        tmp = t_1
    else
        tmp = y4 * (c * (y * y3))
    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 * ((y1 * z) - (y * y5)));
	double tmp;
	if (y3 <= -1.1e+264) {
		tmp = t_1;
	} else if (y3 <= 3.2e+48) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else if (y3 <= 4.8e+254) {
		tmp = t_1;
	} else {
		tmp = y4 * (c * (y * y3));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = a * (y3 * ((y1 * z) - (y * y5)))
	tmp = 0
	if y3 <= -1.1e+264:
		tmp = t_1
	elif y3 <= 3.2e+48:
		tmp = i * (y1 * ((j * x) - (k * z)))
	elif y3 <= 4.8e+254:
		tmp = t_1
	else:
		tmp = y4 * (c * (y * y3))
	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(Float64(y1 * z) - Float64(y * y5))))
	tmp = 0.0
	if (y3 <= -1.1e+264)
		tmp = t_1;
	elseif (y3 <= 3.2e+48)
		tmp = Float64(i * Float64(y1 * Float64(Float64(j * x) - Float64(k * z))));
	elseif (y3 <= 4.8e+254)
		tmp = t_1;
	else
		tmp = Float64(y4 * Float64(c * Float64(y * y3)));
	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 * ((y1 * z) - (y * y5)));
	tmp = 0.0;
	if (y3 <= -1.1e+264)
		tmp = t_1;
	elseif (y3 <= 3.2e+48)
		tmp = i * (y1 * ((j * x) - (k * z)));
	elseif (y3 <= 4.8e+254)
		tmp = t_1;
	else
		tmp = y4 * (c * (y * y3));
	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[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y3, -1.1e+264], t$95$1, If[LessEqual[y3, 3.2e+48], N[(i * N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 4.8e+254], t$95$1, N[(y4 * N[(c * N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y3 \leq 4.8 \cdot 10^{+254}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;y4 \cdot \left(c \cdot \left(y \cdot y3\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y3 < -1.1e264 or 3.2000000000000001e48 < y3 < 4.7999999999999997e254

    1. Initial program 22.8%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites46.0%

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

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. 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-*.f6456.9

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

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

    if -1.1e264 < y3 < 3.2000000000000001e48

    1. Initial program 34.9%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites44.4%

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

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

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

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

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

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot \color{blue}{z}\right)\right) \]
      5. lift-*.f6432.0

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

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

    if 4.7999999999999997e254 < y3

    1. Initial program 44.2%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites55.9%

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

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

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

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

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

        \[\leadsto y4 \cdot \left(-1 \cdot \left(y \cdot \left(b \cdot k - c \cdot y3\right)\right)\right) \]
      5. lower-*.f6467.7

        \[\leadsto y4 \cdot \left(-1 \cdot \left(y \cdot \left(b \cdot k - c \cdot y3\right)\right)\right) \]
    8. Applied rewrites67.7%

      \[\leadsto y4 \cdot \left(-1 \cdot \color{blue}{\left(y \cdot \left(b \cdot k - c \cdot y3\right)\right)}\right) \]
    9. Taylor expanded in b around 0

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

        \[\leadsto y4 \cdot \left(c \cdot \left(y \cdot y3\right)\right) \]
      2. lower-*.f6488.9

        \[\leadsto y4 \cdot \left(c \cdot \left(y \cdot y3\right)\right) \]
    11. Applied rewrites88.9%

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

Alternative 17: 26.5% accurate, 4.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(\left(-y\right) \cdot \left(y3 \cdot y5\right)\right)\\ \mathbf{if}\;y5 \leq -4.7 \cdot 10^{+14}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y5 \leq -5.8 \cdot 10^{-177}:\\ \;\;\;\;y4 \cdot \left(-b \cdot \left(k \cdot y\right)\right)\\ \mathbf{elif}\;y5 \leq 5.7 \cdot 10^{+165}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* a (* (- y) (* y3 y5)))))
   (if (<= y5 -4.7e+14)
     t_1
     (if (<= y5 -5.8e-177)
       (* y4 (- (* b (* k y))))
       (if (<= y5 5.7e+165) (* i (* y1 (- (* j x) (* k z)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = a * (-y * (y3 * y5));
	double tmp;
	if (y5 <= -4.7e+14) {
		tmp = t_1;
	} else if (y5 <= -5.8e-177) {
		tmp = y4 * -(b * (k * y));
	} else if (y5 <= 5.7e+165) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = a * (-y * (y3 * y5))
    if (y5 <= (-4.7d+14)) then
        tmp = t_1
    else if (y5 <= (-5.8d-177)) then
        tmp = y4 * -(b * (k * y))
    else if (y5 <= 5.7d+165) then
        tmp = i * (y1 * ((j * x) - (k * z)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = a * (-y * (y3 * y5));
	double tmp;
	if (y5 <= -4.7e+14) {
		tmp = t_1;
	} else if (y5 <= -5.8e-177) {
		tmp = y4 * -(b * (k * y));
	} else if (y5 <= 5.7e+165) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = a * (-y * (y3 * y5))
	tmp = 0
	if y5 <= -4.7e+14:
		tmp = t_1
	elif y5 <= -5.8e-177:
		tmp = y4 * -(b * (k * y))
	elif y5 <= 5.7e+165:
		tmp = i * (y1 * ((j * x) - (k * z)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(a * Float64(Float64(-y) * Float64(y3 * y5)))
	tmp = 0.0
	if (y5 <= -4.7e+14)
		tmp = t_1;
	elseif (y5 <= -5.8e-177)
		tmp = Float64(y4 * Float64(-Float64(b * Float64(k * y))));
	elseif (y5 <= 5.7e+165)
		tmp = Float64(i * Float64(y1 * Float64(Float64(j * x) - Float64(k * z))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = a * (-y * (y3 * y5));
	tmp = 0.0;
	if (y5 <= -4.7e+14)
		tmp = t_1;
	elseif (y5 <= -5.8e-177)
		tmp = y4 * -(b * (k * y));
	elseif (y5 <= 5.7e+165)
		tmp = i * (y1 * ((j * x) - (k * z)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(a * N[((-y) * N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y5, -4.7e+14], t$95$1, If[LessEqual[y5, -5.8e-177], N[(y4 * (-N[(b * N[(k * y), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], If[LessEqual[y5, 5.7e+165], N[(i * N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

\mathbf{elif}\;y5 \leq -5.8 \cdot 10^{-177}:\\
\;\;\;\;y4 \cdot \left(-b \cdot \left(k \cdot y\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y5 < -4.7e14 or 5.70000000000000027e165 < y5

    1. Initial program 24.8%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites49.1%

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

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. 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-*.f6436.9

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

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

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

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

        \[\leadsto a \cdot \left(-1 \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right) \]
      3. lower-*.f6440.6

        \[\leadsto a \cdot \left(-1 \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right) \]
    11. Applied rewrites40.6%

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

    if -4.7e14 < y5 < -5.79999999999999994e-177

    1. Initial program 40.9%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites41.4%

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

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

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

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

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

        \[\leadsto y4 \cdot \left(-1 \cdot \left(y \cdot \left(b \cdot k - c \cdot y3\right)\right)\right) \]
      5. lower-*.f6440.1

        \[\leadsto y4 \cdot \left(-1 \cdot \left(y \cdot \left(b \cdot k - c \cdot y3\right)\right)\right) \]
    8. Applied rewrites40.1%

      \[\leadsto y4 \cdot \left(-1 \cdot \color{blue}{\left(y \cdot \left(b \cdot k - c \cdot y3\right)\right)}\right) \]
    9. Taylor expanded in b around inf

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

        \[\leadsto y4 \cdot \left(-1 \cdot \left(b \cdot \left(k \cdot y\right)\right)\right) \]
      2. lower-*.f6440.0

        \[\leadsto y4 \cdot \left(-1 \cdot \left(b \cdot \left(k \cdot y\right)\right)\right) \]
    11. Applied rewrites40.0%

      \[\leadsto y4 \cdot \left(-1 \cdot \left(b \cdot \left(k \cdot \color{blue}{y}\right)\right)\right) \]

    if -5.79999999999999994e-177 < y5 < 5.70000000000000027e165

    1. Initial program 34.9%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites41.7%

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

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

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

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

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

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot \color{blue}{z}\right)\right) \]
      5. lift-*.f6435.2

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - \color{blue}{k \cdot z}\right)\right) \]
    8. Applied rewrites35.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y5 \leq -4.7 \cdot 10^{+14}:\\ \;\;\;\;a \cdot \left(\left(-y\right) \cdot \left(y3 \cdot y5\right)\right)\\ \mathbf{elif}\;y5 \leq -5.8 \cdot 10^{-177}:\\ \;\;\;\;y4 \cdot \left(-b \cdot \left(k \cdot y\right)\right)\\ \mathbf{elif}\;y5 \leq 5.7 \cdot 10^{+165}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(\left(-y\right) \cdot \left(y3 \cdot y5\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 32.4% accurate, 5.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y5 \leq -1.75 \cdot 10^{-14} \lor \neg \left(y5 \leq 1.2 \cdot 10^{+46}\right):\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (or (<= y5 -1.75e-14) (not (<= y5 1.2e+46)))
   (* y3 (* y5 (- (* j y0) (* a y))))
   (* i (* z (- (* c t) (* k y1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if ((y5 <= -1.75e-14) || !(y5 <= 1.2e+46)) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else {
		tmp = i * (z * ((c * t) - (k * y1)));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if ((y5 <= (-1.75d-14)) .or. (.not. (y5 <= 1.2d+46))) then
        tmp = y3 * (y5 * ((j * y0) - (a * y)))
    else
        tmp = i * (z * ((c * t) - (k * y1)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if ((y5 <= -1.75e-14) || !(y5 <= 1.2e+46)) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else {
		tmp = i * (z * ((c * t) - (k * y1)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if (y5 <= -1.75e-14) or not (y5 <= 1.2e+46):
		tmp = y3 * (y5 * ((j * y0) - (a * y)))
	else:
		tmp = i * (z * ((c * t) - (k * y1)))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if ((y5 <= -1.75e-14) || !(y5 <= 1.2e+46))
		tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))));
	else
		tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if ((y5 <= -1.75e-14) || ~((y5 <= 1.2e+46)))
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	else
		tmp = i * (z * ((c * t) - (k * y1)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[Or[LessEqual[y5, -1.75e-14], N[Not[LessEqual[y5, 1.2e+46]], $MachinePrecision]], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -1.75 \cdot 10^{-14} \lor \neg \left(y5 \leq 1.2 \cdot 10^{+46}\right):\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y5 < -1.7500000000000001e-14 or 1.20000000000000004e46 < y5

    1. Initial program 25.7%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites47.0%

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

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

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

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

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

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
      5. lower-*.f6448.3

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
    8. Applied rewrites48.3%

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

    if -1.7500000000000001e-14 < y5 < 1.20000000000000004e46

    1. Initial program 38.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. Add Preprocessing
    3. Taylor expanded in z around -inf

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

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

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

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

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

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

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

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

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

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

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
    8. Applied rewrites33.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y5 \leq -1.75 \cdot 10^{-14} \lor \neg \left(y5 \leq 1.2 \cdot 10^{+46}\right):\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 21.3% accurate, 5.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y1 \leq -5.5 \cdot 10^{+155}:\\ \;\;\;\;y4 \cdot \left(k \cdot \left(y1 \cdot y2\right)\right)\\ \mathbf{elif}\;y1 \leq -1 \cdot 10^{-85} \lor \neg \left(y1 \leq 2.1 \cdot 10^{+56}\right):\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(y0 \cdot \left(y3 \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 (<= y1 -5.5e+155)
   (* y4 (* k (* y1 y2)))
   (if (or (<= y1 -1e-85) (not (<= y1 2.1e+56)))
     (* a (* y3 (* y1 z)))
     (* j (* y0 (* y3 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 (y1 <= -5.5e+155) {
		tmp = y4 * (k * (y1 * y2));
	} else if ((y1 <= -1e-85) || !(y1 <= 2.1e+56)) {
		tmp = a * (y3 * (y1 * z));
	} else {
		tmp = j * (y0 * (y3 * 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 (y1 <= (-5.5d+155)) then
        tmp = y4 * (k * (y1 * y2))
    else if ((y1 <= (-1d-85)) .or. (.not. (y1 <= 2.1d+56))) then
        tmp = a * (y3 * (y1 * z))
    else
        tmp = j * (y0 * (y3 * 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 (y1 <= -5.5e+155) {
		tmp = y4 * (k * (y1 * y2));
	} else if ((y1 <= -1e-85) || !(y1 <= 2.1e+56)) {
		tmp = a * (y3 * (y1 * z));
	} else {
		tmp = j * (y0 * (y3 * y5));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y1 <= -5.5e+155:
		tmp = y4 * (k * (y1 * y2))
	elif (y1 <= -1e-85) or not (y1 <= 2.1e+56):
		tmp = a * (y3 * (y1 * z))
	else:
		tmp = j * (y0 * (y3 * 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 (y1 <= -5.5e+155)
		tmp = Float64(y4 * Float64(k * Float64(y1 * y2)));
	elseif ((y1 <= -1e-85) || !(y1 <= 2.1e+56))
		tmp = Float64(a * Float64(y3 * Float64(y1 * z)));
	else
		tmp = Float64(j * Float64(y0 * Float64(y3 * 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 (y1 <= -5.5e+155)
		tmp = y4 * (k * (y1 * y2));
	elseif ((y1 <= -1e-85) || ~((y1 <= 2.1e+56)))
		tmp = a * (y3 * (y1 * z));
	else
		tmp = j * (y0 * (y3 * 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[y1, -5.5e+155], N[(y4 * N[(k * N[(y1 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y1, -1e-85], N[Not[LessEqual[y1, 2.1e+56]], $MachinePrecision]], N[(a * N[(y3 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(y0 * N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;y1 \leq -1 \cdot 10^{-85} \lor \neg \left(y1 \leq 2.1 \cdot 10^{+56}\right):\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y1 < -5.5000000000000001e155

    1. Initial program 16.8%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites38.5%

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

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

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

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

        \[\leadsto y4 \cdot \left(y2 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
      4. lower-*.f6441.1

        \[\leadsto y4 \cdot \left(y2 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    8. Applied rewrites41.1%

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

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

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

        \[\leadsto y4 \cdot \left(k \cdot \left(y1 \cdot y2\right)\right) \]
    11. Applied rewrites55.3%

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

    if -5.5000000000000001e155 < y1 < -9.9999999999999998e-86 or 2.10000000000000017e56 < y1

    1. Initial program 33.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites44.9%

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

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. 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-*.f6437.1

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites37.1%

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

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6431.0

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    11. Applied rewrites31.0%

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]

    if -9.9999999999999998e-86 < y1 < 2.10000000000000017e56

    1. Initial program 36.8%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites43.4%

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

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

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

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

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

        \[\leadsto y0 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right) \]
      5. lower-*.f6429.9

        \[\leadsto y0 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right) \]
    8. Applied rewrites29.9%

      \[\leadsto y0 \cdot \color{blue}{\left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right)} \]
    9. Taylor expanded in z around 0

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

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot \color{blue}{y5}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right) \]
      3. lower-*.f6422.8

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right) \]
    11. Applied rewrites22.8%

      \[\leadsto j \cdot \left(y0 \cdot \color{blue}{\left(y3 \cdot y5\right)}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification30.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y1 \leq -5.5 \cdot 10^{+155}:\\ \;\;\;\;y4 \cdot \left(k \cdot \left(y1 \cdot y2\right)\right)\\ \mathbf{elif}\;y1 \leq -1 \cdot 10^{-85} \lor \neg \left(y1 \leq 2.1 \cdot 10^{+56}\right):\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 21.4% accurate, 5.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y1 \leq -2 \cdot 10^{+155}:\\ \;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4\right)\right)\\ \mathbf{elif}\;y1 \leq -1 \cdot 10^{-85} \lor \neg \left(y1 \leq 2.1 \cdot 10^{+56}\right):\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(y0 \cdot \left(y3 \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 (<= y1 -2e+155)
   (* k (* y2 (* y1 y4)))
   (if (or (<= y1 -1e-85) (not (<= y1 2.1e+56)))
     (* a (* y3 (* y1 z)))
     (* j (* y0 (* y3 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 (y1 <= -2e+155) {
		tmp = k * (y2 * (y1 * y4));
	} else if ((y1 <= -1e-85) || !(y1 <= 2.1e+56)) {
		tmp = a * (y3 * (y1 * z));
	} else {
		tmp = j * (y0 * (y3 * 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 (y1 <= (-2d+155)) then
        tmp = k * (y2 * (y1 * y4))
    else if ((y1 <= (-1d-85)) .or. (.not. (y1 <= 2.1d+56))) then
        tmp = a * (y3 * (y1 * z))
    else
        tmp = j * (y0 * (y3 * 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 (y1 <= -2e+155) {
		tmp = k * (y2 * (y1 * y4));
	} else if ((y1 <= -1e-85) || !(y1 <= 2.1e+56)) {
		tmp = a * (y3 * (y1 * z));
	} else {
		tmp = j * (y0 * (y3 * y5));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y1 <= -2e+155:
		tmp = k * (y2 * (y1 * y4))
	elif (y1 <= -1e-85) or not (y1 <= 2.1e+56):
		tmp = a * (y3 * (y1 * z))
	else:
		tmp = j * (y0 * (y3 * 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 (y1 <= -2e+155)
		tmp = Float64(k * Float64(y2 * Float64(y1 * y4)));
	elseif ((y1 <= -1e-85) || !(y1 <= 2.1e+56))
		tmp = Float64(a * Float64(y3 * Float64(y1 * z)));
	else
		tmp = Float64(j * Float64(y0 * Float64(y3 * 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 (y1 <= -2e+155)
		tmp = k * (y2 * (y1 * y4));
	elseif ((y1 <= -1e-85) || ~((y1 <= 2.1e+56)))
		tmp = a * (y3 * (y1 * z));
	else
		tmp = j * (y0 * (y3 * 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[y1, -2e+155], N[(k * N[(y2 * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y1, -1e-85], N[Not[LessEqual[y1, 2.1e+56]], $MachinePrecision]], N[(a * N[(y3 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(y0 * N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;y1 \leq -1 \cdot 10^{-85} \lor \neg \left(y1 \leq 2.1 \cdot 10^{+56}\right):\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y1 < -2.00000000000000001e155

    1. Initial program 16.4%

      \[\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. Add Preprocessing
    3. Taylor expanded in y2 around inf

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

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

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

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

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

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

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - \color{blue}{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-*.f64N/A

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) \]
      5. lift--.f6458.7

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

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

      \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6449.8

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4\right)\right) \]
    11. Applied rewrites49.8%

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

    if -2.00000000000000001e155 < y1 < -9.9999999999999998e-86 or 2.10000000000000017e56 < y1

    1. Initial program 34.0%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites45.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)} \]
    6. Taylor expanded in a around -inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. 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-*.f6437.6

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites37.6%

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

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6431.4

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    11. Applied rewrites31.4%

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]

    if -9.9999999999999998e-86 < y1 < 2.10000000000000017e56

    1. Initial program 36.8%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites43.4%

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

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

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

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

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

        \[\leadsto y0 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right) \]
      5. lower-*.f6429.9

        \[\leadsto y0 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right) \]
    8. Applied rewrites29.9%

      \[\leadsto y0 \cdot \color{blue}{\left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right)} \]
    9. Taylor expanded in z around 0

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

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot \color{blue}{y5}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right) \]
      3. lower-*.f6422.8

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right) \]
    11. Applied rewrites22.8%

      \[\leadsto j \cdot \left(y0 \cdot \color{blue}{\left(y3 \cdot y5\right)}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification29.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y1 \leq -2 \cdot 10^{+155}:\\ \;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4\right)\right)\\ \mathbf{elif}\;y1 \leq -1 \cdot 10^{-85} \lor \neg \left(y1 \leq 2.1 \cdot 10^{+56}\right):\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 21.0% accurate, 5.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y1 \leq -5.5 \cdot 10^{+155}:\\ \;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right)\\ \mathbf{elif}\;y1 \leq -1 \cdot 10^{-85} \lor \neg \left(y1 \leq 2.1 \cdot 10^{+56}\right):\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(y0 \cdot \left(y3 \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 (<= y1 -5.5e+155)
   (* k (* y1 (* y2 y4)))
   (if (or (<= y1 -1e-85) (not (<= y1 2.1e+56)))
     (* a (* y3 (* y1 z)))
     (* j (* y0 (* y3 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 (y1 <= -5.5e+155) {
		tmp = k * (y1 * (y2 * y4));
	} else if ((y1 <= -1e-85) || !(y1 <= 2.1e+56)) {
		tmp = a * (y3 * (y1 * z));
	} else {
		tmp = j * (y0 * (y3 * 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 (y1 <= (-5.5d+155)) then
        tmp = k * (y1 * (y2 * y4))
    else if ((y1 <= (-1d-85)) .or. (.not. (y1 <= 2.1d+56))) then
        tmp = a * (y3 * (y1 * z))
    else
        tmp = j * (y0 * (y3 * 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 (y1 <= -5.5e+155) {
		tmp = k * (y1 * (y2 * y4));
	} else if ((y1 <= -1e-85) || !(y1 <= 2.1e+56)) {
		tmp = a * (y3 * (y1 * z));
	} else {
		tmp = j * (y0 * (y3 * y5));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y1 <= -5.5e+155:
		tmp = k * (y1 * (y2 * y4))
	elif (y1 <= -1e-85) or not (y1 <= 2.1e+56):
		tmp = a * (y3 * (y1 * z))
	else:
		tmp = j * (y0 * (y3 * 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 (y1 <= -5.5e+155)
		tmp = Float64(k * Float64(y1 * Float64(y2 * y4)));
	elseif ((y1 <= -1e-85) || !(y1 <= 2.1e+56))
		tmp = Float64(a * Float64(y3 * Float64(y1 * z)));
	else
		tmp = Float64(j * Float64(y0 * Float64(y3 * 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 (y1 <= -5.5e+155)
		tmp = k * (y1 * (y2 * y4));
	elseif ((y1 <= -1e-85) || ~((y1 <= 2.1e+56)))
		tmp = a * (y3 * (y1 * z));
	else
		tmp = j * (y0 * (y3 * 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[y1, -5.5e+155], N[(k * N[(y1 * N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y1, -1e-85], N[Not[LessEqual[y1, 2.1e+56]], $MachinePrecision]], N[(a * N[(y3 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(y0 * N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;y1 \leq -1 \cdot 10^{-85} \lor \neg \left(y1 \leq 2.1 \cdot 10^{+56}\right):\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y1 < -5.5000000000000001e155

    1. Initial program 16.8%

      \[\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. Add Preprocessing
    3. Taylor expanded in y2 around inf

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

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

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

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

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

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

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - \color{blue}{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-*.f64N/A

        \[\leadsto k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) \]
      5. lift--.f6457.7

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

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

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

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

        \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right) \]
    11. Applied rewrites46.2%

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

    if -5.5000000000000001e155 < y1 < -9.9999999999999998e-86 or 2.10000000000000017e56 < y1

    1. Initial program 33.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites44.9%

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

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. 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-*.f6437.1

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites37.1%

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

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6431.0

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    11. Applied rewrites31.0%

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]

    if -9.9999999999999998e-86 < y1 < 2.10000000000000017e56

    1. Initial program 36.8%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites43.4%

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

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

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

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

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

        \[\leadsto y0 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right) \]
      5. lower-*.f6429.9

        \[\leadsto y0 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right) \]
    8. Applied rewrites29.9%

      \[\leadsto y0 \cdot \color{blue}{\left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right)} \]
    9. Taylor expanded in z around 0

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

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot \color{blue}{y5}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right) \]
      3. lower-*.f6422.8

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right) \]
    11. Applied rewrites22.8%

      \[\leadsto j \cdot \left(y0 \cdot \color{blue}{\left(y3 \cdot y5\right)}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification29.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y1 \leq -5.5 \cdot 10^{+155}:\\ \;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right)\\ \mathbf{elif}\;y1 \leq -1 \cdot 10^{-85} \lor \neg \left(y1 \leq 2.1 \cdot 10^{+56}\right):\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 21.8% accurate, 5.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y1 \leq -5.3 \cdot 10^{+155}:\\ \;\;\;\;y4 \cdot \left(k \cdot \left(y1 \cdot y2\right)\right)\\ \mathbf{elif}\;y1 \leq 6.5 \cdot 10^{-211}:\\ \;\;\;\;a \cdot \left(\left(-y\right) \cdot \left(y3 \cdot y5\right)\right)\\ \mathbf{elif}\;y1 \leq 3.8 \cdot 10^{+53}:\\ \;\;\;\;y0 \cdot \left(y3 \cdot \left(j \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(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
 (if (<= y1 -5.3e+155)
   (* y4 (* k (* y1 y2)))
   (if (<= y1 6.5e-211)
     (* a (* (- y) (* y3 y5)))
     (if (<= y1 3.8e+53) (* y0 (* y3 (* j y5))) (* 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) {
	double tmp;
	if (y1 <= -5.3e+155) {
		tmp = y4 * (k * (y1 * y2));
	} else if (y1 <= 6.5e-211) {
		tmp = a * (-y * (y3 * y5));
	} else if (y1 <= 3.8e+53) {
		tmp = y0 * (y3 * (j * y5));
	} else {
		tmp = a * (y3 * (y1 * z));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (y1 <= (-5.3d+155)) then
        tmp = y4 * (k * (y1 * y2))
    else if (y1 <= 6.5d-211) then
        tmp = a * (-y * (y3 * y5))
    else if (y1 <= 3.8d+53) then
        tmp = y0 * (y3 * (j * y5))
    else
        tmp = a * (y3 * (y1 * z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y1 <= -5.3e+155) {
		tmp = y4 * (k * (y1 * y2));
	} else if (y1 <= 6.5e-211) {
		tmp = a * (-y * (y3 * y5));
	} else if (y1 <= 3.8e+53) {
		tmp = y0 * (y3 * (j * y5));
	} else {
		tmp = a * (y3 * (y1 * z));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y1 <= -5.3e+155:
		tmp = y4 * (k * (y1 * y2))
	elif y1 <= 6.5e-211:
		tmp = a * (-y * (y3 * y5))
	elif y1 <= 3.8e+53:
		tmp = y0 * (y3 * (j * y5))
	else:
		tmp = a * (y3 * (y1 * z))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (y1 <= -5.3e+155)
		tmp = Float64(y4 * Float64(k * Float64(y1 * y2)));
	elseif (y1 <= 6.5e-211)
		tmp = Float64(a * Float64(Float64(-y) * Float64(y3 * y5)));
	elseif (y1 <= 3.8e+53)
		tmp = Float64(y0 * Float64(y3 * Float64(j * y5)));
	else
		tmp = Float64(a * Float64(y3 * Float64(y1 * z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (y1 <= -5.3e+155)
		tmp = y4 * (k * (y1 * y2));
	elseif (y1 <= 6.5e-211)
		tmp = a * (-y * (y3 * y5));
	elseif (y1 <= 3.8e+53)
		tmp = y0 * (y3 * (j * y5));
	else
		tmp = a * (y3 * (y1 * z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y1, -5.3e+155], N[(y4 * N[(k * N[(y1 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 6.5e-211], N[(a * N[((-y) * N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 3.8e+53], N[(y0 * N[(y3 * N[(j * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(y3 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y1 \leq 3.8 \cdot 10^{+53}:\\
\;\;\;\;y0 \cdot \left(y3 \cdot \left(j \cdot y5\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y1 < -5.29999999999999965e155

    1. Initial program 16.8%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites38.5%

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

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

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

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

        \[\leadsto y4 \cdot \left(y2 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
      4. lower-*.f6441.1

        \[\leadsto y4 \cdot \left(y2 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    8. Applied rewrites41.1%

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

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

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

        \[\leadsto y4 \cdot \left(k \cdot \left(y1 \cdot y2\right)\right) \]
    11. Applied rewrites55.3%

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

    if -5.29999999999999965e155 < y1 < 6.4999999999999996e-211

    1. Initial program 36.0%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites42.9%

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

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. 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-*.f6428.4

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites28.4%

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

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

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

        \[\leadsto a \cdot \left(-1 \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right) \]
      3. lower-*.f6426.6

        \[\leadsto a \cdot \left(-1 \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right) \]
    11. Applied rewrites26.6%

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

    if 6.4999999999999996e-211 < y1 < 3.79999999999999997e53

    1. Initial program 34.2%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites44.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)} \]
    6. Taylor expanded in y0 around -inf

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

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

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

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

        \[\leadsto y0 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right) \]
      5. lower-*.f6431.7

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

      \[\leadsto y0 \cdot \color{blue}{\left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right)} \]
    9. Taylor expanded in z around 0

      \[\leadsto y0 \cdot \left(y3 \cdot \left(j \cdot y5\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6424.1

        \[\leadsto y0 \cdot \left(y3 \cdot \left(j \cdot y5\right)\right) \]
    11. Applied rewrites24.1%

      \[\leadsto y0 \cdot \left(y3 \cdot \left(j \cdot y5\right)\right) \]

    if 3.79999999999999997e53 < y1

    1. Initial program 37.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) \]
    2. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites46.3%

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

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. 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-*.f6435.2

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites35.2%

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

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6441.4

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    11. Applied rewrites41.4%

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification32.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y1 \leq -5.3 \cdot 10^{+155}:\\ \;\;\;\;y4 \cdot \left(k \cdot \left(y1 \cdot y2\right)\right)\\ \mathbf{elif}\;y1 \leq 6.5 \cdot 10^{-211}:\\ \;\;\;\;a \cdot \left(\left(-y\right) \cdot \left(y3 \cdot y5\right)\right)\\ \mathbf{elif}\;y1 \leq 3.8 \cdot 10^{+53}:\\ \;\;\;\;y0 \cdot \left(y3 \cdot \left(j \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 21.6% accurate, 7.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y5 \leq -1.9 \cdot 10^{+21} \lor \neg \left(y5 \leq 5 \cdot 10^{-81}\right):\\ \;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(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
 (if (or (<= y5 -1.9e+21) (not (<= y5 5e-81)))
   (* j (* y0 (* y3 y5)))
   (* 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) {
	double tmp;
	if ((y5 <= -1.9e+21) || !(y5 <= 5e-81)) {
		tmp = j * (y0 * (y3 * y5));
	} else {
		tmp = a * (y3 * (y1 * z));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if ((y5 <= (-1.9d+21)) .or. (.not. (y5 <= 5d-81))) then
        tmp = j * (y0 * (y3 * y5))
    else
        tmp = a * (y3 * (y1 * z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if ((y5 <= -1.9e+21) || !(y5 <= 5e-81)) {
		tmp = j * (y0 * (y3 * y5));
	} else {
		tmp = a * (y3 * (y1 * z));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if (y5 <= -1.9e+21) or not (y5 <= 5e-81):
		tmp = j * (y0 * (y3 * y5))
	else:
		tmp = a * (y3 * (y1 * z))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if ((y5 <= -1.9e+21) || !(y5 <= 5e-81))
		tmp = Float64(j * Float64(y0 * Float64(y3 * y5)));
	else
		tmp = Float64(a * Float64(y3 * Float64(y1 * z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if ((y5 <= -1.9e+21) || ~((y5 <= 5e-81)))
		tmp = j * (y0 * (y3 * y5));
	else
		tmp = a * (y3 * (y1 * z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[Or[LessEqual[y5, -1.9e+21], N[Not[LessEqual[y5, 5e-81]], $MachinePrecision]], N[(j * N[(y0 * N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(y3 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -1.9 \cdot 10^{+21} \lor \neg \left(y5 \leq 5 \cdot 10^{-81}\right):\\
\;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y5 < -1.9e21 or 4.99999999999999981e-81 < y5

    1. Initial program 29.8%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites46.7%

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

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

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

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

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

        \[\leadsto y0 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right) \]
      5. lower-*.f6433.2

        \[\leadsto y0 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right) \]
    8. Applied rewrites33.2%

      \[\leadsto y0 \cdot \color{blue}{\left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right)} \]
    9. Taylor expanded in z around 0

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

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot \color{blue}{y5}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right) \]
      3. lower-*.f6429.4

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right) \]
    11. Applied rewrites29.4%

      \[\leadsto j \cdot \left(y0 \cdot \color{blue}{\left(y3 \cdot y5\right)}\right) \]

    if -1.9e21 < y5 < 4.99999999999999981e-81

    1. Initial program 35.8%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites38.0%

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

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. 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-*.f6424.2

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites24.2%

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

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6419.4

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    11. Applied rewrites19.4%

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification24.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y5 \leq -1.9 \cdot 10^{+21} \lor \neg \left(y5 \leq 5 \cdot 10^{-81}\right):\\ \;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 21.3% accurate, 7.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y5 \leq -1.9 \cdot 10^{+21} \lor \neg \left(y5 \leq 5 \cdot 10^{-81}\right):\\ \;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(y1 \cdot \left(y3 \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 (or (<= y5 -1.9e+21) (not (<= y5 5e-81)))
   (* j (* y0 (* y3 y5)))
   (* 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) {
	double tmp;
	if ((y5 <= -1.9e+21) || !(y5 <= 5e-81)) {
		tmp = j * (y0 * (y3 * y5));
	} else {
		tmp = a * (y1 * (y3 * 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 ((y5 <= (-1.9d+21)) .or. (.not. (y5 <= 5d-81))) then
        tmp = j * (y0 * (y3 * y5))
    else
        tmp = a * (y1 * (y3 * 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 ((y5 <= -1.9e+21) || !(y5 <= 5e-81)) {
		tmp = j * (y0 * (y3 * y5));
	} else {
		tmp = a * (y1 * (y3 * z));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if (y5 <= -1.9e+21) or not (y5 <= 5e-81):
		tmp = j * (y0 * (y3 * y5))
	else:
		tmp = a * (y1 * (y3 * 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 ((y5 <= -1.9e+21) || !(y5 <= 5e-81))
		tmp = Float64(j * Float64(y0 * Float64(y3 * y5)));
	else
		tmp = Float64(a * Float64(y1 * Float64(y3 * 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 ((y5 <= -1.9e+21) || ~((y5 <= 5e-81)))
		tmp = j * (y0 * (y3 * y5));
	else
		tmp = a * (y1 * (y3 * z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[Or[LessEqual[y5, -1.9e+21], N[Not[LessEqual[y5, 5e-81]], $MachinePrecision]], N[(j * N[(y0 * N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(y1 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -1.9 \cdot 10^{+21} \lor \neg \left(y5 \leq 5 \cdot 10^{-81}\right):\\
\;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y5 < -1.9e21 or 4.99999999999999981e-81 < y5

    1. Initial program 29.8%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites46.7%

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

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

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

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

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

        \[\leadsto y0 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right) \]
      5. lower-*.f6433.2

        \[\leadsto y0 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right) \]
    8. Applied rewrites33.2%

      \[\leadsto y0 \cdot \color{blue}{\left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right)} \]
    9. Taylor expanded in z around 0

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

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot \color{blue}{y5}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right) \]
      3. lower-*.f6429.4

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right) \]
    11. Applied rewrites29.4%

      \[\leadsto j \cdot \left(y0 \cdot \color{blue}{\left(y3 \cdot y5\right)}\right) \]

    if -1.9e21 < y5 < 4.99999999999999981e-81

    1. Initial program 35.8%

      \[\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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites38.0%

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

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. 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-*.f6424.2

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites24.2%

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

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

        \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
      2. lower-*.f6416.1

        \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
    11. Applied rewrites16.1%

      \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification23.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y5 \leq -1.9 \cdot 10^{+21} \lor \neg \left(y5 \leq 5 \cdot 10^{-81}\right):\\ \;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 16.3% accurate, 12.6× speedup?

\[\begin{array}{l} \\ j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right) \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (* j (* y0 (* y3 y5))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return j * (y0 * (y3 * y5));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    code = j * (y0 * (y3 * y5))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return j * (y0 * (y3 * y5));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	return j * (y0 * (y3 * y5))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	return Float64(j * Float64(y0 * Float64(y3 * y5)))
end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = j * (y0 * (y3 * y5));
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(j * N[(y0 * N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right)
\end{array}
Derivation
  1. Initial program 32.6%

    \[\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. Add Preprocessing
  3. 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)} \]
  4. 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) \]
  5. Applied rewrites42.7%

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

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

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

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

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

      \[\leadsto y0 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right) \]
    5. lower-*.f6425.2

      \[\leadsto y0 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right) \]
  8. Applied rewrites25.2%

    \[\leadsto y0 \cdot \color{blue}{\left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right)} \]
  9. Taylor expanded in z around 0

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

      \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot \color{blue}{y5}\right)\right) \]
    2. lower-*.f64N/A

      \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right) \]
    3. lower-*.f6418.5

      \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot y5\right)\right) \]
  11. Applied rewrites18.5%

    \[\leadsto j \cdot \left(y0 \cdot \color{blue}{\left(y3 \cdot y5\right)}\right) \]
  12. Add Preprocessing

Developer Target 1: 28.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y4 \cdot c - y5 \cdot a\\ t_2 := x \cdot y2 - z \cdot y3\\ t_3 := y2 \cdot t - y3 \cdot y\\ t_4 := k \cdot y2 - j \cdot y3\\ t_5 := y4 \cdot b - y5 \cdot i\\ t_6 := \left(j \cdot t - k \cdot y\right) \cdot t\_5\\ t_7 := b \cdot a - i \cdot c\\ t_8 := t\_7 \cdot \left(y \cdot x - t \cdot z\right)\\ t_9 := j \cdot x - k \cdot z\\ t_10 := \left(b \cdot y0 - i \cdot y1\right) \cdot t\_9\\ t_11 := t\_9 \cdot \left(y0 \cdot b - i \cdot y1\right)\\ t_12 := y4 \cdot y1 - y5 \cdot y0\\ t_13 := t\_4 \cdot t\_12\\ t_14 := \left(y2 \cdot k - y3 \cdot j\right) \cdot t\_12\\ t_15 := \left(\left(\left(\left(k \cdot y\right) \cdot \left(y5 \cdot i\right) - \left(y \cdot b\right) \cdot \left(y4 \cdot k\right)\right) - \left(y5 \cdot t\right) \cdot \left(i \cdot j\right)\right) - \left(t\_3 \cdot t\_1 - t\_14\right)\right) + \left(t\_8 - \left(t\_11 - \left(y2 \cdot x - y3 \cdot z\right) \cdot \left(c \cdot y0 - y1 \cdot a\right)\right)\right)\\ t_16 := \left(\left(t\_6 - \left(y3 \cdot y\right) \cdot \left(y5 \cdot a - y4 \cdot c\right)\right) + \left(\left(y5 \cdot a\right) \cdot \left(t \cdot y2\right) + t\_13\right)\right) + \left(t\_2 \cdot \left(c \cdot y0 - a \cdot y1\right) - \left(t\_10 - \left(y \cdot x - z \cdot t\right) \cdot t\_7\right)\right)\\ t_17 := t \cdot y2 - y \cdot y3\\ \mathbf{if}\;y4 < -7.206256231996481 \cdot 10^{+60}:\\ \;\;\;\;\left(t\_8 - \left(t\_11 - t\_6\right)\right) - \left(\frac{t\_3}{\frac{1}{t\_1}} - t\_14\right)\\ \mathbf{elif}\;y4 < -3.364603505246317 \cdot 10^{-66}:\\ \;\;\;\;\left(\left(\left(\left(t \cdot c\right) \cdot \left(i \cdot z\right) - \left(a \cdot t\right) \cdot \left(b \cdot z\right)\right) - \left(y \cdot c\right) \cdot \left(i \cdot x\right)\right) - t\_10\right) + \left(\left(y0 \cdot c - a \cdot y1\right) \cdot t\_2 - \left(t\_17 \cdot \left(y4 \cdot c - a \cdot y5\right) - \left(y1 \cdot y4 - y5 \cdot y0\right) \cdot t\_4\right)\right)\\ \mathbf{elif}\;y4 < -1.2000065055686116 \cdot 10^{-105}:\\ \;\;\;\;t\_16\\ \mathbf{elif}\;y4 < 6.718963124057495 \cdot 10^{-279}:\\ \;\;\;\;t\_15\\ \mathbf{elif}\;y4 < 4.77962681403792 \cdot 10^{-222}:\\ \;\;\;\;t\_16\\ \mathbf{elif}\;y4 < 2.2852241541266835 \cdot 10^{-175}:\\ \;\;\;\;t\_15\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(k \cdot \left(i \cdot \left(z \cdot y1\right)\right) - \left(j \cdot \left(i \cdot \left(x \cdot y1\right)\right) + y0 \cdot \left(k \cdot \left(z \cdot b\right)\right)\right)\right)\right) + \left(z \cdot \left(y3 \cdot \left(a \cdot y1\right)\right) - \left(y2 \cdot \left(x \cdot \left(a \cdot y1\right)\right) + y0 \cdot \left(z \cdot \left(c \cdot y3\right)\right)\right)\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot t\_5\right) - t\_17 \cdot t\_1\right) + t\_13\\ \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 (- (* y4 c) (* y5 a)))
        (t_2 (- (* x y2) (* z y3)))
        (t_3 (- (* y2 t) (* y3 y)))
        (t_4 (- (* k y2) (* j y3)))
        (t_5 (- (* y4 b) (* y5 i)))
        (t_6 (* (- (* j t) (* k y)) t_5))
        (t_7 (- (* b a) (* i c)))
        (t_8 (* t_7 (- (* y x) (* t z))))
        (t_9 (- (* j x) (* k z)))
        (t_10 (* (- (* b y0) (* i y1)) t_9))
        (t_11 (* t_9 (- (* y0 b) (* i y1))))
        (t_12 (- (* y4 y1) (* y5 y0)))
        (t_13 (* t_4 t_12))
        (t_14 (* (- (* y2 k) (* y3 j)) t_12))
        (t_15
         (+
          (-
           (-
            (- (* (* k y) (* y5 i)) (* (* y b) (* y4 k)))
            (* (* y5 t) (* i j)))
           (- (* t_3 t_1) t_14))
          (- t_8 (- t_11 (* (- (* y2 x) (* y3 z)) (- (* c y0) (* y1 a)))))))
        (t_16
         (+
          (+
           (- t_6 (* (* y3 y) (- (* y5 a) (* y4 c))))
           (+ (* (* y5 a) (* t y2)) t_13))
          (-
           (* t_2 (- (* c y0) (* a y1)))
           (- t_10 (* (- (* y x) (* z t)) t_7)))))
        (t_17 (- (* t y2) (* y y3))))
   (if (< y4 -7.206256231996481e+60)
     (- (- t_8 (- t_11 t_6)) (- (/ t_3 (/ 1.0 t_1)) t_14))
     (if (< y4 -3.364603505246317e-66)
       (+
        (-
         (- (- (* (* t c) (* i z)) (* (* a t) (* b z))) (* (* y c) (* i x)))
         t_10)
        (-
         (* (- (* y0 c) (* a y1)) t_2)
         (- (* t_17 (- (* y4 c) (* a y5))) (* (- (* y1 y4) (* y5 y0)) t_4))))
       (if (< y4 -1.2000065055686116e-105)
         t_16
         (if (< y4 6.718963124057495e-279)
           t_15
           (if (< y4 4.77962681403792e-222)
             t_16
             (if (< y4 2.2852241541266835e-175)
               t_15
               (+
                (-
                 (+
                  (+
                   (-
                    (* (- (* x y) (* z t)) (- (* a b) (* c i)))
                    (-
                     (* k (* i (* z y1)))
                     (+ (* j (* i (* x y1))) (* y0 (* k (* z b))))))
                   (-
                    (* z (* y3 (* a y1)))
                    (+ (* y2 (* x (* a y1))) (* y0 (* z (* c y3))))))
                  (* (- (* t j) (* y k)) t_5))
                 (* t_17 t_1))
                t_13)))))))))
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 = (y4 * c) - (y5 * a);
	double t_2 = (x * y2) - (z * y3);
	double t_3 = (y2 * t) - (y3 * y);
	double t_4 = (k * y2) - (j * y3);
	double t_5 = (y4 * b) - (y5 * i);
	double t_6 = ((j * t) - (k * y)) * t_5;
	double t_7 = (b * a) - (i * c);
	double t_8 = t_7 * ((y * x) - (t * z));
	double t_9 = (j * x) - (k * z);
	double t_10 = ((b * y0) - (i * y1)) * t_9;
	double t_11 = t_9 * ((y0 * b) - (i * y1));
	double t_12 = (y4 * y1) - (y5 * y0);
	double t_13 = t_4 * t_12;
	double t_14 = ((y2 * k) - (y3 * j)) * t_12;
	double t_15 = (((((k * y) * (y5 * i)) - ((y * b) * (y4 * k))) - ((y5 * t) * (i * j))) - ((t_3 * t_1) - t_14)) + (t_8 - (t_11 - (((y2 * x) - (y3 * z)) * ((c * y0) - (y1 * a)))));
	double t_16 = ((t_6 - ((y3 * y) * ((y5 * a) - (y4 * c)))) + (((y5 * a) * (t * y2)) + t_13)) + ((t_2 * ((c * y0) - (a * y1))) - (t_10 - (((y * x) - (z * t)) * t_7)));
	double t_17 = (t * y2) - (y * y3);
	double tmp;
	if (y4 < -7.206256231996481e+60) {
		tmp = (t_8 - (t_11 - t_6)) - ((t_3 / (1.0 / t_1)) - t_14);
	} else if (y4 < -3.364603505246317e-66) {
		tmp = (((((t * c) * (i * z)) - ((a * t) * (b * z))) - ((y * c) * (i * x))) - t_10) + ((((y0 * c) - (a * y1)) * t_2) - ((t_17 * ((y4 * c) - (a * y5))) - (((y1 * y4) - (y5 * y0)) * t_4)));
	} else if (y4 < -1.2000065055686116e-105) {
		tmp = t_16;
	} else if (y4 < 6.718963124057495e-279) {
		tmp = t_15;
	} else if (y4 < 4.77962681403792e-222) {
		tmp = t_16;
	} else if (y4 < 2.2852241541266835e-175) {
		tmp = t_15;
	} else {
		tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - ((k * (i * (z * y1))) - ((j * (i * (x * y1))) + (y0 * (k * (z * b)))))) + ((z * (y3 * (a * y1))) - ((y2 * (x * (a * y1))) + (y0 * (z * (c * y3)))))) + (((t * j) - (y * k)) * t_5)) - (t_17 * t_1)) + t_13;
	}
	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_10
    real(8) :: t_11
    real(8) :: t_12
    real(8) :: t_13
    real(8) :: t_14
    real(8) :: t_15
    real(8) :: t_16
    real(8) :: t_17
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: t_5
    real(8) :: t_6
    real(8) :: t_7
    real(8) :: t_8
    real(8) :: t_9
    real(8) :: tmp
    t_1 = (y4 * c) - (y5 * a)
    t_2 = (x * y2) - (z * y3)
    t_3 = (y2 * t) - (y3 * y)
    t_4 = (k * y2) - (j * y3)
    t_5 = (y4 * b) - (y5 * i)
    t_6 = ((j * t) - (k * y)) * t_5
    t_7 = (b * a) - (i * c)
    t_8 = t_7 * ((y * x) - (t * z))
    t_9 = (j * x) - (k * z)
    t_10 = ((b * y0) - (i * y1)) * t_9
    t_11 = t_9 * ((y0 * b) - (i * y1))
    t_12 = (y4 * y1) - (y5 * y0)
    t_13 = t_4 * t_12
    t_14 = ((y2 * k) - (y3 * j)) * t_12
    t_15 = (((((k * y) * (y5 * i)) - ((y * b) * (y4 * k))) - ((y5 * t) * (i * j))) - ((t_3 * t_1) - t_14)) + (t_8 - (t_11 - (((y2 * x) - (y3 * z)) * ((c * y0) - (y1 * a)))))
    t_16 = ((t_6 - ((y3 * y) * ((y5 * a) - (y4 * c)))) + (((y5 * a) * (t * y2)) + t_13)) + ((t_2 * ((c * y0) - (a * y1))) - (t_10 - (((y * x) - (z * t)) * t_7)))
    t_17 = (t * y2) - (y * y3)
    if (y4 < (-7.206256231996481d+60)) then
        tmp = (t_8 - (t_11 - t_6)) - ((t_3 / (1.0d0 / t_1)) - t_14)
    else if (y4 < (-3.364603505246317d-66)) then
        tmp = (((((t * c) * (i * z)) - ((a * t) * (b * z))) - ((y * c) * (i * x))) - t_10) + ((((y0 * c) - (a * y1)) * t_2) - ((t_17 * ((y4 * c) - (a * y5))) - (((y1 * y4) - (y5 * y0)) * t_4)))
    else if (y4 < (-1.2000065055686116d-105)) then
        tmp = t_16
    else if (y4 < 6.718963124057495d-279) then
        tmp = t_15
    else if (y4 < 4.77962681403792d-222) then
        tmp = t_16
    else if (y4 < 2.2852241541266835d-175) then
        tmp = t_15
    else
        tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - ((k * (i * (z * y1))) - ((j * (i * (x * y1))) + (y0 * (k * (z * b)))))) + ((z * (y3 * (a * y1))) - ((y2 * (x * (a * y1))) + (y0 * (z * (c * y3)))))) + (((t * j) - (y * k)) * t_5)) - (t_17 * t_1)) + t_13
    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 = (y4 * c) - (y5 * a);
	double t_2 = (x * y2) - (z * y3);
	double t_3 = (y2 * t) - (y3 * y);
	double t_4 = (k * y2) - (j * y3);
	double t_5 = (y4 * b) - (y5 * i);
	double t_6 = ((j * t) - (k * y)) * t_5;
	double t_7 = (b * a) - (i * c);
	double t_8 = t_7 * ((y * x) - (t * z));
	double t_9 = (j * x) - (k * z);
	double t_10 = ((b * y0) - (i * y1)) * t_9;
	double t_11 = t_9 * ((y0 * b) - (i * y1));
	double t_12 = (y4 * y1) - (y5 * y0);
	double t_13 = t_4 * t_12;
	double t_14 = ((y2 * k) - (y3 * j)) * t_12;
	double t_15 = (((((k * y) * (y5 * i)) - ((y * b) * (y4 * k))) - ((y5 * t) * (i * j))) - ((t_3 * t_1) - t_14)) + (t_8 - (t_11 - (((y2 * x) - (y3 * z)) * ((c * y0) - (y1 * a)))));
	double t_16 = ((t_6 - ((y3 * y) * ((y5 * a) - (y4 * c)))) + (((y5 * a) * (t * y2)) + t_13)) + ((t_2 * ((c * y0) - (a * y1))) - (t_10 - (((y * x) - (z * t)) * t_7)));
	double t_17 = (t * y2) - (y * y3);
	double tmp;
	if (y4 < -7.206256231996481e+60) {
		tmp = (t_8 - (t_11 - t_6)) - ((t_3 / (1.0 / t_1)) - t_14);
	} else if (y4 < -3.364603505246317e-66) {
		tmp = (((((t * c) * (i * z)) - ((a * t) * (b * z))) - ((y * c) * (i * x))) - t_10) + ((((y0 * c) - (a * y1)) * t_2) - ((t_17 * ((y4 * c) - (a * y5))) - (((y1 * y4) - (y5 * y0)) * t_4)));
	} else if (y4 < -1.2000065055686116e-105) {
		tmp = t_16;
	} else if (y4 < 6.718963124057495e-279) {
		tmp = t_15;
	} else if (y4 < 4.77962681403792e-222) {
		tmp = t_16;
	} else if (y4 < 2.2852241541266835e-175) {
		tmp = t_15;
	} else {
		tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - ((k * (i * (z * y1))) - ((j * (i * (x * y1))) + (y0 * (k * (z * b)))))) + ((z * (y3 * (a * y1))) - ((y2 * (x * (a * y1))) + (y0 * (z * (c * y3)))))) + (((t * j) - (y * k)) * t_5)) - (t_17 * t_1)) + t_13;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = (y4 * c) - (y5 * a)
	t_2 = (x * y2) - (z * y3)
	t_3 = (y2 * t) - (y3 * y)
	t_4 = (k * y2) - (j * y3)
	t_5 = (y4 * b) - (y5 * i)
	t_6 = ((j * t) - (k * y)) * t_5
	t_7 = (b * a) - (i * c)
	t_8 = t_7 * ((y * x) - (t * z))
	t_9 = (j * x) - (k * z)
	t_10 = ((b * y0) - (i * y1)) * t_9
	t_11 = t_9 * ((y0 * b) - (i * y1))
	t_12 = (y4 * y1) - (y5 * y0)
	t_13 = t_4 * t_12
	t_14 = ((y2 * k) - (y3 * j)) * t_12
	t_15 = (((((k * y) * (y5 * i)) - ((y * b) * (y4 * k))) - ((y5 * t) * (i * j))) - ((t_3 * t_1) - t_14)) + (t_8 - (t_11 - (((y2 * x) - (y3 * z)) * ((c * y0) - (y1 * a)))))
	t_16 = ((t_6 - ((y3 * y) * ((y5 * a) - (y4 * c)))) + (((y5 * a) * (t * y2)) + t_13)) + ((t_2 * ((c * y0) - (a * y1))) - (t_10 - (((y * x) - (z * t)) * t_7)))
	t_17 = (t * y2) - (y * y3)
	tmp = 0
	if y4 < -7.206256231996481e+60:
		tmp = (t_8 - (t_11 - t_6)) - ((t_3 / (1.0 / t_1)) - t_14)
	elif y4 < -3.364603505246317e-66:
		tmp = (((((t * c) * (i * z)) - ((a * t) * (b * z))) - ((y * c) * (i * x))) - t_10) + ((((y0 * c) - (a * y1)) * t_2) - ((t_17 * ((y4 * c) - (a * y5))) - (((y1 * y4) - (y5 * y0)) * t_4)))
	elif y4 < -1.2000065055686116e-105:
		tmp = t_16
	elif y4 < 6.718963124057495e-279:
		tmp = t_15
	elif y4 < 4.77962681403792e-222:
		tmp = t_16
	elif y4 < 2.2852241541266835e-175:
		tmp = t_15
	else:
		tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - ((k * (i * (z * y1))) - ((j * (i * (x * y1))) + (y0 * (k * (z * b)))))) + ((z * (y3 * (a * y1))) - ((y2 * (x * (a * y1))) + (y0 * (z * (c * y3)))))) + (((t * j) - (y * k)) * t_5)) - (t_17 * t_1)) + t_13
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(y4 * c) - Float64(y5 * a))
	t_2 = Float64(Float64(x * y2) - Float64(z * y3))
	t_3 = Float64(Float64(y2 * t) - Float64(y3 * y))
	t_4 = Float64(Float64(k * y2) - Float64(j * y3))
	t_5 = Float64(Float64(y4 * b) - Float64(y5 * i))
	t_6 = Float64(Float64(Float64(j * t) - Float64(k * y)) * t_5)
	t_7 = Float64(Float64(b * a) - Float64(i * c))
	t_8 = Float64(t_7 * Float64(Float64(y * x) - Float64(t * z)))
	t_9 = Float64(Float64(j * x) - Float64(k * z))
	t_10 = Float64(Float64(Float64(b * y0) - Float64(i * y1)) * t_9)
	t_11 = Float64(t_9 * Float64(Float64(y0 * b) - Float64(i * y1)))
	t_12 = Float64(Float64(y4 * y1) - Float64(y5 * y0))
	t_13 = Float64(t_4 * t_12)
	t_14 = Float64(Float64(Float64(y2 * k) - Float64(y3 * j)) * t_12)
	t_15 = Float64(Float64(Float64(Float64(Float64(Float64(k * y) * Float64(y5 * i)) - Float64(Float64(y * b) * Float64(y4 * k))) - Float64(Float64(y5 * t) * Float64(i * j))) - Float64(Float64(t_3 * t_1) - t_14)) + Float64(t_8 - Float64(t_11 - Float64(Float64(Float64(y2 * x) - Float64(y3 * z)) * Float64(Float64(c * y0) - Float64(y1 * a))))))
	t_16 = Float64(Float64(Float64(t_6 - Float64(Float64(y3 * y) * Float64(Float64(y5 * a) - Float64(y4 * c)))) + Float64(Float64(Float64(y5 * a) * Float64(t * y2)) + t_13)) + Float64(Float64(t_2 * Float64(Float64(c * y0) - Float64(a * y1))) - Float64(t_10 - Float64(Float64(Float64(y * x) - Float64(z * t)) * t_7))))
	t_17 = Float64(Float64(t * y2) - Float64(y * y3))
	tmp = 0.0
	if (y4 < -7.206256231996481e+60)
		tmp = Float64(Float64(t_8 - Float64(t_11 - t_6)) - Float64(Float64(t_3 / Float64(1.0 / t_1)) - t_14));
	elseif (y4 < -3.364603505246317e-66)
		tmp = Float64(Float64(Float64(Float64(Float64(Float64(t * c) * Float64(i * z)) - Float64(Float64(a * t) * Float64(b * z))) - Float64(Float64(y * c) * Float64(i * x))) - t_10) + Float64(Float64(Float64(Float64(y0 * c) - Float64(a * y1)) * t_2) - Float64(Float64(t_17 * Float64(Float64(y4 * c) - Float64(a * y5))) - Float64(Float64(Float64(y1 * y4) - Float64(y5 * y0)) * t_4))));
	elseif (y4 < -1.2000065055686116e-105)
		tmp = t_16;
	elseif (y4 < 6.718963124057495e-279)
		tmp = t_15;
	elseif (y4 < 4.77962681403792e-222)
		tmp = t_16;
	elseif (y4 < 2.2852241541266835e-175)
		tmp = t_15;
	else
		tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(k * Float64(i * Float64(z * y1))) - Float64(Float64(j * Float64(i * Float64(x * y1))) + Float64(y0 * Float64(k * Float64(z * b)))))) + Float64(Float64(z * Float64(y3 * Float64(a * y1))) - Float64(Float64(y2 * Float64(x * Float64(a * y1))) + Float64(y0 * Float64(z * Float64(c * y3)))))) + Float64(Float64(Float64(t * j) - Float64(y * k)) * t_5)) - Float64(t_17 * t_1)) + t_13);
	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 = (y4 * c) - (y5 * a);
	t_2 = (x * y2) - (z * y3);
	t_3 = (y2 * t) - (y3 * y);
	t_4 = (k * y2) - (j * y3);
	t_5 = (y4 * b) - (y5 * i);
	t_6 = ((j * t) - (k * y)) * t_5;
	t_7 = (b * a) - (i * c);
	t_8 = t_7 * ((y * x) - (t * z));
	t_9 = (j * x) - (k * z);
	t_10 = ((b * y0) - (i * y1)) * t_9;
	t_11 = t_9 * ((y0 * b) - (i * y1));
	t_12 = (y4 * y1) - (y5 * y0);
	t_13 = t_4 * t_12;
	t_14 = ((y2 * k) - (y3 * j)) * t_12;
	t_15 = (((((k * y) * (y5 * i)) - ((y * b) * (y4 * k))) - ((y5 * t) * (i * j))) - ((t_3 * t_1) - t_14)) + (t_8 - (t_11 - (((y2 * x) - (y3 * z)) * ((c * y0) - (y1 * a)))));
	t_16 = ((t_6 - ((y3 * y) * ((y5 * a) - (y4 * c)))) + (((y5 * a) * (t * y2)) + t_13)) + ((t_2 * ((c * y0) - (a * y1))) - (t_10 - (((y * x) - (z * t)) * t_7)));
	t_17 = (t * y2) - (y * y3);
	tmp = 0.0;
	if (y4 < -7.206256231996481e+60)
		tmp = (t_8 - (t_11 - t_6)) - ((t_3 / (1.0 / t_1)) - t_14);
	elseif (y4 < -3.364603505246317e-66)
		tmp = (((((t * c) * (i * z)) - ((a * t) * (b * z))) - ((y * c) * (i * x))) - t_10) + ((((y0 * c) - (a * y1)) * t_2) - ((t_17 * ((y4 * c) - (a * y5))) - (((y1 * y4) - (y5 * y0)) * t_4)));
	elseif (y4 < -1.2000065055686116e-105)
		tmp = t_16;
	elseif (y4 < 6.718963124057495e-279)
		tmp = t_15;
	elseif (y4 < 4.77962681403792e-222)
		tmp = t_16;
	elseif (y4 < 2.2852241541266835e-175)
		tmp = t_15;
	else
		tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - ((k * (i * (z * y1))) - ((j * (i * (x * y1))) + (y0 * (k * (z * b)))))) + ((z * (y3 * (a * y1))) - ((y2 * (x * (a * y1))) + (y0 * (z * (c * y3)))))) + (((t * j) - (y * k)) * t_5)) - (t_17 * t_1)) + t_13;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y2 * t), $MachinePrecision] - N[(y3 * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision] * t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(N[(b * a), $MachinePrecision] - N[(i * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(t$95$7 * N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$10 = N[(N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision] * t$95$9), $MachinePrecision]}, Block[{t$95$11 = N[(t$95$9 * N[(N[(y0 * b), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$12 = N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$13 = N[(t$95$4 * t$95$12), $MachinePrecision]}, Block[{t$95$14 = N[(N[(N[(y2 * k), $MachinePrecision] - N[(y3 * j), $MachinePrecision]), $MachinePrecision] * t$95$12), $MachinePrecision]}, Block[{t$95$15 = N[(N[(N[(N[(N[(N[(k * y), $MachinePrecision] * N[(y5 * i), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] * N[(y4 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y5 * t), $MachinePrecision] * N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$3 * t$95$1), $MachinePrecision] - t$95$14), $MachinePrecision]), $MachinePrecision] + N[(t$95$8 - N[(t$95$11 - N[(N[(N[(y2 * x), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision] * N[(N[(c * y0), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$16 = N[(N[(N[(t$95$6 - N[(N[(y3 * y), $MachinePrecision] * N[(N[(y5 * a), $MachinePrecision] - N[(y4 * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y5 * a), $MachinePrecision] * N[(t * y2), $MachinePrecision]), $MachinePrecision] + t$95$13), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$10 - N[(N[(N[(y * x), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$17 = N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]}, If[Less[y4, -7.206256231996481e+60], N[(N[(t$95$8 - N[(t$95$11 - t$95$6), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$3 / N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision] - t$95$14), $MachinePrecision]), $MachinePrecision], If[Less[y4, -3.364603505246317e-66], N[(N[(N[(N[(N[(N[(t * c), $MachinePrecision] * N[(i * z), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * c), $MachinePrecision] * N[(i * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$10), $MachinePrecision] + N[(N[(N[(N[(y0 * c), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] - N[(N[(t$95$17 * N[(N[(y4 * c), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y1 * y4), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[y4, -1.2000065055686116e-105], t$95$16, If[Less[y4, 6.718963124057495e-279], t$95$15, If[Less[y4, 4.77962681403792e-222], t$95$16, If[Less[y4, 2.2852241541266835e-175], t$95$15, 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[(k * N[(i * N[(z * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * N[(i * N[(x * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y0 * N[(k * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(y3 * N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y2 * N[(x * N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y0 * N[(z * N[(c * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * t$95$5), $MachinePrecision]), $MachinePrecision] - N[(t$95$17 * t$95$1), $MachinePrecision]), $MachinePrecision] + t$95$13), $MachinePrecision]]]]]]]]]]]]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y4 \cdot c - y5 \cdot a\\
t_2 := x \cdot y2 - z \cdot y3\\
t_3 := y2 \cdot t - y3 \cdot y\\
t_4 := k \cdot y2 - j \cdot y3\\
t_5 := y4 \cdot b - y5 \cdot i\\
t_6 := \left(j \cdot t - k \cdot y\right) \cdot t\_5\\
t_7 := b \cdot a - i \cdot c\\
t_8 := t\_7 \cdot \left(y \cdot x - t \cdot z\right)\\
t_9 := j \cdot x - k \cdot z\\
t_10 := \left(b \cdot y0 - i \cdot y1\right) \cdot t\_9\\
t_11 := t\_9 \cdot \left(y0 \cdot b - i \cdot y1\right)\\
t_12 := y4 \cdot y1 - y5 \cdot y0\\
t_13 := t\_4 \cdot t\_12\\
t_14 := \left(y2 \cdot k - y3 \cdot j\right) \cdot t\_12\\
t_15 := \left(\left(\left(\left(k \cdot y\right) \cdot \left(y5 \cdot i\right) - \left(y \cdot b\right) \cdot \left(y4 \cdot k\right)\right) - \left(y5 \cdot t\right) \cdot \left(i \cdot j\right)\right) - \left(t\_3 \cdot t\_1 - t\_14\right)\right) + \left(t\_8 - \left(t\_11 - \left(y2 \cdot x - y3 \cdot z\right) \cdot \left(c \cdot y0 - y1 \cdot a\right)\right)\right)\\
t_16 := \left(\left(t\_6 - \left(y3 \cdot y\right) \cdot \left(y5 \cdot a - y4 \cdot c\right)\right) + \left(\left(y5 \cdot a\right) \cdot \left(t \cdot y2\right) + t\_13\right)\right) + \left(t\_2 \cdot \left(c \cdot y0 - a \cdot y1\right) - \left(t\_10 - \left(y \cdot x - z \cdot t\right) \cdot t\_7\right)\right)\\
t_17 := t \cdot y2 - y \cdot y3\\
\mathbf{if}\;y4 < -7.206256231996481 \cdot 10^{+60}:\\
\;\;\;\;\left(t\_8 - \left(t\_11 - t\_6\right)\right) - \left(\frac{t\_3}{\frac{1}{t\_1}} - t\_14\right)\\

\mathbf{elif}\;y4 < -3.364603505246317 \cdot 10^{-66}:\\
\;\;\;\;\left(\left(\left(\left(t \cdot c\right) \cdot \left(i \cdot z\right) - \left(a \cdot t\right) \cdot \left(b \cdot z\right)\right) - \left(y \cdot c\right) \cdot \left(i \cdot x\right)\right) - t\_10\right) + \left(\left(y0 \cdot c - a \cdot y1\right) \cdot t\_2 - \left(t\_17 \cdot \left(y4 \cdot c - a \cdot y5\right) - \left(y1 \cdot y4 - y5 \cdot y0\right) \cdot t\_4\right)\right)\\

\mathbf{elif}\;y4 < -1.2000065055686116 \cdot 10^{-105}:\\
\;\;\;\;t\_16\\

\mathbf{elif}\;y4 < 6.718963124057495 \cdot 10^{-279}:\\
\;\;\;\;t\_15\\

\mathbf{elif}\;y4 < 4.77962681403792 \cdot 10^{-222}:\\
\;\;\;\;t\_16\\

\mathbf{elif}\;y4 < 2.2852241541266835 \cdot 10^{-175}:\\
\;\;\;\;t\_15\\

\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(k \cdot \left(i \cdot \left(z \cdot y1\right)\right) - \left(j \cdot \left(i \cdot \left(x \cdot y1\right)\right) + y0 \cdot \left(k \cdot \left(z \cdot b\right)\right)\right)\right)\right) + \left(z \cdot \left(y3 \cdot \left(a \cdot y1\right)\right) - \left(y2 \cdot \left(x \cdot \left(a \cdot y1\right)\right) + y0 \cdot \left(z \cdot \left(c \cdot y3\right)\right)\right)\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot t\_5\right) - t\_17 \cdot t\_1\right) + t\_13\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2025051 
(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

  :alt
  (! :herbie-platform default (if (< y4 -7206256231996481000000000000000000000000000000000000000000000) (- (- (* (- (* b a) (* i c)) (- (* y x) (* t z))) (- (* (- (* j x) (* k z)) (- (* y0 b) (* i y1))) (* (- (* j t) (* k y)) (- (* y4 b) (* y5 i))))) (- (/ (- (* y2 t) (* y3 y)) (/ 1 (- (* y4 c) (* y5 a)))) (* (- (* y2 k) (* y3 j)) (- (* y4 y1) (* y5 y0))))) (if (< y4 -3364603505246317/1000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (- (- (* (* t c) (* i z)) (* (* a t) (* b z))) (* (* y c) (* i x))) (* (- (* b y0) (* i y1)) (- (* j x) (* k z)))) (- (* (- (* y0 c) (* a y1)) (- (* x y2) (* z y3))) (- (* (- (* t y2) (* y y3)) (- (* y4 c) (* a y5))) (* (- (* y1 y4) (* y5 y0)) (- (* k y2) (* j y3)))))) (if (< y4 -3000016263921529/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (+ (- (* (- (* j t) (* k y)) (- (* y4 b) (* y5 i))) (* (* y3 y) (- (* y5 a) (* y4 c)))) (+ (* (* y5 a) (* t y2)) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))) (- (* (- (* x y2) (* z y3)) (- (* c y0) (* a y1))) (- (* (- (* b y0) (* i y1)) (- (* j x) (* k z))) (* (- (* y x) (* z t)) (- (* b a) (* i c)))))) (if (< y4 1343792624811499/200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (- (- (* (* k y) (* y5 i)) (* (* y b) (* y4 k))) (* (* y5 t) (* i j))) (- (* (- (* y2 t) (* y3 y)) (- (* y4 c) (* y5 a))) (* (- (* y2 k) (* y3 j)) (- (* y4 y1) (* y5 y0))))) (- (* (- (* b a) (* i c)) (- (* y x) (* t z))) (- (* (- (* j x) (* k z)) (- (* y0 b) (* i y1))) (* (- (* y2 x) (* y3 z)) (- (* c y0) (* y1 a)))))) (if (< y4 29872667587737/6250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (+ (- (* (- (* j t) (* k y)) (- (* y4 b) (* y5 i))) (* (* y3 y) (- (* y5 a) (* y4 c)))) (+ (* (* y5 a) (* t y2)) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))) (- (* (- (* x y2) (* z y3)) (- (* c y0) (* a y1))) (- (* (- (* b y0) (* i y1)) (- (* j x) (* k z))) (* (- (* y x) (* z t)) (- (* b a) (* i c)))))) (if (< y4 4570448308253367/20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (- (- (* (* k y) (* y5 i)) (* (* y b) (* y4 k))) (* (* y5 t) (* i j))) (- (* (- (* y2 t) (* y3 y)) (- (* y4 c) (* y5 a))) (* (- (* y2 k) (* y3 j)) (- (* y4 y1) (* y5 y0))))) (- (* (- (* b a) (* i c)) (- (* y x) (* t z))) (- (* (- (* j x) (* k z)) (- (* y0 b) (* i y1))) (* (- (* y2 x) (* y3 z)) (- (* c y0) (* y1 a)))))) (+ (- (+ (+ (- (* (- (* x y) (* z t)) (- (* a b) (* c i))) (- (* k (* i (* z y1))) (+ (* j (* i (* x y1))) (* y0 (* k (* z b)))))) (- (* z (* y3 (* a y1))) (+ (* y2 (* x (* a y1))) (* y0 (* z (* c y3)))))) (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i)))) (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a)))) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))))))))

  (+ (- (+ (+ (- (* (- (* 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)))))