Linear.Matrix:det44 from linear-1.19.1.3

Percentage Accurate: 29.7% → 42.4%
Time: 22.7s
Alternatives: 30
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 30 alternatives:

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

Initial Program: 29.7% 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: 42.4% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y1 \cdot y4 - y0 \cdot y5\\ t_2 := b \cdot y0 - i \cdot y1\\ t_3 := a \cdot b - c \cdot i\\ t_4 := c \cdot y4 - a \cdot y5\\ t_5 := c \cdot y0 - a \cdot y1\\ \mathbf{if}\;y2 \leq -1.28 \cdot 10^{+147}:\\ \;\;\;\;\left(-y5\right) \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\\ \mathbf{elif}\;y2 \leq -4.5 \cdot 10^{+36}:\\ \;\;\;\;x \cdot \left(\mathsf{fma}\left(y, t\_3, y2 \cdot t\_5\right) - j \cdot t\_2\right)\\ \mathbf{elif}\;y2 \leq -1.12 \cdot 10^{-222}:\\ \;\;\;\;\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{elif}\;y2 \leq 1.4 \cdot 10^{-276}:\\ \;\;\;\;\left(-y3\right) \cdot \left(\mathsf{fma}\left(j, t\_1, z \cdot t\_5\right) - y \cdot t\_4\right)\\ \mathbf{elif}\;y2 \leq 1.55 \cdot 10^{-166}:\\ \;\;\;\;\left(-z\right) \cdot \left(\mathsf{fma}\left(t, t\_3, y3 \cdot t\_5\right) - k \cdot t\_2\right)\\ \mathbf{elif}\;y2 \leq 1.32 \cdot 10^{+137}:\\ \;\;\;\;y \cdot \left(\mathsf{fma}\left(-1, k \cdot \left(b \cdot y4 - i \cdot y5\right), x \cdot t\_3\right) + y3 \cdot t\_4\right)\\ \mathbf{else}:\\ \;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, t\_1, x \cdot t\_5\right) - t \cdot t\_4\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (- (* y1 y4) (* y0 y5)))
        (t_2 (- (* b y0) (* i y1)))
        (t_3 (- (* a b) (* c i)))
        (t_4 (- (* c y4) (* a y5)))
        (t_5 (- (* c y0) (* a y1))))
   (if (<= y2 -1.28e+147)
     (* (- y5) (* y2 (- (* k y0) (* a t))))
     (if (<= y2 -4.5e+36)
       (* x (- (fma y t_3 (* y2 t_5)) (* j t_2)))
       (if (<= y2 -1.12e-222)
         (*
          (- i)
          (-
           (fma c (- (* x y) (* t z)) (* y5 (- (* j t) (* k y))))
           (* y1 (- (* j x) (* k z)))))
         (if (<= y2 1.4e-276)
           (* (- y3) (- (fma j t_1 (* z t_5)) (* y t_4)))
           (if (<= y2 1.55e-166)
             (* (- z) (- (fma t t_3 (* y3 t_5)) (* k t_2)))
             (if (<= y2 1.32e+137)
               (*
                y
                (+
                 (fma -1.0 (* k (- (* b y4) (* i y5))) (* x t_3))
                 (* y3 t_4)))
               (* y2 (- (fma k t_1 (* x t_5)) (* t t_4)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = (y1 * y4) - (y0 * y5);
	double t_2 = (b * y0) - (i * y1);
	double t_3 = (a * b) - (c * i);
	double t_4 = (c * y4) - (a * y5);
	double t_5 = (c * y0) - (a * y1);
	double tmp;
	if (y2 <= -1.28e+147) {
		tmp = -y5 * (y2 * ((k * y0) - (a * t)));
	} else if (y2 <= -4.5e+36) {
		tmp = x * (fma(y, t_3, (y2 * t_5)) - (j * t_2));
	} else if (y2 <= -1.12e-222) {
		tmp = -i * (fma(c, ((x * y) - (t * z)), (y5 * ((j * t) - (k * y)))) - (y1 * ((j * x) - (k * z))));
	} else if (y2 <= 1.4e-276) {
		tmp = -y3 * (fma(j, t_1, (z * t_5)) - (y * t_4));
	} else if (y2 <= 1.55e-166) {
		tmp = -z * (fma(t, t_3, (y3 * t_5)) - (k * t_2));
	} else if (y2 <= 1.32e+137) {
		tmp = y * (fma(-1.0, (k * ((b * y4) - (i * y5))), (x * t_3)) + (y3 * t_4));
	} else {
		tmp = y2 * (fma(k, t_1, (x * t_5)) - (t * t_4));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(y1 * y4) - Float64(y0 * y5))
	t_2 = Float64(Float64(b * y0) - Float64(i * y1))
	t_3 = Float64(Float64(a * b) - Float64(c * i))
	t_4 = Float64(Float64(c * y4) - Float64(a * y5))
	t_5 = Float64(Float64(c * y0) - Float64(a * y1))
	tmp = 0.0
	if (y2 <= -1.28e+147)
		tmp = Float64(Float64(-y5) * Float64(y2 * Float64(Float64(k * y0) - Float64(a * t))));
	elseif (y2 <= -4.5e+36)
		tmp = Float64(x * Float64(fma(y, t_3, Float64(y2 * t_5)) - Float64(j * t_2)));
	elseif (y2 <= -1.12e-222)
		tmp = Float64(Float64(-i) * Float64(fma(c, Float64(Float64(x * y) - Float64(t * z)), Float64(y5 * Float64(Float64(j * t) - Float64(k * y)))) - Float64(y1 * Float64(Float64(j * x) - Float64(k * z)))));
	elseif (y2 <= 1.4e-276)
		tmp = Float64(Float64(-y3) * Float64(fma(j, t_1, Float64(z * t_5)) - Float64(y * t_4)));
	elseif (y2 <= 1.55e-166)
		tmp = Float64(Float64(-z) * Float64(fma(t, t_3, Float64(y3 * t_5)) - Float64(k * t_2)));
	elseif (y2 <= 1.32e+137)
		tmp = Float64(y * Float64(fma(-1.0, Float64(k * Float64(Float64(b * y4) - Float64(i * y5))), Float64(x * t_3)) + Float64(y3 * t_4)));
	else
		tmp = Float64(y2 * Float64(fma(k, t_1, Float64(x * t_5)) - Float64(t * t_4)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y2, -1.28e+147], N[((-y5) * N[(y2 * N[(N[(k * y0), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, -4.5e+36], N[(x * N[(N[(y * t$95$3 + N[(y2 * t$95$5), $MachinePrecision]), $MachinePrecision] - N[(j * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, -1.12e-222], N[((-i) * N[(N[(c * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y5 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 1.4e-276], N[((-y3) * N[(N[(j * t$95$1 + N[(z * t$95$5), $MachinePrecision]), $MachinePrecision] - N[(y * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 1.55e-166], N[((-z) * N[(N[(t * t$95$3 + N[(y3 * t$95$5), $MachinePrecision]), $MachinePrecision] - N[(k * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 1.32e+137], N[(y * N[(N[(-1.0 * N[(k * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(y3 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y2 * N[(N[(k * t$95$1 + N[(x * t$95$5), $MachinePrecision]), $MachinePrecision] - N[(t * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y1 \cdot y4 - y0 \cdot y5\\
t_2 := b \cdot y0 - i \cdot y1\\
t_3 := a \cdot b - c \cdot i\\
t_4 := c \cdot y4 - a \cdot y5\\
t_5 := c \cdot y0 - a \cdot y1\\
\mathbf{if}\;y2 \leq -1.28 \cdot 10^{+147}:\\
\;\;\;\;\left(-y5\right) \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\\

\mathbf{elif}\;y2 \leq -4.5 \cdot 10^{+36}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(y, t\_3, y2 \cdot t\_5\right) - j \cdot t\_2\right)\\

\mathbf{elif}\;y2 \leq -1.12 \cdot 10^{-222}:\\
\;\;\;\;\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{elif}\;y2 \leq 1.4 \cdot 10^{-276}:\\
\;\;\;\;\left(-y3\right) \cdot \left(\mathsf{fma}\left(j, t\_1, z \cdot t\_5\right) - y \cdot t\_4\right)\\

\mathbf{elif}\;y2 \leq 1.55 \cdot 10^{-166}:\\
\;\;\;\;\left(-z\right) \cdot \left(\mathsf{fma}\left(t, t\_3, y3 \cdot t\_5\right) - k \cdot t\_2\right)\\

\mathbf{elif}\;y2 \leq 1.32 \cdot 10^{+137}:\\
\;\;\;\;y \cdot \left(\mathsf{fma}\left(-1, k \cdot \left(b \cdot y4 - i \cdot y5\right), x \cdot t\_3\right) + y3 \cdot t\_4\right)\\

\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, t\_1, x \cdot t\_5\right) - t \cdot t\_4\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if y2 < -1.28e147

    1. Initial program 23.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 y5 around -inf

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \left(y5 \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\right) \]
      4. lower-*.f6465.9

        \[\leadsto -1 \cdot \left(y5 \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\right) \]
    8. Applied rewrites65.9%

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

    if -1.28e147 < y2 < -4.49999999999999997e36

    1. Initial program 22.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 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 rewrites56.7%

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

    if -4.49999999999999997e36 < y2 < -1.12000000000000006e-222

    1. Initial program 46.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 rewrites59.2%

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

    if -1.12000000000000006e-222 < y2 < 1.39999999999999993e-276

    1. Initial program 49.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 rewrites82.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)} \]

    if 1.39999999999999993e-276 < y2 < 1.54999999999999992e-166

    1. Initial program 23.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 rewrites76.4%

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

    if 1.54999999999999992e-166 < y2 < 1.31999999999999997e137

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

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

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

        \[\leadsto y \cdot \left(\left(-1 \cdot \left(k \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + x \cdot \left(a \cdot b - c \cdot i\right)\right) - \color{blue}{-1 \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
    5. Applied rewrites49.8%

      \[\leadsto \color{blue}{y \cdot \left(\mathsf{fma}\left(-1, k \cdot \left(b \cdot y4 - i \cdot y5\right), x \cdot \left(a \cdot b - c \cdot i\right)\right) - -1 \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]

    if 1.31999999999999997e137 < y2

    1. Initial program 35.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 rewrites71.2%

      \[\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 7 regimes into one program.
  4. Final simplification62.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y2 \leq -1.28 \cdot 10^{+147}:\\ \;\;\;\;\left(-y5\right) \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\\ \mathbf{elif}\;y2 \leq -4.5 \cdot 10^{+36}:\\ \;\;\;\;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{elif}\;y2 \leq -1.12 \cdot 10^{-222}:\\ \;\;\;\;\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{elif}\;y2 \leq 1.4 \cdot 10^{-276}:\\ \;\;\;\;\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}\;y2 \leq 1.55 \cdot 10^{-166}:\\ \;\;\;\;\left(-z\right) \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)\\ \mathbf{elif}\;y2 \leq 1.32 \cdot 10^{+137}:\\ \;\;\;\;y \cdot \left(\mathsf{fma}\left(-1, k \cdot \left(b \cdot y4 - i \cdot y5\right), x \cdot \left(a \cdot b - c \cdot i\right)\right) + y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 53.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot b - c \cdot i\\ t_2 := \left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot t\_1 - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \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\_2 \leq \infty:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\left(-z\right) \cdot \left(\mathsf{fma}\left(t, t\_1, y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \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
 (let* ((t_1 (- (* a b) (* c i)))
        (t_2
         (+
          (-
           (+
            (+
             (-
              (* (- (* x y) (* z t)) t_1)
              (* (- (* 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_2 INFINITY)
     t_2
     (*
      (- z)
      (-
       (fma t t_1 (* y3 (- (* c y0) (* a y1))))
       (* k (- (* b y0) (* i 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 t_1 = (a * b) - (c * i);
	double t_2 = (((((((x * y) - (z * t)) * t_1) - (((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_2 <= ((double) INFINITY)) {
		tmp = t_2;
	} else {
		tmp = -z * (fma(t, t_1, (y3 * ((c * y0) - (a * y1)))) - (k * ((b * y0) - (i * y1))));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(a * b) - Float64(c * i))
	t_2 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * t_1) - 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_2 <= Inf)
		tmp = t_2;
	else
		tmp = Float64(Float64(-z) * Float64(fma(t, t_1, Float64(y3 * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(k * Float64(Float64(b * y0) - Float64(i * y1)))));
	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[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * t$95$1), $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$2, Infinity], t$95$2, N[((-z) * N[(N[(t * t$95$1 + N[(y3 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\left(-z\right) \cdot \left(\mathsf{fma}\left(t, t\_1, y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\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 93.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

    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 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 rewrites37.8%

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

    \[\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(-z\right) \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)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 42.3% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
t_1 := y1 \cdot y4 - y0 \cdot y5\\
t_2 := j \cdot t - k \cdot y\\
t_3 := b \cdot y0 - i \cdot y1\\
t_4 := a \cdot b - c \cdot i\\
t_5 := c \cdot y4 - a \cdot y5\\
t_6 := c \cdot y0 - a \cdot y1\\
\mathbf{if}\;y2 \leq -1.28 \cdot 10^{+147}:\\
\;\;\;\;\left(-y5\right) \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\\

\mathbf{elif}\;y2 \leq -4.5 \cdot 10^{+36}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(y, t\_4, y2 \cdot t\_6\right) - j \cdot t\_3\right)\\

\mathbf{elif}\;y2 \leq -1.12 \cdot 10^{-222}:\\
\;\;\;\;\left(-i\right) \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot t\_2\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\

\mathbf{elif}\;y2 \leq 1.4 \cdot 10^{-276}:\\
\;\;\;\;\left(-y3\right) \cdot \left(\mathsf{fma}\left(j, t\_1, z \cdot t\_6\right) - y \cdot t\_5\right)\\

\mathbf{elif}\;y2 \leq 4.5 \cdot 10^{-143}:\\
\;\;\;\;\left(-z\right) \cdot \left(\mathsf{fma}\left(t, t\_4, y3 \cdot t\_6\right) - k \cdot t\_3\right)\\

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

\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, t\_1, x \cdot t\_6\right) - t \cdot t\_5\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if y2 < -1.28e147

    1. Initial program 23.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 y5 around -inf

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \left(y5 \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\right) \]
      4. lower-*.f6465.9

        \[\leadsto -1 \cdot \left(y5 \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\right) \]
    8. Applied rewrites65.9%

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

    if -1.28e147 < y2 < -4.49999999999999997e36

    1. Initial program 22.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 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 rewrites56.7%

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

    if -4.49999999999999997e36 < y2 < -1.12000000000000006e-222

    1. Initial program 46.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 rewrites59.2%

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

    if -1.12000000000000006e-222 < y2 < 1.39999999999999993e-276

    1. Initial program 49.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 rewrites82.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)} \]

    if 1.39999999999999993e-276 < y2 < 4.5e-143

    1. Initial program 33.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 rewrites71.4%

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

    if 4.5e-143 < y2 < 7.39999999999999956e129

    1. Initial program 26.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 rewrites45.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)} \]

    if 7.39999999999999956e129 < y2

    1. Initial program 34.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 rewrites69.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)} \]
  3. Recombined 7 regimes into one program.
  4. Final simplification61.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y2 \leq -1.28 \cdot 10^{+147}:\\ \;\;\;\;\left(-y5\right) \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\\ \mathbf{elif}\;y2 \leq -4.5 \cdot 10^{+36}:\\ \;\;\;\;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{elif}\;y2 \leq -1.12 \cdot 10^{-222}:\\ \;\;\;\;\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{elif}\;y2 \leq 1.4 \cdot 10^{-276}:\\ \;\;\;\;\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}\;y2 \leq 4.5 \cdot 10^{-143}:\\ \;\;\;\;\left(-z\right) \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)\\ \mathbf{elif}\;y2 \leq 7.4 \cdot 10^{+129}:\\ \;\;\;\;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{else}:\\ \;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 42.7% accurate, 2.0× speedup?

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

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

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

\mathbf{elif}\;y2 \leq -1.12 \cdot 10^{-222}:\\
\;\;\;\;t\_7\\

\mathbf{elif}\;y2 \leq 4.2 \cdot 10^{-229}:\\
\;\;\;\;\left(-y3\right) \cdot \left(\mathsf{fma}\left(j, t\_1, z \cdot t\_5\right) - y \cdot t\_4\right)\\

\mathbf{elif}\;y2 \leq 5 \cdot 10^{-103}:\\
\;\;\;\;t\_7\\

\mathbf{elif}\;y2 \leq 6.8 \cdot 10^{+129}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, t\_6, y4 \cdot t\_2\right) - y0 \cdot t\_3\right)\\

\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, t\_1, x \cdot t\_5\right) - t \cdot t\_4\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y2 < -1.28e147

    1. Initial program 23.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 y5 around -inf

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \left(y5 \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\right) \]
      4. lower-*.f6465.9

        \[\leadsto -1 \cdot \left(y5 \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\right) \]
    8. Applied rewrites65.9%

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

    if -1.28e147 < y2 < -4.49999999999999997e36

    1. Initial program 22.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 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 rewrites56.7%

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

    if -4.49999999999999997e36 < y2 < -1.12000000000000006e-222 or 4.19999999999999967e-229 < y2 < 4.99999999999999966e-103

    1. Initial program 41.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 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 -1.12000000000000006e-222 < y2 < 4.19999999999999967e-229

    1. Initial program 43.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 rewrites70.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)} \]

    if 4.99999999999999966e-103 < y2 < 6.80000000000000036e129

    1. Initial program 26.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 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 rewrites47.5%

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

    if 6.80000000000000036e129 < y2

    1. Initial program 34.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 rewrites69.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)} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification61.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y2 \leq -1.28 \cdot 10^{+147}:\\ \;\;\;\;\left(-y5\right) \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\\ \mathbf{elif}\;y2 \leq -4.5 \cdot 10^{+36}:\\ \;\;\;\;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{elif}\;y2 \leq -1.12 \cdot 10^{-222}:\\ \;\;\;\;\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{elif}\;y2 \leq 4.2 \cdot 10^{-229}:\\ \;\;\;\;\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}\;y2 \leq 5 \cdot 10^{-103}:\\ \;\;\;\;\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{elif}\;y2 \leq 6.8 \cdot 10^{+129}:\\ \;\;\;\;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{else}:\\ \;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 42.9% accurate, 2.3× speedup?

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

\\
\begin{array}{l}
t_1 := j \cdot t - k \cdot y\\
t_2 := j \cdot x - k \cdot z\\
t_3 := c \cdot y0 - a \cdot y1\\
t_4 := x \cdot y - t \cdot z\\
\mathbf{if}\;y2 \leq -1.28 \cdot 10^{+147}:\\
\;\;\;\;\left(-y5\right) \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\\

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

\mathbf{elif}\;y2 \leq 5 \cdot 10^{-103}:\\
\;\;\;\;\left(-i\right) \cdot \left(\mathsf{fma}\left(c, t\_4, y5 \cdot t\_1\right) - y1 \cdot t\_2\right)\\

\mathbf{elif}\;y2 \leq 6.8 \cdot 10^{+129}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, t\_4, y4 \cdot t\_1\right) - y0 \cdot t\_2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y2 < -1.28e147

    1. Initial program 23.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 y5 around -inf

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \left(y5 \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\right) \]
      4. lower-*.f6465.9

        \[\leadsto -1 \cdot \left(y5 \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\right) \]
    8. Applied rewrites65.9%

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

    if -1.28e147 < y2 < -4.49999999999999997e36

    1. Initial program 22.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 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 rewrites56.7%

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

    if -4.49999999999999997e36 < y2 < 4.99999999999999966e-103

    1. Initial program 42.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 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.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 4.99999999999999966e-103 < y2 < 6.80000000000000036e129

    1. Initial program 26.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 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 rewrites47.5%

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

    if 6.80000000000000036e129 < y2

    1. Initial program 34.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 rewrites69.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)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification57.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y2 \leq -1.28 \cdot 10^{+147}:\\ \;\;\;\;\left(-y5\right) \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\\ \mathbf{elif}\;y2 \leq -4.5 \cdot 10^{+36}:\\ \;\;\;\;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{elif}\;y2 \leq 5 \cdot 10^{-103}:\\ \;\;\;\;\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{elif}\;y2 \leq 6.8 \cdot 10^{+129}:\\ \;\;\;\;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{else}:\\ \;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 39.0% accurate, 2.3× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\\
t_2 := c \cdot y0 - a \cdot y1\\
\mathbf{if}\;y4 \leq -1.75 \cdot 10^{+224}:\\
\;\;\;\;y4 \cdot \left(k \cdot t\_1\right)\\

\mathbf{elif}\;y4 \leq -1.05 \cdot 10^{+144}:\\
\;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\

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

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

\mathbf{else}:\\
\;\;\;\;k \cdot \left(y4 \cdot t\_1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y4 < -1.75e224

    1. Initial program 44.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 rewrites77.7%

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

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

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

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

        \[\leadsto y4 \cdot \left(b \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      4. lift--.f6440.0

        \[\leadsto y4 \cdot \left(b \cdot \left(j \cdot t - k \cdot \color{blue}{y}\right)\right) \]
    8. Applied rewrites40.0%

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

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

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

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

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

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

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

    if -1.75e224 < y4 < -1.04999999999999998e144

    1. Initial program 22.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 rewrites56.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 t around inf

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

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

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

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

        \[\leadsto t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right) \]
      5. lower-*.f6461.9

        \[\leadsto t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right) \]
    8. Applied rewrites61.9%

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

    if -1.04999999999999998e144 < y4 < 7.4999999999999995e-184

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

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

    if 7.4999999999999995e-184 < y4 < 1.29999999999999991e72

    1. Initial program 37.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 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 rewrites49.6%

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

    if 1.29999999999999991e72 < y4

    1. Initial program 24.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 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 rewrites52.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 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-*.f6448.5

        \[\leadsto k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right) \]
    8. Applied rewrites48.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. Add Preprocessing

Alternative 7: 42.8% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 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)\\ t_2 := c \cdot y0 - a \cdot y1\\ \mathbf{if}\;y4 \leq -4.3 \cdot 10^{+128}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y4 \leq 7.5 \cdot 10^{-184}:\\ \;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot t\_2\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \mathbf{elif}\;y4 \leq 1.02 \cdot 10^{+97}:\\ \;\;\;\;x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot t\_2\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
         (*
          y4
          (-
           (fma b (- (* j t) (* k y)) (* y1 (- (* k y2) (* j y3))))
           (* c (- (* t y2) (* y y3))))))
        (t_2 (- (* c y0) (* a y1))))
   (if (<= y4 -4.3e+128)
     t_1
     (if (<= y4 7.5e-184)
       (*
        y2
        (-
         (fma k (- (* y1 y4) (* y0 y5)) (* x t_2))
         (* t (- (* c y4) (* a y5)))))
       (if (<= y4 1.02e+97)
         (*
          x
          (-
           (fma y (- (* a b) (* c i)) (* y2 t_2))
           (* 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 = y4 * (fma(b, ((j * t) - (k * y)), (y1 * ((k * y2) - (j * y3)))) - (c * ((t * y2) - (y * y3))));
	double t_2 = (c * y0) - (a * y1);
	double tmp;
	if (y4 <= -4.3e+128) {
		tmp = t_1;
	} else if (y4 <= 7.5e-184) {
		tmp = y2 * (fma(k, ((y1 * y4) - (y0 * y5)), (x * t_2)) - (t * ((c * y4) - (a * y5))));
	} else if (y4 <= 1.02e+97) {
		tmp = x * (fma(y, ((a * b) - (c * i)), (y2 * t_2)) - (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(y4 * Float64(fma(b, Float64(Float64(j * t) - Float64(k * y)), Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3)))))
	t_2 = Float64(Float64(c * y0) - Float64(a * y1))
	tmp = 0.0
	if (y4 <= -4.3e+128)
		tmp = t_1;
	elseif (y4 <= 7.5e-184)
		tmp = Float64(y2 * Float64(fma(k, Float64(Float64(y1 * y4) - Float64(y0 * y5)), Float64(x * t_2)) - Float64(t * Float64(Float64(c * y4) - Float64(a * y5)))));
	elseif (y4 <= 1.02e+97)
		tmp = Float64(x * Float64(fma(y, Float64(Float64(a * b) - Float64(c * i)), Float64(y2 * t_2)) - 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[(y4 * N[(N[(b * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision] + 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]}, Block[{t$95$2 = N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -4.3e+128], t$95$1, If[LessEqual[y4, 7.5e-184], N[(y2 * N[(N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision] + N[(x * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 1.02e+97], N[(x * N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(y2 * t$95$2), $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 := 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)\\
t_2 := c \cdot y0 - a \cdot y1\\
\mathbf{if}\;y4 \leq -4.3 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y4 \leq 1.02 \cdot 10^{+97}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot t\_2\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 3 regimes
  2. if y4 < -4.29999999999999975e128 or 1.02000000000000003e97 < y4

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

    if -4.29999999999999975e128 < y4 < 7.4999999999999995e-184

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

    if 7.4999999999999995e-184 < y4 < 1.02000000000000003e97

    1. Initial program 33.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 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 rewrites48.9%

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

Alternative 8: 34.7% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;t \leq -4.2 \cdot 10^{+74}:\\
\;\;\;\;\left(-y5\right) \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\\

\mathbf{elif}\;t \leq -1.9 \cdot 10^{-151}:\\
\;\;\;\;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}\;t \leq 2.5 \cdot 10^{-230}:\\
\;\;\;\;k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right)\\

\mathbf{elif}\;t \leq 7 \cdot 10^{-39}:\\
\;\;\;\;k \cdot \left(y5 \cdot \mathsf{fma}\left(-1, y0 \cdot y2, i \cdot y\right)\right)\\

\mathbf{elif}\;t \leq 2.35 \cdot 10^{+61}:\\
\;\;\;\;y2 \cdot \left(y1 \cdot \mathsf{fma}\left(-1, a \cdot x, k \cdot y4\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -3.0000000000000001e188 or 2.3499999999999999e61 < t

    1. Initial program 27.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 rewrites53.2%

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

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

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

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

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

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

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

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

    if -3.0000000000000001e188 < t < -4.1999999999999998e74

    1. Initial program 24.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 y5 around -inf

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \left(y5 \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\right) \]
      4. lower-*.f6460.3

        \[\leadsto -1 \cdot \left(y5 \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\right) \]
    8. Applied rewrites60.3%

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

    if -4.1999999999999998e74 < t < -1.89999999999999985e-151

    1. Initial program 25.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 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 rewrites49.6%

      \[\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.89999999999999985e-151 < t < 2.50000000000000017e-230

    1. Initial program 36.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 rewrites41.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-*.f6443.8

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

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

    if 2.50000000000000017e-230 < t < 6.99999999999999999e-39

    1. Initial program 59.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 y5 around -inf

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

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

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

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

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

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

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

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

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

        \[\leadsto k \cdot \left(y5 \cdot \mathsf{fma}\left(-1, y0 \cdot y2, i \cdot y\right)\right) \]
      5. lower-*.f6439.4

        \[\leadsto k \cdot \left(y5 \cdot \mathsf{fma}\left(-1, y0 \cdot y2, i \cdot y\right)\right) \]
    8. Applied rewrites39.4%

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

    if 6.99999999999999999e-39 < t < 2.3499999999999999e61

    1. Initial program 34.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 rewrites44.0%

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

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

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

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

        \[\leadsto y2 \cdot \left(y1 \cdot \mathsf{fma}\left(-1, a \cdot x, k \cdot y4\right)\right) \]
      4. lower-*.f6461.5

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

      \[\leadsto y2 \cdot \left(y1 \cdot \color{blue}{\mathsf{fma}\left(-1, a \cdot x, k \cdot y4\right)}\right) \]
  3. Recombined 6 regimes into one program.
  4. Final simplification51.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{+188}:\\ \;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{+74}:\\ \;\;\;\;\left(-y5\right) \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-151}:\\ \;\;\;\;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}\;t \leq 2.5 \cdot 10^{-230}:\\ \;\;\;\;k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right)\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-39}:\\ \;\;\;\;k \cdot \left(y5 \cdot \mathsf{fma}\left(-1, y0 \cdot y2, i \cdot y\right)\right)\\ \mathbf{elif}\;t \leq 2.35 \cdot 10^{+61}:\\ \;\;\;\;y2 \cdot \left(y1 \cdot \mathsf{fma}\left(-1, a \cdot x, k \cdot y4\right)\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 32.5% accurate, 3.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y1 \leq -6.6 \cdot 10^{+255}:\\ \;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\ \mathbf{elif}\;y1 \leq -6.8 \cdot 10^{+31}:\\ \;\;\;\;y2 \cdot \left(y1 \cdot \mathsf{fma}\left(-1, a \cdot x, k \cdot y4\right)\right)\\ \mathbf{elif}\;y1 \leq -2.8 \cdot 10^{-37}:\\ \;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\ \mathbf{elif}\;y1 \leq -8.2 \cdot 10^{-209}:\\ \;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\ \mathbf{elif}\;y1 \leq 2.4 \cdot 10^{-139}:\\ \;\;\;\;\left(-y5\right) \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\\ \mathbf{elif}\;y1 \leq 3.3 \cdot 10^{+22}:\\ \;\;\;\;i \cdot \left(y \cdot \mathsf{fma}\left(-1, c \cdot x, k \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y4 \cdot \left(y1 \cdot \left(k \cdot y2 - j \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
 (if (<= y1 -6.6e+255)
   (* k (* z (- (* b y0) (* i y1))))
   (if (<= y1 -6.8e+31)
     (* y2 (* y1 (fma -1.0 (* a x) (* k y4))))
     (if (<= y1 -2.8e-37)
       (* c (* y4 (- (* y y3) (* t y2))))
       (if (<= y1 -8.2e-209)
         (* i (* t (fma -1.0 (* j y5) (* c z))))
         (if (<= y1 2.4e-139)
           (* (- y5) (* y2 (- (* k y0) (* a t))))
           (if (<= y1 3.3e+22)
             (* i (* y (fma -1.0 (* c x) (* k y5))))
             (* y4 (* y1 (- (* k y2) (* j 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 tmp;
	if (y1 <= -6.6e+255) {
		tmp = k * (z * ((b * y0) - (i * y1)));
	} else if (y1 <= -6.8e+31) {
		tmp = y2 * (y1 * fma(-1.0, (a * x), (k * y4)));
	} else if (y1 <= -2.8e-37) {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	} else if (y1 <= -8.2e-209) {
		tmp = i * (t * fma(-1.0, (j * y5), (c * z)));
	} else if (y1 <= 2.4e-139) {
		tmp = -y5 * (y2 * ((k * y0) - (a * t)));
	} else if (y1 <= 3.3e+22) {
		tmp = i * (y * fma(-1.0, (c * x), (k * y5)));
	} else {
		tmp = y4 * (y1 * ((k * y2) - (j * y3)));
	}
	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 <= -6.6e+255)
		tmp = Float64(k * Float64(z * Float64(Float64(b * y0) - Float64(i * y1))));
	elseif (y1 <= -6.8e+31)
		tmp = Float64(y2 * Float64(y1 * fma(-1.0, Float64(a * x), Float64(k * y4))));
	elseif (y1 <= -2.8e-37)
		tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2))));
	elseif (y1 <= -8.2e-209)
		tmp = Float64(i * Float64(t * fma(-1.0, Float64(j * y5), Float64(c * z))));
	elseif (y1 <= 2.4e-139)
		tmp = Float64(Float64(-y5) * Float64(y2 * Float64(Float64(k * y0) - Float64(a * t))));
	elseif (y1 <= 3.3e+22)
		tmp = Float64(i * Float64(y * fma(-1.0, Float64(c * x), Float64(k * y5))));
	else
		tmp = Float64(y4 * Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y1, -6.6e+255], N[(k * N[(z * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, -6.8e+31], N[(y2 * N[(y1 * N[(-1.0 * N[(a * x), $MachinePrecision] + N[(k * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, -2.8e-37], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, -8.2e-209], N[(i * N[(t * N[(-1.0 * N[(j * y5), $MachinePrecision] + N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 2.4e-139], N[((-y5) * N[(y2 * N[(N[(k * y0), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 3.3e+22], N[(i * N[(y * N[(-1.0 * N[(c * x), $MachinePrecision] + N[(k * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y4 * N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y1 \leq -6.6 \cdot 10^{+255}:\\
\;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\

\mathbf{elif}\;y1 \leq -6.8 \cdot 10^{+31}:\\
\;\;\;\;y2 \cdot \left(y1 \cdot \mathsf{fma}\left(-1, a \cdot x, k \cdot y4\right)\right)\\

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

\mathbf{elif}\;y1 \leq -8.2 \cdot 10^{-209}:\\
\;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\

\mathbf{elif}\;y1 \leq 2.4 \cdot 10^{-139}:\\
\;\;\;\;\left(-y5\right) \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\\

\mathbf{elif}\;y1 \leq 3.3 \cdot 10^{+22}:\\
\;\;\;\;i \cdot \left(y \cdot \mathsf{fma}\left(-1, c \cdot x, k \cdot y5\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y4 \cdot \left(y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if y1 < -6.59999999999999963e255

    1. Initial program 0.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 rewrites64.9%

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

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

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

    if -6.59999999999999963e255 < y1 < -6.7999999999999996e31

    1. Initial program 28.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.0%

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

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

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

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

        \[\leadsto y2 \cdot \left(y1 \cdot \mathsf{fma}\left(-1, a \cdot x, k \cdot y4\right)\right) \]
      4. lower-*.f6449.5

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

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

    if -6.7999999999999996e31 < y1 < -2.8000000000000001e-37

    1. Initial program 21.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 rewrites72.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-*.f6465.0

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

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

    if -2.8000000000000001e-37 < y1 < -8.19999999999999955e-209

    1. Initial program 32.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 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 rewrites58.8%

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

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

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

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

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

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

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

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

    if -8.19999999999999955e-209 < y1 < 2.40000000000000015e-139

    1. Initial program 47.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 y5 around -inf

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \left(y5 \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\right) \]
      4. lower-*.f6447.1

        \[\leadsto -1 \cdot \left(y5 \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\right) \]
    8. Applied rewrites47.1%

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

    if 2.40000000000000015e-139 < y1 < 3.2999999999999998e22

    1. Initial program 37.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 rewrites59.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 y around -inf

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

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

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

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

        \[\leadsto i \cdot \left(y \cdot \mathsf{fma}\left(-1, c \cdot x, k \cdot y5\right)\right) \]
      5. lower-*.f6453.1

        \[\leadsto i \cdot \left(y \cdot \mathsf{fma}\left(-1, c \cdot x, k \cdot y5\right)\right) \]
    8. Applied rewrites53.1%

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

    if 3.2999999999999998e22 < y1

    1. Initial program 30.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 rewrites33.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 y1 around inf

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

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

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

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

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

      \[\leadsto y4 \cdot \left(y1 \cdot \color{blue}{\left(k \cdot y2 - j \cdot y3\right)}\right) \]
  3. Recombined 7 regimes into one program.
  4. Final simplification51.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y1 \leq -6.6 \cdot 10^{+255}:\\ \;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\ \mathbf{elif}\;y1 \leq -6.8 \cdot 10^{+31}:\\ \;\;\;\;y2 \cdot \left(y1 \cdot \mathsf{fma}\left(-1, a \cdot x, k \cdot y4\right)\right)\\ \mathbf{elif}\;y1 \leq -2.8 \cdot 10^{-37}:\\ \;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\ \mathbf{elif}\;y1 \leq -8.2 \cdot 10^{-209}:\\ \;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\ \mathbf{elif}\;y1 \leq 2.4 \cdot 10^{-139}:\\ \;\;\;\;\left(-y5\right) \cdot \left(y2 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\\ \mathbf{elif}\;y1 \leq 3.3 \cdot 10^{+22}:\\ \;\;\;\;i \cdot \left(y \cdot \mathsf{fma}\left(-1, c \cdot x, k \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y4 \cdot \left(y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 32.3% accurate, 3.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y1 \leq -6.6 \cdot 10^{+255}:\\ \;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\ \mathbf{elif}\;y1 \leq -6.8 \cdot 10^{+31}:\\ \;\;\;\;y2 \cdot \left(y1 \cdot \mathsf{fma}\left(-1, a \cdot x, k \cdot y4\right)\right)\\ \mathbf{elif}\;y1 \leq -2.8 \cdot 10^{-37}:\\ \;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\ \mathbf{elif}\;y1 \leq -7.6 \cdot 10^{-162}:\\ \;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\ \mathbf{elif}\;y1 \leq 9.6 \cdot 10^{-243}:\\ \;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\ \mathbf{elif}\;y1 \leq 3.3 \cdot 10^{+22}:\\ \;\;\;\;i \cdot \left(y \cdot \mathsf{fma}\left(-1, c \cdot x, k \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y4 \cdot \left(y1 \cdot \left(k \cdot y2 - j \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
 (if (<= y1 -6.6e+255)
   (* k (* z (- (* b y0) (* i y1))))
   (if (<= y1 -6.8e+31)
     (* y2 (* y1 (fma -1.0 (* a x) (* k y4))))
     (if (<= y1 -2.8e-37)
       (* c (* y4 (- (* y y3) (* t y2))))
       (if (<= y1 -7.6e-162)
         (* i (* t (fma -1.0 (* j y5) (* c z))))
         (if (<= y1 9.6e-243)
           (* b (* y4 (- (* j t) (* k y))))
           (if (<= y1 3.3e+22)
             (* i (* y (fma -1.0 (* c x) (* k y5))))
             (* y4 (* y1 (- (* k y2) (* j 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 tmp;
	if (y1 <= -6.6e+255) {
		tmp = k * (z * ((b * y0) - (i * y1)));
	} else if (y1 <= -6.8e+31) {
		tmp = y2 * (y1 * fma(-1.0, (a * x), (k * y4)));
	} else if (y1 <= -2.8e-37) {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	} else if (y1 <= -7.6e-162) {
		tmp = i * (t * fma(-1.0, (j * y5), (c * z)));
	} else if (y1 <= 9.6e-243) {
		tmp = b * (y4 * ((j * t) - (k * y)));
	} else if (y1 <= 3.3e+22) {
		tmp = i * (y * fma(-1.0, (c * x), (k * y5)));
	} else {
		tmp = y4 * (y1 * ((k * y2) - (j * y3)));
	}
	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 <= -6.6e+255)
		tmp = Float64(k * Float64(z * Float64(Float64(b * y0) - Float64(i * y1))));
	elseif (y1 <= -6.8e+31)
		tmp = Float64(y2 * Float64(y1 * fma(-1.0, Float64(a * x), Float64(k * y4))));
	elseif (y1 <= -2.8e-37)
		tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2))));
	elseif (y1 <= -7.6e-162)
		tmp = Float64(i * Float64(t * fma(-1.0, Float64(j * y5), Float64(c * z))));
	elseif (y1 <= 9.6e-243)
		tmp = Float64(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y))));
	elseif (y1 <= 3.3e+22)
		tmp = Float64(i * Float64(y * fma(-1.0, Float64(c * x), Float64(k * y5))));
	else
		tmp = Float64(y4 * Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y1, -6.6e+255], N[(k * N[(z * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, -6.8e+31], N[(y2 * N[(y1 * N[(-1.0 * N[(a * x), $MachinePrecision] + N[(k * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, -2.8e-37], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, -7.6e-162], N[(i * N[(t * N[(-1.0 * N[(j * y5), $MachinePrecision] + N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 9.6e-243], N[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 3.3e+22], N[(i * N[(y * N[(-1.0 * N[(c * x), $MachinePrecision] + N[(k * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y4 * N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y1 \leq -6.6 \cdot 10^{+255}:\\
\;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\

\mathbf{elif}\;y1 \leq -6.8 \cdot 10^{+31}:\\
\;\;\;\;y2 \cdot \left(y1 \cdot \mathsf{fma}\left(-1, a \cdot x, k \cdot y4\right)\right)\\

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

\mathbf{elif}\;y1 \leq -7.6 \cdot 10^{-162}:\\
\;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\

\mathbf{elif}\;y1 \leq 9.6 \cdot 10^{-243}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\

\mathbf{elif}\;y1 \leq 3.3 \cdot 10^{+22}:\\
\;\;\;\;i \cdot \left(y \cdot \mathsf{fma}\left(-1, c \cdot x, k \cdot y5\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y4 \cdot \left(y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if y1 < -6.59999999999999963e255

    1. Initial program 0.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 rewrites64.9%

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

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

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

    if -6.59999999999999963e255 < y1 < -6.7999999999999996e31

    1. Initial program 28.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.0%

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

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

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

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

        \[\leadsto y2 \cdot \left(y1 \cdot \mathsf{fma}\left(-1, a \cdot x, k \cdot y4\right)\right) \]
      4. lower-*.f6449.5

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

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

    if -6.7999999999999996e31 < y1 < -2.8000000000000001e-37

    1. Initial program 21.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 rewrites72.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-*.f6465.0

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

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

    if -2.8000000000000001e-37 < y1 < -7.6000000000000001e-162

    1. Initial program 42.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 rewrites69.8%

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

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

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

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

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

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

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

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

    if -7.6000000000000001e-162 < y1 < 9.6000000000000004e-243

    1. Initial program 44.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 rewrites35.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)} \]
    6. Taylor expanded in y4 around inf

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

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      2. lift-*.f64N/A

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

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot \color{blue}{y}\right)\right) \]
      4. lift-*.f6441.5

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - \color{blue}{k \cdot y}\right)\right) \]
    8. Applied rewrites41.5%

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

    if 9.6000000000000004e-243 < y1 < 3.2999999999999998e22

    1. Initial program 36.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 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 rewrites56.2%

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

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

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

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

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

        \[\leadsto i \cdot \left(y \cdot \mathsf{fma}\left(-1, c \cdot x, k \cdot y5\right)\right) \]
      5. lower-*.f6447.4

        \[\leadsto i \cdot \left(y \cdot \mathsf{fma}\left(-1, c \cdot x, k \cdot y5\right)\right) \]
    8. Applied rewrites47.4%

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

    if 3.2999999999999998e22 < y1

    1. Initial program 30.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 rewrites33.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 y1 around inf

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

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

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

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

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

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

Alternative 11: 31.6% accurate, 3.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y1 \leq -1.75 \cdot 10^{+39}:\\
\;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\

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

\mathbf{elif}\;y1 \leq -7.6 \cdot 10^{-162}:\\
\;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\

\mathbf{elif}\;y1 \leq 9.6 \cdot 10^{-243}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\

\mathbf{elif}\;y1 \leq 3.3 \cdot 10^{+22}:\\
\;\;\;\;i \cdot \left(y \cdot \mathsf{fma}\left(-1, c \cdot x, k \cdot y5\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y4 \cdot \left(y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\


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

    1. Initial program 21.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 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 rewrites48.6%

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

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

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

    if -1.7500000000000001e39 < y1 < -2.8000000000000001e-37

    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 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 rewrites73.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 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-*.f6460.7

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

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

    if -2.8000000000000001e-37 < y1 < -7.6000000000000001e-162

    1. Initial program 42.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 rewrites69.8%

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

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

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

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

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

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

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

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

    if -7.6000000000000001e-162 < y1 < 9.6000000000000004e-243

    1. Initial program 44.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 rewrites35.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)} \]
    6. Taylor expanded in y4 around inf

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

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      2. lift-*.f64N/A

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

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot \color{blue}{y}\right)\right) \]
      4. lift-*.f6441.5

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - \color{blue}{k \cdot y}\right)\right) \]
    8. Applied rewrites41.5%

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

    if 9.6000000000000004e-243 < y1 < 3.2999999999999998e22

    1. Initial program 36.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 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 rewrites56.2%

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

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

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

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

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

        \[\leadsto i \cdot \left(y \cdot \mathsf{fma}\left(-1, c \cdot x, k \cdot y5\right)\right) \]
      5. lower-*.f6447.4

        \[\leadsto i \cdot \left(y \cdot \mathsf{fma}\left(-1, c \cdot x, k \cdot y5\right)\right) \]
    8. Applied rewrites47.4%

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

    if 3.2999999999999998e22 < y1

    1. Initial program 30.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 rewrites33.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 y1 around inf

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

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

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

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

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

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

Alternative 12: 31.9% accurate, 3.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y1 \leq -1.75 \cdot 10^{+39}:\\
\;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\

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

\mathbf{elif}\;y1 \leq -7.6 \cdot 10^{-162}:\\
\;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\

\mathbf{elif}\;y1 \leq 7.6 \cdot 10^{-255}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\

\mathbf{elif}\;y1 \leq 1.65 \cdot 10^{-15}:\\
\;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y4 \cdot \left(y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\


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

    1. Initial program 21.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 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 rewrites48.6%

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

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

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

    if -1.7500000000000001e39 < y1 < -2.8000000000000001e-37

    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 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 rewrites73.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 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-*.f6460.7

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

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

    if -2.8000000000000001e-37 < y1 < -7.6000000000000001e-162

    1. Initial program 42.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 rewrites69.8%

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

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

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

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

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

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

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

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

    if -7.6000000000000001e-162 < y1 < 7.6e-255

    1. Initial program 42.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 rewrites31.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)} \]
    6. Taylor expanded in y4 around inf

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

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      2. lift-*.f64N/A

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

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot \color{blue}{y}\right)\right) \]
      4. lift-*.f6440.0

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - \color{blue}{k \cdot y}\right)\right) \]
    8. Applied rewrites40.0%

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

    if 7.6e-255 < y1 < 1.65e-15

    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 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 rewrites48.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.3

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

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

    if 1.65e-15 < y1

    1. Initial program 32.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 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 rewrites32.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 y4 \cdot \left(y1 \cdot \color{blue}{\left(k \cdot y2 - j \cdot y3\right)}\right) \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

Alternative 13: 31.3% accurate, 3.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y2 \leq -5.7 \cdot 10^{+54}:\\ \;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\\ \mathbf{elif}\;y2 \leq -1.02 \cdot 10^{-25}:\\ \;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\ \mathbf{elif}\;y2 \leq 6.5 \cdot 10^{-145}:\\ \;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\ \mathbf{elif}\;y2 \leq 6.3 \cdot 10^{+38}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{elif}\;y2 \leq 1.8 \cdot 10^{+204}:\\ \;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= y2 -5.7e+54)
   (* k (* y2 (- (* y1 y4) (* y0 y5))))
   (if (<= y2 -1.02e-25)
     (* i (* z (- (* c t) (* k y1))))
     (if (<= y2 6.5e-145)
       (* a (* b (- (* x y) (* t z))))
       (if (<= y2 6.3e+38)
         (* i (* y1 (- (* j x) (* k z))))
         (if (<= y2 1.8e+204)
           (* a (* y5 (- (* t y2) (* y y3))))
           (* y2 (* x (- (* c y0) (* a y1))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y2 <= -5.7e+54) {
		tmp = k * (y2 * ((y1 * y4) - (y0 * y5)));
	} else if (y2 <= -1.02e-25) {
		tmp = i * (z * ((c * t) - (k * y1)));
	} else if (y2 <= 6.5e-145) {
		tmp = a * (b * ((x * y) - (t * z)));
	} else if (y2 <= 6.3e+38) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else if (y2 <= 1.8e+204) {
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	} else {
		tmp = y2 * (x * ((c * y0) - (a * y1)));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

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

\mathbf{elif}\;y2 \leq -1.02 \cdot 10^{-25}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\

\mathbf{elif}\;y2 \leq 6.5 \cdot 10^{-145}:\\
\;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\

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

\mathbf{elif}\;y2 \leq 1.8 \cdot 10^{+204}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y2 < -5.6999999999999997e54

    1. Initial program 24.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 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 rewrites55.2%

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

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

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

    if -5.6999999999999997e54 < y2 < -1.01999999999999998e-25

    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 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.2%

      \[\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-*.f6462.9

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

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

    if -1.01999999999999998e-25 < y2 < 6.5000000000000002e-145

    1. Initial program 46.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 rewrites28.9%

      \[\leadsto \color{blue}{b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    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--.f6434.8

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

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

    if 6.5000000000000002e-145 < y2 < 6.30000000000000003e38

    1. Initial program 26.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 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 rewrites42.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-*.f6443.4

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

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

    if 6.30000000000000003e38 < y2 < 1.8000000000000001e204

    1. Initial program 26.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 y5 around -inf

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      5. lift--.f6446.0

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot \color{blue}{y3}\right)\right) \]
    8. Applied rewrites46.0%

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

    if 1.8000000000000001e204 < y2

    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 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 rewrites68.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 x around inf

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

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \]
      2. lift-*.f64N/A

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

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

        \[\leadsto y2 \cdot \left(x \cdot \left(c \cdot y0 - \color{blue}{a \cdot y1}\right)\right) \]
    8. Applied rewrites59.0%

      \[\leadsto y2 \cdot \left(x \cdot \color{blue}{\left(c \cdot y0 - a \cdot y1\right)}\right) \]
  3. Recombined 6 regimes into one program.
  4. Add Preprocessing

Alternative 14: 30.5% accurate, 4.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{+55}:\\
\;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\

\mathbf{elif}\;x \leq 3.5 \cdot 10^{-296}:\\
\;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\

\mathbf{elif}\;x \leq 1.7 \cdot 10^{-109}:\\
\;\;\;\;k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right)\\

\mathbf{elif}\;x \leq 1.7 \cdot 10^{-57}:\\
\;\;\;\;y4 \cdot \left(t \cdot \left(b \cdot j - c \cdot y2\right)\right)\\

\mathbf{else}:\\
\;\;\;\;i \cdot \left(y \cdot \mathsf{fma}\left(-1, c \cdot x, k \cdot y5\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -1.4499999999999999e55

    1. Initial program 38.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 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 rewrites43.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-*.f6446.8

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

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

    if -1.4499999999999999e55 < x < 3.4999999999999999e-296

    1. Initial program 33.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.2%

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

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

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

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

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

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

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

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

    if 3.4999999999999999e-296 < x < 1.70000000000000006e-109

    1. Initial program 37.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 rewrites34.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 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-*.f6446.5

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

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

    if 1.70000000000000006e-109 < x < 1.70000000000000008e-57

    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 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.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 b around inf

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

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

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

        \[\leadsto y4 \cdot \left(b \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      4. lift--.f6431.8

        \[\leadsto y4 \cdot \left(b \cdot \left(j \cdot t - k \cdot \color{blue}{y}\right)\right) \]
    8. Applied rewrites31.8%

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

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

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

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

        \[\leadsto y4 \cdot \left(t \cdot \left(b \cdot j - c \cdot y2\right)\right) \]
      4. lower-*.f6480.1

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

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

    if 1.70000000000000008e-57 < x

    1. Initial program 30.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 rewrites46.2%

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

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

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

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

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

        \[\leadsto i \cdot \left(y \cdot \mathsf{fma}\left(-1, c \cdot x, k \cdot y5\right)\right) \]
      5. lower-*.f6447.6

        \[\leadsto i \cdot \left(y \cdot \mathsf{fma}\left(-1, c \cdot x, k \cdot y5\right)\right) \]
    8. Applied rewrites47.6%

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

Alternative 15: 31.5% accurate, 4.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y1 \leq -1.75 \cdot 10^{+39}:\\
\;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\

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

\mathbf{elif}\;y1 \leq 7.6 \cdot 10^{-255}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\

\mathbf{elif}\;y1 \leq 1.65 \cdot 10^{-15}:\\
\;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y4 \cdot \left(y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y1 < -1.7500000000000001e39

    1. Initial program 21.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 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 rewrites48.6%

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

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

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

    if -1.7500000000000001e39 < y1 < -4.3000000000000003e-40

    1. Initial program 25.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 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 rewrites69.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 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-*.f6457.0

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

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

    if -4.3000000000000003e-40 < y1 < 7.6e-255

    1. Initial program 41.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 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 rewrites35.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 y4 around inf

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

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      2. lift-*.f64N/A

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

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot \color{blue}{y}\right)\right) \]
      4. lift-*.f6439.1

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - \color{blue}{k \cdot y}\right)\right) \]
    8. Applied rewrites39.1%

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

    if 7.6e-255 < y1 < 1.65e-15

    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 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 rewrites48.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.3

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

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

    if 1.65e-15 < y1

    1. Initial program 32.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 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 rewrites32.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 y4 \cdot \left(y1 \cdot \color{blue}{\left(k \cdot y2 - j \cdot y3\right)}\right) \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

Alternative 16: 31.5% accurate, 4.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y2 \leq -5.7 \cdot 10^{+54}:\\ \;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\\ \mathbf{elif}\;y2 \leq -1.02 \cdot 10^{-25}:\\ \;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\ \mathbf{elif}\;y2 \leq 6.5 \cdot 10^{-145}:\\ \;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\ \mathbf{elif}\;y2 \leq 6.3 \cdot 10^{+38}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - 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
 (if (<= y2 -5.7e+54)
   (* k (* y2 (- (* y1 y4) (* y0 y5))))
   (if (<= y2 -1.02e-25)
     (* i (* z (- (* c t) (* k y1))))
     (if (<= y2 6.5e-145)
       (* a (* b (- (* x y) (* t z))))
       (if (<= y2 6.3e+38)
         (* i (* y1 (- (* j x) (* k z))))
         (* a (* y5 (- (* t y2) (* 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 tmp;
	if (y2 <= -5.7e+54) {
		tmp = k * (y2 * ((y1 * y4) - (y0 * y5)));
	} else if (y2 <= -1.02e-25) {
		tmp = i * (z * ((c * t) - (k * y1)));
	} else if (y2 <= 6.5e-145) {
		tmp = a * (b * ((x * y) - (t * z)));
	} else if (y2 <= 6.3e+38) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else {
		tmp = a * (y5 * ((t * y2) - (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) :: tmp
    if (y2 <= (-5.7d+54)) then
        tmp = k * (y2 * ((y1 * y4) - (y0 * y5)))
    else if (y2 <= (-1.02d-25)) then
        tmp = i * (z * ((c * t) - (k * y1)))
    else if (y2 <= 6.5d-145) then
        tmp = a * (b * ((x * y) - (t * z)))
    else if (y2 <= 6.3d+38) then
        tmp = i * (y1 * ((j * x) - (k * z)))
    else
        tmp = a * (y5 * ((t * y2) - (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 tmp;
	if (y2 <= -5.7e+54) {
		tmp = k * (y2 * ((y1 * y4) - (y0 * y5)));
	} else if (y2 <= -1.02e-25) {
		tmp = i * (z * ((c * t) - (k * y1)));
	} else if (y2 <= 6.5e-145) {
		tmp = a * (b * ((x * y) - (t * z)));
	} else if (y2 <= 6.3e+38) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else {
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y2 <= -5.7e+54:
		tmp = k * (y2 * ((y1 * y4) - (y0 * y5)))
	elif y2 <= -1.02e-25:
		tmp = i * (z * ((c * t) - (k * y1)))
	elif y2 <= 6.5e-145:
		tmp = a * (b * ((x * y) - (t * z)))
	elif y2 <= 6.3e+38:
		tmp = i * (y1 * ((j * x) - (k * z)))
	else:
		tmp = a * (y5 * ((t * y2) - (y * y3)))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (y2 <= -5.7e+54)
		tmp = Float64(k * Float64(y2 * Float64(Float64(y1 * y4) - Float64(y0 * y5))));
	elseif (y2 <= -1.02e-25)
		tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1))));
	elseif (y2 <= 6.5e-145)
		tmp = Float64(a * Float64(b * Float64(Float64(x * y) - Float64(t * z))));
	elseif (y2 <= 6.3e+38)
		tmp = Float64(i * Float64(y1 * Float64(Float64(j * x) - Float64(k * z))));
	else
		tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - 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)
	tmp = 0.0;
	if (y2 <= -5.7e+54)
		tmp = k * (y2 * ((y1 * y4) - (y0 * y5)));
	elseif (y2 <= -1.02e-25)
		tmp = i * (z * ((c * t) - (k * y1)));
	elseif (y2 <= 6.5e-145)
		tmp = a * (b * ((x * y) - (t * z)));
	elseif (y2 <= 6.3e+38)
		tmp = i * (y1 * ((j * x) - (k * z)));
	else
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y2, -5.7e+54], N[(k * N[(y2 * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, -1.02e-25], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 6.5e-145], N[(a * N[(b * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 6.3e+38], N[(i * N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y2 \leq -1.02 \cdot 10^{-25}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\

\mathbf{elif}\;y2 \leq 6.5 \cdot 10^{-145}:\\
\;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y2 < -5.6999999999999997e54

    1. Initial program 24.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 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 rewrites55.2%

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

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

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

    if -5.6999999999999997e54 < y2 < -1.01999999999999998e-25

    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 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.2%

      \[\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-*.f6462.9

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

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

    if -1.01999999999999998e-25 < y2 < 6.5000000000000002e-145

    1. Initial program 46.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 rewrites28.9%

      \[\leadsto \color{blue}{b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    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--.f6434.8

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

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

    if 6.5000000000000002e-145 < y2 < 6.30000000000000003e38

    1. Initial program 26.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 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 rewrites42.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-*.f6443.4

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

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

    if 6.30000000000000003e38 < y2

    1. Initial program 32.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 y5 around -inf

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      5. lift--.f6441.2

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot \color{blue}{y3}\right)\right) \]
    8. Applied rewrites41.2%

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

Alternative 17: 30.4% accurate, 4.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -5.3 \cdot 10^{+163}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{elif}\;x \leq -1.38 \cdot 10^{+107}:\\ \;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\ \mathbf{elif}\;x \leq -7.2 \cdot 10^{-18}:\\ \;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\ \mathbf{elif}\;x \leq 2.95 \cdot 10^{+68}:\\ \;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\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 (<= x -5.3e+163)
   (* i (* y1 (- (* j x) (* k z))))
   (if (<= x -1.38e+107)
     (* c (* y0 (- (* x y2) (* y3 z))))
     (if (<= x -7.2e-18)
       (* k (* z (- (* b y0) (* i y1))))
       (if (<= x 2.95e+68)
         (* a (* y5 (- (* t y2) (* y y3))))
         (* 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 (x <= -5.3e+163) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else if (x <= -1.38e+107) {
		tmp = c * (y0 * ((x * y2) - (y3 * z)));
	} else if (x <= -7.2e-18) {
		tmp = k * (z * ((b * y0) - (i * y1)));
	} else if (x <= 2.95e+68) {
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	} 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 (x <= (-5.3d+163)) then
        tmp = i * (y1 * ((j * x) - (k * z)))
    else if (x <= (-1.38d+107)) then
        tmp = c * (y0 * ((x * y2) - (y3 * z)))
    else if (x <= (-7.2d-18)) then
        tmp = k * (z * ((b * y0) - (i * y1)))
    else if (x <= 2.95d+68) then
        tmp = a * (y5 * ((t * y2) - (y * y3)))
    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 (x <= -5.3e+163) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else if (x <= -1.38e+107) {
		tmp = c * (y0 * ((x * y2) - (y3 * z)));
	} else if (x <= -7.2e-18) {
		tmp = k * (z * ((b * y0) - (i * y1)));
	} else if (x <= 2.95e+68) {
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	} 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 x <= -5.3e+163:
		tmp = i * (y1 * ((j * x) - (k * z)))
	elif x <= -1.38e+107:
		tmp = c * (y0 * ((x * y2) - (y3 * z)))
	elif x <= -7.2e-18:
		tmp = k * (z * ((b * y0) - (i * y1)))
	elif x <= 2.95e+68:
		tmp = a * (y5 * ((t * y2) - (y * y3)))
	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 (x <= -5.3e+163)
		tmp = Float64(i * Float64(y1 * Float64(Float64(j * x) - Float64(k * z))));
	elseif (x <= -1.38e+107)
		tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z))));
	elseif (x <= -7.2e-18)
		tmp = Float64(k * Float64(z * Float64(Float64(b * y0) - Float64(i * y1))));
	elseif (x <= 2.95e+68)
		tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))));
	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 (x <= -5.3e+163)
		tmp = i * (y1 * ((j * x) - (k * z)));
	elseif (x <= -1.38e+107)
		tmp = c * (y0 * ((x * y2) - (y3 * z)));
	elseif (x <= -7.2e-18)
		tmp = k * (z * ((b * y0) - (i * y1)));
	elseif (x <= 2.95e+68)
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	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[x, -5.3e+163], N[(i * N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.38e+107], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -7.2e-18], N[(k * N[(z * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.95e+68], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $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}\;x \leq -5.3 \cdot 10^{+163}:\\
\;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\

\mathbf{elif}\;x \leq -1.38 \cdot 10^{+107}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\

\mathbf{elif}\;x \leq -7.2 \cdot 10^{-18}:\\
\;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\

\mathbf{elif}\;x \leq 2.95 \cdot 10^{+68}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\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 x < -5.29999999999999983e163

    1. Initial program 42.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 rewrites50.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-*.f6458.0

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

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

    if -5.29999999999999983e163 < x < -1.38e107

    1. Initial program 28.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 y0 around inf

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

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

        \[\leadsto y0 \cdot \left(\left(-1 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) + c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{b \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    5. Applied rewrites43.3%

      \[\leadsto \color{blue}{y0 \cdot \left(\mathsf{fma}\left(-1, y5 \cdot \left(k \cdot y2 - j \cdot y3\right), c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    6. Taylor expanded in c around inf

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

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

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

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

        \[\leadsto c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \]
      5. lift--.f6457.5

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

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

    if -1.38e107 < x < -7.20000000000000021e-18

    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 rewrites42.2%

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

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

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

    if -7.20000000000000021e-18 < x < 2.94999999999999993e68

    1. Initial program 36.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 y5 around -inf

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      5. lift--.f6432.9

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot \color{blue}{y3}\right)\right) \]
    8. Applied rewrites32.9%

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

    if 2.94999999999999993e68 < x

    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 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 rewrites39.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)} \]
    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--.f6451.3

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

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

Alternative 18: 28.3% accurate, 4.2× speedup?

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

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

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

\\
\begin{array}{l}
t_1 := i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{if}\;x \leq -1.45 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -1.55 \cdot 10^{-161}:\\
\;\;\;\;i \cdot \left(\left(-j\right) \cdot \left(t \cdot y5\right)\right)\\

\mathbf{elif}\;x \leq 3.5 \cdot 10^{+39}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\

\mathbf{elif}\;x \leq 8.2 \cdot 10^{+108}:\\
\;\;\;\;j \cdot \left(\left(-b\right) \cdot \left(x \cdot y0\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.4499999999999999e55 or 8.1999999999999998e108 < x

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

      \[\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-*.f6447.2

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

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

    if -1.4499999999999999e55 < x < -1.5499999999999999e-161

    1. Initial program 27.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 rewrites39.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 t around -inf

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

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

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

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

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

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

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

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

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

        \[\leadsto i \cdot \left(-1 \cdot \left(j \cdot \left(t \cdot y5\right)\right)\right) \]
      3. lower-*.f6435.6

        \[\leadsto i \cdot \left(-1 \cdot \left(j \cdot \left(t \cdot y5\right)\right)\right) \]
    11. Applied rewrites35.6%

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

    if -1.5499999999999999e-161 < x < 3.5000000000000002e39

    1. Initial program 38.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 rewrites39.9%

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

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

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

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

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

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

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

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

    if 3.5000000000000002e39 < x < 8.1999999999999998e108

    1. Initial program 13.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 y0 around inf

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

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

        \[\leadsto y0 \cdot \left(\left(-1 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) + c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{b \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    5. Applied rewrites36.7%

      \[\leadsto \color{blue}{y0 \cdot \left(\mathsf{fma}\left(-1, y5 \cdot \left(k \cdot y2 - j \cdot y3\right), c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    6. Taylor expanded in j around inf

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

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

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

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

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right) \]
      5. lower-*.f6441.3

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right) \]
    8. Applied rewrites41.3%

      \[\leadsto j \cdot \color{blue}{\left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right)} \]
    9. Taylor expanded in x around inf

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

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

        \[\leadsto j \cdot \left(-1 \cdot \left(b \cdot \left(x \cdot y0\right)\right)\right) \]
      3. lower-*.f6451.3

        \[\leadsto j \cdot \left(-1 \cdot \left(b \cdot \left(x \cdot y0\right)\right)\right) \]
    11. Applied rewrites51.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.45 \cdot 10^{+55}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{elif}\;x \leq -1.55 \cdot 10^{-161}:\\ \;\;\;\;i \cdot \left(\left(-j\right) \cdot \left(t \cdot y5\right)\right)\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{+39}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\ \mathbf{elif}\;x \leq 8.2 \cdot 10^{+108}:\\ \;\;\;\;j \cdot \left(\left(-b\right) \cdot \left(x \cdot y0\right)\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 22.3% accurate, 4.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{+91}:\\
\;\;\;\;a \cdot \left(b \cdot \left(\left(-t\right) \cdot z\right)\right)\\

\mathbf{elif}\;t \leq -6.5 \cdot 10^{-216}:\\
\;\;\;\;a \cdot \left(b \cdot \left(x \cdot y\right)\right)\\

\mathbf{elif}\;t \leq 1.15 \cdot 10^{-35}:\\
\;\;\;\;y0 \cdot \left(y2 \cdot \left(\left(-k\right) \cdot y5\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -3.6e91

    1. Initial program 21.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 rewrites31.3%

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

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

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

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

        \[\leadsto a \cdot \left(b \cdot \left(-1 \cdot \left(t \cdot z\right)\right)\right) \]
      2. lift-*.f6441.3

        \[\leadsto a \cdot \left(b \cdot \left(-1 \cdot \left(t \cdot z\right)\right)\right) \]
    11. Applied rewrites41.3%

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

    if -3.6e91 < t < -6.4999999999999999e-216

    1. Initial program 27.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 rewrites46.6%

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

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

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

      \[\leadsto a \cdot \left(b \cdot \left(x \cdot y\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6430.8

        \[\leadsto a \cdot \left(b \cdot \left(x \cdot y\right)\right) \]
    11. Applied rewrites30.8%

      \[\leadsto a \cdot \left(b \cdot \left(x \cdot y\right)\right) \]

    if -6.4999999999999999e-216 < t < 1.1499999999999999e-35

    1. Initial program 49.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 y0 around inf

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

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

        \[\leadsto y0 \cdot \left(\left(-1 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) + c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{b \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    5. Applied rewrites37.7%

      \[\leadsto \color{blue}{y0 \cdot \left(\mathsf{fma}\left(-1, y5 \cdot \left(k \cdot y2 - j \cdot y3\right), c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    6. Taylor expanded in y2 around inf

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

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

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

        \[\leadsto y0 \cdot \left(y2 \cdot \mathsf{fma}\left(-1, k \cdot y5, c \cdot x\right)\right) \]
      4. lower-*.f6432.0

        \[\leadsto y0 \cdot \left(y2 \cdot \mathsf{fma}\left(-1, k \cdot y5, c \cdot x\right)\right) \]
    8. Applied rewrites32.0%

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

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

        \[\leadsto y0 \cdot \left(y2 \cdot \left(-1 \cdot \left(k \cdot y5\right)\right)\right) \]
      2. lift-*.f6427.7

        \[\leadsto y0 \cdot \left(y2 \cdot \left(-1 \cdot \left(k \cdot y5\right)\right)\right) \]
    11. Applied rewrites27.7%

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

    if 1.1499999999999999e-35 < t < 1.25e84

    1. Initial program 33.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 rewrites38.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 b around inf

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

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

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

        \[\leadsto y4 \cdot \left(b \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      4. lift--.f6441.7

        \[\leadsto y4 \cdot \left(b \cdot \left(j \cdot t - k \cdot \color{blue}{y}\right)\right) \]
    8. Applied rewrites41.7%

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

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

        \[\leadsto y4 \cdot \left(b \cdot \left(-1 \cdot \left(k \cdot y\right)\right)\right) \]
      2. lift-*.f6438.2

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

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

    if 1.25e84 < t

    1. Initial program 31.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 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 rewrites50.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)} \]
    6. Taylor expanded in t around -inf

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

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

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

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

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

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

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

      \[\leadsto i \cdot \left(t \cdot \left(c \cdot z\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6445.9

        \[\leadsto i \cdot \left(t \cdot \left(c \cdot z\right)\right) \]
    11. Applied rewrites45.9%

      \[\leadsto i \cdot \left(t \cdot \left(c \cdot z\right)\right) \]
  3. Recombined 5 regimes into one program.
  4. Final simplification35.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.6 \cdot 10^{+91}:\\ \;\;\;\;a \cdot \left(b \cdot \left(\left(-t\right) \cdot z\right)\right)\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{-216}:\\ \;\;\;\;a \cdot \left(b \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-35}:\\ \;\;\;\;y0 \cdot \left(y2 \cdot \left(\left(-k\right) \cdot y5\right)\right)\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+84}:\\ \;\;\;\;y4 \cdot \left(b \cdot \left(\left(-k\right) \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(t \cdot \left(c \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 31.0% accurate, 4.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+180}:\\ \;\;\;\;a \cdot \left(b \cdot \left(\left(-t\right) \cdot z\right)\right)\\ \mathbf{elif}\;z \leq -7.6 \cdot 10^{+34}:\\ \;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\ \mathbf{elif}\;z \leq 2.22 \cdot 10^{-44}:\\ \;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\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 (<= z -3e+180)
   (* a (* b (* (- t) z)))
   (if (<= z -7.6e+34)
     (* y1 (* z (- (* a y3) (* i k))))
     (if (<= z 2.22e-44)
       (* a (* y5 (- (* t y2) (* y y3))))
       (* 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 (z <= -3e+180) {
		tmp = a * (b * (-t * z));
	} else if (z <= -7.6e+34) {
		tmp = y1 * (z * ((a * y3) - (i * k)));
	} else if (z <= 2.22e-44) {
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	} 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 (z <= (-3d+180)) then
        tmp = a * (b * (-t * z))
    else if (z <= (-7.6d+34)) then
        tmp = y1 * (z * ((a * y3) - (i * k)))
    else if (z <= 2.22d-44) then
        tmp = a * (y5 * ((t * y2) - (y * y3)))
    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 (z <= -3e+180) {
		tmp = a * (b * (-t * z));
	} else if (z <= -7.6e+34) {
		tmp = y1 * (z * ((a * y3) - (i * k)));
	} else if (z <= 2.22e-44) {
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	} 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 z <= -3e+180:
		tmp = a * (b * (-t * z))
	elif z <= -7.6e+34:
		tmp = y1 * (z * ((a * y3) - (i * k)))
	elif z <= 2.22e-44:
		tmp = a * (y5 * ((t * y2) - (y * y3)))
	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 (z <= -3e+180)
		tmp = Float64(a * Float64(b * Float64(Float64(-t) * z)));
	elseif (z <= -7.6e+34)
		tmp = Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k))));
	elseif (z <= 2.22e-44)
		tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))));
	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 (z <= -3e+180)
		tmp = a * (b * (-t * z));
	elseif (z <= -7.6e+34)
		tmp = y1 * (z * ((a * y3) - (i * k)));
	elseif (z <= 2.22e-44)
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	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[z, -3e+180], N[(a * N[(b * N[((-t) * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.6e+34], N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.22e-44], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $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}\;z \leq -3 \cdot 10^{+180}:\\
\;\;\;\;a \cdot \left(b \cdot \left(\left(-t\right) \cdot z\right)\right)\\

\mathbf{elif}\;z \leq -7.6 \cdot 10^{+34}:\\
\;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\

\mathbf{elif}\;z \leq 2.22 \cdot 10^{-44}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\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 z < -3.00000000000000003e180

    1. Initial program 22.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 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 rewrites41.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)} \]
    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--.f6455.7

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

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

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

        \[\leadsto a \cdot \left(b \cdot \left(-1 \cdot \left(t \cdot z\right)\right)\right) \]
      2. lift-*.f6451.3

        \[\leadsto a \cdot \left(b \cdot \left(-1 \cdot \left(t \cdot z\right)\right)\right) \]
    11. Applied rewrites51.3%

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

    if -3.00000000000000003e180 < z < -7.6000000000000003e34

    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 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 rewrites42.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 y1 around -inf

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

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

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

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

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
      5. lower-*.f6439.8

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
    8. Applied rewrites39.8%

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

    if -7.6000000000000003e34 < z < 2.22e-44

    1. Initial program 40.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 y5 around -inf

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      5. lift--.f6435.0

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot \color{blue}{y3}\right)\right) \]
    8. Applied rewrites35.0%

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

    if 2.22e-44 < z

    1. Initial program 30.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.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+180}:\\ \;\;\;\;a \cdot \left(b \cdot \left(\left(-t\right) \cdot z\right)\right)\\ \mathbf{elif}\;z \leq -7.6 \cdot 10^{+34}:\\ \;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\ \mathbf{elif}\;z \leq 2.22 \cdot 10^{-44}:\\ \;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 30.8% accurate, 4.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+209}:\\ \;\;\;\;a \cdot \left(b \cdot \left(\left(-t\right) \cdot z\right)\right)\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-60}:\\ \;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\ \mathbf{elif}\;z \leq 2.22 \cdot 10^{-44}:\\ \;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\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 (<= z -1.05e+209)
   (* a (* b (* (- t) z)))
   (if (<= z -6.5e-60)
     (* k (* z (- (* b y0) (* i y1))))
     (if (<= z 2.22e-44)
       (* a (* y5 (- (* t y2) (* y y3))))
       (* 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 (z <= -1.05e+209) {
		tmp = a * (b * (-t * z));
	} else if (z <= -6.5e-60) {
		tmp = k * (z * ((b * y0) - (i * y1)));
	} else if (z <= 2.22e-44) {
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	} 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 (z <= (-1.05d+209)) then
        tmp = a * (b * (-t * z))
    else if (z <= (-6.5d-60)) then
        tmp = k * (z * ((b * y0) - (i * y1)))
    else if (z <= 2.22d-44) then
        tmp = a * (y5 * ((t * y2) - (y * y3)))
    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 (z <= -1.05e+209) {
		tmp = a * (b * (-t * z));
	} else if (z <= -6.5e-60) {
		tmp = k * (z * ((b * y0) - (i * y1)));
	} else if (z <= 2.22e-44) {
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	} 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 z <= -1.05e+209:
		tmp = a * (b * (-t * z))
	elif z <= -6.5e-60:
		tmp = k * (z * ((b * y0) - (i * y1)))
	elif z <= 2.22e-44:
		tmp = a * (y5 * ((t * y2) - (y * y3)))
	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 (z <= -1.05e+209)
		tmp = Float64(a * Float64(b * Float64(Float64(-t) * z)));
	elseif (z <= -6.5e-60)
		tmp = Float64(k * Float64(z * Float64(Float64(b * y0) - Float64(i * y1))));
	elseif (z <= 2.22e-44)
		tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))));
	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 (z <= -1.05e+209)
		tmp = a * (b * (-t * z));
	elseif (z <= -6.5e-60)
		tmp = k * (z * ((b * y0) - (i * y1)));
	elseif (z <= 2.22e-44)
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	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[z, -1.05e+209], N[(a * N[(b * N[((-t) * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.5e-60], N[(k * N[(z * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.22e-44], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $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}\;z \leq -1.05 \cdot 10^{+209}:\\
\;\;\;\;a \cdot \left(b \cdot \left(\left(-t\right) \cdot z\right)\right)\\

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

\mathbf{elif}\;z \leq 2.22 \cdot 10^{-44}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\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 z < -1.05e209

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

      \[\leadsto \color{blue}{b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    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--.f6461.4

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

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

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

        \[\leadsto a \cdot \left(b \cdot \left(-1 \cdot \left(t \cdot z\right)\right)\right) \]
      2. lift-*.f6461.2

        \[\leadsto a \cdot \left(b \cdot \left(-1 \cdot \left(t \cdot z\right)\right)\right) \]
    11. Applied rewrites61.2%

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

    if -1.05e209 < z < -6.49999999999999995e-60

    1. Initial program 27.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 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 rewrites38.1%

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, a \cdot b - c \cdot i, y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    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--.f6435.1

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

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

    if -6.49999999999999995e-60 < z < 2.22e-44

    1. Initial program 40.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 y5 around -inf

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      5. lift--.f6435.9

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot \color{blue}{y3}\right)\right) \]
    8. Applied rewrites35.9%

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

    if 2.22e-44 < z

    1. Initial program 30.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.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+209}:\\ \;\;\;\;a \cdot \left(b \cdot \left(\left(-t\right) \cdot z\right)\right)\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-60}:\\ \;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\ \mathbf{elif}\;z \leq 2.22 \cdot 10^{-44}:\\ \;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 30.4% accurate, 4.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{+160}:\\ \;\;\;\;a \cdot \left(b \cdot \left(\left(-t\right) \cdot z\right)\right)\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{+36}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{elif}\;z \leq 2.22 \cdot 10^{-44}:\\ \;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\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 (<= z -5.4e+160)
   (* a (* b (* (- t) z)))
   (if (<= z -5.8e+36)
     (* i (* y1 (- (* j x) (* k z))))
     (if (<= z 2.22e-44)
       (* a (* y5 (- (* t y2) (* y y3))))
       (* 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 (z <= -5.4e+160) {
		tmp = a * (b * (-t * z));
	} else if (z <= -5.8e+36) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else if (z <= 2.22e-44) {
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	} 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 (z <= (-5.4d+160)) then
        tmp = a * (b * (-t * z))
    else if (z <= (-5.8d+36)) then
        tmp = i * (y1 * ((j * x) - (k * z)))
    else if (z <= 2.22d-44) then
        tmp = a * (y5 * ((t * y2) - (y * y3)))
    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 (z <= -5.4e+160) {
		tmp = a * (b * (-t * z));
	} else if (z <= -5.8e+36) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else if (z <= 2.22e-44) {
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	} 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 z <= -5.4e+160:
		tmp = a * (b * (-t * z))
	elif z <= -5.8e+36:
		tmp = i * (y1 * ((j * x) - (k * z)))
	elif z <= 2.22e-44:
		tmp = a * (y5 * ((t * y2) - (y * y3)))
	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 (z <= -5.4e+160)
		tmp = Float64(a * Float64(b * Float64(Float64(-t) * z)));
	elseif (z <= -5.8e+36)
		tmp = Float64(i * Float64(y1 * Float64(Float64(j * x) - Float64(k * z))));
	elseif (z <= 2.22e-44)
		tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))));
	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 (z <= -5.4e+160)
		tmp = a * (b * (-t * z));
	elseif (z <= -5.8e+36)
		tmp = i * (y1 * ((j * x) - (k * z)));
	elseif (z <= 2.22e-44)
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	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[z, -5.4e+160], N[(a * N[(b * N[((-t) * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.8e+36], N[(i * N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.22e-44], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $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}\;z \leq -5.4 \cdot 10^{+160}:\\
\;\;\;\;a \cdot \left(b \cdot \left(\left(-t\right) \cdot z\right)\right)\\

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

\mathbf{elif}\;z \leq 2.22 \cdot 10^{-44}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\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 z < -5.4e160

    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 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 rewrites41.6%

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

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

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

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

        \[\leadsto a \cdot \left(b \cdot \left(-1 \cdot \left(t \cdot z\right)\right)\right) \]
      2. lift-*.f6445.5

        \[\leadsto a \cdot \left(b \cdot \left(-1 \cdot \left(t \cdot z\right)\right)\right) \]
    11. Applied rewrites45.5%

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

    if -5.4e160 < z < -5.8e36

    1. Initial program 15.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 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 rewrites42.9%

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

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

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

    if -5.8e36 < z < 2.22e-44

    1. Initial program 40.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 y5 around -inf

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      5. lift--.f6435.0

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot \color{blue}{y3}\right)\right) \]
    8. Applied rewrites35.0%

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

    if 2.22e-44 < z

    1. Initial program 30.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.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{+160}:\\ \;\;\;\;a \cdot \left(b \cdot \left(\left(-t\right) \cdot z\right)\right)\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{+36}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{elif}\;z \leq 2.22 \cdot 10^{-44}:\\ \;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 30.0% accurate, 4.8× speedup?

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

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

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

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

\mathbf{elif}\;x \leq 3.6 \cdot 10^{+47}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\

\mathbf{elif}\;x \leq 8.2 \cdot 10^{+108}:\\
\;\;\;\;j \cdot \left(\left(-b\right) \cdot \left(x \cdot y0\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.12000000000000005e-17 or 8.1999999999999998e108 < x

    1. Initial program 33.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 rewrites46.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)} \]
    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-*.f6444.9

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

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

    if -1.12000000000000005e-17 < x < 3.60000000000000008e47

    1. Initial program 36.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 y5 around -inf

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      5. lift--.f6432.9

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot \color{blue}{y3}\right)\right) \]
    8. Applied rewrites32.9%

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

    if 3.60000000000000008e47 < x < 8.1999999999999998e108

    1. Initial program 14.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 y0 around inf

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

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

        \[\leadsto y0 \cdot \left(\left(-1 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) + c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{b \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    5. Applied rewrites35.3%

      \[\leadsto \color{blue}{y0 \cdot \left(\mathsf{fma}\left(-1, y5 \cdot \left(k \cdot y2 - j \cdot y3\right), c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    6. Taylor expanded in j around inf

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

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

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

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

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right) \]
      5. lower-*.f6440.4

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right) \]
    8. Applied rewrites40.4%

      \[\leadsto j \cdot \color{blue}{\left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right)} \]
    9. Taylor expanded in x around inf

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

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

        \[\leadsto j \cdot \left(-1 \cdot \left(b \cdot \left(x \cdot y0\right)\right)\right) \]
      3. lower-*.f6451.1

        \[\leadsto j \cdot \left(-1 \cdot \left(b \cdot \left(x \cdot y0\right)\right)\right) \]
    11. Applied rewrites51.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.12 \cdot 10^{-17}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{+47}:\\ \;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \mathbf{elif}\;x \leq 8.2 \cdot 10^{+108}:\\ \;\;\;\;j \cdot \left(\left(-b\right) \cdot \left(x \cdot y0\right)\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 27.8% accurate, 4.8× speedup?

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

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

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

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

\mathbf{elif}\;b \leq -4.4 \cdot 10^{+173}:\\
\;\;\;\;a \cdot \left(b \cdot \left(x \cdot y\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;y4 \cdot \left(b \cdot \left(\left(-k\right) \cdot y\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.7999999999999999e252

    1. Initial program 23.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 y0 around inf

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

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

        \[\leadsto y0 \cdot \left(\left(-1 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) + c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{b \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    5. Applied rewrites46.2%

      \[\leadsto \color{blue}{y0 \cdot \left(\mathsf{fma}\left(-1, y5 \cdot \left(k \cdot y2 - j \cdot y3\right), c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    6. Taylor expanded in j around inf

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

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

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

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

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right) \]
      5. lower-*.f6454.9

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right) \]
    8. Applied rewrites54.9%

      \[\leadsto j \cdot \color{blue}{\left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right)} \]
    9. Taylor expanded in x around inf

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

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

        \[\leadsto j \cdot \left(-1 \cdot \left(b \cdot \left(x \cdot y0\right)\right)\right) \]
      3. lower-*.f6454.9

        \[\leadsto j \cdot \left(-1 \cdot \left(b \cdot \left(x \cdot y0\right)\right)\right) \]
    11. Applied rewrites54.9%

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

    if -1.7999999999999999e252 < b < -4.4e173

    1. Initial program 26.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 rewrites68.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 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--.f6453.4

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

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

      \[\leadsto a \cdot \left(b \cdot \left(x \cdot y\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6453.1

        \[\leadsto a \cdot \left(b \cdot \left(x \cdot y\right)\right) \]
    11. Applied rewrites53.1%

      \[\leadsto a \cdot \left(b \cdot \left(x \cdot y\right)\right) \]

    if -4.4e173 < b < 1e173

    1. Initial program 36.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 rewrites43.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 k around -inf

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

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

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

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

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

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

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

    if 1e173 < b

    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 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 rewrites59.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 b around inf

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

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

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

        \[\leadsto y4 \cdot \left(b \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      4. lift--.f6430.0

        \[\leadsto y4 \cdot \left(b \cdot \left(j \cdot t - k \cdot \color{blue}{y}\right)\right) \]
    8. Applied rewrites30.0%

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

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

        \[\leadsto y4 \cdot \left(b \cdot \left(-1 \cdot \left(k \cdot y\right)\right)\right) \]
      2. lift-*.f6434.4

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

      \[\leadsto y4 \cdot \left(b \cdot \left(-1 \cdot \left(k \cdot \color{blue}{y}\right)\right)\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification34.4%

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

Alternative 25: 22.3% accurate, 5.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{+91}:\\
\;\;\;\;a \cdot \left(b \cdot \left(\left(-t\right) \cdot z\right)\right)\\

\mathbf{elif}\;t \leq -6.5 \cdot 10^{-216}:\\
\;\;\;\;a \cdot \left(b \cdot \left(x \cdot y\right)\right)\\

\mathbf{elif}\;t \leq 1.55 \cdot 10^{+51}:\\
\;\;\;\;y0 \cdot \left(y2 \cdot \left(\left(-k\right) \cdot y5\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.6e91

    1. Initial program 21.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 rewrites31.3%

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

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

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

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

        \[\leadsto a \cdot \left(b \cdot \left(-1 \cdot \left(t \cdot z\right)\right)\right) \]
      2. lift-*.f6441.3

        \[\leadsto a \cdot \left(b \cdot \left(-1 \cdot \left(t \cdot z\right)\right)\right) \]
    11. Applied rewrites41.3%

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

    if -3.6e91 < t < -6.4999999999999999e-216

    1. Initial program 27.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 rewrites46.6%

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

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

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

      \[\leadsto a \cdot \left(b \cdot \left(x \cdot y\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6430.8

        \[\leadsto a \cdot \left(b \cdot \left(x \cdot y\right)\right) \]
    11. Applied rewrites30.8%

      \[\leadsto a \cdot \left(b \cdot \left(x \cdot y\right)\right) \]

    if -6.4999999999999999e-216 < t < 1.55000000000000006e51

    1. Initial program 46.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 y0 around inf

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

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

        \[\leadsto y0 \cdot \left(\left(-1 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) + c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{b \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    5. Applied rewrites38.6%

      \[\leadsto \color{blue}{y0 \cdot \left(\mathsf{fma}\left(-1, y5 \cdot \left(k \cdot y2 - j \cdot y3\right), c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    6. Taylor expanded in y2 around inf

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

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

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

        \[\leadsto y0 \cdot \left(y2 \cdot \mathsf{fma}\left(-1, k \cdot y5, c \cdot x\right)\right) \]
      4. lower-*.f6431.7

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

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

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

        \[\leadsto y0 \cdot \left(y2 \cdot \left(-1 \cdot \left(k \cdot y5\right)\right)\right) \]
      2. lift-*.f6427.0

        \[\leadsto y0 \cdot \left(y2 \cdot \left(-1 \cdot \left(k \cdot y5\right)\right)\right) \]
    11. Applied rewrites27.0%

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

    if 1.55000000000000006e51 < t

    1. Initial program 31.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 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.2%

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

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

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

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

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

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

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

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

      \[\leadsto i \cdot \left(t \cdot \left(c \cdot z\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6441.2

        \[\leadsto i \cdot \left(t \cdot \left(c \cdot z\right)\right) \]
    11. Applied rewrites41.2%

      \[\leadsto i \cdot \left(t \cdot \left(c \cdot z\right)\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification33.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.6 \cdot 10^{+91}:\\ \;\;\;\;a \cdot \left(b \cdot \left(\left(-t\right) \cdot z\right)\right)\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{-216}:\\ \;\;\;\;a \cdot \left(b \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+51}:\\ \;\;\;\;y0 \cdot \left(y2 \cdot \left(\left(-k\right) \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(t \cdot \left(c \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 30.6% accurate, 5.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.12 \cdot 10^{-17}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{elif}\;x \leq 2.95 \cdot 10^{+68}:\\ \;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\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 (<= x -1.12e-17)
   (* i (* y1 (- (* j x) (* k z))))
   (if (<= x 2.95e+68)
     (* a (* y5 (- (* t y2) (* y y3))))
     (* 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 (x <= -1.12e-17) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else if (x <= 2.95e+68) {
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	} 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 (x <= (-1.12d-17)) then
        tmp = i * (y1 * ((j * x) - (k * z)))
    else if (x <= 2.95d+68) then
        tmp = a * (y5 * ((t * y2) - (y * y3)))
    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 (x <= -1.12e-17) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else if (x <= 2.95e+68) {
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	} 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 x <= -1.12e-17:
		tmp = i * (y1 * ((j * x) - (k * z)))
	elif x <= 2.95e+68:
		tmp = a * (y5 * ((t * y2) - (y * y3)))
	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 (x <= -1.12e-17)
		tmp = Float64(i * Float64(y1 * Float64(Float64(j * x) - Float64(k * z))));
	elseif (x <= 2.95e+68)
		tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))));
	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 (x <= -1.12e-17)
		tmp = i * (y1 * ((j * x) - (k * z)));
	elseif (x <= 2.95e+68)
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	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[x, -1.12e-17], N[(i * N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.95e+68], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $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}\;x \leq -1.12 \cdot 10^{-17}:\\
\;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\

\mathbf{elif}\;x \leq 2.95 \cdot 10^{+68}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\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 3 regimes
  2. if x < -1.12000000000000005e-17

    1. Initial program 31.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 rewrites42.8%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    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-*.f6443.1

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

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

    if -1.12000000000000005e-17 < x < 2.94999999999999993e68

    1. Initial program 36.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 y5 around -inf

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      5. lift--.f6432.9

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot \color{blue}{y3}\right)\right) \]
    8. Applied rewrites32.9%

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

    if 2.94999999999999993e68 < x

    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 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 rewrites39.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)} \]
    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--.f6451.3

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

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

Alternative 27: 22.6% accurate, 7.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+34} \lor \neg \left(y \leq 1.16 \cdot 10^{-27}\right):\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.19999999999999993e34 or 1.16000000000000005e-27 < y

    1. Initial program 30.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 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.2%

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

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

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

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

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

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

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

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

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6434.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
    11. Applied rewrites34.8%

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]

    if -1.19999999999999993e34 < y < 1.16000000000000005e-27

    1. Initial program 35.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 rewrites40.1%

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

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

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

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

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

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

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

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

      \[\leadsto i \cdot \left(t \cdot \left(c \cdot z\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6424.2

        \[\leadsto i \cdot \left(t \cdot \left(c \cdot z\right)\right) \]
    11. Applied rewrites24.2%

      \[\leadsto i \cdot \left(t \cdot \left(c \cdot z\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification28.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{+34} \lor \neg \left(y \leq 1.16 \cdot 10^{-27}\right):\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(t \cdot \left(c \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 28: 22.7% accurate, 7.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5 \cdot 10^{+33} \lor \neg \left(y \leq 9.5 \cdot 10^{-28}\right):\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(i \cdot \left(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 (or (<= y -5e+33) (not (<= y 9.5e-28)))
   (* i (* k (* y y5)))
   (* c (* i (* 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 ((y <= -5e+33) || !(y <= 9.5e-28)) {
		tmp = i * (k * (y * y5));
	} else {
		tmp = c * (i * (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 ((y <= (-5d+33)) .or. (.not. (y <= 9.5d-28))) then
        tmp = i * (k * (y * y5))
    else
        tmp = c * (i * (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 ((y <= -5e+33) || !(y <= 9.5e-28)) {
		tmp = i * (k * (y * y5));
	} else {
		tmp = c * (i * (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 (y <= -5e+33) or not (y <= 9.5e-28):
		tmp = i * (k * (y * y5))
	else:
		tmp = c * (i * (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 ((y <= -5e+33) || !(y <= 9.5e-28))
		tmp = Float64(i * Float64(k * Float64(y * y5)));
	else
		tmp = Float64(c * Float64(i * 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 ((y <= -5e+33) || ~((y <= 9.5e-28)))
		tmp = i * (k * (y * y5));
	else
		tmp = c * (i * (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[Or[LessEqual[y, -5e+33], N[Not[LessEqual[y, 9.5e-28]], $MachinePrecision]], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(i * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{+33} \lor \neg \left(y \leq 9.5 \cdot 10^{-28}\right):\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.99999999999999973e33 or 9.50000000000000001e-28 < y

    1. Initial program 30.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 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.2%

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

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

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

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

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

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

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

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

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6434.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
    11. Applied rewrites34.8%

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]

    if -4.99999999999999973e33 < y < 9.50000000000000001e-28

    1. Initial program 35.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 rewrites40.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      3. lift-*.f6419.7

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
    11. Applied rewrites19.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5 \cdot 10^{+33} \lor \neg \left(y \leq 9.5 \cdot 10^{-28}\right):\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(i \cdot \left(t \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 29: 22.7% accurate, 7.2× speedup?

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

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

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+34}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\

\mathbf{elif}\;y \leq 1.25 \cdot 10^{-31}:\\
\;\;\;\;i \cdot \left(t \cdot \left(c \cdot z\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.19999999999999993e34

    1. Initial program 50.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 rewrites44.2%

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

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

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

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

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

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

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

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

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6444.6

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
    11. Applied rewrites44.6%

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]

    if -1.19999999999999993e34 < y < 1.25e-31

    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 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 rewrites40.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 t around -inf

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

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

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

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

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

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

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

      \[\leadsto i \cdot \left(t \cdot \left(c \cdot z\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6423.8

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

      \[\leadsto i \cdot \left(t \cdot \left(c \cdot z\right)\right) \]

    if 1.25e-31 < y

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

      \[\leadsto \color{blue}{b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    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--.f6443.2

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

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

      \[\leadsto a \cdot \left(b \cdot \left(x \cdot y\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6438.8

        \[\leadsto a \cdot \left(b \cdot \left(x \cdot y\right)\right) \]
    11. Applied rewrites38.8%

      \[\leadsto a \cdot \left(b \cdot \left(x \cdot y\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 30: 17.7% accurate, 12.6× speedup?

\[\begin{array}{l} \\ c \cdot \left(i \cdot \left(t \cdot z\right)\right) \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (* c (* i (* 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) {
	return c * (i * (t * z));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    code = c * (i * (t * z))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return c * (i * (t * z));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	return c * (i * (t * z))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	return Float64(c * Float64(i * Float64(t * z)))
end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = c * (i * (t * z));
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(c * N[(i * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
c \cdot \left(i \cdot \left(t \cdot z\right)\right)
\end{array}
Derivation
  1. Initial program 33.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 rewrites41.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
    3. lift-*.f6417.8

      \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
  11. Applied rewrites17.8%

    \[\leadsto c \cdot \left(i \cdot \color{blue}{\left(t \cdot z\right)}\right) \]
  12. Add Preprocessing

Developer Target 1: 27.3% 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 2025064 
(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)))))