Linear.Matrix:det44 from linear-1.19.1.3

Percentage Accurate: 29.2% → 52.7%
Time: 19.2s
Alternatives: 22
Speedup: 5.8×

Specification

?
\[\begin{array}{l} \\ \left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (+
  (-
   (+
    (+
     (-
      (* (- (* x y) (* z t)) (- (* a b) (* c i)))
      (* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
     (* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a))))
    (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
   (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
  (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    code = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(Float64(x * j) - Float64(z * k)) * Float64(Float64(y0 * b) - Float64(y1 * i)))) + Float64(Float64(Float64(x * y2) - Float64(z * y3)) * Float64(Float64(y0 * c) - Float64(y1 * a)))) + Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))) - Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))))
end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 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.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (+
  (-
   (+
    (+
     (-
      (* (- (* x y) (* z t)) (- (* a b) (* c i)))
      (* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
     (* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a))))
    (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
   (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
  (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    code = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(Float64(x * j) - Float64(z * k)) * Float64(Float64(y0 * b) - Float64(y1 * i)))) + Float64(Float64(Float64(x * y2) - Float64(z * y3)) * Float64(Float64(y0 * c) - Float64(y1 * a)))) + Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))) - Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))))
end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 52.7% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot y - t \cdot z\\ t_2 := j \cdot t - k \cdot y\\ t_3 := c \cdot y0 - a \cdot y1\\ t_4 := j \cdot x - k \cdot z\\ \mathbf{if}\;y5 \leq -8 \cdot 10^{+114}:\\ \;\;\;\;-1 \cdot \left(y5 \cdot \left(\mathsf{fma}\left(i, t\_2, y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)\\ \mathbf{elif}\;y5 \leq -6 \cdot 10^{-60}:\\ \;\;\;\;-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, t\_1, y5 \cdot t\_2\right) - y1 \cdot t\_4\right)\right)\\ \mathbf{elif}\;y5 \leq -7.5 \cdot 10^{-272}:\\ \;\;\;\;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}\;y5 \leq 4.2 \cdot 10^{-57}:\\ \;\;\;\;b \cdot \left(\mathsf{fma}\left(a, t\_1, y4 \cdot t\_2\right) - y0 \cdot t\_4\right)\\ \mathbf{elif}\;y5 \leq 2.3 \cdot 10^{+165}:\\ \;\;\;\;-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot t\_3\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \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
 (let* ((t_1 (- (* x y) (* t z)))
        (t_2 (- (* j t) (* k y)))
        (t_3 (- (* c y0) (* a y1)))
        (t_4 (- (* j x) (* k z))))
   (if (<= y5 -8e+114)
     (*
      -1.0
      (*
       y5
       (-
        (fma i t_2 (* y0 (- (* k y2) (* j y3))))
        (* a (- (* t y2) (* y y3))))))
     (if (<= y5 -6e-60)
       (* -1.0 (* i (- (fma c t_1 (* y5 t_2)) (* y1 t_4))))
       (if (<= y5 -7.5e-272)
         (*
          x
          (-
           (fma y (- (* a b) (* c i)) (* y2 t_3))
           (* j (- (* b y0) (* i y1)))))
         (if (<= y5 4.2e-57)
           (* b (- (fma a t_1 (* y4 t_2)) (* y0 t_4)))
           (if (<= y5 2.3e+165)
             (*
              -1.0
              (*
               y3
               (-
                (fma j (- (* y1 y4) (* y0 y5)) (* z t_3))
                (* y (- (* c y4) (* a y5))))))
             (* y3 (* y5 (- (* j y0) (* a 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 t_1 = (x * y) - (t * z);
	double t_2 = (j * t) - (k * y);
	double t_3 = (c * y0) - (a * y1);
	double t_4 = (j * x) - (k * z);
	double tmp;
	if (y5 <= -8e+114) {
		tmp = -1.0 * (y5 * (fma(i, t_2, (y0 * ((k * y2) - (j * y3)))) - (a * ((t * y2) - (y * y3)))));
	} else if (y5 <= -6e-60) {
		tmp = -1.0 * (i * (fma(c, t_1, (y5 * t_2)) - (y1 * t_4)));
	} else if (y5 <= -7.5e-272) {
		tmp = x * (fma(y, ((a * b) - (c * i)), (y2 * t_3)) - (j * ((b * y0) - (i * y1))));
	} else if (y5 <= 4.2e-57) {
		tmp = b * (fma(a, t_1, (y4 * t_2)) - (y0 * t_4));
	} else if (y5 <= 2.3e+165) {
		tmp = -1.0 * (y3 * (fma(j, ((y1 * y4) - (y0 * y5)), (z * t_3)) - (y * ((c * y4) - (a * y5)))));
	} else {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(x * y) - Float64(t * z))
	t_2 = Float64(Float64(j * t) - Float64(k * y))
	t_3 = Float64(Float64(c * y0) - Float64(a * y1))
	t_4 = Float64(Float64(j * x) - Float64(k * z))
	tmp = 0.0
	if (y5 <= -8e+114)
		tmp = Float64(-1.0 * Float64(y5 * Float64(fma(i, t_2, Float64(y0 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(a * Float64(Float64(t * y2) - Float64(y * y3))))));
	elseif (y5 <= -6e-60)
		tmp = Float64(-1.0 * Float64(i * Float64(fma(c, t_1, Float64(y5 * t_2)) - Float64(y1 * t_4))));
	elseif (y5 <= -7.5e-272)
		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 (y5 <= 4.2e-57)
		tmp = Float64(b * Float64(fma(a, t_1, Float64(y4 * t_2)) - Float64(y0 * t_4)));
	elseif (y5 <= 2.3e+165)
		tmp = Float64(-1.0 * Float64(y3 * Float64(fma(j, Float64(Float64(y1 * y4) - Float64(y0 * y5)), Float64(z * t_3)) - Float64(y * Float64(Float64(c * y4) - Float64(a * y5))))));
	else
		tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y5, -8e+114], N[(-1.0 * N[(y5 * N[(N[(i * t$95$2 + N[(y0 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -6e-60], N[(-1.0 * N[(i * N[(N[(c * t$95$1 + N[(y5 * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(y1 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -7.5e-272], 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[y5, 4.2e-57], N[(b * N[(N[(a * t$95$1 + N[(y4 * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(y0 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 2.3e+165], N[(-1.0 * N[(y3 * N[(N[(j * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision] + N[(z * t$95$3), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y5 \leq -7.5 \cdot 10^{-272}:\\
\;\;\;\;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}\;y5 \leq 4.2 \cdot 10^{-57}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, t\_1, y4 \cdot t\_2\right) - y0 \cdot t\_4\right)\\

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

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


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

    1. Initial program 29.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. Taylor expanded in y5 around -inf

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

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

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

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

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

    if -8e114 < y5 < -6.00000000000000038e-60

    1. Initial program 29.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. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.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)} \]

    if -6.00000000000000038e-60 < y5 < -7.50000000000000005e-272

    1. Initial program 29.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. Taylor expanded in x around inf

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

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

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

      \[\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 -7.50000000000000005e-272 < y5 < 4.1999999999999999e-57

    1. Initial program 29.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. Taylor expanded in b around inf

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

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

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

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

    if 4.1999999999999999e-57 < y5 < 2.30000000000000016e165

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

    if 2.30000000000000016e165 < y5

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 42.5% accurate, 2.0× 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 \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)\\ t_5 := x \cdot y - t \cdot z\\ \mathbf{if}\;y5 \leq -1.7 \cdot 10^{+176}:\\ \;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \mathbf{elif}\;y5 \leq -5.8 \cdot 10^{+106}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;y5 \leq -6 \cdot 10^{-60}:\\ \;\;\;\;-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, t\_5, y5 \cdot t\_1\right) - y1 \cdot t\_2\right)\right)\\ \mathbf{elif}\;y5 \leq -7.5 \cdot 10^{-272}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;y5 \leq 4.2 \cdot 10^{-57}:\\ \;\;\;\;b \cdot \left(\mathsf{fma}\left(a, t\_5, y4 \cdot t\_1\right) - y0 \cdot t\_2\right)\\ \mathbf{elif}\;y5 \leq 2.3 \cdot 10^{+165}:\\ \;\;\;\;-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot t\_3\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \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
 (let* ((t_1 (- (* j t) (* k y)))
        (t_2 (- (* j x) (* k z)))
        (t_3 (- (* c y0) (* a y1)))
        (t_4
         (*
          x
          (-
           (fma y (- (* a b) (* c i)) (* y2 t_3))
           (* j (- (* b y0) (* i y1))))))
        (t_5 (- (* x y) (* t z))))
   (if (<= y5 -1.7e+176)
     (* a (* y5 (- (* t y2) (* y y3))))
     (if (<= y5 -5.8e+106)
       t_4
       (if (<= y5 -6e-60)
         (* -1.0 (* i (- (fma c t_5 (* y5 t_1)) (* y1 t_2))))
         (if (<= y5 -7.5e-272)
           t_4
           (if (<= y5 4.2e-57)
             (* b (- (fma a t_5 (* y4 t_1)) (* y0 t_2)))
             (if (<= y5 2.3e+165)
               (*
                -1.0
                (*
                 y3
                 (-
                  (fma j (- (* y1 y4) (* y0 y5)) (* z t_3))
                  (* y (- (* c y4) (* a y5))))))
               (* y3 (* y5 (- (* j y0) (* a 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 t_1 = (j * t) - (k * y);
	double t_2 = (j * x) - (k * z);
	double t_3 = (c * y0) - (a * y1);
	double t_4 = x * (fma(y, ((a * b) - (c * i)), (y2 * t_3)) - (j * ((b * y0) - (i * y1))));
	double t_5 = (x * y) - (t * z);
	double tmp;
	if (y5 <= -1.7e+176) {
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	} else if (y5 <= -5.8e+106) {
		tmp = t_4;
	} else if (y5 <= -6e-60) {
		tmp = -1.0 * (i * (fma(c, t_5, (y5 * t_1)) - (y1 * t_2)));
	} else if (y5 <= -7.5e-272) {
		tmp = t_4;
	} else if (y5 <= 4.2e-57) {
		tmp = b * (fma(a, t_5, (y4 * t_1)) - (y0 * t_2));
	} else if (y5 <= 2.3e+165) {
		tmp = -1.0 * (y3 * (fma(j, ((y1 * y4) - (y0 * y5)), (z * t_3)) - (y * ((c * y4) - (a * y5)))));
	} else {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	}
	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(x * Float64(fma(y, Float64(Float64(a * b) - Float64(c * i)), Float64(y2 * t_3)) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1)))))
	t_5 = Float64(Float64(x * y) - Float64(t * z))
	tmp = 0.0
	if (y5 <= -1.7e+176)
		tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))));
	elseif (y5 <= -5.8e+106)
		tmp = t_4;
	elseif (y5 <= -6e-60)
		tmp = Float64(-1.0 * Float64(i * Float64(fma(c, t_5, Float64(y5 * t_1)) - Float64(y1 * t_2))));
	elseif (y5 <= -7.5e-272)
		tmp = t_4;
	elseif (y5 <= 4.2e-57)
		tmp = Float64(b * Float64(fma(a, t_5, Float64(y4 * t_1)) - Float64(y0 * t_2)));
	elseif (y5 <= 2.3e+165)
		tmp = Float64(-1.0 * Float64(y3 * Float64(fma(j, Float64(Float64(y1 * y4) - Float64(y0 * y5)), Float64(z * t_3)) - Float64(y * Float64(Float64(c * y4) - Float64(a * y5))))));
	else
		tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))));
	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[(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]}, Block[{t$95$5 = N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y5, -1.7e+176], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -5.8e+106], t$95$4, If[LessEqual[y5, -6e-60], N[(-1.0 * N[(i * N[(N[(c * t$95$5 + N[(y5 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -7.5e-272], t$95$4, If[LessEqual[y5, 4.2e-57], N[(b * N[(N[(a * t$95$5 + N[(y4 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 2.3e+165], N[(-1.0 * N[(y3 * N[(N[(j * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision] + N[(z * t$95$3), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $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 \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)\\
t_5 := x \cdot y - t \cdot z\\
\mathbf{if}\;y5 \leq -1.7 \cdot 10^{+176}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\

\mathbf{elif}\;y5 \leq -5.8 \cdot 10^{+106}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;y5 \leq -6 \cdot 10^{-60}:\\
\;\;\;\;-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, t\_5, y5 \cdot t\_1\right) - y1 \cdot t\_2\right)\right)\\

\mathbf{elif}\;y5 \leq -7.5 \cdot 10^{-272}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;y5 \leq 4.2 \cdot 10^{-57}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, t\_5, y4 \cdot t\_1\right) - y0 \cdot t\_2\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y5 < -1.70000000000000007e176

    1. Initial program 29.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. Taylor expanded in y5 around -inf

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

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

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

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

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

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

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      5. lift-*.f6426.1

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
    7. Applied rewrites26.1%

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

    if -1.70000000000000007e176 < y5 < -5.8000000000000004e106 or -6.00000000000000038e-60 < y5 < -7.50000000000000005e-272

    1. Initial program 29.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. Taylor expanded in x around inf

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

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

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

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

    if -5.8000000000000004e106 < y5 < -6.00000000000000038e-60

    1. Initial program 29.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. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.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)} \]

    if -7.50000000000000005e-272 < y5 < 4.1999999999999999e-57

    1. Initial program 29.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. Taylor expanded in b around inf

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

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

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

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

    if 4.1999999999999999e-57 < y5 < 2.30000000000000016e165

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

    if 2.30000000000000016e165 < y5

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 40.6% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 29.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) \]

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

    1. Initial program 29.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. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.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)} \]
    5. Taylor expanded in t around inf

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \mathsf{fma}\left(i, \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right), \frac{i \cdot \left(\left(-1 \cdot \left(k \cdot \left(y \cdot y5\right)\right) + c \cdot \left(x \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)}{t}\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(t \cdot \mathsf{fma}\left(i, \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right), \frac{i \cdot \left(\left(-1 \cdot \left(k \cdot \left(y \cdot y5\right)\right) + c \cdot \left(x \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)}{t}\right)\right) \]
      6. lower-/.f64N/A

        \[\leadsto -1 \cdot \left(t \cdot \mathsf{fma}\left(i, \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right), \frac{i \cdot \left(\left(-1 \cdot \left(k \cdot \left(y \cdot y5\right)\right) + c \cdot \left(x \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)}{t}\right)\right) \]
    7. Applied rewrites36.3%

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

Alternative 4: 36.1% accurate, 2.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+89}:\\
\;\;\;\;a \cdot \left(z \cdot \mathsf{fma}\left(-1, b \cdot t, y1 \cdot y3\right)\right)\\

\mathbf{elif}\;z \leq -9.6 \cdot 10^{-142}:\\
\;\;\;\;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}\;z \leq 1.1 \cdot 10^{-291}:\\
\;\;\;\;j \cdot \left(y5 \cdot \mathsf{fma}\left(-1, i \cdot t, y0 \cdot y3\right)\right)\\

\mathbf{elif}\;z \leq 4.1 \cdot 10^{+39}:\\
\;\;\;\;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}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.00000000000000013e89

    1. Initial program 29.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. Taylor expanded in z around -inf

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

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

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

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    4. Applied rewrites38.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)} \]
    5. Taylor expanded in a around -inf

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

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

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

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

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

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

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

    if -3.00000000000000013e89 < z < -9.59999999999999952e-142

    1. Initial program 29.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. Taylor expanded in x around inf

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

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

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

      \[\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 -9.59999999999999952e-142 < z < 1.10000000000000001e-291

    1. Initial program 29.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. Taylor expanded in y5 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.10000000000000001e-291 < z < 4.10000000000000004e39

    1. Initial program 29.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. Taylor expanded in b around inf

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

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

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

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

    if 4.10000000000000004e39 < z

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 35.7% accurate, 2.3× speedup?

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

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

\mathbf{elif}\;z \leq -5.5 \cdot 10^{-148}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{-291}:\\
\;\;\;\;j \cdot \left(y5 \cdot \mathsf{fma}\left(-1, i \cdot t, y0 \cdot y3\right)\right)\\

\mathbf{elif}\;z \leq 4.1 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 29.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. Taylor expanded in z around -inf

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

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

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

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    4. Applied rewrites38.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)} \]
    5. Taylor expanded in a around -inf

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

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

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

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

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

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

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

    if -1.95000000000000005e89 < z < -5.5000000000000003e-148 or 1.10000000000000001e-291 < z < 4.10000000000000004e39

    1. Initial program 29.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. Taylor expanded in b around inf

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

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

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

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

    if -5.5000000000000003e-148 < z < 1.10000000000000001e-291

    1. Initial program 29.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. Taylor expanded in y5 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.10000000000000004e39 < z

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 31.9% accurate, 4.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.6 \cdot 10^{-61}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\

\mathbf{elif}\;y \leq -3.4 \cdot 10^{-145}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(z \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\right)\\

\mathbf{elif}\;y \leq 5.1 \cdot 10^{-49}:\\
\;\;\;\;j \cdot \left(y5 \cdot \mathsf{fma}\left(-1, i \cdot t, y0 \cdot y3\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -8.6000000000000007e-61

    1. Initial program 29.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. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.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)} \]
    5. Taylor expanded in k around -inf

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

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

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

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

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

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

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

    if -8.6000000000000007e-61 < y < -3.3999999999999999e-145

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \left(y3 \cdot \left(z \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\right) \]
      5. lift-*.f6427.5

        \[\leadsto -1 \cdot \left(y3 \cdot \left(z \cdot \left(c \cdot y0 - \color{blue}{a \cdot y1}\right)\right)\right) \]
    7. Applied rewrites27.5%

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

    if -3.3999999999999999e-145 < y < 5.10000000000000026e-49

    1. Initial program 29.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. Taylor expanded in y5 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.10000000000000026e-49 < y < 7.7999999999999996e138

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.7999999999999996e138 < y

    1. Initial program 29.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. Taylor expanded in b around inf

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

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

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    4. Applied rewrites37.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)} \]
    5. Taylor expanded in y around inf

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

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

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

        \[\leadsto b \cdot \left(y \cdot \mathsf{fma}\left(-1, k \cdot y4, a \cdot x\right)\right) \]
      4. lower-*.f6425.9

        \[\leadsto b \cdot \left(y \cdot \mathsf{fma}\left(-1, k \cdot y4, a \cdot x\right)\right) \]
    7. Applied rewrites25.9%

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

Alternative 7: 31.7% accurate, 4.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.4 \cdot 10^{+90}:\\
\;\;\;\;a \cdot \left(z \cdot \mathsf{fma}\left(-1, b \cdot t, y1 \cdot y3\right)\right)\\

\mathbf{elif}\;z \leq -2.9 \cdot 10^{-133}:\\
\;\;\;\;y \cdot \left(a \cdot \left(b \cdot x - y3 \cdot y5\right)\right)\\

\mathbf{elif}\;z \leq 2.5 \cdot 10^{-50}:\\
\;\;\;\;j \cdot \left(y5 \cdot \mathsf{fma}\left(-1, i \cdot t, y0 \cdot y3\right)\right)\\

\mathbf{elif}\;z \leq 2.45 \cdot 10^{+39}:\\
\;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -7.4e90

    1. Initial program 29.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. Taylor expanded in z around -inf

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

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

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

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    4. Applied rewrites38.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)} \]
    5. Taylor expanded in a around -inf

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

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

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

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

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

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

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

    if -7.4e90 < z < -2.8999999999999998e-133

    1. Initial program 29.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. 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)} \]
    3. 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) \]
    4. Applied rewrites36.1%

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

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

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

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

        \[\leadsto y \cdot \left(a \cdot \left(b \cdot x - y3 \cdot y5\right)\right) \]
      4. lower-*.f6426.3

        \[\leadsto y \cdot \left(a \cdot \left(b \cdot x - y3 \cdot y5\right)\right) \]
    7. Applied rewrites26.3%

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

    if -2.8999999999999998e-133 < z < 2.49999999999999984e-50

    1. Initial program 29.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. Taylor expanded in y5 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.49999999999999984e-50 < z < 2.44999999999999994e39

    1. Initial program 29.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. Taylor expanded in z around -inf

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

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

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

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    4. Applied rewrites38.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)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto k \cdot \color{blue}{\left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    6. 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 \color{blue}{y1}\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right) \]
      5. lift-*.f6427.6

        \[\leadsto k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right) \]
    7. Applied rewrites27.6%

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

    if 2.44999999999999994e39 < z

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 31.6% accurate, 4.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\ \mathbf{if}\;z \leq -1.8 \cdot 10^{+204}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-133}:\\ \;\;\;\;y \cdot \left(a \cdot \left(b \cdot x - y3 \cdot y5\right)\right)\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-50}:\\ \;\;\;\;j \cdot \left(y5 \cdot \mathsf{fma}\left(-1, i \cdot t, y0 \cdot y3\right)\right)\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{+39}:\\ \;\;\;\;k \cdot \left(z \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 (* a (* y3 (- (* y1 z) (* y y5))))))
   (if (<= z -1.8e+204)
     t_1
     (if (<= z -2.9e-133)
       (* y (* a (- (* b x) (* y3 y5))))
       (if (<= z 2.5e-50)
         (* j (* y5 (fma -1.0 (* i t) (* y0 y3))))
         (if (<= z 2.45e+39) (* k (* z (- (* 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 = a * (y3 * ((y1 * z) - (y * y5)));
	double tmp;
	if (z <= -1.8e+204) {
		tmp = t_1;
	} else if (z <= -2.9e-133) {
		tmp = y * (a * ((b * x) - (y3 * y5)));
	} else if (z <= 2.5e-50) {
		tmp = j * (y5 * fma(-1.0, (i * t), (y0 * y3)));
	} else if (z <= 2.45e+39) {
		tmp = k * (z * ((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(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * y5))))
	tmp = 0.0
	if (z <= -1.8e+204)
		tmp = t_1;
	elseif (z <= -2.9e-133)
		tmp = Float64(y * Float64(a * Float64(Float64(b * x) - Float64(y3 * y5))));
	elseif (z <= 2.5e-50)
		tmp = Float64(j * Float64(y5 * fma(-1.0, Float64(i * t), Float64(y0 * y3))));
	elseif (z <= 2.45e+39)
		tmp = Float64(k * Float64(z * 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[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+204], t$95$1, If[LessEqual[z, -2.9e-133], N[(y * N[(a * N[(N[(b * x), $MachinePrecision] - N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e-50], N[(j * N[(y5 * N[(-1.0 * N[(i * t), $MachinePrecision] + N[(y0 * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.45e+39], N[(k * N[(z * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.9 \cdot 10^{-133}:\\
\;\;\;\;y \cdot \left(a \cdot \left(b \cdot x - y3 \cdot y5\right)\right)\\

\mathbf{elif}\;z \leq 2.5 \cdot 10^{-50}:\\
\;\;\;\;j \cdot \left(y5 \cdot \mathsf{fma}\left(-1, i \cdot t, y0 \cdot y3\right)\right)\\

\mathbf{elif}\;z \leq 2.45 \cdot 10^{+39}:\\
\;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.8000000000000001e204 or 2.44999999999999994e39 < z

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8000000000000001e204 < z < -2.8999999999999998e-133

    1. Initial program 29.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. 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)} \]
    3. 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) \]
    4. Applied rewrites36.1%

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

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

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

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

        \[\leadsto y \cdot \left(a \cdot \left(b \cdot x - y3 \cdot y5\right)\right) \]
      4. lower-*.f6426.3

        \[\leadsto y \cdot \left(a \cdot \left(b \cdot x - y3 \cdot y5\right)\right) \]
    7. Applied rewrites26.3%

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

    if -2.8999999999999998e-133 < z < 2.49999999999999984e-50

    1. Initial program 29.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. Taylor expanded in y5 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.49999999999999984e-50 < z < 2.44999999999999994e39

    1. Initial program 29.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. Taylor expanded in z around -inf

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

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

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

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    4. Applied rewrites38.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)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto k \cdot \color{blue}{\left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    6. 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 \color{blue}{y1}\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right) \]
      5. lift-*.f6427.6

        \[\leadsto k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right) \]
    7. Applied rewrites27.6%

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

Alternative 9: 31.3% accurate, 4.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -9.8 \cdot 10^{-76}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\

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

\mathbf{elif}\;y5 \leq 9 \cdot 10^{-167}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\

\mathbf{elif}\;y5 \leq 5.6 \cdot 10^{+42}:\\
\;\;\;\;y4 \cdot \left(b \cdot \left(j \cdot t - k \cdot y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y5 < -9.79999999999999944e-76

    1. Initial program 29.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. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.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)} \]
    5. Taylor expanded in k around -inf

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

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

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

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

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

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

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

    if -9.79999999999999944e-76 < y5 < -1.8e-227

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8e-227 < y5 < 9.0000000000000002e-167

    1. Initial program 29.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. Taylor expanded in b around inf

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

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

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    4. Applied rewrites37.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)} \]
    5. Taylor expanded in j around inf

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

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

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

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

        \[\leadsto b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right) \]
    7. Applied rewrites27.2%

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

    if 9.0000000000000002e-167 < y5 < 5.5999999999999999e42

    1. Initial program 29.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. Taylor expanded in y4 around inf

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

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

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.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)} \]
    5. Taylor expanded in b around inf

      \[\leadsto y4 \cdot \left(b \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
    6. 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 \color{blue}{y}\right)\right) \]
      3. lift-*.f64N/A

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

        \[\leadsto y4 \cdot \left(b \cdot \left(j \cdot t - k \cdot y\right)\right) \]
    7. Applied rewrites26.6%

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

    if 5.5999999999999999e42 < y5

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 31.1% accurate, 4.4× speedup?

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

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

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

\\
\begin{array}{l}
\mathbf{if}\;y1 \leq -1800:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\

\mathbf{elif}\;y1 \leq 1.1 \cdot 10^{-172}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\

\mathbf{elif}\;y1 \leq 4.8 \cdot 10^{-41}:\\
\;\;\;\;x \cdot \left(y \cdot \left(a \cdot b - c \cdot i\right)\right)\\

\mathbf{elif}\;y1 \leq 5 \cdot 10^{+44}:\\
\;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\

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


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

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

    if -1800 < y1 < 1.10000000000000004e-172

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.10000000000000004e-172 < y1 < 4.80000000000000044e-41

    1. Initial program 29.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. 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)} \]
    3. 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) \]
    4. Applied rewrites36.1%

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

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

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

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

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

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

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

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

    if 4.80000000000000044e-41 < y1 < 4.9999999999999996e44

    1. Initial program 29.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. Taylor expanded in z around -inf

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

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

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

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    4. Applied rewrites38.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)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto k \cdot \color{blue}{\left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    6. 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 \color{blue}{y1}\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right) \]
      5. lift-*.f6427.6

        \[\leadsto k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right) \]
    7. Applied rewrites27.6%

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

    if 4.9999999999999996e44 < y1

    1. Initial program 29.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. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.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)} \]
    5. Taylor expanded in y1 around -inf

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

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

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

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

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

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

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

Alternative 11: 30.9% accurate, 4.4× speedup?

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

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

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

\\
\begin{array}{l}
\mathbf{if}\;y1 \leq -1800:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\

\mathbf{elif}\;y1 \leq 1.05 \cdot 10^{-172}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\

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

\mathbf{elif}\;y1 \leq 5 \cdot 10^{+44}:\\
\;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\

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


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

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

    if -1800 < y1 < 1.05e-172

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.05e-172 < y1 < 1.4500000000000001e-42

    1. Initial program 29.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. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.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)} \]
    5. Taylor expanded in k around -inf

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

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

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

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

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

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

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

    if 1.4500000000000001e-42 < y1 < 4.9999999999999996e44

    1. Initial program 29.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. Taylor expanded in z around -inf

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

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

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

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    4. Applied rewrites38.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)} \]
    5. Taylor expanded in k around -inf

      \[\leadsto k \cdot \color{blue}{\left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    6. 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 \color{blue}{y1}\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right) \]
      5. lift-*.f6427.6

        \[\leadsto k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right) \]
    7. Applied rewrites27.6%

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

    if 4.9999999999999996e44 < y1

    1. Initial program 29.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. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.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)} \]
    5. Taylor expanded in y1 around -inf

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

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

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

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

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

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

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

Alternative 12: 30.4% accurate, 5.0× speedup?

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

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

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

\\
\begin{array}{l}
\mathbf{if}\;y1 \leq -1800:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\

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

\mathbf{elif}\;y1 \leq 5.6 \cdot 10^{+88}:\\
\;\;\;\;y \cdot \left(a \cdot \left(b \cdot x - y3 \cdot y5\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y1 < -1800

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

    if -1800 < y1 < 2.0000000000000001e-172

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e-172 < y1 < 5.59999999999999977e88

    1. Initial program 29.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. 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)} \]
    3. 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) \]
    4. Applied rewrites36.1%

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

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

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

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

        \[\leadsto y \cdot \left(a \cdot \left(b \cdot x - y3 \cdot y5\right)\right) \]
      4. lower-*.f6426.3

        \[\leadsto y \cdot \left(a \cdot \left(b \cdot x - y3 \cdot y5\right)\right) \]
    7. Applied rewrites26.3%

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

    if 5.59999999999999977e88 < y1

    1. Initial program 29.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. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.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)} \]
    5. Taylor expanded in y1 around -inf

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

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

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

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

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

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

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

Alternative 13: 30.2% accurate, 5.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -9.8 \cdot 10^{-76}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\

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

\mathbf{elif}\;y5 \leq 4.3 \cdot 10^{+35}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y5 < -9.79999999999999944e-76

    1. Initial program 29.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. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.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)} \]
    5. Taylor expanded in k around -inf

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

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

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

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

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

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

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

    if -9.79999999999999944e-76 < y5 < -1.8e-227

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8e-227 < y5 < 4.2999999999999998e35

    1. Initial program 29.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. Taylor expanded in b around inf

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

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

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    4. Applied rewrites37.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)} \]
    5. Taylor expanded in j around inf

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

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

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

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

        \[\leadsto b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right) \]
    7. Applied rewrites27.2%

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

    if 4.2999999999999998e35 < y5

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 30.2% accurate, 5.8× speedup?

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

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

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

\\
\begin{array}{l}
\mathbf{if}\;y1 \leq -26:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\

\mathbf{elif}\;y1 \leq 0.00065:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\

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


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

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

    if -26 < y1 < 6.4999999999999997e-4

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.4999999999999997e-4 < y1

    1. Initial program 29.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. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.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)} \]
    5. Taylor expanded in y1 around -inf

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

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

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

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

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

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

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

Alternative 15: 28.9% accurate, 5.8× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < -4.3999999999999999e175 or 1.3000000000000001e180 < k

    1. Initial program 29.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. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.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)} \]
    5. Taylor expanded in k around -inf

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

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

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

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

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

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

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

    if -4.3999999999999999e175 < k < 1.3000000000000001e180

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 24.8% accurate, 4.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.65 \cdot 10^{-73}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{-244}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-118}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{+121}:\\ \;\;\;\;b \cdot \left(j \cdot \left(-1 \cdot \left(x \cdot y0\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(-1 \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= y -2.65e-73)
   (* i (* k (- (* y y5) (* y1 z))))
   (if (<= y 6.8e-244)
     (* a (* y3 (* y1 z)))
     (if (<= y 8.5e-118)
       (* i (* y1 (- (* j x) (* k z))))
       (if (<= y 3.2e+121)
         (* b (* j (* -1.0 (* x y0))))
         (* b (* -1.0 (* k (* y y4)))))))))
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 <= -2.65e-73) {
		tmp = i * (k * ((y * y5) - (y1 * z)));
	} else if (y <= 6.8e-244) {
		tmp = a * (y3 * (y1 * z));
	} else if (y <= 8.5e-118) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else if (y <= 3.2e+121) {
		tmp = b * (j * (-1.0 * (x * y0)));
	} else {
		tmp = b * (-1.0 * (k * (y * y4)));
	}
	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 <= (-2.65d-73)) then
        tmp = i * (k * ((y * y5) - (y1 * z)))
    else if (y <= 6.8d-244) then
        tmp = a * (y3 * (y1 * z))
    else if (y <= 8.5d-118) then
        tmp = i * (y1 * ((j * x) - (k * z)))
    else if (y <= 3.2d+121) then
        tmp = b * (j * ((-1.0d0) * (x * y0)))
    else
        tmp = b * ((-1.0d0) * (k * (y * y4)))
    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 <= -2.65e-73) {
		tmp = i * (k * ((y * y5) - (y1 * z)));
	} else if (y <= 6.8e-244) {
		tmp = a * (y3 * (y1 * z));
	} else if (y <= 8.5e-118) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else if (y <= 3.2e+121) {
		tmp = b * (j * (-1.0 * (x * y0)));
	} else {
		tmp = b * (-1.0 * (k * (y * y4)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y <= -2.65e-73:
		tmp = i * (k * ((y * y5) - (y1 * z)))
	elif y <= 6.8e-244:
		tmp = a * (y3 * (y1 * z))
	elif y <= 8.5e-118:
		tmp = i * (y1 * ((j * x) - (k * z)))
	elif y <= 3.2e+121:
		tmp = b * (j * (-1.0 * (x * y0)))
	else:
		tmp = b * (-1.0 * (k * (y * y4)))
	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 <= -2.65e-73)
		tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z))));
	elseif (y <= 6.8e-244)
		tmp = Float64(a * Float64(y3 * Float64(y1 * z)));
	elseif (y <= 8.5e-118)
		tmp = Float64(i * Float64(y1 * Float64(Float64(j * x) - Float64(k * z))));
	elseif (y <= 3.2e+121)
		tmp = Float64(b * Float64(j * Float64(-1.0 * Float64(x * y0))));
	else
		tmp = Float64(b * Float64(-1.0 * Float64(k * Float64(y * y4))));
	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 <= -2.65e-73)
		tmp = i * (k * ((y * y5) - (y1 * z)));
	elseif (y <= 6.8e-244)
		tmp = a * (y3 * (y1 * z));
	elseif (y <= 8.5e-118)
		tmp = i * (y1 * ((j * x) - (k * z)));
	elseif (y <= 3.2e+121)
		tmp = b * (j * (-1.0 * (x * y0)));
	else
		tmp = b * (-1.0 * (k * (y * y4)));
	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, -2.65e-73], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e-244], N[(a * N[(y3 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e-118], N[(i * N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e+121], N[(b * N[(j * N[(-1.0 * N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(-1.0 * N[(k * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.65 \cdot 10^{-73}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\

\mathbf{elif}\;y \leq 6.8 \cdot 10^{-244}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\

\mathbf{elif}\;y \leq 8.5 \cdot 10^{-118}:\\
\;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\

\mathbf{elif}\;y \leq 3.2 \cdot 10^{+121}:\\
\;\;\;\;b \cdot \left(j \cdot \left(-1 \cdot \left(x \cdot y0\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot \left(-1 \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -2.64999999999999986e-73

    1. Initial program 29.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. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.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)} \]
    5. Taylor expanded in k around -inf

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

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

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

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

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

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

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

    if -2.64999999999999986e-73 < y < 6.80000000000000018e-244

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.80000000000000018e-244 < y < 8.50000000000000087e-118

    1. Initial program 29.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. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.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)} \]
    5. Taylor expanded in y1 around -inf

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

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

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

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

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

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

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

    if 8.50000000000000087e-118 < y < 3.1999999999999999e121

    1. Initial program 29.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. Taylor expanded in b around inf

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

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

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    4. Applied rewrites37.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)} \]
    5. Taylor expanded in j around inf

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

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

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

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

        \[\leadsto b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right) \]
    7. Applied rewrites27.2%

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

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

        \[\leadsto b \cdot \left(j \cdot \left(-1 \cdot \left(x \cdot y0\right)\right)\right) \]
      2. lift-*.f6417.4

        \[\leadsto b \cdot \left(j \cdot \left(-1 \cdot \left(x \cdot y0\right)\right)\right) \]
    10. Applied rewrites17.4%

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

    if 3.1999999999999999e121 < y

    1. Initial program 29.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. Taylor expanded in b around inf

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

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

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    4. Applied rewrites37.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)} \]
    5. Taylor expanded in y around inf

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

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

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

        \[\leadsto b \cdot \left(y \cdot \mathsf{fma}\left(-1, k \cdot y4, a \cdot x\right)\right) \]
      4. lower-*.f6425.9

        \[\leadsto b \cdot \left(y \cdot \mathsf{fma}\left(-1, k \cdot y4, a \cdot x\right)\right) \]
    7. Applied rewrites25.9%

      \[\leadsto b \cdot \left(y \cdot \color{blue}{\mathsf{fma}\left(-1, k \cdot y4, a \cdot x\right)}\right) \]
    8. Taylor expanded in x around 0

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

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

        \[\leadsto b \cdot \left(-1 \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right) \]
      3. lower-*.f6416.8

        \[\leadsto b \cdot \left(-1 \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right) \]
    10. Applied rewrites16.8%

      \[\leadsto b \cdot \left(-1 \cdot \left(k \cdot \color{blue}{\left(y \cdot y4\right)}\right)\right) \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 17: 23.8% accurate, 6.6× speedup?

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

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

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

\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -3.5 \cdot 10^{-66}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\

\mathbf{elif}\;y5 \leq 5.8 \cdot 10^{+35}:\\
\;\;\;\;b \cdot \left(j \cdot \left(-1 \cdot \left(x \cdot y0\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y5 < -3.5e-66

    1. Initial program 29.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. Taylor expanded in i around -inf

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

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

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

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    4. Applied rewrites37.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)} \]
    5. Taylor expanded in k around -inf

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

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

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

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

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

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

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

    if -3.5e-66 < y5 < 5.79999999999999989e35

    1. Initial program 29.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. Taylor expanded in b around inf

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

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

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    4. Applied rewrites37.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)} \]
    5. Taylor expanded in j around inf

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

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

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

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

        \[\leadsto b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right) \]
    7. Applied rewrites27.2%

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

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

        \[\leadsto b \cdot \left(j \cdot \left(-1 \cdot \left(x \cdot y0\right)\right)\right) \]
      2. lift-*.f6417.4

        \[\leadsto b \cdot \left(j \cdot \left(-1 \cdot \left(x \cdot y0\right)\right)\right) \]
    10. Applied rewrites17.4%

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

    if 5.79999999999999989e35 < y5

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 22.1% accurate, 5.6× speedup?

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

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

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+89}:\\
\;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\

\mathbf{elif}\;z \leq -3.2 \cdot 10^{-230}:\\
\;\;\;\;a \cdot \left(-1 \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right)\\

\mathbf{elif}\;z \leq 1.7 \cdot 10^{+40}:\\
\;\;\;\;b \cdot \left(j \cdot \left(-1 \cdot \left(x \cdot y0\right)\right)\right)\\

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


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

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
      2. lower-*.f6417.2

        \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
    10. Applied rewrites17.2%

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

    if -1.90000000000000012e89 < z < -3.2e-230

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.2e-230 < z < 1.69999999999999994e40

    1. Initial program 29.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. Taylor expanded in b around inf

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

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

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    4. Applied rewrites37.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)} \]
    5. Taylor expanded in j around inf

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

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

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

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

        \[\leadsto b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right) \]
    7. Applied rewrites27.2%

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

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

        \[\leadsto b \cdot \left(j \cdot \left(-1 \cdot \left(x \cdot y0\right)\right)\right) \]
      2. lift-*.f6417.4

        \[\leadsto b \cdot \left(j \cdot \left(-1 \cdot \left(x \cdot y0\right)\right)\right) \]
    10. Applied rewrites17.4%

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

    if 1.69999999999999994e40 < z

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 19: 21.9% accurate, 6.6× speedup?

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

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

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+89}:\\
\;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\

\mathbf{elif}\;z \leq 1.7 \cdot 10^{+40}:\\
\;\;\;\;a \cdot \left(-1 \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.90000000000000012e89

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
      2. lower-*.f6417.2

        \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
    10. Applied rewrites17.2%

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

    if -1.90000000000000012e89 < z < 1.69999999999999994e40

    1. Initial program 29.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. Taylor expanded in y3 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(-1 \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right) \]
    10. Applied rewrites16.8%

      \[\leadsto a \cdot \left(-1 \cdot \left(y \cdot \color{blue}{\left(y3 \cdot y5\right)}\right)\right) \]

    if 1.69999999999999994e40 < z

    1. Initial program 29.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. Taylor expanded in y3 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
    4. Applied rewrites37.2%

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    5. Taylor expanded in a around -inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \color{blue}{\left(y1 \cdot z - y \cdot y5\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - \color{blue}{y \cdot y5}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot \color{blue}{y5}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6426.2

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    7. Applied rewrites26.2%

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    8. Taylor expanded in y around 0

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    9. Step-by-step derivation
      1. lift-*.f6417.0

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    10. Applied rewrites17.0%

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 20: 21.8% accurate, 7.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+62}:\\ \;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{+38}:\\ \;\;\;\;b \cdot \left(a \cdot \left(x \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= z -1.4e+62)
   (* a (* y1 (* y3 z)))
   (if (<= z 3.9e+38) (* b (* a (* x y))) (* a (* y3 (* y1 z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (z <= -1.4e+62) {
		tmp = a * (y1 * (y3 * z));
	} else if (z <= 3.9e+38) {
		tmp = b * (a * (x * y));
	} else {
		tmp = a * (y3 * (y1 * z));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (z <= (-1.4d+62)) then
        tmp = a * (y1 * (y3 * z))
    else if (z <= 3.9d+38) then
        tmp = b * (a * (x * y))
    else
        tmp = a * (y3 * (y1 * z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (z <= -1.4e+62) {
		tmp = a * (y1 * (y3 * z));
	} else if (z <= 3.9e+38) {
		tmp = b * (a * (x * y));
	} else {
		tmp = a * (y3 * (y1 * z));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if z <= -1.4e+62:
		tmp = a * (y1 * (y3 * z))
	elif z <= 3.9e+38:
		tmp = b * (a * (x * y))
	else:
		tmp = a * (y3 * (y1 * z))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (z <= -1.4e+62)
		tmp = Float64(a * Float64(y1 * Float64(y3 * z)));
	elseif (z <= 3.9e+38)
		tmp = Float64(b * Float64(a * Float64(x * y)));
	else
		tmp = Float64(a * Float64(y3 * Float64(y1 * z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (z <= -1.4e+62)
		tmp = a * (y1 * (y3 * z));
	elseif (z <= 3.9e+38)
		tmp = b * (a * (x * y));
	else
		tmp = a * (y3 * (y1 * z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[z, -1.4e+62], N[(a * N[(y1 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.9e+38], N[(b * N[(a * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(y3 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+62}:\\
\;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\

\mathbf{elif}\;z \leq 3.9 \cdot 10^{+38}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y\right)\right)\\

\mathbf{else}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.40000000000000007e62

    1. Initial program 29.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. Taylor expanded in y3 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
    4. Applied rewrites37.2%

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    5. Taylor expanded in a around -inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \color{blue}{\left(y1 \cdot z - y \cdot y5\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - \color{blue}{y \cdot y5}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot \color{blue}{y5}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6426.2

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    7. Applied rewrites26.2%

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    8. Taylor expanded in y around 0

      \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
      2. lower-*.f6417.2

        \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
    10. Applied rewrites17.2%

      \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]

    if -1.40000000000000007e62 < z < 3.90000000000000023e38

    1. Initial program 29.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. Taylor expanded in b around inf

      \[\leadsto \color{blue}{b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \color{blue}{\left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    4. Applied rewrites37.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)} \]
    5. Taylor expanded in a around inf

      \[\leadsto b \cdot \left(a \cdot \color{blue}{\left(x \cdot y - t \cdot z\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y - \color{blue}{t \cdot z}\right)\right) \]
      2. lift--.f64N/A

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y - t \cdot \color{blue}{z}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right) \]
      4. lift-*.f6427.0

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right) \]
    7. Applied rewrites27.0%

      \[\leadsto b \cdot \left(a \cdot \color{blue}{\left(x \cdot y - t \cdot z\right)}\right) \]
    8. Taylor expanded in x around inf

      \[\leadsto b \cdot \left(a \cdot \left(x \cdot \color{blue}{y}\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y\right)\right) \]
      2. lift-*.f6416.9

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y\right)\right) \]
    10. Applied rewrites16.9%

      \[\leadsto b \cdot \left(a \cdot \left(x \cdot \color{blue}{y}\right)\right) \]

    if 3.90000000000000023e38 < z

    1. Initial program 29.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. Taylor expanded in y3 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
    4. Applied rewrites37.2%

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    5. Taylor expanded in a around -inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \color{blue}{\left(y1 \cdot z - y \cdot y5\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - \color{blue}{y \cdot y5}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot \color{blue}{y5}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6426.2

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    7. Applied rewrites26.2%

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    8. Taylor expanded in y around 0

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    9. Step-by-step derivation
      1. lift-*.f6417.0

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    10. Applied rewrites17.0%

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 21: 17.2% accurate, 13.6× speedup?

\[\begin{array}{l} \\ a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (* a (* y3 (* y1 z))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return a * (y3 * (y1 * z));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    code = a * (y3 * (y1 * z))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return a * (y3 * (y1 * z));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	return a * (y3 * (y1 * z))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	return Float64(a * Float64(y3 * Float64(y1 * z)))
end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = a * (y3 * (y1 * z));
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(a * N[(y3 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)
\end{array}
Derivation
  1. Initial program 29.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. Taylor expanded in y3 around -inf

    \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
  3. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    2. lower-*.f64N/A

      \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
    3. lower--.f64N/A

      \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
  4. Applied rewrites37.2%

    \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
  5. Taylor expanded in a around -inf

    \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
  6. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto a \cdot \left(y3 \cdot \color{blue}{\left(y1 \cdot z - y \cdot y5\right)}\right) \]
    2. lower-*.f64N/A

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - \color{blue}{y \cdot y5}\right)\right) \]
    3. lower--.f64N/A

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot \color{blue}{y5}\right)\right) \]
    4. lower-*.f64N/A

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    5. lower-*.f6426.2

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
  7. Applied rewrites26.2%

    \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
  8. Taylor expanded in y around 0

    \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
  9. Step-by-step derivation
    1. lift-*.f6417.0

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
  10. Applied rewrites17.0%

    \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
  11. Add Preprocessing

Alternative 22: 17.0% accurate, 13.6× speedup?

\[\begin{array}{l} \\ a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (* a (* y1 (* y3 z))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return a * (y1 * (y3 * z));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    code = a * (y1 * (y3 * z))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return a * (y1 * (y3 * z));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	return a * (y1 * (y3 * z))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	return Float64(a * Float64(y1 * Float64(y3 * z)))
end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = a * (y1 * (y3 * z));
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(a * N[(y1 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)
\end{array}
Derivation
  1. Initial program 29.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. Taylor expanded in y3 around -inf

    \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
  3. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    2. lower-*.f64N/A

      \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
    3. lower--.f64N/A

      \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
  4. Applied rewrites37.2%

    \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
  5. Taylor expanded in a around -inf

    \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
  6. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto a \cdot \left(y3 \cdot \color{blue}{\left(y1 \cdot z - y \cdot y5\right)}\right) \]
    2. lower-*.f64N/A

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - \color{blue}{y \cdot y5}\right)\right) \]
    3. lower--.f64N/A

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot \color{blue}{y5}\right)\right) \]
    4. lower-*.f64N/A

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    5. lower-*.f6426.2

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
  7. Applied rewrites26.2%

    \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
  8. Taylor expanded in y around 0

    \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
  9. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
    2. lower-*.f6417.2

      \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
  10. Applied rewrites17.2%

    \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
  11. Add Preprocessing

Reproduce

?
herbie shell --seed 2025134 
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :name "Linear.Matrix:det44 from linear-1.19.1.3"
  :precision binary64
  (+ (- (+ (+ (- (* (- (* x y) (* z t)) (- (* a b) (* c i))) (* (- (* x j) (* z k)) (- (* y0 b) (* y1 i)))) (* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a)))) (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i)))) (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a)))) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))