Linear.Matrix:det44 from linear-1.19.1.3

Percentage Accurate: 30.3% → 53.0%
Time: 20.0s
Alternatives: 33
Speedup: 4.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 33 alternatives:

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

Initial Program: 30.3% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 53.0% 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}:\\ \;\;\;\;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)\\ \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
     (*
      b
      (-
       (fma a (- (* x y) (* t z)) (* y4 (- (* j t) (* k y))))
       (* y0 (- (* 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 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 = b * (fma(a, ((x * y) - (t * z)), (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(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(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)))));
	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[(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]]]
\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}:\\
\;\;\;\;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)\\


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

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

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

    1. Initial program 0.0%

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

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

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

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

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

Alternative 2: 43.6% accurate, 2.0× speedup?

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

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

\mathbf{elif}\;y3 \leq -6 \cdot 10^{+51}:\\
\;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, t\_3, x \cdot t\_1\right) - t \cdot t\_4\right)\\

\mathbf{elif}\;y3 \leq -1 \cdot 10^{-261}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y3 \leq 1.85 \cdot 10^{+154}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y3 < -8.4999999999999998e143 or 1.84999999999999997e154 < y3

    1. Initial program 22.8%

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

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

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

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

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

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

    if -8.4999999999999998e143 < y3 < -6e51

    1. Initial program 29.7%

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

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

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

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

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

    if -6e51 < y3 < -9.99999999999999984e-262 or 1.1e73 < y3 < 1.84999999999999997e154

    1. Initial program 33.2%

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

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

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

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

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

    if -9.99999999999999984e-262 < y3 < 1.1e73

    1. Initial program 33.5%

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

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

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

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

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

Alternative 3: 38.4% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot t - k \cdot y\\ t_2 := c \cdot y0 - a \cdot y1\\ t_3 := j \cdot x - k \cdot z\\ t_4 := x \cdot y - t \cdot z\\ \mathbf{if}\;x \leq -1.3 \cdot 10^{+173}:\\ \;\;\;\;-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, t\_4, y5 \cdot t\_1\right) - y1 \cdot t\_3\right)\right)\\ \mathbf{elif}\;x \leq -4 \cdot 10^{-224}:\\ \;\;\;\;b \cdot \left(\mathsf{fma}\left(a, t\_4, y4 \cdot t\_1\right) - y0 \cdot t\_3\right)\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{-282}:\\ \;\;\;\;-1 \cdot \left(y3 \cdot \left(y4 \cdot \left(j \cdot y1 - c \cdot y\right)\right)\right)\\ \mathbf{elif}\;x \leq 8.8 \cdot 10^{-235}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{elif}\;x \leq 3.7 \cdot 10^{+89}:\\ \;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot t\_2\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot t\_2\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\ \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 (- (* c y0) (* a y1)))
        (t_3 (- (* j x) (* k z)))
        (t_4 (- (* x y) (* t z))))
   (if (<= x -1.3e+173)
     (* -1.0 (* i (- (fma c t_4 (* y5 t_1)) (* y1 t_3))))
     (if (<= x -4e-224)
       (* b (- (fma a t_4 (* y4 t_1)) (* y0 t_3)))
       (if (<= x 3.3e-282)
         (* -1.0 (* y3 (* y4 (- (* j y1) (* c y)))))
         (if (<= x 8.8e-235)
           (* y3 (* y5 (- (* j y0) (* a y))))
           (if (<= x 3.7e+89)
             (*
              y2
              (-
               (fma k (- (* y1 y4) (* y0 y5)) (* x t_2))
               (* t (- (* c y4) (* a y5)))))
             (*
              x
              (-
               (fma y (- (* a b) (* c i)) (* y2 t_2))
               (* j (- (* b y0) (* i y1))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = (j * t) - (k * y);
	double t_2 = (c * y0) - (a * y1);
	double t_3 = (j * x) - (k * z);
	double t_4 = (x * y) - (t * z);
	double tmp;
	if (x <= -1.3e+173) {
		tmp = -1.0 * (i * (fma(c, t_4, (y5 * t_1)) - (y1 * t_3)));
	} else if (x <= -4e-224) {
		tmp = b * (fma(a, t_4, (y4 * t_1)) - (y0 * t_3));
	} else if (x <= 3.3e-282) {
		tmp = -1.0 * (y3 * (y4 * ((j * y1) - (c * y))));
	} else if (x <= 8.8e-235) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else if (x <= 3.7e+89) {
		tmp = y2 * (fma(k, ((y1 * y4) - (y0 * y5)), (x * t_2)) - (t * ((c * y4) - (a * y5))));
	} else {
		tmp = x * (fma(y, ((a * b) - (c * i)), (y2 * t_2)) - (j * ((b * y0) - (i * y1))));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(j * t) - Float64(k * y))
	t_2 = Float64(Float64(c * y0) - Float64(a * y1))
	t_3 = Float64(Float64(j * x) - Float64(k * z))
	t_4 = Float64(Float64(x * y) - Float64(t * z))
	tmp = 0.0
	if (x <= -1.3e+173)
		tmp = Float64(-1.0 * Float64(i * Float64(fma(c, t_4, Float64(y5 * t_1)) - Float64(y1 * t_3))));
	elseif (x <= -4e-224)
		tmp = Float64(b * Float64(fma(a, t_4, Float64(y4 * t_1)) - Float64(y0 * t_3)));
	elseif (x <= 3.3e-282)
		tmp = Float64(-1.0 * Float64(y3 * Float64(y4 * Float64(Float64(j * y1) - Float64(c * y)))));
	elseif (x <= 8.8e-235)
		tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))));
	elseif (x <= 3.7e+89)
		tmp = Float64(y2 * Float64(fma(k, Float64(Float64(y1 * y4) - Float64(y0 * y5)), Float64(x * t_2)) - Float64(t * Float64(Float64(c * y4) - Float64(a * y5)))));
	else
		tmp = Float64(x * Float64(fma(y, Float64(Float64(a * b) - Float64(c * i)), Float64(y2 * t_2)) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1)))));
	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[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.3e+173], N[(-1.0 * N[(i * N[(N[(c * t$95$4 + N[(y5 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y1 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4e-224], N[(b * N[(N[(a * t$95$4 + N[(y4 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.3e-282], N[(-1.0 * N[(y3 * N[(y4 * N[(N[(j * y1), $MachinePrecision] - N[(c * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.8e-235], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.7e+89], N[(y2 * N[(N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision] + N[(x * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(y2 * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(j * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -4 \cdot 10^{-224}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, t\_4, y4 \cdot t\_1\right) - y0 \cdot t\_3\right)\\

\mathbf{elif}\;x \leq 3.3 \cdot 10^{-282}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(y4 \cdot \left(j \cdot y1 - c \cdot y\right)\right)\right)\\

\mathbf{elif}\;x \leq 8.8 \cdot 10^{-235}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot t\_2\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < -1.2999999999999999e173

    1. Initial program 23.2%

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

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

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

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

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

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

    if -1.2999999999999999e173 < x < -4.0000000000000001e-224

    1. Initial program 31.3%

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

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

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

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

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

    if -4.0000000000000001e-224 < x < 3.3e-282

    1. Initial program 33.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \left(y3 \cdot \left(y4 \cdot \left(j \cdot y1 - c \cdot y\right)\right)\right) \]
      4. lower-*.f6427.5

        \[\leadsto -1 \cdot \left(y3 \cdot \left(y4 \cdot \left(j \cdot y1 - c \cdot y\right)\right)\right) \]
    8. Applied rewrites27.5%

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

    if 3.3e-282 < x < 8.79999999999999935e-235

    1. Initial program 35.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.79999999999999935e-235 < x < 3.6999999999999998e89

    1. Initial program 34.2%

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

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

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

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

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

    if 3.6999999999999998e89 < x

    1. Initial program 24.1%

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

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

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

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

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

Alternative 4: 38.1% accurate, 2.3× speedup?

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

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

\mathbf{elif}\;x \leq 3.3 \cdot 10^{-282}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(y4 \cdot \left(j \cdot y1 - c \cdot y\right)\right)\right)\\

\mathbf{elif}\;x \leq 8.8 \cdot 10^{-235}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot t\_1\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -4.0000000000000001e-224

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

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

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

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

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

    if -4.0000000000000001e-224 < x < 3.3e-282

    1. Initial program 33.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \left(y3 \cdot \left(y4 \cdot \left(j \cdot y1 - c \cdot y\right)\right)\right) \]
      4. lower-*.f6427.5

        \[\leadsto -1 \cdot \left(y3 \cdot \left(y4 \cdot \left(j \cdot y1 - c \cdot y\right)\right)\right) \]
    8. Applied rewrites27.5%

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

    if 3.3e-282 < x < 8.79999999999999935e-235

    1. Initial program 35.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.79999999999999935e-235 < x < 3.6999999999999998e89

    1. Initial program 34.2%

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

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

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

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

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

    if 3.6999999999999998e89 < x

    1. Initial program 24.1%

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

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

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

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

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

Alternative 5: 40.4% accurate, 2.3× speedup?

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

\\
\begin{array}{l}
t_1 := c \cdot y0 - a \cdot y1\\
t_2 := j \cdot t - k \cdot y\\
t_3 := a \cdot b - c \cdot i\\
t_4 := b \cdot y0 - i \cdot y1\\
\mathbf{if}\;x \leq -4.5 \cdot 10^{+118}:\\
\;\;\;\;-1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, t\_3, y3 \cdot t\_1\right) - k \cdot t\_4\right)\right)\\

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

\mathbf{elif}\;x \leq 1.02 \cdot 10^{-50}:\\
\;\;\;\;-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{else}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(y, t\_3, y2 \cdot t\_1\right) - j \cdot t\_4\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -4.50000000000000002e118

    1. Initial program 24.2%

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

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

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

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

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

    if -4.50000000000000002e118 < x < -1.8e-145

    1. Initial program 31.5%

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

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

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

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

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

    if -1.8e-145 < x < 1.0199999999999999e-50

    1. Initial program 35.2%

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

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

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

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

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

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

    if 1.0199999999999999e-50 < x

    1. Initial program 26.8%

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

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

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

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

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

Alternative 6: 41.1% accurate, 2.3× speedup?

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

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

\mathbf{elif}\;x \leq -1.8 \cdot 10^{-145}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, t\_3, y4 \cdot t\_1\right) - y0 \cdot t\_2\right)\\

\mathbf{elif}\;x \leq 1.02 \cdot 10^{-50}:\\
\;\;\;\;-1 \cdot \left(y5 \cdot \left(\mathsf{fma}\left(i, t\_1, y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.2999999999999999e173

    1. Initial program 23.2%

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

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

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

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

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

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

    if -1.2999999999999999e173 < x < -1.8e-145

    1. Initial program 30.6%

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

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

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

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

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

    if -1.8e-145 < x < 1.0199999999999999e-50

    1. Initial program 35.2%

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

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

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

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

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

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

    if 1.0199999999999999e-50 < x

    1. Initial program 26.8%

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

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

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

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

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

Alternative 7: 39.6% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot t - k \cdot y\\ \mathbf{if}\;y4 \leq -6 \cdot 10^{+74}:\\ \;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, t\_1, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \mathbf{elif}\;y4 \leq 9 \cdot 10^{-195}:\\ \;\;\;\;b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot t\_1\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{elif}\;y4 \leq 7.8 \cdot 10^{+87}:\\ \;\;\;\;x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (- (* j t) (* k y))))
   (if (<= y4 -6e+74)
     (*
      y4
      (- (fma b t_1 (* y1 (- (* k y2) (* j y3)))) (* c (- (* t y2) (* y y3)))))
     (if (<= y4 9e-195)
       (*
        b
        (- (fma a (- (* x y) (* t z)) (* y4 t_1)) (* y0 (- (* j x) (* k z)))))
       (if (<= y4 7.8e+87)
         (*
          x
          (-
           (fma y (- (* a b) (* c i)) (* y2 (- (* c y0) (* a y1))))
           (* j (- (* b y0) (* i y1)))))
         (* y2 (* y4 (- (* k y1) (* c 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 = (j * t) - (k * y);
	double tmp;
	if (y4 <= -6e+74) {
		tmp = y4 * (fma(b, t_1, (y1 * ((k * y2) - (j * y3)))) - (c * ((t * y2) - (y * y3))));
	} else if (y4 <= 9e-195) {
		tmp = b * (fma(a, ((x * y) - (t * z)), (y4 * t_1)) - (y0 * ((j * x) - (k * z))));
	} else if (y4 <= 7.8e+87) {
		tmp = x * (fma(y, ((a * b) - (c * i)), (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
	} else {
		tmp = y2 * (y4 * ((k * y1) - (c * 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(j * t) - Float64(k * y))
	tmp = 0.0
	if (y4 <= -6e+74)
		tmp = Float64(y4 * Float64(fma(b, t_1, Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3)))));
	elseif (y4 <= 9e-195)
		tmp = Float64(b * Float64(fma(a, Float64(Float64(x * y) - Float64(t * z)), Float64(y4 * t_1)) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z)))));
	elseif (y4 <= 7.8e+87)
		tmp = Float64(x * Float64(fma(y, Float64(Float64(a * b) - Float64(c * i)), Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1)))));
	else
		tmp = Float64(y2 * Float64(y4 * Float64(Float64(k * y1) - Float64(c * 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[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -6e+74], N[(y4 * N[(N[(b * t$95$1 + N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 9e-195], N[(b * N[(N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y4 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 7.8e+87], N[(x * N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y2 * N[(y4 * N[(N[(k * y1), $MachinePrecision] - N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot t - k \cdot y\\
\mathbf{if}\;y4 \leq -6 \cdot 10^{+74}:\\
\;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, t\_1, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\

\mathbf{elif}\;y4 \leq 9 \cdot 10^{-195}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot t\_1\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y4 < -6e74

    1. Initial program 25.1%

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

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

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

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

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

    if -6e74 < y4 < 9e-195

    1. Initial program 33.7%

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

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

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

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

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

    if 9e-195 < y4 < 7.80000000000000039e87

    1. Initial program 32.9%

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

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

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

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

      \[\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.80000000000000039e87 < y4

    1. Initial program 24.4%

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

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

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

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

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

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

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

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

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      4. lower-/.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      5. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      6. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      7. lift--.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      8. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      9. lift-*.f6438.9

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
    8. Applied rewrites38.9%

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

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

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

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

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

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

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

Alternative 8: 36.9% accurate, 2.5× speedup?

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

\\
\begin{array}{l}
t_1 := y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\
\mathbf{if}\;y4 \leq -1.9 \cdot 10^{+208}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y4 \leq 9 \cdot 10^{-195}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y4 < -1.9000000000000001e208 or 7.80000000000000039e87 < y4

    1. Initial program 24.5%

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

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

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

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

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

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

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

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

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      4. lower-/.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      5. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      6. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      7. lift--.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      8. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      9. lift-*.f6438.8

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
    8. Applied rewrites38.8%

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

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

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

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

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

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

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

    if -1.9000000000000001e208 < y4 < 9e-195

    1. Initial program 32.0%

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

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

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

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

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

    if 9e-195 < y4 < 7.80000000000000039e87

    1. Initial program 32.9%

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

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

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

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

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

Alternative 9: 36.1% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
t_1 := y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\
\mathbf{if}\;y4 \leq -1.9 \cdot 10^{+208}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y4 \leq 1.65 \cdot 10^{+53}:\\
\;\;\;\;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}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y4 < -1.9000000000000001e208 or 1.6500000000000001e53 < y4

    1. Initial program 25.1%

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

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

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

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

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

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

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

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

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      4. lower-/.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      5. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      6. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      7. lift--.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      8. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      9. lift-*.f6438.7

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
    8. Applied rewrites38.7%

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

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

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

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

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

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

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

    if -1.9000000000000001e208 < y4 < 1.6500000000000001e53

    1. Initial program 32.3%

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

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

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

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

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

Alternative 10: 33.9% accurate, 3.3× speedup?

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

\\
\begin{array}{l}
t_1 := y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\
\mathbf{if}\;y4 \leq -2.8 \cdot 10^{+208}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y4 \leq -6.6 \cdot 10^{+42}:\\
\;\;\;\;j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right)\\

\mathbf{elif}\;y4 \leq -4.6 \cdot 10^{-66}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\

\mathbf{elif}\;y4 \leq 7 \cdot 10^{+55}:\\
\;\;\;\;x \cdot \left(a \cdot \left(b \cdot y\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y4 < -2.80000000000000022e208 or 7.00000000000000021e55 < y4

    1. Initial program 25.1%

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

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

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

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

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

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

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

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

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      4. lower-/.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      5. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      6. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      7. lift--.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      8. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      9. lift-*.f6438.8

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
    8. Applied rewrites38.8%

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

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

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

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

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

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

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

    if -2.80000000000000022e208 < y4 < -6.5999999999999998e42

    1. Initial program 26.3%

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

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

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

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

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

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

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

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

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right) \]
      4. lower-*.f6436.8

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

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

    if -6.5999999999999998e42 < y4 < -4.59999999999999984e-66

    1. Initial program 31.6%

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

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

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

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

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

      \[\leadsto b \cdot \left(a \cdot \color{blue}{\left(x \cdot y - t \cdot z\right)}\right) \]
    7. 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 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 \color{blue}{z}\right)\right) \]
    8. Applied rewrites27.0%

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

    if -4.59999999999999984e-66 < y4 < 7.00000000000000021e55

    1. Initial program 34.1%

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

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

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

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

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

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

        \[\leadsto x \cdot \left(a \cdot \left(b \cdot y\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right) \]
      2. lower-*.f6430.7

        \[\leadsto x \cdot \left(a \cdot \left(b \cdot y\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right) \]
    8. Applied rewrites30.7%

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

Alternative 11: 30.3% accurate, 3.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\ \mathbf{if}\;y0 \leq -3.3 \cdot 10^{-24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y0 \leq -4.6 \cdot 10^{-237}:\\ \;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\ \mathbf{elif}\;y0 \leq 8 \cdot 10^{-239}:\\ \;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\ \mathbf{elif}\;y0 \leq 90000:\\ \;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\\ \mathbf{elif}\;y0 \leq 2.3 \cdot 10^{+83}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y0 \leq 2.2 \cdot 10^{+203}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \left(y3 \cdot \left(c \cdot \left(y0 \cdot z\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* b (* y0 (- (* k z) (* j x))))))
   (if (<= y0 -3.3e-24)
     t_1
     (if (<= y0 -4.6e-237)
       (* b (* y4 (- (* j t) (* k y))))
       (if (<= y0 8e-239)
         (* b (* a (- (* x y) (* t z))))
         (if (<= y0 90000.0)
           (* k (* y2 (- (* y1 y4) (* y0 y5))))
           (if (<= y0 2.3e+83)
             t_1
             (if (<= y0 2.2e+203)
               (* y3 (* y5 (- (* j y0) (* a y))))
               (* -1.0 (* y3 (* c (* y0 z))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = b * (y0 * ((k * z) - (j * x)));
	double tmp;
	if (y0 <= -3.3e-24) {
		tmp = t_1;
	} else if (y0 <= -4.6e-237) {
		tmp = b * (y4 * ((j * t) - (k * y)));
	} else if (y0 <= 8e-239) {
		tmp = b * (a * ((x * y) - (t * z)));
	} else if (y0 <= 90000.0) {
		tmp = k * (y2 * ((y1 * y4) - (y0 * y5)));
	} else if (y0 <= 2.3e+83) {
		tmp = t_1;
	} else if (y0 <= 2.2e+203) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else {
		tmp = -1.0 * (y3 * (c * (y0 * z)));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = b * (y0 * ((k * z) - (j * x)))
    if (y0 <= (-3.3d-24)) then
        tmp = t_1
    else if (y0 <= (-4.6d-237)) then
        tmp = b * (y4 * ((j * t) - (k * y)))
    else if (y0 <= 8d-239) then
        tmp = b * (a * ((x * y) - (t * z)))
    else if (y0 <= 90000.0d0) then
        tmp = k * (y2 * ((y1 * y4) - (y0 * y5)))
    else if (y0 <= 2.3d+83) then
        tmp = t_1
    else if (y0 <= 2.2d+203) then
        tmp = y3 * (y5 * ((j * y0) - (a * y)))
    else
        tmp = (-1.0d0) * (y3 * (c * (y0 * z)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = b * (y0 * ((k * z) - (j * x)));
	double tmp;
	if (y0 <= -3.3e-24) {
		tmp = t_1;
	} else if (y0 <= -4.6e-237) {
		tmp = b * (y4 * ((j * t) - (k * y)));
	} else if (y0 <= 8e-239) {
		tmp = b * (a * ((x * y) - (t * z)));
	} else if (y0 <= 90000.0) {
		tmp = k * (y2 * ((y1 * y4) - (y0 * y5)));
	} else if (y0 <= 2.3e+83) {
		tmp = t_1;
	} else if (y0 <= 2.2e+203) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else {
		tmp = -1.0 * (y3 * (c * (y0 * z)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = b * (y0 * ((k * z) - (j * x)))
	tmp = 0
	if y0 <= -3.3e-24:
		tmp = t_1
	elif y0 <= -4.6e-237:
		tmp = b * (y4 * ((j * t) - (k * y)))
	elif y0 <= 8e-239:
		tmp = b * (a * ((x * y) - (t * z)))
	elif y0 <= 90000.0:
		tmp = k * (y2 * ((y1 * y4) - (y0 * y5)))
	elif y0 <= 2.3e+83:
		tmp = t_1
	elif y0 <= 2.2e+203:
		tmp = y3 * (y5 * ((j * y0) - (a * y)))
	else:
		tmp = -1.0 * (y3 * (c * (y0 * z)))
	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(y0 * Float64(Float64(k * z) - Float64(j * x))))
	tmp = 0.0
	if (y0 <= -3.3e-24)
		tmp = t_1;
	elseif (y0 <= -4.6e-237)
		tmp = Float64(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y))));
	elseif (y0 <= 8e-239)
		tmp = Float64(b * Float64(a * Float64(Float64(x * y) - Float64(t * z))));
	elseif (y0 <= 90000.0)
		tmp = Float64(k * Float64(y2 * Float64(Float64(y1 * y4) - Float64(y0 * y5))));
	elseif (y0 <= 2.3e+83)
		tmp = t_1;
	elseif (y0 <= 2.2e+203)
		tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))));
	else
		tmp = Float64(-1.0 * Float64(y3 * Float64(c * Float64(y0 * z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = b * (y0 * ((k * z) - (j * x)));
	tmp = 0.0;
	if (y0 <= -3.3e-24)
		tmp = t_1;
	elseif (y0 <= -4.6e-237)
		tmp = b * (y4 * ((j * t) - (k * y)));
	elseif (y0 <= 8e-239)
		tmp = b * (a * ((x * y) - (t * z)));
	elseif (y0 <= 90000.0)
		tmp = k * (y2 * ((y1 * y4) - (y0 * y5)));
	elseif (y0 <= 2.3e+83)
		tmp = t_1;
	elseif (y0 <= 2.2e+203)
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	else
		tmp = -1.0 * (y3 * (c * (y0 * z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y0, -3.3e-24], t$95$1, If[LessEqual[y0, -4.6e-237], N[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 8e-239], N[(b * N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 90000.0], N[(k * N[(y2 * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 2.3e+83], t$95$1, If[LessEqual[y0, 2.2e+203], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(y3 * N[(c * N[(y0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y0 \leq -4.6 \cdot 10^{-237}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\

\mathbf{elif}\;y0 \leq 8 \cdot 10^{-239}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\

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

\mathbf{elif}\;y0 \leq 2.3 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\

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

\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(c \cdot \left(y0 \cdot z\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y0 < -3.29999999999999984e-24 or 9e4 < y0 < 2.29999999999999995e83

    1. Initial program 27.4%

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

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

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

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

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

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

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

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

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

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

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

    if -3.29999999999999984e-24 < y0 < -4.60000000000000023e-237

    1. Initial program 35.8%

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

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

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

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

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

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

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

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

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

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

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

    if -4.60000000000000023e-237 < y0 < 8.0000000000000006e-239

    1. Initial program 35.6%

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

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

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

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

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

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

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right) \]
      4. lift--.f6428.6

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

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

    if 8.0000000000000006e-239 < y0 < 9e4

    1. Initial program 33.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.29999999999999995e83 < y0 < 2.20000000000000004e203

    1. Initial program 26.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.20000000000000004e203 < y0

    1. Initial program 21.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \left(y3 \cdot \left(c \cdot \left(y0 \cdot z\right)\right)\right) \]
      2. lower-*.f6435.3

        \[\leadsto -1 \cdot \left(y3 \cdot \left(c \cdot \left(y0 \cdot z\right)\right)\right) \]
    11. Applied rewrites35.3%

      \[\leadsto -1 \cdot \left(y3 \cdot \left(c \cdot \left(y0 \cdot \color{blue}{z}\right)\right)\right) \]
  3. Recombined 6 regimes into one program.
  4. Add Preprocessing

Alternative 12: 32.0% accurate, 3.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\ \mathbf{if}\;y4 \leq -2.8 \cdot 10^{+208}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y4 \leq -6.6 \cdot 10^{+42}:\\ \;\;\;\;j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right)\\ \mathbf{elif}\;y4 \leq -2.2 \cdot 10^{-135}:\\ \;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\ \mathbf{elif}\;y4 \leq 3.3 \cdot 10^{-191}:\\ \;\;\;\;b \cdot \left(-1 \cdot \left(z \cdot \left(a \cdot t - k \cdot y0\right)\right)\right)\\ \mathbf{elif}\;y4 \leq 4.4 \cdot 10^{+55}:\\ \;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\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 (* y2 (* y4 (- (* k y1) (* c t))))))
   (if (<= y4 -2.8e+208)
     t_1
     (if (<= y4 -6.6e+42)
       (* j (* y4 (fma -1.0 (* y1 y3) (* b t))))
       (if (<= y4 -2.2e-135)
         (* b (* a (- (* x y) (* t z))))
         (if (<= y4 3.3e-191)
           (* b (* -1.0 (* z (- (* a t) (* k y0)))))
           (if (<= y4 4.4e+55) (* j (* y0 (- (* y3 y5) (* b x)))) 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 = y2 * (y4 * ((k * y1) - (c * t)));
	double tmp;
	if (y4 <= -2.8e+208) {
		tmp = t_1;
	} else if (y4 <= -6.6e+42) {
		tmp = j * (y4 * fma(-1.0, (y1 * y3), (b * t)));
	} else if (y4 <= -2.2e-135) {
		tmp = b * (a * ((x * y) - (t * z)));
	} else if (y4 <= 3.3e-191) {
		tmp = b * (-1.0 * (z * ((a * t) - (k * y0))));
	} else if (y4 <= 4.4e+55) {
		tmp = j * (y0 * ((y3 * y5) - (b * x)));
	} 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(y2 * Float64(y4 * Float64(Float64(k * y1) - Float64(c * t))))
	tmp = 0.0
	if (y4 <= -2.8e+208)
		tmp = t_1;
	elseif (y4 <= -6.6e+42)
		tmp = Float64(j * Float64(y4 * fma(-1.0, Float64(y1 * y3), Float64(b * t))));
	elseif (y4 <= -2.2e-135)
		tmp = Float64(b * Float64(a * Float64(Float64(x * y) - Float64(t * z))));
	elseif (y4 <= 3.3e-191)
		tmp = Float64(b * Float64(-1.0 * Float64(z * Float64(Float64(a * t) - Float64(k * y0)))));
	elseif (y4 <= 4.4e+55)
		tmp = Float64(j * Float64(y0 * Float64(Float64(y3 * y5) - Float64(b * x))));
	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[(y2 * N[(y4 * N[(N[(k * y1), $MachinePrecision] - N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -2.8e+208], t$95$1, If[LessEqual[y4, -6.6e+42], N[(j * N[(y4 * N[(-1.0 * N[(y1 * y3), $MachinePrecision] + N[(b * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -2.2e-135], N[(b * N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 3.3e-191], N[(b * N[(-1.0 * N[(z * N[(N[(a * t), $MachinePrecision] - N[(k * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 4.4e+55], N[(j * N[(y0 * N[(N[(y3 * y5), $MachinePrecision] - N[(b * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\
\mathbf{if}\;y4 \leq -2.8 \cdot 10^{+208}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y4 \leq -6.6 \cdot 10^{+42}:\\
\;\;\;\;j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right)\\

\mathbf{elif}\;y4 \leq -2.2 \cdot 10^{-135}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\

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

\mathbf{elif}\;y4 \leq 4.4 \cdot 10^{+55}:\\
\;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y4 < -2.80000000000000022e208 or 4.40000000000000021e55 < y4

    1. Initial program 25.1%

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

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

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

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

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

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

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

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

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      4. lower-/.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      5. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      6. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      7. lift--.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      8. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      9. lift-*.f6438.7

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
    8. Applied rewrites38.7%

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

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

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

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

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

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

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

    if -2.80000000000000022e208 < y4 < -6.5999999999999998e42

    1. Initial program 26.3%

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

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

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

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

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

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

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

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

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right) \]
      4. lower-*.f6436.8

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

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

    if -6.5999999999999998e42 < y4 < -2.2e-135

    1. Initial program 32.0%

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

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

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

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

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

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

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

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

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

    if -2.2e-135 < y4 < 3.29999999999999981e-191

    1. Initial program 35.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.29999999999999981e-191 < y4 < 4.40000000000000021e55

    1. Initial program 33.1%

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

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

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

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

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

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

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

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

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right) \]
      4. lower-*.f6427.6

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

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

Alternative 13: 32.1% accurate, 3.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\ \mathbf{if}\;y4 \leq -2.8 \cdot 10^{+208}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y4 \leq -6.6 \cdot 10^{+42}:\\ \;\;\;\;j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right)\\ \mathbf{elif}\;y4 \leq -6.5 \cdot 10^{-130}:\\ \;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\ \mathbf{elif}\;y4 \leq 7 \cdot 10^{-193}:\\ \;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\ \mathbf{elif}\;y4 \leq 4.4 \cdot 10^{+55}:\\ \;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\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 (* y2 (* y4 (- (* k y1) (* c t))))))
   (if (<= y4 -2.8e+208)
     t_1
     (if (<= y4 -6.6e+42)
       (* j (* y4 (fma -1.0 (* y1 y3) (* b t))))
       (if (<= y4 -6.5e-130)
         (* b (* a (- (* x y) (* t z))))
         (if (<= y4 7e-193)
           (* b (* y0 (- (* k z) (* j x))))
           (if (<= y4 4.4e+55) (* j (* y0 (- (* y3 y5) (* b x)))) 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 = y2 * (y4 * ((k * y1) - (c * t)));
	double tmp;
	if (y4 <= -2.8e+208) {
		tmp = t_1;
	} else if (y4 <= -6.6e+42) {
		tmp = j * (y4 * fma(-1.0, (y1 * y3), (b * t)));
	} else if (y4 <= -6.5e-130) {
		tmp = b * (a * ((x * y) - (t * z)));
	} else if (y4 <= 7e-193) {
		tmp = b * (y0 * ((k * z) - (j * x)));
	} else if (y4 <= 4.4e+55) {
		tmp = j * (y0 * ((y3 * y5) - (b * x)));
	} 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(y2 * Float64(y4 * Float64(Float64(k * y1) - Float64(c * t))))
	tmp = 0.0
	if (y4 <= -2.8e+208)
		tmp = t_1;
	elseif (y4 <= -6.6e+42)
		tmp = Float64(j * Float64(y4 * fma(-1.0, Float64(y1 * y3), Float64(b * t))));
	elseif (y4 <= -6.5e-130)
		tmp = Float64(b * Float64(a * Float64(Float64(x * y) - Float64(t * z))));
	elseif (y4 <= 7e-193)
		tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x))));
	elseif (y4 <= 4.4e+55)
		tmp = Float64(j * Float64(y0 * Float64(Float64(y3 * y5) - Float64(b * x))));
	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[(y2 * N[(y4 * N[(N[(k * y1), $MachinePrecision] - N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -2.8e+208], t$95$1, If[LessEqual[y4, -6.6e+42], N[(j * N[(y4 * N[(-1.0 * N[(y1 * y3), $MachinePrecision] + N[(b * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -6.5e-130], N[(b * N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 7e-193], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 4.4e+55], N[(j * N[(y0 * N[(N[(y3 * y5), $MachinePrecision] - N[(b * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\
\mathbf{if}\;y4 \leq -2.8 \cdot 10^{+208}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y4 \leq -6.6 \cdot 10^{+42}:\\
\;\;\;\;j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right)\\

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

\mathbf{elif}\;y4 \leq 7 \cdot 10^{-193}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\

\mathbf{elif}\;y4 \leq 4.4 \cdot 10^{+55}:\\
\;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y4 < -2.80000000000000022e208 or 4.40000000000000021e55 < y4

    1. Initial program 25.1%

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

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

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

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

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

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

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

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

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      4. lower-/.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      5. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      6. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      7. lift--.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      8. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      9. lift-*.f6438.7

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
    8. Applied rewrites38.7%

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

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

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

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

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

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

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

    if -2.80000000000000022e208 < y4 < -6.5999999999999998e42

    1. Initial program 26.3%

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

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

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

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

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

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

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

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

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right) \]
      4. lower-*.f6436.8

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

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

    if -6.5999999999999998e42 < y4 < -6.5000000000000002e-130

    1. Initial program 32.1%

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

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

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

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

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

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

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right) \]
      4. lift--.f6425.8

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

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

    if -6.5000000000000002e-130 < y4 < 7.00000000000000009e-193

    1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

    if 7.00000000000000009e-193 < y4 < 4.40000000000000021e55

    1. Initial program 33.0%

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

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

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

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

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

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

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

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

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right) \]
      4. lower-*.f6427.7

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

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

Alternative 14: 31.7% accurate, 3.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\ \mathbf{if}\;y4 \leq -2.1 \cdot 10^{+208}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y4 \leq -1.8 \cdot 10^{+75}:\\ \;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\ \mathbf{elif}\;y4 \leq -6.5 \cdot 10^{-130}:\\ \;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\ \mathbf{elif}\;y4 \leq 7 \cdot 10^{-193}:\\ \;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\ \mathbf{elif}\;y4 \leq 4.4 \cdot 10^{+55}:\\ \;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\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 (* y2 (* y4 (- (* k y1) (* c t))))))
   (if (<= y4 -2.1e+208)
     t_1
     (if (<= y4 -1.8e+75)
       (* b (* y4 (- (* j t) (* k y))))
       (if (<= y4 -6.5e-130)
         (* b (* a (- (* x y) (* t z))))
         (if (<= y4 7e-193)
           (* b (* y0 (- (* k z) (* j x))))
           (if (<= y4 4.4e+55) (* j (* y0 (- (* y3 y5) (* b x)))) 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 = y2 * (y4 * ((k * y1) - (c * t)));
	double tmp;
	if (y4 <= -2.1e+208) {
		tmp = t_1;
	} else if (y4 <= -1.8e+75) {
		tmp = b * (y4 * ((j * t) - (k * y)));
	} else if (y4 <= -6.5e-130) {
		tmp = b * (a * ((x * y) - (t * z)));
	} else if (y4 <= 7e-193) {
		tmp = b * (y0 * ((k * z) - (j * x)));
	} else if (y4 <= 4.4e+55) {
		tmp = j * (y0 * ((y3 * y5) - (b * x)));
	} 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 = y2 * (y4 * ((k * y1) - (c * t)))
    if (y4 <= (-2.1d+208)) then
        tmp = t_1
    else if (y4 <= (-1.8d+75)) then
        tmp = b * (y4 * ((j * t) - (k * y)))
    else if (y4 <= (-6.5d-130)) then
        tmp = b * (a * ((x * y) - (t * z)))
    else if (y4 <= 7d-193) then
        tmp = b * (y0 * ((k * z) - (j * x)))
    else if (y4 <= 4.4d+55) then
        tmp = j * (y0 * ((y3 * y5) - (b * x)))
    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 = y2 * (y4 * ((k * y1) - (c * t)));
	double tmp;
	if (y4 <= -2.1e+208) {
		tmp = t_1;
	} else if (y4 <= -1.8e+75) {
		tmp = b * (y4 * ((j * t) - (k * y)));
	} else if (y4 <= -6.5e-130) {
		tmp = b * (a * ((x * y) - (t * z)));
	} else if (y4 <= 7e-193) {
		tmp = b * (y0 * ((k * z) - (j * x)));
	} else if (y4 <= 4.4e+55) {
		tmp = j * (y0 * ((y3 * y5) - (b * x)));
	} 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 = y2 * (y4 * ((k * y1) - (c * t)))
	tmp = 0
	if y4 <= -2.1e+208:
		tmp = t_1
	elif y4 <= -1.8e+75:
		tmp = b * (y4 * ((j * t) - (k * y)))
	elif y4 <= -6.5e-130:
		tmp = b * (a * ((x * y) - (t * z)))
	elif y4 <= 7e-193:
		tmp = b * (y0 * ((k * z) - (j * x)))
	elif y4 <= 4.4e+55:
		tmp = j * (y0 * ((y3 * y5) - (b * x)))
	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(y2 * Float64(y4 * Float64(Float64(k * y1) - Float64(c * t))))
	tmp = 0.0
	if (y4 <= -2.1e+208)
		tmp = t_1;
	elseif (y4 <= -1.8e+75)
		tmp = Float64(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y))));
	elseif (y4 <= -6.5e-130)
		tmp = Float64(b * Float64(a * Float64(Float64(x * y) - Float64(t * z))));
	elseif (y4 <= 7e-193)
		tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x))));
	elseif (y4 <= 4.4e+55)
		tmp = Float64(j * Float64(y0 * Float64(Float64(y3 * y5) - Float64(b * x))));
	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 = y2 * (y4 * ((k * y1) - (c * t)));
	tmp = 0.0;
	if (y4 <= -2.1e+208)
		tmp = t_1;
	elseif (y4 <= -1.8e+75)
		tmp = b * (y4 * ((j * t) - (k * y)));
	elseif (y4 <= -6.5e-130)
		tmp = b * (a * ((x * y) - (t * z)));
	elseif (y4 <= 7e-193)
		tmp = b * (y0 * ((k * z) - (j * x)));
	elseif (y4 <= 4.4e+55)
		tmp = j * (y0 * ((y3 * y5) - (b * x)));
	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[(y2 * N[(y4 * N[(N[(k * y1), $MachinePrecision] - N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -2.1e+208], t$95$1, If[LessEqual[y4, -1.8e+75], N[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -6.5e-130], N[(b * N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 7e-193], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 4.4e+55], N[(j * N[(y0 * N[(N[(y3 * y5), $MachinePrecision] - N[(b * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\
\mathbf{if}\;y4 \leq -2.1 \cdot 10^{+208}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;y4 \leq 7 \cdot 10^{-193}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\

\mathbf{elif}\;y4 \leq 4.4 \cdot 10^{+55}:\\
\;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y4 < -2.0999999999999998e208 or 4.40000000000000021e55 < y4

    1. Initial program 25.1%

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

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

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

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

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

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

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

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

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      4. lower-/.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      5. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      6. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      7. lift--.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      8. lift-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
      9. lift-*.f6438.7

        \[\leadsto y2 \cdot \left(k \cdot \left(\mathsf{fma}\left(y1, y4, \frac{x \cdot \left(c \cdot y0 - a \cdot y1\right)}{k}\right) - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right) \]
    8. Applied rewrites38.7%

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

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

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

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

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

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

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

    if -2.0999999999999998e208 < y4 < -1.8e75

    1. Initial program 25.4%

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

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

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

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

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

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

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

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

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

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

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

    if -1.8e75 < y4 < -6.5000000000000002e-130

    1. Initial program 31.8%

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

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

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

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

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

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

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right) \]
      4. lift--.f6425.8

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

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

    if -6.5000000000000002e-130 < y4 < 7.00000000000000009e-193

    1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

    if 7.00000000000000009e-193 < y4 < 4.40000000000000021e55

    1. Initial program 33.0%

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

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

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

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

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

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

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

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

        \[\leadsto j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right) \]
      4. lower-*.f6427.7

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

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

Alternative 15: 29.7% accurate, 3.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y0 \leq -3.3 \cdot 10^{-24}:\\ \;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\ \mathbf{elif}\;y0 \leq -4.6 \cdot 10^{-237}:\\ \;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\ \mathbf{elif}\;y0 \leq 8 \cdot 10^{-239}:\\ \;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\ \mathbf{elif}\;y0 \leq 6.8 \cdot 10^{+19}:\\ \;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\\ \mathbf{elif}\;y0 \leq 7.5 \cdot 10^{+136}:\\ \;\;\;\;x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= y0 -3.3e-24)
   (* b (* y0 (- (* k z) (* j x))))
   (if (<= y0 -4.6e-237)
     (* b (* y4 (- (* j t) (* k y))))
     (if (<= y0 8e-239)
       (* b (* a (- (* x y) (* t z))))
       (if (<= y0 6.8e+19)
         (* k (* y2 (- (* y1 y4) (* y0 y5))))
         (if (<= y0 7.5e+136)
           (* x (* j (- (* i y1) (* b y0))))
           (* x (* y2 (- (* c y0) (* a y1))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y0 <= -3.3e-24) {
		tmp = b * (y0 * ((k * z) - (j * x)));
	} else if (y0 <= -4.6e-237) {
		tmp = b * (y4 * ((j * t) - (k * y)));
	} else if (y0 <= 8e-239) {
		tmp = b * (a * ((x * y) - (t * z)));
	} else if (y0 <= 6.8e+19) {
		tmp = k * (y2 * ((y1 * y4) - (y0 * y5)));
	} else if (y0 <= 7.5e+136) {
		tmp = x * (j * ((i * y1) - (b * y0)));
	} else {
		tmp = x * (y2 * ((c * y0) - (a * y1)));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\\
\begin{array}{l}
\mathbf{if}\;y0 \leq -3.3 \cdot 10^{-24}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\

\mathbf{elif}\;y0 \leq -4.6 \cdot 10^{-237}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\

\mathbf{elif}\;y0 \leq 8 \cdot 10^{-239}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\

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

\mathbf{elif}\;y0 \leq 7.5 \cdot 10^{+136}:\\
\;\;\;\;x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y0 < -3.29999999999999984e-24

    1. Initial program 26.5%

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

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

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

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

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

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

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

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

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

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

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

    if -3.29999999999999984e-24 < y0 < -4.60000000000000023e-237

    1. Initial program 35.8%

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

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

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

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

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

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

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

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

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

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

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

    if -4.60000000000000023e-237 < y0 < 8.0000000000000006e-239

    1. Initial program 35.6%

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

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

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

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

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

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

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right) \]
      4. lift--.f6428.6

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

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

    if 8.0000000000000006e-239 < y0 < 6.8e19

    1. Initial program 33.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.8e19 < y0 < 7.5000000000000002e136

    1. Initial program 29.8%

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    6. Taylor expanded in j around inf

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

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

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

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \]
      4. lift-*.f6429.6

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \]
    8. Applied rewrites29.6%

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

    if 7.5000000000000002e136 < y0

    1. Initial program 22.6%

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

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

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

        \[\leadsto x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{j \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    5. Applied rewrites35.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)} \]
    6. Taylor expanded in y2 around inf

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

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

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

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

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

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

Alternative 16: 30.4% accurate, 3.7× speedup?

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

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

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

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

\mathbf{elif}\;y0 \leq 8 \cdot 10^{-239}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\

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

\mathbf{elif}\;y0 \leq 2.3 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\

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

\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(c \cdot \left(y0 \cdot z\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y0 < -2.8000000000000002e-24 or 9e4 < y0 < 2.29999999999999995e83

    1. Initial program 27.4%

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

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

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

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

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

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

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

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

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

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

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

    if -2.8000000000000002e-24 < y0 < 8.0000000000000006e-239

    1. Initial program 35.8%

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

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

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

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

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

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

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

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

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

    if 8.0000000000000006e-239 < y0 < 9e4

    1. Initial program 33.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.29999999999999995e83 < y0 < 2.20000000000000004e203

    1. Initial program 26.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.20000000000000004e203 < y0

    1. Initial program 21.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \left(y3 \cdot \left(c \cdot \left(y0 \cdot z\right)\right)\right) \]
      2. lower-*.f6435.3

        \[\leadsto -1 \cdot \left(y3 \cdot \left(c \cdot \left(y0 \cdot z\right)\right)\right) \]
    11. Applied rewrites35.3%

      \[\leadsto -1 \cdot \left(y3 \cdot \left(c \cdot \left(y0 \cdot \color{blue}{z}\right)\right)\right) \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 17: 31.2% accurate, 4.2× speedup?

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

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

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

\\
\begin{array}{l}
\mathbf{if}\;y0 \leq -3.3 \cdot 10^{-24}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\

\mathbf{elif}\;y0 \leq -4.6 \cdot 10^{-237}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\

\mathbf{elif}\;y0 \leq 8 \cdot 10^{-239}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y0 < -3.29999999999999984e-24

    1. Initial program 26.5%

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

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

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

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

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

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

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

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

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

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

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

    if -3.29999999999999984e-24 < y0 < -4.60000000000000023e-237

    1. Initial program 35.8%

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

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

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

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

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

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

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

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

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

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

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

    if -4.60000000000000023e-237 < y0 < 8.0000000000000006e-239

    1. Initial program 35.6%

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

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

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

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

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

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

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right) \]
      4. lift--.f6428.6

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

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

    if 8.0000000000000006e-239 < y0 < 9e4

    1. Initial program 33.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 9e4 < y0

    1. Initial program 25.8%

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    6. Taylor expanded in y0 around inf

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

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

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

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
      4. lower-*.f6437.7

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    8. Applied rewrites37.7%

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

Alternative 18: 33.0% accurate, 4.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c \cdot \left(y2 \cdot \left(x \cdot y0 - t \cdot y4\right)\right)\\ \mathbf{if}\;y2 \leq -1.85 \cdot 10^{+62}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y2 \leq -3.8 \cdot 10^{-215}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{elif}\;y2 \leq 2.4 \cdot 10^{-179}:\\ \;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\ \mathbf{elif}\;y2 \leq 1.6 \cdot 10^{+49}:\\ \;\;\;\;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 (* c (* y2 (- (* x y0) (* t y4))))))
   (if (<= y2 -1.85e+62)
     t_1
     (if (<= y2 -3.8e-215)
       (* y3 (* y5 (- (* j y0) (* a y))))
       (if (<= y2 2.4e-179)
         (* b (* a (- (* x y) (* t z))))
         (if (<= y2 1.6e+49) (* 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 = c * (y2 * ((x * y0) - (t * y4)));
	double tmp;
	if (y2 <= -1.85e+62) {
		tmp = t_1;
	} else if (y2 <= -3.8e-215) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else if (y2 <= 2.4e-179) {
		tmp = b * (a * ((x * y) - (t * z)));
	} else if (y2 <= 1.6e+49) {
		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 = c * (y2 * ((x * y0) - (t * y4)))
    if (y2 <= (-1.85d+62)) then
        tmp = t_1
    else if (y2 <= (-3.8d-215)) then
        tmp = y3 * (y5 * ((j * y0) - (a * y)))
    else if (y2 <= 2.4d-179) then
        tmp = b * (a * ((x * y) - (t * z)))
    else if (y2 <= 1.6d+49) 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 = c * (y2 * ((x * y0) - (t * y4)));
	double tmp;
	if (y2 <= -1.85e+62) {
		tmp = t_1;
	} else if (y2 <= -3.8e-215) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else if (y2 <= 2.4e-179) {
		tmp = b * (a * ((x * y) - (t * z)));
	} else if (y2 <= 1.6e+49) {
		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 = c * (y2 * ((x * y0) - (t * y4)))
	tmp = 0
	if y2 <= -1.85e+62:
		tmp = t_1
	elif y2 <= -3.8e-215:
		tmp = y3 * (y5 * ((j * y0) - (a * y)))
	elif y2 <= 2.4e-179:
		tmp = b * (a * ((x * y) - (t * z)))
	elif y2 <= 1.6e+49:
		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(c * Float64(y2 * Float64(Float64(x * y0) - Float64(t * y4))))
	tmp = 0.0
	if (y2 <= -1.85e+62)
		tmp = t_1;
	elseif (y2 <= -3.8e-215)
		tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))));
	elseif (y2 <= 2.4e-179)
		tmp = Float64(b * Float64(a * Float64(Float64(x * y) - Float64(t * z))));
	elseif (y2 <= 1.6e+49)
		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 = c * (y2 * ((x * y0) - (t * y4)));
	tmp = 0.0;
	if (y2 <= -1.85e+62)
		tmp = t_1;
	elseif (y2 <= -3.8e-215)
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	elseif (y2 <= 2.4e-179)
		tmp = b * (a * ((x * y) - (t * z)));
	elseif (y2 <= 1.6e+49)
		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[(c * N[(y2 * N[(N[(x * y0), $MachinePrecision] - N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y2, -1.85e+62], t$95$1, If[LessEqual[y2, -3.8e-215], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 2.4e-179], N[(b * N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 1.6e+49], 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 := c \cdot \left(y2 \cdot \left(x \cdot y0 - t \cdot y4\right)\right)\\
\mathbf{if}\;y2 \leq -1.85 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y2 \leq -3.8 \cdot 10^{-215}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\

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

\mathbf{elif}\;y2 \leq 1.6 \cdot 10^{+49}:\\
\;\;\;\;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 4 regimes
  2. if y2 < -1.85000000000000007e62 or 1.60000000000000007e49 < y2

    1. Initial program 24.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto c \cdot \left(y2 \cdot \left(x \cdot y0 - t \cdot y4\right)\right) \]
      5. lower-*.f6439.0

        \[\leadsto c \cdot \left(y2 \cdot \left(x \cdot y0 - t \cdot y4\right)\right) \]
    8. Applied rewrites39.0%

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

    if -1.85000000000000007e62 < y2 < -3.79999999999999977e-215

    1. Initial program 34.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.79999999999999977e-215 < y2 < 2.4e-179

    1. Initial program 34.6%

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

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

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

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

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

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

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

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

    if 2.4e-179 < y2 < 1.60000000000000007e49

    1. Initial program 33.8%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 19: 22.3% accurate, 4.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\ \mathbf{if}\;z \leq -2.1 \cdot 10^{+161}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.772 \cdot 10^{-54}:\\ \;\;\;\;-1 \cdot \left(y3 \cdot \left(y0 \cdot \left(c \cdot z\right)\right)\right)\\ \mathbf{elif}\;z \leq -1.95 \cdot 10^{-298}:\\ \;\;\;\;x \cdot \left(i \cdot \left(j \cdot y1\right)\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+83}:\\ \;\;\;\;a \cdot \left(-1 \cdot \left(y \cdot \left(y3 \cdot y5\right)\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)))))
   (if (<= z -2.1e+161)
     t_1
     (if (<= z -1.772e-54)
       (* -1.0 (* y3 (* y0 (* c z))))
       (if (<= z -1.95e-298)
         (* x (* i (* j y1)))
         (if (<= z 6e+83) (* a (* -1.0 (* y (* y3 y5)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = a * (y3 * (y1 * z));
	double tmp;
	if (z <= -2.1e+161) {
		tmp = t_1;
	} else if (z <= -1.772e-54) {
		tmp = -1.0 * (y3 * (y0 * (c * z)));
	} else if (z <= -1.95e-298) {
		tmp = x * (i * (j * y1));
	} else if (z <= 6e+83) {
		tmp = a * (-1.0 * (y * (y3 * y5)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

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

\mathbf{elif}\;z \leq -1.772 \cdot 10^{-54}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(y0 \cdot \left(c \cdot z\right)\right)\right)\\

\mathbf{elif}\;z \leq -1.95 \cdot 10^{-298}:\\
\;\;\;\;x \cdot \left(i \cdot \left(j \cdot y1\right)\right)\\

\mathbf{elif}\;z \leq 6 \cdot 10^{+83}:\\
\;\;\;\;a \cdot \left(-1 \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.1e161 or 5.9999999999999999e83 < z

    1. Initial program 22.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.1e161 < z < -1.7720000000000001e-54

    1. Initial program 28.7%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto -1 \cdot \left(y3 \cdot \left(y0 \cdot \left(c \cdot z\right)\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6417.7

        \[\leadsto -1 \cdot \left(y3 \cdot \left(y0 \cdot \left(c \cdot z\right)\right)\right) \]
    11. Applied rewrites17.7%

      \[\leadsto -1 \cdot \left(y3 \cdot \left(y0 \cdot \left(c \cdot z\right)\right)\right) \]

    if -1.7720000000000001e-54 < z < -1.95000000000000014e-298

    1. Initial program 38.3%

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

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

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

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

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

      \[\leadsto x \cdot \left(j \cdot \color{blue}{\left(i \cdot y1 - b \cdot y0\right)}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - \color{blue}{b \cdot y0}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot \color{blue}{y0}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \]
      4. lift-*.f6428.0

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \]
    8. Applied rewrites28.0%

      \[\leadsto x \cdot \left(j \cdot \color{blue}{\left(i \cdot y1 - b \cdot y0\right)}\right) \]
    9. Taylor expanded in b around 0

      \[\leadsto x \cdot \left(i \cdot \left(j \cdot \color{blue}{y1}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(i \cdot \left(j \cdot y1\right)\right) \]
      2. lower-*.f6416.7

        \[\leadsto x \cdot \left(i \cdot \left(j \cdot y1\right)\right) \]
    11. Applied rewrites16.7%

      \[\leadsto x \cdot \left(i \cdot \left(j \cdot \color{blue}{y1}\right)\right) \]

    if -1.95000000000000014e-298 < z < 5.9999999999999999e83

    1. Initial program 33.2%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y3 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
    5. Applied rewrites37.5%

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    6. Taylor expanded in a around -inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \color{blue}{\left(y1 \cdot z - y \cdot y5\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - \color{blue}{y \cdot y5}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot \color{blue}{y5}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6422.4

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites22.4%

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    9. Taylor expanded in y around inf

      \[\leadsto a \cdot \left(-1 \cdot \left(y \cdot \color{blue}{\left(y3 \cdot y5\right)}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(-1 \cdot \left(y \cdot \left(y3 \cdot \color{blue}{y5}\right)\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(-1 \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right) \]
      3. lower-*.f6417.5

        \[\leadsto a \cdot \left(-1 \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right) \]
    11. Applied rewrites17.5%

      \[\leadsto a \cdot \left(-1 \cdot \left(y \cdot \color{blue}{\left(y3 \cdot y5\right)}\right)\right) \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 20: 30.3% accurate, 4.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y3 \leq -2.3 \cdot 10^{+75}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\ \mathbf{elif}\;y3 \leq 2.4 \cdot 10^{-96}:\\ \;\;\;\;c \cdot \left(y2 \cdot \left(x \cdot y0 - t \cdot y4\right)\right)\\ \mathbf{elif}\;y3 \leq 3.1 \cdot 10^{+119}:\\ \;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \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 (<= y3 -2.3e+75)
   (* a (* y3 (- (* y1 z) (* y y5))))
   (if (<= y3 2.4e-96)
     (* c (* y2 (- (* x y0) (* t y4))))
     (if (<= y3 3.1e+119)
       (* b (* j (- (* t y4) (* x y0))))
       (* j (* -1.0 (* y1 (* y3 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 (y3 <= -2.3e+75) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else if (y3 <= 2.4e-96) {
		tmp = c * (y2 * ((x * y0) - (t * y4)));
	} else if (y3 <= 3.1e+119) {
		tmp = b * (j * ((t * y4) - (x * y0)));
	} else {
		tmp = j * (-1.0 * (y1 * (y3 * 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 (y3 <= (-2.3d+75)) then
        tmp = a * (y3 * ((y1 * z) - (y * y5)))
    else if (y3 <= 2.4d-96) then
        tmp = c * (y2 * ((x * y0) - (t * y4)))
    else if (y3 <= 3.1d+119) then
        tmp = b * (j * ((t * y4) - (x * y0)))
    else
        tmp = j * ((-1.0d0) * (y1 * (y3 * 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 (y3 <= -2.3e+75) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else if (y3 <= 2.4e-96) {
		tmp = c * (y2 * ((x * y0) - (t * y4)));
	} else if (y3 <= 3.1e+119) {
		tmp = b * (j * ((t * y4) - (x * y0)));
	} else {
		tmp = j * (-1.0 * (y1 * (y3 * y4)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y3 <= -2.3e+75:
		tmp = a * (y3 * ((y1 * z) - (y * y5)))
	elif y3 <= 2.4e-96:
		tmp = c * (y2 * ((x * y0) - (t * y4)))
	elif y3 <= 3.1e+119:
		tmp = b * (j * ((t * y4) - (x * y0)))
	else:
		tmp = j * (-1.0 * (y1 * (y3 * 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 (y3 <= -2.3e+75)
		tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * y5))));
	elseif (y3 <= 2.4e-96)
		tmp = Float64(c * Float64(y2 * Float64(Float64(x * y0) - Float64(t * y4))));
	elseif (y3 <= 3.1e+119)
		tmp = Float64(b * Float64(j * Float64(Float64(t * y4) - Float64(x * y0))));
	else
		tmp = Float64(j * Float64(-1.0 * Float64(y1 * Float64(y3 * 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 (y3 <= -2.3e+75)
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	elseif (y3 <= 2.4e-96)
		tmp = c * (y2 * ((x * y0) - (t * y4)));
	elseif (y3 <= 3.1e+119)
		tmp = b * (j * ((t * y4) - (x * y0)));
	else
		tmp = j * (-1.0 * (y1 * (y3 * 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[y3, -2.3e+75], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 2.4e-96], N[(c * N[(y2 * N[(N[(x * y0), $MachinePrecision] - N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 3.1e+119], N[(b * N[(j * N[(N[(t * y4), $MachinePrecision] - N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(-1.0 * N[(y1 * N[(y3 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y3 \leq -2.3 \cdot 10^{+75}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\

\mathbf{elif}\;y3 \leq 2.4 \cdot 10^{-96}:\\
\;\;\;\;c \cdot \left(y2 \cdot \left(x \cdot y0 - t \cdot y4\right)\right)\\

\mathbf{elif}\;y3 \leq 3.1 \cdot 10^{+119}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\

\mathbf{else}:\\
\;\;\;\;j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y3 < -2.2999999999999999e75

    1. Initial program 24.6%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y3 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
    5. Applied rewrites53.3%

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    6. Taylor expanded in a around -inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \color{blue}{\left(y1 \cdot z - y \cdot y5\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - \color{blue}{y \cdot y5}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot \color{blue}{y5}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6441.6

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites41.6%

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]

    if -2.2999999999999999e75 < y3 < 2.40000000000000019e-96

    1. Initial program 34.3%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    5. Applied rewrites39.5%

      \[\leadsto \color{blue}{y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    6. Taylor expanded in c around inf

      \[\leadsto c \cdot \color{blue}{\left(y2 \cdot \left(x \cdot y0 - t \cdot y4\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(y2 \cdot \color{blue}{\left(x \cdot y0 - t \cdot y4\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(y2 \cdot \left(x \cdot y0 - \color{blue}{t \cdot y4}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto c \cdot \left(y2 \cdot \left(x \cdot y0 - t \cdot \color{blue}{y4}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto c \cdot \left(y2 \cdot \left(x \cdot y0 - t \cdot y4\right)\right) \]
      5. lower-*.f6427.0

        \[\leadsto c \cdot \left(y2 \cdot \left(x \cdot y0 - t \cdot y4\right)\right) \]
    8. Applied rewrites27.0%

      \[\leadsto c \cdot \color{blue}{\left(y2 \cdot \left(x \cdot y0 - t \cdot y4\right)\right)} \]

    if 2.40000000000000019e-96 < y3 < 3.09999999999999995e119

    1. Initial program 31.6%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf

      \[\leadsto \color{blue}{b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \color{blue}{\left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    5. Applied rewrites36.9%

      \[\leadsto \color{blue}{b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    6. Taylor expanded in j around inf

      \[\leadsto b \cdot \left(j \cdot \color{blue}{\left(t \cdot y4 - x \cdot y0\right)}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \left(j \cdot \left(t \cdot y4 - \color{blue}{x \cdot y0}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot \color{blue}{y0}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right) \]
      4. lower-*.f6425.7

        \[\leadsto b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right) \]
    8. Applied rewrites25.7%

      \[\leadsto b \cdot \left(j \cdot \color{blue}{\left(t \cdot y4 - x \cdot y0\right)}\right) \]

    if 3.09999999999999995e119 < y3

    1. Initial program 23.9%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in j around inf

      \[\leadsto \color{blue}{j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \color{blue}{\left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - \color{blue}{x \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    5. Applied rewrites39.5%

      \[\leadsto \color{blue}{j \cdot \left(\mathsf{fma}\left(-1, y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right), t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    6. Taylor expanded in y4 around inf

      \[\leadsto j \cdot \left(y4 \cdot \color{blue}{\left(-1 \cdot \left(y1 \cdot y3\right) + b \cdot t\right)}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \left(-1 \cdot \left(y1 \cdot y3\right) + \color{blue}{b \cdot t}\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot \color{blue}{y3}, b \cdot t\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right) \]
      4. lower-*.f6435.8

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right) \]
    8. Applied rewrites35.8%

      \[\leadsto j \cdot \left(y4 \cdot \color{blue}{\mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)}\right) \]
    9. Taylor expanded in t around 0

      \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \color{blue}{\left(y3 \cdot y4\right)}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot \color{blue}{y4}\right)\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right) \]
      3. lower-*.f6431.2

        \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right) \]
    11. Applied rewrites31.2%

      \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \color{blue}{\left(y3 \cdot y4\right)}\right)\right) \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 21: 30.1% accurate, 4.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y3 \leq -2.3 \cdot 10^{+75}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\ \mathbf{elif}\;y3 \leq 2.2 \cdot 10^{-93}:\\ \;\;\;\;c \cdot \left(y2 \cdot \left(x \cdot y0 - t \cdot y4\right)\right)\\ \mathbf{elif}\;y3 \leq 3.5 \cdot 10^{+113}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \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 (<= y3 -2.3e+75)
   (* a (* y3 (- (* y1 z) (* y y5))))
   (if (<= y3 2.2e-93)
     (* c (* y2 (- (* x y0) (* t y4))))
     (if (<= y3 3.5e+113)
       (* y3 (* y5 (- (* j y0) (* a y))))
       (* j (* -1.0 (* y1 (* y3 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 (y3 <= -2.3e+75) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else if (y3 <= 2.2e-93) {
		tmp = c * (y2 * ((x * y0) - (t * y4)));
	} else if (y3 <= 3.5e+113) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else {
		tmp = j * (-1.0 * (y1 * (y3 * 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 (y3 <= (-2.3d+75)) then
        tmp = a * (y3 * ((y1 * z) - (y * y5)))
    else if (y3 <= 2.2d-93) then
        tmp = c * (y2 * ((x * y0) - (t * y4)))
    else if (y3 <= 3.5d+113) then
        tmp = y3 * (y5 * ((j * y0) - (a * y)))
    else
        tmp = j * ((-1.0d0) * (y1 * (y3 * 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 (y3 <= -2.3e+75) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else if (y3 <= 2.2e-93) {
		tmp = c * (y2 * ((x * y0) - (t * y4)));
	} else if (y3 <= 3.5e+113) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else {
		tmp = j * (-1.0 * (y1 * (y3 * y4)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y3 <= -2.3e+75:
		tmp = a * (y3 * ((y1 * z) - (y * y5)))
	elif y3 <= 2.2e-93:
		tmp = c * (y2 * ((x * y0) - (t * y4)))
	elif y3 <= 3.5e+113:
		tmp = y3 * (y5 * ((j * y0) - (a * y)))
	else:
		tmp = j * (-1.0 * (y1 * (y3 * 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 (y3 <= -2.3e+75)
		tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * y5))));
	elseif (y3 <= 2.2e-93)
		tmp = Float64(c * Float64(y2 * Float64(Float64(x * y0) - Float64(t * y4))));
	elseif (y3 <= 3.5e+113)
		tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))));
	else
		tmp = Float64(j * Float64(-1.0 * Float64(y1 * Float64(y3 * 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 (y3 <= -2.3e+75)
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	elseif (y3 <= 2.2e-93)
		tmp = c * (y2 * ((x * y0) - (t * y4)));
	elseif (y3 <= 3.5e+113)
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	else
		tmp = j * (-1.0 * (y1 * (y3 * 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[y3, -2.3e+75], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 2.2e-93], N[(c * N[(y2 * N[(N[(x * y0), $MachinePrecision] - N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 3.5e+113], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(-1.0 * N[(y1 * N[(y3 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y3 \leq -2.3 \cdot 10^{+75}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\

\mathbf{elif}\;y3 \leq 2.2 \cdot 10^{-93}:\\
\;\;\;\;c \cdot \left(y2 \cdot \left(x \cdot y0 - t \cdot y4\right)\right)\\

\mathbf{elif}\;y3 \leq 3.5 \cdot 10^{+113}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\

\mathbf{else}:\\
\;\;\;\;j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y3 < -2.2999999999999999e75

    1. Initial program 24.6%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y3 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
    5. Applied rewrites53.3%

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    6. Taylor expanded in a around -inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \color{blue}{\left(y1 \cdot z - y \cdot y5\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - \color{blue}{y \cdot y5}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot \color{blue}{y5}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6441.6

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites41.6%

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]

    if -2.2999999999999999e75 < y3 < 2.19999999999999996e-93

    1. Initial program 34.2%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y2 around inf

      \[\leadsto \color{blue}{y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \color{blue}{\left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{t \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    5. Applied rewrites39.5%

      \[\leadsto \color{blue}{y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)} \]
    6. Taylor expanded in c around inf

      \[\leadsto c \cdot \color{blue}{\left(y2 \cdot \left(x \cdot y0 - t \cdot y4\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(y2 \cdot \color{blue}{\left(x \cdot y0 - t \cdot y4\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(y2 \cdot \left(x \cdot y0 - \color{blue}{t \cdot y4}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto c \cdot \left(y2 \cdot \left(x \cdot y0 - t \cdot \color{blue}{y4}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto c \cdot \left(y2 \cdot \left(x \cdot y0 - t \cdot y4\right)\right) \]
      5. lower-*.f6427.1

        \[\leadsto c \cdot \left(y2 \cdot \left(x \cdot y0 - t \cdot y4\right)\right) \]
    8. Applied rewrites27.1%

      \[\leadsto c \cdot \color{blue}{\left(y2 \cdot \left(x \cdot y0 - t \cdot y4\right)\right)} \]

    if 2.19999999999999996e-93 < y3 < 3.5000000000000001e113

    1. Initial program 31.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y3 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
    5. Applied rewrites35.1%

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    6. Taylor expanded in y5 around -inf

      \[\leadsto y3 \cdot \color{blue}{\left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \color{blue}{\left(j \cdot y0 - a \cdot y\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - \color{blue}{a \cdot y}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot \color{blue}{y}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
      5. lower-*.f6424.1

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
    8. Applied rewrites24.1%

      \[\leadsto y3 \cdot \color{blue}{\left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)} \]

    if 3.5000000000000001e113 < y3

    1. Initial program 24.3%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in j around inf

      \[\leadsto \color{blue}{j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \color{blue}{\left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - \color{blue}{x \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    5. Applied rewrites39.7%

      \[\leadsto \color{blue}{j \cdot \left(\mathsf{fma}\left(-1, y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right), t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    6. Taylor expanded in y4 around inf

      \[\leadsto j \cdot \left(y4 \cdot \color{blue}{\left(-1 \cdot \left(y1 \cdot y3\right) + b \cdot t\right)}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \left(-1 \cdot \left(y1 \cdot y3\right) + \color{blue}{b \cdot t}\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot \color{blue}{y3}, b \cdot t\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right) \]
      4. lower-*.f6435.6

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right) \]
    8. Applied rewrites35.6%

      \[\leadsto j \cdot \left(y4 \cdot \color{blue}{\mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)}\right) \]
    9. Taylor expanded in t around 0

      \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \color{blue}{\left(y3 \cdot y4\right)}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot \color{blue}{y4}\right)\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right) \]
      3. lower-*.f6431.3

        \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right) \]
    11. Applied rewrites31.3%

      \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \color{blue}{\left(y3 \cdot y4\right)}\right)\right) \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 22: 25.4% accurate, 5.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y3 \leq -1.5 \cdot 10^{+75}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\ \mathbf{elif}\;y3 \leq -7 \cdot 10^{-298}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{elif}\;y3 \leq 1.32 \cdot 10^{+70}:\\ \;\;\;\;x \cdot \left(j \cdot \left(-1 \cdot \left(b \cdot y0\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \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 (<= y3 -1.5e+75)
   (* a (* y3 (- (* y1 z) (* y y5))))
   (if (<= y3 -7e-298)
     (* y3 (* y5 (- (* j y0) (* a y))))
     (if (<= y3 1.32e+70)
       (* x (* j (* -1.0 (* b y0))))
       (* j (* -1.0 (* y1 (* y3 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 (y3 <= -1.5e+75) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else if (y3 <= -7e-298) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else if (y3 <= 1.32e+70) {
		tmp = x * (j * (-1.0 * (b * y0)));
	} else {
		tmp = j * (-1.0 * (y1 * (y3 * 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 (y3 <= (-1.5d+75)) then
        tmp = a * (y3 * ((y1 * z) - (y * y5)))
    else if (y3 <= (-7d-298)) then
        tmp = y3 * (y5 * ((j * y0) - (a * y)))
    else if (y3 <= 1.32d+70) then
        tmp = x * (j * ((-1.0d0) * (b * y0)))
    else
        tmp = j * ((-1.0d0) * (y1 * (y3 * 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 (y3 <= -1.5e+75) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else if (y3 <= -7e-298) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else if (y3 <= 1.32e+70) {
		tmp = x * (j * (-1.0 * (b * y0)));
	} else {
		tmp = j * (-1.0 * (y1 * (y3 * y4)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y3 <= -1.5e+75:
		tmp = a * (y3 * ((y1 * z) - (y * y5)))
	elif y3 <= -7e-298:
		tmp = y3 * (y5 * ((j * y0) - (a * y)))
	elif y3 <= 1.32e+70:
		tmp = x * (j * (-1.0 * (b * y0)))
	else:
		tmp = j * (-1.0 * (y1 * (y3 * 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 (y3 <= -1.5e+75)
		tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * y5))));
	elseif (y3 <= -7e-298)
		tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))));
	elseif (y3 <= 1.32e+70)
		tmp = Float64(x * Float64(j * Float64(-1.0 * Float64(b * y0))));
	else
		tmp = Float64(j * Float64(-1.0 * Float64(y1 * Float64(y3 * 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 (y3 <= -1.5e+75)
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	elseif (y3 <= -7e-298)
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	elseif (y3 <= 1.32e+70)
		tmp = x * (j * (-1.0 * (b * y0)));
	else
		tmp = j * (-1.0 * (y1 * (y3 * 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[y3, -1.5e+75], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, -7e-298], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 1.32e+70], N[(x * N[(j * N[(-1.0 * N[(b * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(-1.0 * N[(y1 * N[(y3 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y3 \leq -1.5 \cdot 10^{+75}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\

\mathbf{elif}\;y3 \leq -7 \cdot 10^{-298}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\

\mathbf{elif}\;y3 \leq 1.32 \cdot 10^{+70}:\\
\;\;\;\;x \cdot \left(j \cdot \left(-1 \cdot \left(b \cdot y0\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y3 < -1.5e75

    1. Initial program 24.6%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y3 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
    5. Applied rewrites53.3%

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    6. Taylor expanded in a around -inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \color{blue}{\left(y1 \cdot z - y \cdot y5\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - \color{blue}{y \cdot y5}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot \color{blue}{y5}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6441.7

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites41.7%

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]

    if -1.5e75 < y3 < -6.9999999999999996e-298

    1. Initial program 34.3%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y3 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
    5. Applied rewrites28.6%

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    6. Taylor expanded in y5 around -inf

      \[\leadsto y3 \cdot \color{blue}{\left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \color{blue}{\left(j \cdot y0 - a \cdot y\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - \color{blue}{a \cdot y}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot \color{blue}{y}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
      5. lower-*.f6421.1

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
    8. Applied rewrites21.1%

      \[\leadsto y3 \cdot \color{blue}{\left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)} \]

    if -6.9999999999999996e-298 < y3 < 1.3199999999999999e70

    1. Initial program 33.4%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{j \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    5. Applied rewrites39.3%

      \[\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)} \]
    6. Taylor expanded in j around inf

      \[\leadsto x \cdot \left(j \cdot \color{blue}{\left(i \cdot y1 - b \cdot y0\right)}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - \color{blue}{b \cdot y0}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot \color{blue}{y0}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \]
      4. lift-*.f6426.6

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \]
    8. Applied rewrites26.6%

      \[\leadsto x \cdot \left(j \cdot \color{blue}{\left(i \cdot y1 - b \cdot y0\right)}\right) \]
    9. Taylor expanded in b around inf

      \[\leadsto x \cdot \left(j \cdot \left(-1 \cdot \left(b \cdot \color{blue}{y0}\right)\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(-1 \cdot \left(b \cdot y0\right)\right)\right) \]
      2. lift-*.f6416.9

        \[\leadsto x \cdot \left(j \cdot \left(-1 \cdot \left(b \cdot y0\right)\right)\right) \]
    11. Applied rewrites16.9%

      \[\leadsto x \cdot \left(j \cdot \left(-1 \cdot \left(b \cdot \color{blue}{y0}\right)\right)\right) \]

    if 1.3199999999999999e70 < y3

    1. Initial program 25.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in j around inf

      \[\leadsto \color{blue}{j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \color{blue}{\left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - \color{blue}{x \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    5. Applied rewrites38.5%

      \[\leadsto \color{blue}{j \cdot \left(\mathsf{fma}\left(-1, y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right), t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    6. Taylor expanded in y4 around inf

      \[\leadsto j \cdot \left(y4 \cdot \color{blue}{\left(-1 \cdot \left(y1 \cdot y3\right) + b \cdot t\right)}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \left(-1 \cdot \left(y1 \cdot y3\right) + \color{blue}{b \cdot t}\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot \color{blue}{y3}, b \cdot t\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right) \]
      4. lower-*.f6434.1

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right) \]
    8. Applied rewrites34.1%

      \[\leadsto j \cdot \left(y4 \cdot \color{blue}{\mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)}\right) \]
    9. Taylor expanded in t around 0

      \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \color{blue}{\left(y3 \cdot y4\right)}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot \color{blue}{y4}\right)\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right) \]
      3. lower-*.f6429.0

        \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right) \]
    11. Applied rewrites29.0%

      \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \color{blue}{\left(y3 \cdot y4\right)}\right)\right) \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 23: 22.5% accurate, 5.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(-1 \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right)\\ \mathbf{if}\;y5 \leq -3.7 \cdot 10^{+123}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y5 \leq -6.2 \cdot 10^{-296}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\ \mathbf{elif}\;y5 \leq 1.05 \cdot 10^{-66}:\\ \;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* a (* -1.0 (* y (* y3 y5))))))
   (if (<= y5 -3.7e+123)
     t_1
     (if (<= y5 -6.2e-296)
       (* a (* y3 (* y1 z)))
       (if (<= y5 1.05e-66) (* j (* t (* b y4))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = a * (-1.0 * (y * (y3 * y5)));
	double tmp;
	if (y5 <= -3.7e+123) {
		tmp = t_1;
	} else if (y5 <= -6.2e-296) {
		tmp = a * (y3 * (y1 * z));
	} else if (y5 <= 1.05e-66) {
		tmp = j * (t * (b * y4));
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = a * ((-1.0d0) * (y * (y3 * y5)))
    if (y5 <= (-3.7d+123)) then
        tmp = t_1
    else if (y5 <= (-6.2d-296)) then
        tmp = a * (y3 * (y1 * z))
    else if (y5 <= 1.05d-66) then
        tmp = j * (t * (b * y4))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = a * (-1.0 * (y * (y3 * y5)));
	double tmp;
	if (y5 <= -3.7e+123) {
		tmp = t_1;
	} else if (y5 <= -6.2e-296) {
		tmp = a * (y3 * (y1 * z));
	} else if (y5 <= 1.05e-66) {
		tmp = j * (t * (b * y4));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = a * (-1.0 * (y * (y3 * y5)))
	tmp = 0
	if y5 <= -3.7e+123:
		tmp = t_1
	elif y5 <= -6.2e-296:
		tmp = a * (y3 * (y1 * z))
	elif y5 <= 1.05e-66:
		tmp = j * (t * (b * y4))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(a * Float64(-1.0 * Float64(y * Float64(y3 * y5))))
	tmp = 0.0
	if (y5 <= -3.7e+123)
		tmp = t_1;
	elseif (y5 <= -6.2e-296)
		tmp = Float64(a * Float64(y3 * Float64(y1 * z)));
	elseif (y5 <= 1.05e-66)
		tmp = Float64(j * Float64(t * Float64(b * y4)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = a * (-1.0 * (y * (y3 * y5)));
	tmp = 0.0;
	if (y5 <= -3.7e+123)
		tmp = t_1;
	elseif (y5 <= -6.2e-296)
		tmp = a * (y3 * (y1 * z));
	elseif (y5 <= 1.05e-66)
		tmp = j * (t * (b * y4));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(a * N[(-1.0 * N[(y * N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y5, -3.7e+123], t$95$1, If[LessEqual[y5, -6.2e-296], N[(a * N[(y3 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 1.05e-66], N[(j * N[(t * N[(b * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \left(-1 \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right)\\
\mathbf{if}\;y5 \leq -3.7 \cdot 10^{+123}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y5 \leq -6.2 \cdot 10^{-296}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\

\mathbf{elif}\;y5 \leq 1.05 \cdot 10^{-66}:\\
\;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y5 < -3.69999999999999996e123 or 1.05e-66 < y5

    1. Initial program 26.0%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y3 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
    5. Applied rewrites37.9%

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    6. Taylor expanded in a around -inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \color{blue}{\left(y1 \cdot z - y \cdot y5\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - \color{blue}{y \cdot y5}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot \color{blue}{y5}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6434.6

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites34.6%

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    9. Taylor expanded in y around inf

      \[\leadsto a \cdot \left(-1 \cdot \left(y \cdot \color{blue}{\left(y3 \cdot y5\right)}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(-1 \cdot \left(y \cdot \left(y3 \cdot \color{blue}{y5}\right)\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(-1 \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right) \]
      3. lower-*.f6427.6

        \[\leadsto a \cdot \left(-1 \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right) \]
    11. Applied rewrites27.6%

      \[\leadsto a \cdot \left(-1 \cdot \left(y \cdot \color{blue}{\left(y3 \cdot y5\right)}\right)\right) \]

    if -3.69999999999999996e123 < y5 < -6.2000000000000004e-296

    1. Initial program 33.2%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y3 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
    5. Applied rewrites39.1%

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    6. Taylor expanded in a around -inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \color{blue}{\left(y1 \cdot z - y \cdot y5\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - \color{blue}{y \cdot y5}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot \color{blue}{y5}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6423.5

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites23.5%

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    9. Taylor expanded in y around 0

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6418.3

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    11. Applied rewrites18.3%

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]

    if -6.2000000000000004e-296 < y5 < 1.05e-66

    1. Initial program 35.3%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in j around inf

      \[\leadsto \color{blue}{j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \color{blue}{\left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - \color{blue}{x \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    5. Applied rewrites35.0%

      \[\leadsto \color{blue}{j \cdot \left(\mathsf{fma}\left(-1, y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right), t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    6. Taylor expanded in t around inf

      \[\leadsto j \cdot \left(t \cdot \color{blue}{\left(b \cdot y4 - i \cdot y5\right)}\right) \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \]
      3. lift--.f64N/A

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot \color{blue}{y5}\right)\right) \]
      4. lift-*.f6419.9

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4 - \color{blue}{i \cdot y5}\right)\right) \]
    8. Applied rewrites19.9%

      \[\leadsto j \cdot \left(t \cdot \color{blue}{\left(b \cdot y4 - i \cdot y5\right)}\right) \]
    9. Taylor expanded in b around inf

      \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6418.0

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4\right)\right) \]
    11. Applied rewrites18.0%

      \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 24: 21.6% accurate, 5.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \leq -2.9 \cdot 10^{+79}:\\ \;\;\;\;x \cdot \left(i \cdot \left(j \cdot y1\right)\right)\\ \mathbf{elif}\;i \leq 6.2 \cdot 10^{-282}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\ \mathbf{elif}\;i \leq 3.8 \cdot 10^{+34}:\\ \;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(j \cdot \left(i \cdot y1\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= i -2.9e+79)
   (* x (* i (* j y1)))
   (if (<= i 6.2e-282)
     (* a (* y3 (* y1 z)))
     (if (<= i 3.8e+34) (* j (* t (* b y4))) (* x (* j (* i y1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (i <= -2.9e+79) {
		tmp = x * (i * (j * y1));
	} else if (i <= 6.2e-282) {
		tmp = a * (y3 * (y1 * z));
	} else if (i <= 3.8e+34) {
		tmp = j * (t * (b * y4));
	} else {
		tmp = x * (j * (i * y1));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (i <= (-2.9d+79)) then
        tmp = x * (i * (j * y1))
    else if (i <= 6.2d-282) then
        tmp = a * (y3 * (y1 * z))
    else if (i <= 3.8d+34) then
        tmp = j * (t * (b * y4))
    else
        tmp = x * (j * (i * y1))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (i <= -2.9e+79) {
		tmp = x * (i * (j * y1));
	} else if (i <= 6.2e-282) {
		tmp = a * (y3 * (y1 * z));
	} else if (i <= 3.8e+34) {
		tmp = j * (t * (b * y4));
	} else {
		tmp = x * (j * (i * y1));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if i <= -2.9e+79:
		tmp = x * (i * (j * y1))
	elif i <= 6.2e-282:
		tmp = a * (y3 * (y1 * z))
	elif i <= 3.8e+34:
		tmp = j * (t * (b * y4))
	else:
		tmp = x * (j * (i * y1))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (i <= -2.9e+79)
		tmp = Float64(x * Float64(i * Float64(j * y1)));
	elseif (i <= 6.2e-282)
		tmp = Float64(a * Float64(y3 * Float64(y1 * z)));
	elseif (i <= 3.8e+34)
		tmp = Float64(j * Float64(t * Float64(b * y4)));
	else
		tmp = Float64(x * Float64(j * Float64(i * y1)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (i <= -2.9e+79)
		tmp = x * (i * (j * y1));
	elseif (i <= 6.2e-282)
		tmp = a * (y3 * (y1 * z));
	elseif (i <= 3.8e+34)
		tmp = j * (t * (b * y4));
	else
		tmp = x * (j * (i * y1));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[i, -2.9e+79], N[(x * N[(i * N[(j * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 6.2e-282], N[(a * N[(y3 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 3.8e+34], N[(j * N[(t * N[(b * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(j * N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;i \leq -2.9 \cdot 10^{+79}:\\
\;\;\;\;x \cdot \left(i \cdot \left(j \cdot y1\right)\right)\\

\mathbf{elif}\;i \leq 6.2 \cdot 10^{-282}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\

\mathbf{elif}\;i \leq 3.8 \cdot 10^{+34}:\\
\;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(j \cdot \left(i \cdot y1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if i < -2.89999999999999992e79

    1. Initial program 22.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{j \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    5. Applied rewrites34.9%

      \[\leadsto \color{blue}{x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    6. Taylor expanded in j around inf

      \[\leadsto x \cdot \left(j \cdot \color{blue}{\left(i \cdot y1 - b \cdot y0\right)}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - \color{blue}{b \cdot y0}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot \color{blue}{y0}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \]
      4. lift-*.f6434.1

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \]
    8. Applied rewrites34.1%

      \[\leadsto x \cdot \left(j \cdot \color{blue}{\left(i \cdot y1 - b \cdot y0\right)}\right) \]
    9. Taylor expanded in b around 0

      \[\leadsto x \cdot \left(i \cdot \left(j \cdot \color{blue}{y1}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(i \cdot \left(j \cdot y1\right)\right) \]
      2. lower-*.f6427.4

        \[\leadsto x \cdot \left(i \cdot \left(j \cdot y1\right)\right) \]
    11. Applied rewrites27.4%

      \[\leadsto x \cdot \left(i \cdot \left(j \cdot \color{blue}{y1}\right)\right) \]

    if -2.89999999999999992e79 < i < 6.20000000000000027e-282

    1. Initial program 34.9%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y3 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
    5. Applied rewrites39.1%

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    6. Taylor expanded in a around -inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \color{blue}{\left(y1 \cdot z - y \cdot y5\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - \color{blue}{y \cdot y5}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot \color{blue}{y5}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6428.5

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites28.5%

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    9. Taylor expanded in y around 0

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6418.2

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    11. Applied rewrites18.2%

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]

    if 6.20000000000000027e-282 < i < 3.8000000000000001e34

    1. Initial program 33.7%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in j around inf

      \[\leadsto \color{blue}{j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \color{blue}{\left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - \color{blue}{x \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    5. Applied rewrites36.4%

      \[\leadsto \color{blue}{j \cdot \left(\mathsf{fma}\left(-1, y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right), t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    6. Taylor expanded in t around inf

      \[\leadsto j \cdot \left(t \cdot \color{blue}{\left(b \cdot y4 - i \cdot y5\right)}\right) \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \]
      3. lift--.f64N/A

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot \color{blue}{y5}\right)\right) \]
      4. lift-*.f6420.1

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4 - \color{blue}{i \cdot y5}\right)\right) \]
    8. Applied rewrites20.1%

      \[\leadsto j \cdot \left(t \cdot \color{blue}{\left(b \cdot y4 - i \cdot y5\right)}\right) \]
    9. Taylor expanded in b around inf

      \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6416.2

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4\right)\right) \]
    11. Applied rewrites16.2%

      \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4\right)\right) \]

    if 3.8000000000000001e34 < i

    1. Initial program 25.8%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{j \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    5. Applied rewrites38.3%

      \[\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)} \]
    6. Taylor expanded in j around inf

      \[\leadsto x \cdot \left(j \cdot \color{blue}{\left(i \cdot y1 - b \cdot y0\right)}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - \color{blue}{b \cdot y0}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot \color{blue}{y0}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \]
      4. lift-*.f6433.0

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \]
    8. Applied rewrites33.0%

      \[\leadsto x \cdot \left(j \cdot \color{blue}{\left(i \cdot y1 - b \cdot y0\right)}\right) \]
    9. Taylor expanded in b around 0

      \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6428.1

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1\right)\right) \]
    11. Applied rewrites28.1%

      \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1\right)\right) \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 25: 25.4% accurate, 6.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y3 \leq -5.6 \cdot 10^{-112}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\ \mathbf{elif}\;y3 \leq 1.32 \cdot 10^{+70}:\\ \;\;\;\;x \cdot \left(j \cdot \left(-1 \cdot \left(b \cdot y0\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \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 (<= y3 -5.6e-112)
   (* a (* y3 (- (* y1 z) (* y y5))))
   (if (<= y3 1.32e+70)
     (* x (* j (* -1.0 (* b y0))))
     (* j (* -1.0 (* y1 (* y3 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 (y3 <= -5.6e-112) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else if (y3 <= 1.32e+70) {
		tmp = x * (j * (-1.0 * (b * y0)));
	} else {
		tmp = j * (-1.0 * (y1 * (y3 * 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 (y3 <= (-5.6d-112)) then
        tmp = a * (y3 * ((y1 * z) - (y * y5)))
    else if (y3 <= 1.32d+70) then
        tmp = x * (j * ((-1.0d0) * (b * y0)))
    else
        tmp = j * ((-1.0d0) * (y1 * (y3 * 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 (y3 <= -5.6e-112) {
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	} else if (y3 <= 1.32e+70) {
		tmp = x * (j * (-1.0 * (b * y0)));
	} else {
		tmp = j * (-1.0 * (y1 * (y3 * y4)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y3 <= -5.6e-112:
		tmp = a * (y3 * ((y1 * z) - (y * y5)))
	elif y3 <= 1.32e+70:
		tmp = x * (j * (-1.0 * (b * y0)))
	else:
		tmp = j * (-1.0 * (y1 * (y3 * 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 (y3 <= -5.6e-112)
		tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * y5))));
	elseif (y3 <= 1.32e+70)
		tmp = Float64(x * Float64(j * Float64(-1.0 * Float64(b * y0))));
	else
		tmp = Float64(j * Float64(-1.0 * Float64(y1 * Float64(y3 * 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 (y3 <= -5.6e-112)
		tmp = a * (y3 * ((y1 * z) - (y * y5)));
	elseif (y3 <= 1.32e+70)
		tmp = x * (j * (-1.0 * (b * y0)));
	else
		tmp = j * (-1.0 * (y1 * (y3 * 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[y3, -5.6e-112], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 1.32e+70], N[(x * N[(j * N[(-1.0 * N[(b * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(-1.0 * N[(y1 * N[(y3 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y3 \leq -5.6 \cdot 10^{-112}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\

\mathbf{elif}\;y3 \leq 1.32 \cdot 10^{+70}:\\
\;\;\;\;x \cdot \left(j \cdot \left(-1 \cdot \left(b \cdot y0\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y3 < -5.60000000000000046e-112

    1. Initial program 28.7%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y3 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
    5. Applied rewrites44.9%

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    6. Taylor expanded in a around -inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \color{blue}{\left(y1 \cdot z - y \cdot y5\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - \color{blue}{y \cdot y5}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot \color{blue}{y5}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6433.6

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites33.6%

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]

    if -5.60000000000000046e-112 < y3 < 1.3199999999999999e70

    1. Initial program 33.7%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{j \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    5. Applied rewrites39.3%

      \[\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)} \]
    6. Taylor expanded in j around inf

      \[\leadsto x \cdot \left(j \cdot \color{blue}{\left(i \cdot y1 - b \cdot y0\right)}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - \color{blue}{b \cdot y0}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot \color{blue}{y0}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \]
      4. lift-*.f6427.6

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \]
    8. Applied rewrites27.6%

      \[\leadsto x \cdot \left(j \cdot \color{blue}{\left(i \cdot y1 - b \cdot y0\right)}\right) \]
    9. Taylor expanded in b around inf

      \[\leadsto x \cdot \left(j \cdot \left(-1 \cdot \left(b \cdot \color{blue}{y0}\right)\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(-1 \cdot \left(b \cdot y0\right)\right)\right) \]
      2. lift-*.f6417.8

        \[\leadsto x \cdot \left(j \cdot \left(-1 \cdot \left(b \cdot y0\right)\right)\right) \]
    11. Applied rewrites17.8%

      \[\leadsto x \cdot \left(j \cdot \left(-1 \cdot \left(b \cdot \color{blue}{y0}\right)\right)\right) \]

    if 1.3199999999999999e70 < y3

    1. Initial program 25.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in j around inf

      \[\leadsto \color{blue}{j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \color{blue}{\left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - \color{blue}{x \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    5. Applied rewrites38.5%

      \[\leadsto \color{blue}{j \cdot \left(\mathsf{fma}\left(-1, y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right), t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    6. Taylor expanded in y4 around inf

      \[\leadsto j \cdot \left(y4 \cdot \color{blue}{\left(-1 \cdot \left(y1 \cdot y3\right) + b \cdot t\right)}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \left(-1 \cdot \left(y1 \cdot y3\right) + \color{blue}{b \cdot t}\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot \color{blue}{y3}, b \cdot t\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right) \]
      4. lower-*.f6434.1

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right) \]
    8. Applied rewrites34.1%

      \[\leadsto j \cdot \left(y4 \cdot \color{blue}{\mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)}\right) \]
    9. Taylor expanded in t around 0

      \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \color{blue}{\left(y3 \cdot y4\right)}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot \color{blue}{y4}\right)\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right) \]
      3. lower-*.f6429.0

        \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right) \]
    11. Applied rewrites29.0%

      \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \color{blue}{\left(y3 \cdot y4\right)}\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 26: 21.5% accurate, 6.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y3 \leq -1.18 \cdot 10^{-110}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right)\\ \mathbf{elif}\;y3 \leq 1.32 \cdot 10^{+70}:\\ \;\;\;\;x \cdot \left(j \cdot \left(-1 \cdot \left(b \cdot y0\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \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 (<= y3 -1.18e-110)
   (* a (* y3 (* -1.0 (* y y5))))
   (if (<= y3 1.32e+70)
     (* x (* j (* -1.0 (* b y0))))
     (* j (* -1.0 (* y1 (* y3 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 (y3 <= -1.18e-110) {
		tmp = a * (y3 * (-1.0 * (y * y5)));
	} else if (y3 <= 1.32e+70) {
		tmp = x * (j * (-1.0 * (b * y0)));
	} else {
		tmp = j * (-1.0 * (y1 * (y3 * 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 (y3 <= (-1.18d-110)) then
        tmp = a * (y3 * ((-1.0d0) * (y * y5)))
    else if (y3 <= 1.32d+70) then
        tmp = x * (j * ((-1.0d0) * (b * y0)))
    else
        tmp = j * ((-1.0d0) * (y1 * (y3 * 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 (y3 <= -1.18e-110) {
		tmp = a * (y3 * (-1.0 * (y * y5)));
	} else if (y3 <= 1.32e+70) {
		tmp = x * (j * (-1.0 * (b * y0)));
	} else {
		tmp = j * (-1.0 * (y1 * (y3 * y4)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y3 <= -1.18e-110:
		tmp = a * (y3 * (-1.0 * (y * y5)))
	elif y3 <= 1.32e+70:
		tmp = x * (j * (-1.0 * (b * y0)))
	else:
		tmp = j * (-1.0 * (y1 * (y3 * 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 (y3 <= -1.18e-110)
		tmp = Float64(a * Float64(y3 * Float64(-1.0 * Float64(y * y5))));
	elseif (y3 <= 1.32e+70)
		tmp = Float64(x * Float64(j * Float64(-1.0 * Float64(b * y0))));
	else
		tmp = Float64(j * Float64(-1.0 * Float64(y1 * Float64(y3 * 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 (y3 <= -1.18e-110)
		tmp = a * (y3 * (-1.0 * (y * y5)));
	elseif (y3 <= 1.32e+70)
		tmp = x * (j * (-1.0 * (b * y0)));
	else
		tmp = j * (-1.0 * (y1 * (y3 * 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[y3, -1.18e-110], N[(a * N[(y3 * N[(-1.0 * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 1.32e+70], N[(x * N[(j * N[(-1.0 * N[(b * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(-1.0 * N[(y1 * N[(y3 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y3 \leq -1.18 \cdot 10^{-110}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right)\\

\mathbf{elif}\;y3 \leq 1.32 \cdot 10^{+70}:\\
\;\;\;\;x \cdot \left(j \cdot \left(-1 \cdot \left(b \cdot y0\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y3 < -1.18e-110

    1. Initial program 28.7%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y3 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
    5. Applied rewrites44.9%

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    6. Taylor expanded in a around -inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \color{blue}{\left(y1 \cdot z - y \cdot y5\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - \color{blue}{y \cdot y5}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot \color{blue}{y5}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6433.6

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites33.6%

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    9. Taylor expanded in y around inf

      \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot \color{blue}{y5}\right)\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right) \]
      2. lift-*.f6422.1

        \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right) \]
    11. Applied rewrites22.1%

      \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot \color{blue}{y5}\right)\right)\right) \]

    if -1.18e-110 < y3 < 1.3199999999999999e70

    1. Initial program 33.6%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{j \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    5. Applied rewrites39.3%

      \[\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)} \]
    6. Taylor expanded in j around inf

      \[\leadsto x \cdot \left(j \cdot \color{blue}{\left(i \cdot y1 - b \cdot y0\right)}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - \color{blue}{b \cdot y0}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot \color{blue}{y0}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \]
      4. lift-*.f6427.6

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \]
    8. Applied rewrites27.6%

      \[\leadsto x \cdot \left(j \cdot \color{blue}{\left(i \cdot y1 - b \cdot y0\right)}\right) \]
    9. Taylor expanded in b around inf

      \[\leadsto x \cdot \left(j \cdot \left(-1 \cdot \left(b \cdot \color{blue}{y0}\right)\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(-1 \cdot \left(b \cdot y0\right)\right)\right) \]
      2. lift-*.f6417.8

        \[\leadsto x \cdot \left(j \cdot \left(-1 \cdot \left(b \cdot y0\right)\right)\right) \]
    11. Applied rewrites17.8%

      \[\leadsto x \cdot \left(j \cdot \left(-1 \cdot \left(b \cdot \color{blue}{y0}\right)\right)\right) \]

    if 1.3199999999999999e70 < y3

    1. Initial program 25.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in j around inf

      \[\leadsto \color{blue}{j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \color{blue}{\left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - \color{blue}{x \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    5. Applied rewrites38.5%

      \[\leadsto \color{blue}{j \cdot \left(\mathsf{fma}\left(-1, y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right), t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    6. Taylor expanded in y4 around inf

      \[\leadsto j \cdot \left(y4 \cdot \color{blue}{\left(-1 \cdot \left(y1 \cdot y3\right) + b \cdot t\right)}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \left(-1 \cdot \left(y1 \cdot y3\right) + \color{blue}{b \cdot t}\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot \color{blue}{y3}, b \cdot t\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right) \]
      4. lower-*.f6434.1

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right) \]
    8. Applied rewrites34.1%

      \[\leadsto j \cdot \left(y4 \cdot \color{blue}{\mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)}\right) \]
    9. Taylor expanded in t around 0

      \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \color{blue}{\left(y3 \cdot y4\right)}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot \color{blue}{y4}\right)\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right) \]
      3. lower-*.f6429.0

        \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right) \]
    11. Applied rewrites29.0%

      \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \color{blue}{\left(y3 \cdot y4\right)}\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 27: 21.6% accurate, 6.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y3 \leq -4 \cdot 10^{-108}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right)\\ \mathbf{elif}\;y3 \leq 1.32 \cdot 10^{+70}:\\ \;\;\;\;x \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot y0\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \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 (<= y3 -4e-108)
   (* a (* y3 (* -1.0 (* y y5))))
   (if (<= y3 1.32e+70)
     (* x (* -1.0 (* b (* j y0))))
     (* j (* -1.0 (* y1 (* y3 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 (y3 <= -4e-108) {
		tmp = a * (y3 * (-1.0 * (y * y5)));
	} else if (y3 <= 1.32e+70) {
		tmp = x * (-1.0 * (b * (j * y0)));
	} else {
		tmp = j * (-1.0 * (y1 * (y3 * 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 (y3 <= (-4d-108)) then
        tmp = a * (y3 * ((-1.0d0) * (y * y5)))
    else if (y3 <= 1.32d+70) then
        tmp = x * ((-1.0d0) * (b * (j * y0)))
    else
        tmp = j * ((-1.0d0) * (y1 * (y3 * 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 (y3 <= -4e-108) {
		tmp = a * (y3 * (-1.0 * (y * y5)));
	} else if (y3 <= 1.32e+70) {
		tmp = x * (-1.0 * (b * (j * y0)));
	} else {
		tmp = j * (-1.0 * (y1 * (y3 * y4)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y3 <= -4e-108:
		tmp = a * (y3 * (-1.0 * (y * y5)))
	elif y3 <= 1.32e+70:
		tmp = x * (-1.0 * (b * (j * y0)))
	else:
		tmp = j * (-1.0 * (y1 * (y3 * 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 (y3 <= -4e-108)
		tmp = Float64(a * Float64(y3 * Float64(-1.0 * Float64(y * y5))));
	elseif (y3 <= 1.32e+70)
		tmp = Float64(x * Float64(-1.0 * Float64(b * Float64(j * y0))));
	else
		tmp = Float64(j * Float64(-1.0 * Float64(y1 * Float64(y3 * 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 (y3 <= -4e-108)
		tmp = a * (y3 * (-1.0 * (y * y5)));
	elseif (y3 <= 1.32e+70)
		tmp = x * (-1.0 * (b * (j * y0)));
	else
		tmp = j * (-1.0 * (y1 * (y3 * 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[y3, -4e-108], N[(a * N[(y3 * N[(-1.0 * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 1.32e+70], N[(x * N[(-1.0 * N[(b * N[(j * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(-1.0 * N[(y1 * N[(y3 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y3 \leq -4 \cdot 10^{-108}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right)\\

\mathbf{elif}\;y3 \leq 1.32 \cdot 10^{+70}:\\
\;\;\;\;x \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot y0\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y3 < -4.00000000000000016e-108

    1. Initial program 28.6%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y3 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
    5. Applied rewrites45.1%

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    6. Taylor expanded in a around -inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \color{blue}{\left(y1 \cdot z - y \cdot y5\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - \color{blue}{y \cdot y5}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot \color{blue}{y5}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6433.8

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites33.8%

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    9. Taylor expanded in y around inf

      \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot \color{blue}{y5}\right)\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right) \]
      2. lift-*.f6422.3

        \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right) \]
    11. Applied rewrites22.3%

      \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot \color{blue}{y5}\right)\right)\right) \]

    if -4.00000000000000016e-108 < y3 < 1.3199999999999999e70

    1. Initial program 33.7%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{j \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    5. Applied rewrites39.4%

      \[\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)} \]
    6. Taylor expanded in j around inf

      \[\leadsto x \cdot \left(j \cdot \color{blue}{\left(i \cdot y1 - b \cdot y0\right)}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - \color{blue}{b \cdot y0}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot \color{blue}{y0}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \]
      4. lift-*.f6427.7

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \]
    8. Applied rewrites27.7%

      \[\leadsto x \cdot \left(j \cdot \color{blue}{\left(i \cdot y1 - b \cdot y0\right)}\right) \]
    9. Taylor expanded in b around inf

      \[\leadsto x \cdot \left(-1 \cdot \left(b \cdot \color{blue}{\left(j \cdot y0\right)}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot \color{blue}{y0}\right)\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto x \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot y0\right)\right)\right) \]
      3. lower-*.f6418.0

        \[\leadsto x \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot y0\right)\right)\right) \]
    11. Applied rewrites18.0%

      \[\leadsto x \cdot \left(-1 \cdot \left(b \cdot \color{blue}{\left(j \cdot y0\right)}\right)\right) \]

    if 1.3199999999999999e70 < y3

    1. Initial program 25.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in j around inf

      \[\leadsto \color{blue}{j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \color{blue}{\left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - \color{blue}{x \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    5. Applied rewrites38.5%

      \[\leadsto \color{blue}{j \cdot \left(\mathsf{fma}\left(-1, y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right), t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    6. Taylor expanded in y4 around inf

      \[\leadsto j \cdot \left(y4 \cdot \color{blue}{\left(-1 \cdot \left(y1 \cdot y3\right) + b \cdot t\right)}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \left(-1 \cdot \left(y1 \cdot y3\right) + \color{blue}{b \cdot t}\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot \color{blue}{y3}, b \cdot t\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right) \]
      4. lower-*.f6434.1

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right) \]
    8. Applied rewrites34.1%

      \[\leadsto j \cdot \left(y4 \cdot \color{blue}{\mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)}\right) \]
    9. Taylor expanded in t around 0

      \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \color{blue}{\left(y3 \cdot y4\right)}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot \color{blue}{y4}\right)\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right) \]
      3. lower-*.f6429.0

        \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right) \]
    11. Applied rewrites29.0%

      \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \color{blue}{\left(y3 \cdot y4\right)}\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 28: 21.7% accurate, 6.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y3 \leq -1.7 \cdot 10^{-77}:\\ \;\;\;\;a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right)\\ \mathbf{elif}\;y3 \leq 9.2 \cdot 10^{-94}:\\ \;\;\;\;x \cdot \left(i \cdot \left(j \cdot y1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \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 (<= y3 -1.7e-77)
   (* a (* y3 (* -1.0 (* y y5))))
   (if (<= y3 9.2e-94) (* x (* i (* j y1))) (* j (* -1.0 (* y1 (* y3 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 (y3 <= -1.7e-77) {
		tmp = a * (y3 * (-1.0 * (y * y5)));
	} else if (y3 <= 9.2e-94) {
		tmp = x * (i * (j * y1));
	} else {
		tmp = j * (-1.0 * (y1 * (y3 * 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 (y3 <= (-1.7d-77)) then
        tmp = a * (y3 * ((-1.0d0) * (y * y5)))
    else if (y3 <= 9.2d-94) then
        tmp = x * (i * (j * y1))
    else
        tmp = j * ((-1.0d0) * (y1 * (y3 * 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 (y3 <= -1.7e-77) {
		tmp = a * (y3 * (-1.0 * (y * y5)));
	} else if (y3 <= 9.2e-94) {
		tmp = x * (i * (j * y1));
	} else {
		tmp = j * (-1.0 * (y1 * (y3 * y4)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y3 <= -1.7e-77:
		tmp = a * (y3 * (-1.0 * (y * y5)))
	elif y3 <= 9.2e-94:
		tmp = x * (i * (j * y1))
	else:
		tmp = j * (-1.0 * (y1 * (y3 * 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 (y3 <= -1.7e-77)
		tmp = Float64(a * Float64(y3 * Float64(-1.0 * Float64(y * y5))));
	elseif (y3 <= 9.2e-94)
		tmp = Float64(x * Float64(i * Float64(j * y1)));
	else
		tmp = Float64(j * Float64(-1.0 * Float64(y1 * Float64(y3 * 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 (y3 <= -1.7e-77)
		tmp = a * (y3 * (-1.0 * (y * y5)));
	elseif (y3 <= 9.2e-94)
		tmp = x * (i * (j * y1));
	else
		tmp = j * (-1.0 * (y1 * (y3 * 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[y3, -1.7e-77], N[(a * N[(y3 * N[(-1.0 * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 9.2e-94], N[(x * N[(i * N[(j * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(-1.0 * N[(y1 * N[(y3 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y3 \leq -1.7 \cdot 10^{-77}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right)\\

\mathbf{elif}\;y3 \leq 9.2 \cdot 10^{-94}:\\
\;\;\;\;x \cdot \left(i \cdot \left(j \cdot y1\right)\right)\\

\mathbf{else}:\\
\;\;\;\;j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y3 < -1.69999999999999991e-77

    1. Initial program 28.2%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y3 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
    5. Applied rewrites46.1%

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    6. Taylor expanded in a around -inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \color{blue}{\left(y1 \cdot z - y \cdot y5\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - \color{blue}{y \cdot y5}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot \color{blue}{y5}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6434.9

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites34.9%

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    9. Taylor expanded in y around inf

      \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot \color{blue}{y5}\right)\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right) \]
      2. lift-*.f6422.8

        \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right)\right)\right) \]
    11. Applied rewrites22.8%

      \[\leadsto a \cdot \left(y3 \cdot \left(-1 \cdot \left(y \cdot \color{blue}{y5}\right)\right)\right) \]

    if -1.69999999999999991e-77 < y3 < 9.1999999999999997e-94

    1. Initial program 34.2%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{j \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    5. Applied rewrites39.7%

      \[\leadsto \color{blue}{x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    6. Taylor expanded in j around inf

      \[\leadsto x \cdot \left(j \cdot \color{blue}{\left(i \cdot y1 - b \cdot y0\right)}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - \color{blue}{b \cdot y0}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot \color{blue}{y0}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \]
      4. lift-*.f6429.3

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \]
    8. Applied rewrites29.3%

      \[\leadsto x \cdot \left(j \cdot \color{blue}{\left(i \cdot y1 - b \cdot y0\right)}\right) \]
    9. Taylor expanded in b around 0

      \[\leadsto x \cdot \left(i \cdot \left(j \cdot \color{blue}{y1}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(i \cdot \left(j \cdot y1\right)\right) \]
      2. lower-*.f6419.0

        \[\leadsto x \cdot \left(i \cdot \left(j \cdot y1\right)\right) \]
    11. Applied rewrites19.0%

      \[\leadsto x \cdot \left(i \cdot \left(j \cdot \color{blue}{y1}\right)\right) \]

    if 9.1999999999999997e-94 < y3

    1. Initial program 27.9%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in j around inf

      \[\leadsto \color{blue}{j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \color{blue}{\left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - \color{blue}{x \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    5. Applied rewrites37.0%

      \[\leadsto \color{blue}{j \cdot \left(\mathsf{fma}\left(-1, y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right), t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    6. Taylor expanded in y4 around inf

      \[\leadsto j \cdot \left(y4 \cdot \color{blue}{\left(-1 \cdot \left(y1 \cdot y3\right) + b \cdot t\right)}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \left(-1 \cdot \left(y1 \cdot y3\right) + \color{blue}{b \cdot t}\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot \color{blue}{y3}, b \cdot t\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right) \]
      4. lower-*.f6430.8

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right) \]
    8. Applied rewrites30.8%

      \[\leadsto j \cdot \left(y4 \cdot \color{blue}{\mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)}\right) \]
    9. Taylor expanded in t around 0

      \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \color{blue}{\left(y3 \cdot y4\right)}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot \color{blue}{y4}\right)\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right) \]
      3. lower-*.f6423.6

        \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right) \]
    11. Applied rewrites23.6%

      \[\leadsto j \cdot \left(-1 \cdot \left(y1 \cdot \color{blue}{\left(y3 \cdot y4\right)}\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 29: 21.6% accurate, 7.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+159}:\\ \;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+141}:\\ \;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4\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 -2.5e+159)
   (* a (* y1 (* y3 z)))
   (if (<= z 5e+141) (* j (* t (* b y4))) (* 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 <= -2.5e+159) {
		tmp = a * (y1 * (y3 * z));
	} else if (z <= 5e+141) {
		tmp = j * (t * (b * y4));
	} 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 <= (-2.5d+159)) then
        tmp = a * (y1 * (y3 * z))
    else if (z <= 5d+141) then
        tmp = j * (t * (b * y4))
    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 <= -2.5e+159) {
		tmp = a * (y1 * (y3 * z));
	} else if (z <= 5e+141) {
		tmp = j * (t * (b * y4));
	} 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 <= -2.5e+159:
		tmp = a * (y1 * (y3 * z))
	elif z <= 5e+141:
		tmp = j * (t * (b * y4))
	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 <= -2.5e+159)
		tmp = Float64(a * Float64(y1 * Float64(y3 * z)));
	elseif (z <= 5e+141)
		tmp = Float64(j * Float64(t * Float64(b * y4)));
	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 <= -2.5e+159)
		tmp = a * (y1 * (y3 * z));
	elseif (z <= 5e+141)
		tmp = j * (t * (b * y4));
	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, -2.5e+159], N[(a * N[(y1 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+141], N[(j * N[(t * N[(b * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(y3 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+159}:\\
\;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\

\mathbf{elif}\;z \leq 5 \cdot 10^{+141}:\\
\;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4\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 < -2.50000000000000002e159

    1. Initial program 20.7%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y3 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
    5. Applied rewrites41.6%

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    6. Taylor expanded in a around -inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \color{blue}{\left(y1 \cdot z - y \cdot y5\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - \color{blue}{y \cdot y5}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot \color{blue}{y5}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6438.3

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites38.3%

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    9. Taylor expanded in y around 0

      \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
      2. lower-*.f6435.5

        \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
    11. Applied rewrites35.5%

      \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]

    if -2.50000000000000002e159 < z < 5.00000000000000025e141

    1. Initial program 33.4%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in j around inf

      \[\leadsto \color{blue}{j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \color{blue}{\left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - \color{blue}{x \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    5. Applied rewrites37.8%

      \[\leadsto \color{blue}{j \cdot \left(\mathsf{fma}\left(-1, y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right), t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    6. Taylor expanded in t around inf

      \[\leadsto j \cdot \left(t \cdot \color{blue}{\left(b \cdot y4 - i \cdot y5\right)}\right) \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \]
      3. lift--.f64N/A

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot \color{blue}{y5}\right)\right) \]
      4. lift-*.f6426.9

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4 - \color{blue}{i \cdot y5}\right)\right) \]
    8. Applied rewrites26.9%

      \[\leadsto j \cdot \left(t \cdot \color{blue}{\left(b \cdot y4 - i \cdot y5\right)}\right) \]
    9. Taylor expanded in b around inf

      \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6416.7

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4\right)\right) \]
    11. Applied rewrites16.7%

      \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4\right)\right) \]

    if 5.00000000000000025e141 < z

    1. Initial program 21.9%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y3 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
    5. Applied rewrites40.0%

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    6. Taylor expanded in a around -inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \color{blue}{\left(y1 \cdot z - y \cdot y5\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - \color{blue}{y \cdot y5}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot \color{blue}{y5}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6440.3

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites40.3%

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    9. Taylor expanded in y around 0

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6436.1

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
    11. Applied rewrites36.1%

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 30: 21.5% accurate, 7.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(b \cdot \left(t \cdot y4\right)\right)\\ \mathbf{if}\;t \leq -4.6 \cdot 10^{+161}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+42}:\\ \;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* j (* b (* t y4)))))
   (if (<= t -4.6e+161) t_1 (if (<= t 2.5e+42) (* a (* y1 (* y3 z))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = j * (b * (t * y4));
	double tmp;
	if (t <= -4.6e+161) {
		tmp = t_1;
	} else if (t <= 2.5e+42) {
		tmp = a * (y1 * (y3 * z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = j * (b * (t * y4))
    if (t <= (-4.6d+161)) then
        tmp = t_1
    else if (t <= 2.5d+42) then
        tmp = a * (y1 * (y3 * z))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = j * (b * (t * y4));
	double tmp;
	if (t <= -4.6e+161) {
		tmp = t_1;
	} else if (t <= 2.5e+42) {
		tmp = a * (y1 * (y3 * z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = j * (b * (t * y4))
	tmp = 0
	if t <= -4.6e+161:
		tmp = t_1
	elif t <= 2.5e+42:
		tmp = a * (y1 * (y3 * z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(j * Float64(b * Float64(t * y4)))
	tmp = 0.0
	if (t <= -4.6e+161)
		tmp = t_1;
	elseif (t <= 2.5e+42)
		tmp = Float64(a * Float64(y1 * Float64(y3 * z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = j * (b * (t * y4));
	tmp = 0.0;
	if (t <= -4.6e+161)
		tmp = t_1;
	elseif (t <= 2.5e+42)
		tmp = a * (y1 * (y3 * z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(j * N[(b * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.6e+161], t$95$1, If[LessEqual[t, 2.5e+42], N[(a * N[(y1 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot \left(b \cdot \left(t \cdot y4\right)\right)\\
\mathbf{if}\;t \leq -4.6 \cdot 10^{+161}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.5 \cdot 10^{+42}:\\
\;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.5999999999999999e161 or 2.50000000000000003e42 < t

    1. Initial program 23.0%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in j around inf

      \[\leadsto \color{blue}{j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \color{blue}{\left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - \color{blue}{x \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    5. Applied rewrites37.6%

      \[\leadsto \color{blue}{j \cdot \left(\mathsf{fma}\left(-1, y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right), t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    6. Taylor expanded in y4 around inf

      \[\leadsto j \cdot \left(y4 \cdot \color{blue}{\left(-1 \cdot \left(y1 \cdot y3\right) + b \cdot t\right)}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \left(-1 \cdot \left(y1 \cdot y3\right) + \color{blue}{b \cdot t}\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot \color{blue}{y3}, b \cdot t\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right) \]
      4. lower-*.f6434.6

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right) \]
    8. Applied rewrites34.6%

      \[\leadsto j \cdot \left(y4 \cdot \color{blue}{\mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)}\right) \]
    9. Taylor expanded in t around inf

      \[\leadsto j \cdot \left(b \cdot \left(t \cdot \color{blue}{y4}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \left(b \cdot \left(t \cdot y4\right)\right) \]
      2. lower-*.f6428.1

        \[\leadsto j \cdot \left(b \cdot \left(t \cdot y4\right)\right) \]
    11. Applied rewrites28.1%

      \[\leadsto j \cdot \left(b \cdot \left(t \cdot \color{blue}{y4}\right)\right) \]

    if -4.5999999999999999e161 < t < 2.50000000000000003e42

    1. Initial program 33.8%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y3 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
    5. Applied rewrites40.5%

      \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    6. Taylor expanded in a around -inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \color{blue}{\left(y1 \cdot z - y \cdot y5\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - \color{blue}{y \cdot y5}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot \color{blue}{y5}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
      5. lower-*.f6428.3

        \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    8. Applied rewrites28.3%

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
    9. Taylor expanded in y around 0

      \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
      2. lower-*.f6418.3

        \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
    11. Applied rewrites18.3%

      \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 31: 19.4% accurate, 9.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 7200:\\ \;\;\;\;x \cdot \left(i \cdot \left(j \cdot y1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(y4 \cdot \left(b \cdot t\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= t 7200.0) (* x (* i (* j y1))) (* j (* y4 (* b t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (t <= 7200.0) {
		tmp = x * (i * (j * y1));
	} else {
		tmp = j * (y4 * (b * t));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (t <= 7200.0d0) then
        tmp = x * (i * (j * y1))
    else
        tmp = j * (y4 * (b * t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (t <= 7200.0) {
		tmp = x * (i * (j * y1));
	} else {
		tmp = j * (y4 * (b * t));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if t <= 7200.0:
		tmp = x * (i * (j * y1))
	else:
		tmp = j * (y4 * (b * t))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (t <= 7200.0)
		tmp = Float64(x * Float64(i * Float64(j * y1)));
	else
		tmp = Float64(j * Float64(y4 * Float64(b * t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (t <= 7200.0)
		tmp = x * (i * (j * y1));
	else
		tmp = j * (y4 * (b * t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[t, 7200.0], N[(x * N[(i * N[(j * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(y4 * N[(b * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq 7200:\\
\;\;\;\;x \cdot \left(i \cdot \left(j \cdot y1\right)\right)\\

\mathbf{else}:\\
\;\;\;\;j \cdot \left(y4 \cdot \left(b \cdot t\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 7200

    1. Initial program 32.0%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{j \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    5. Applied rewrites37.7%

      \[\leadsto \color{blue}{x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    6. Taylor expanded in j around inf

      \[\leadsto x \cdot \left(j \cdot \color{blue}{\left(i \cdot y1 - b \cdot y0\right)}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - \color{blue}{b \cdot y0}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot \color{blue}{y0}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \]
      4. lift-*.f6426.2

        \[\leadsto x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \]
    8. Applied rewrites26.2%

      \[\leadsto x \cdot \left(j \cdot \color{blue}{\left(i \cdot y1 - b \cdot y0\right)}\right) \]
    9. Taylor expanded in b around 0

      \[\leadsto x \cdot \left(i \cdot \left(j \cdot \color{blue}{y1}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(i \cdot \left(j \cdot y1\right)\right) \]
      2. lower-*.f6417.1

        \[\leadsto x \cdot \left(i \cdot \left(j \cdot y1\right)\right) \]
    11. Applied rewrites17.1%

      \[\leadsto x \cdot \left(i \cdot \left(j \cdot \color{blue}{y1}\right)\right) \]

    if 7200 < t

    1. Initial program 24.9%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in j around inf

      \[\leadsto \color{blue}{j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \color{blue}{\left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto j \cdot \left(\left(-1 \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right) + t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - \color{blue}{x \cdot \left(b \cdot y0 - i \cdot y1\right)}\right) \]
    5. Applied rewrites36.7%

      \[\leadsto \color{blue}{j \cdot \left(\mathsf{fma}\left(-1, y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right), t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    6. Taylor expanded in y4 around inf

      \[\leadsto j \cdot \left(y4 \cdot \color{blue}{\left(-1 \cdot \left(y1 \cdot y3\right) + b \cdot t\right)}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \left(-1 \cdot \left(y1 \cdot y3\right) + \color{blue}{b \cdot t}\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot \color{blue}{y3}, b \cdot t\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right) \]
      4. lower-*.f6433.6

        \[\leadsto j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right) \]
    8. Applied rewrites33.6%

      \[\leadsto j \cdot \left(y4 \cdot \color{blue}{\mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)}\right) \]
    9. Taylor expanded in t around inf

      \[\leadsto j \cdot \left(y4 \cdot \left(b \cdot t\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6426.6

        \[\leadsto j \cdot \left(y4 \cdot \left(b \cdot t\right)\right) \]
    11. Applied rewrites26.6%

      \[\leadsto j \cdot \left(y4 \cdot \left(b \cdot t\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 32: 17.9% accurate, 12.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 30.3%

    \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
  2. Add Preprocessing
  3. Taylor expanded in y3 around -inf

    \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
  4. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    2. lower-*.f64N/A

      \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
    3. lower--.f64N/A

      \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
  5. Applied rewrites38.6%

    \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
  6. Taylor expanded in a around -inf

    \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
  7. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto a \cdot \left(y3 \cdot \color{blue}{\left(y1 \cdot z - y \cdot y5\right)}\right) \]
    2. lower-*.f64N/A

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - \color{blue}{y \cdot y5}\right)\right) \]
    3. lower--.f64N/A

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot \color{blue}{y5}\right)\right) \]
    4. lower-*.f64N/A

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    5. lower-*.f6428.0

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
  8. Applied rewrites28.0%

    \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
  9. Taylor expanded in y around 0

    \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
  10. Step-by-step derivation
    1. lift-*.f6417.9

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
  11. Applied rewrites17.9%

    \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right) \]
  12. Add Preprocessing

Alternative 33: 18.1% accurate, 12.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 30.3%

    \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
  2. Add Preprocessing
  3. Taylor expanded in y3 around -inf

    \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
  4. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto -1 \cdot \color{blue}{\left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
    2. lower-*.f64N/A

      \[\leadsto -1 \cdot \left(y3 \cdot \color{blue}{\left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)}\right) \]
    3. lower--.f64N/A

      \[\leadsto -1 \cdot \left(y3 \cdot \left(\left(j \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{y \cdot \left(c \cdot y4 - a \cdot y5\right)}\right)\right) \]
  5. Applied rewrites38.6%

    \[\leadsto \color{blue}{-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)} \]
  6. Taylor expanded in a around -inf

    \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
  7. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto a \cdot \left(y3 \cdot \color{blue}{\left(y1 \cdot z - y \cdot y5\right)}\right) \]
    2. lower-*.f64N/A

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - \color{blue}{y \cdot y5}\right)\right) \]
    3. lower--.f64N/A

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot \color{blue}{y5}\right)\right) \]
    4. lower-*.f64N/A

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
    5. lower-*.f6428.0

      \[\leadsto a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right) \]
  8. Applied rewrites28.0%

    \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)} \]
  9. Taylor expanded in y around 0

    \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
  10. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
    2. lower-*.f6418.1

      \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
  11. Applied rewrites18.1%

    \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
  12. Add Preprocessing

Developer Target 1: 28.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y4 \cdot c - y5 \cdot a\\ t_2 := x \cdot y2 - z \cdot y3\\ t_3 := y2 \cdot t - y3 \cdot y\\ t_4 := k \cdot y2 - j \cdot y3\\ t_5 := y4 \cdot b - y5 \cdot i\\ t_6 := \left(j \cdot t - k \cdot y\right) \cdot t\_5\\ t_7 := b \cdot a - i \cdot c\\ t_8 := t\_7 \cdot \left(y \cdot x - t \cdot z\right)\\ t_9 := j \cdot x - k \cdot z\\ t_10 := \left(b \cdot y0 - i \cdot y1\right) \cdot t\_9\\ t_11 := t\_9 \cdot \left(y0 \cdot b - i \cdot y1\right)\\ t_12 := y4 \cdot y1 - y5 \cdot y0\\ t_13 := t\_4 \cdot t\_12\\ t_14 := \left(y2 \cdot k - y3 \cdot j\right) \cdot t\_12\\ t_15 := \left(\left(\left(\left(k \cdot y\right) \cdot \left(y5 \cdot i\right) - \left(y \cdot b\right) \cdot \left(y4 \cdot k\right)\right) - \left(y5 \cdot t\right) \cdot \left(i \cdot j\right)\right) - \left(t\_3 \cdot t\_1 - t\_14\right)\right) + \left(t\_8 - \left(t\_11 - \left(y2 \cdot x - y3 \cdot z\right) \cdot \left(c \cdot y0 - y1 \cdot a\right)\right)\right)\\ t_16 := \left(\left(t\_6 - \left(y3 \cdot y\right) \cdot \left(y5 \cdot a - y4 \cdot c\right)\right) + \left(\left(y5 \cdot a\right) \cdot \left(t \cdot y2\right) + t\_13\right)\right) + \left(t\_2 \cdot \left(c \cdot y0 - a \cdot y1\right) - \left(t\_10 - \left(y \cdot x - z \cdot t\right) \cdot t\_7\right)\right)\\ t_17 := t \cdot y2 - y \cdot y3\\ \mathbf{if}\;y4 < -7.206256231996481 \cdot 10^{+60}:\\ \;\;\;\;\left(t\_8 - \left(t\_11 - t\_6\right)\right) - \left(\frac{t\_3}{\frac{1}{t\_1}} - t\_14\right)\\ \mathbf{elif}\;y4 < -3.364603505246317 \cdot 10^{-66}:\\ \;\;\;\;\left(\left(\left(\left(t \cdot c\right) \cdot \left(i \cdot z\right) - \left(a \cdot t\right) \cdot \left(b \cdot z\right)\right) - \left(y \cdot c\right) \cdot \left(i \cdot x\right)\right) - t\_10\right) + \left(\left(y0 \cdot c - a \cdot y1\right) \cdot t\_2 - \left(t\_17 \cdot \left(y4 \cdot c - a \cdot y5\right) - \left(y1 \cdot y4 - y5 \cdot y0\right) \cdot t\_4\right)\right)\\ \mathbf{elif}\;y4 < -1.2000065055686116 \cdot 10^{-105}:\\ \;\;\;\;t\_16\\ \mathbf{elif}\;y4 < 6.718963124057495 \cdot 10^{-279}:\\ \;\;\;\;t\_15\\ \mathbf{elif}\;y4 < 4.77962681403792 \cdot 10^{-222}:\\ \;\;\;\;t\_16\\ \mathbf{elif}\;y4 < 2.2852241541266835 \cdot 10^{-175}:\\ \;\;\;\;t\_15\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(k \cdot \left(i \cdot \left(z \cdot y1\right)\right) - \left(j \cdot \left(i \cdot \left(x \cdot y1\right)\right) + y0 \cdot \left(k \cdot \left(z \cdot b\right)\right)\right)\right)\right) + \left(z \cdot \left(y3 \cdot \left(a \cdot y1\right)\right) - \left(y2 \cdot \left(x \cdot \left(a \cdot y1\right)\right) + y0 \cdot \left(z \cdot \left(c \cdot y3\right)\right)\right)\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot t\_5\right) - t\_17 \cdot t\_1\right) + t\_13\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (- (* y4 c) (* y5 a)))
        (t_2 (- (* x y2) (* z y3)))
        (t_3 (- (* y2 t) (* y3 y)))
        (t_4 (- (* k y2) (* j y3)))
        (t_5 (- (* y4 b) (* y5 i)))
        (t_6 (* (- (* j t) (* k y)) t_5))
        (t_7 (- (* b a) (* i c)))
        (t_8 (* t_7 (- (* y x) (* t z))))
        (t_9 (- (* j x) (* k z)))
        (t_10 (* (- (* b y0) (* i y1)) t_9))
        (t_11 (* t_9 (- (* y0 b) (* i y1))))
        (t_12 (- (* y4 y1) (* y5 y0)))
        (t_13 (* t_4 t_12))
        (t_14 (* (- (* y2 k) (* y3 j)) t_12))
        (t_15
         (+
          (-
           (-
            (- (* (* k y) (* y5 i)) (* (* y b) (* y4 k)))
            (* (* y5 t) (* i j)))
           (- (* t_3 t_1) t_14))
          (- t_8 (- t_11 (* (- (* y2 x) (* y3 z)) (- (* c y0) (* y1 a)))))))
        (t_16
         (+
          (+
           (- t_6 (* (* y3 y) (- (* y5 a) (* y4 c))))
           (+ (* (* y5 a) (* t y2)) t_13))
          (-
           (* t_2 (- (* c y0) (* a y1)))
           (- t_10 (* (- (* y x) (* z t)) t_7)))))
        (t_17 (- (* t y2) (* y y3))))
   (if (< y4 -7.206256231996481e+60)
     (- (- t_8 (- t_11 t_6)) (- (/ t_3 (/ 1.0 t_1)) t_14))
     (if (< y4 -3.364603505246317e-66)
       (+
        (-
         (- (- (* (* t c) (* i z)) (* (* a t) (* b z))) (* (* y c) (* i x)))
         t_10)
        (-
         (* (- (* y0 c) (* a y1)) t_2)
         (- (* t_17 (- (* y4 c) (* a y5))) (* (- (* y1 y4) (* y5 y0)) t_4))))
       (if (< y4 -1.2000065055686116e-105)
         t_16
         (if (< y4 6.718963124057495e-279)
           t_15
           (if (< y4 4.77962681403792e-222)
             t_16
             (if (< y4 2.2852241541266835e-175)
               t_15
               (+
                (-
                 (+
                  (+
                   (-
                    (* (- (* x y) (* z t)) (- (* a b) (* c i)))
                    (-
                     (* k (* i (* z y1)))
                     (+ (* j (* i (* x y1))) (* y0 (* k (* z b))))))
                   (-
                    (* z (* y3 (* a y1)))
                    (+ (* y2 (* x (* a y1))) (* y0 (* z (* c y3))))))
                  (* (- (* t j) (* y k)) t_5))
                 (* t_17 t_1))
                t_13)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = (y4 * c) - (y5 * a);
	double t_2 = (x * y2) - (z * y3);
	double t_3 = (y2 * t) - (y3 * y);
	double t_4 = (k * y2) - (j * y3);
	double t_5 = (y4 * b) - (y5 * i);
	double t_6 = ((j * t) - (k * y)) * t_5;
	double t_7 = (b * a) - (i * c);
	double t_8 = t_7 * ((y * x) - (t * z));
	double t_9 = (j * x) - (k * z);
	double t_10 = ((b * y0) - (i * y1)) * t_9;
	double t_11 = t_9 * ((y0 * b) - (i * y1));
	double t_12 = (y4 * y1) - (y5 * y0);
	double t_13 = t_4 * t_12;
	double t_14 = ((y2 * k) - (y3 * j)) * t_12;
	double t_15 = (((((k * y) * (y5 * i)) - ((y * b) * (y4 * k))) - ((y5 * t) * (i * j))) - ((t_3 * t_1) - t_14)) + (t_8 - (t_11 - (((y2 * x) - (y3 * z)) * ((c * y0) - (y1 * a)))));
	double t_16 = ((t_6 - ((y3 * y) * ((y5 * a) - (y4 * c)))) + (((y5 * a) * (t * y2)) + t_13)) + ((t_2 * ((c * y0) - (a * y1))) - (t_10 - (((y * x) - (z * t)) * t_7)));
	double t_17 = (t * y2) - (y * y3);
	double tmp;
	if (y4 < -7.206256231996481e+60) {
		tmp = (t_8 - (t_11 - t_6)) - ((t_3 / (1.0 / t_1)) - t_14);
	} else if (y4 < -3.364603505246317e-66) {
		tmp = (((((t * c) * (i * z)) - ((a * t) * (b * z))) - ((y * c) * (i * x))) - t_10) + ((((y0 * c) - (a * y1)) * t_2) - ((t_17 * ((y4 * c) - (a * y5))) - (((y1 * y4) - (y5 * y0)) * t_4)));
	} else if (y4 < -1.2000065055686116e-105) {
		tmp = t_16;
	} else if (y4 < 6.718963124057495e-279) {
		tmp = t_15;
	} else if (y4 < 4.77962681403792e-222) {
		tmp = t_16;
	} else if (y4 < 2.2852241541266835e-175) {
		tmp = t_15;
	} else {
		tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - ((k * (i * (z * y1))) - ((j * (i * (x * y1))) + (y0 * (k * (z * b)))))) + ((z * (y3 * (a * y1))) - ((y2 * (x * (a * y1))) + (y0 * (z * (c * y3)))))) + (((t * j) - (y * k)) * t_5)) - (t_17 * t_1)) + t_13;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: t_10
    real(8) :: t_11
    real(8) :: t_12
    real(8) :: t_13
    real(8) :: t_14
    real(8) :: t_15
    real(8) :: t_16
    real(8) :: t_17
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: t_5
    real(8) :: t_6
    real(8) :: t_7
    real(8) :: t_8
    real(8) :: t_9
    real(8) :: tmp
    t_1 = (y4 * c) - (y5 * a)
    t_2 = (x * y2) - (z * y3)
    t_3 = (y2 * t) - (y3 * y)
    t_4 = (k * y2) - (j * y3)
    t_5 = (y4 * b) - (y5 * i)
    t_6 = ((j * t) - (k * y)) * t_5
    t_7 = (b * a) - (i * c)
    t_8 = t_7 * ((y * x) - (t * z))
    t_9 = (j * x) - (k * z)
    t_10 = ((b * y0) - (i * y1)) * t_9
    t_11 = t_9 * ((y0 * b) - (i * y1))
    t_12 = (y4 * y1) - (y5 * y0)
    t_13 = t_4 * t_12
    t_14 = ((y2 * k) - (y3 * j)) * t_12
    t_15 = (((((k * y) * (y5 * i)) - ((y * b) * (y4 * k))) - ((y5 * t) * (i * j))) - ((t_3 * t_1) - t_14)) + (t_8 - (t_11 - (((y2 * x) - (y3 * z)) * ((c * y0) - (y1 * a)))))
    t_16 = ((t_6 - ((y3 * y) * ((y5 * a) - (y4 * c)))) + (((y5 * a) * (t * y2)) + t_13)) + ((t_2 * ((c * y0) - (a * y1))) - (t_10 - (((y * x) - (z * t)) * t_7)))
    t_17 = (t * y2) - (y * y3)
    if (y4 < (-7.206256231996481d+60)) then
        tmp = (t_8 - (t_11 - t_6)) - ((t_3 / (1.0d0 / t_1)) - t_14)
    else if (y4 < (-3.364603505246317d-66)) then
        tmp = (((((t * c) * (i * z)) - ((a * t) * (b * z))) - ((y * c) * (i * x))) - t_10) + ((((y0 * c) - (a * y1)) * t_2) - ((t_17 * ((y4 * c) - (a * y5))) - (((y1 * y4) - (y5 * y0)) * t_4)))
    else if (y4 < (-1.2000065055686116d-105)) then
        tmp = t_16
    else if (y4 < 6.718963124057495d-279) then
        tmp = t_15
    else if (y4 < 4.77962681403792d-222) then
        tmp = t_16
    else if (y4 < 2.2852241541266835d-175) then
        tmp = t_15
    else
        tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - ((k * (i * (z * y1))) - ((j * (i * (x * y1))) + (y0 * (k * (z * b)))))) + ((z * (y3 * (a * y1))) - ((y2 * (x * (a * y1))) + (y0 * (z * (c * y3)))))) + (((t * j) - (y * k)) * t_5)) - (t_17 * t_1)) + t_13
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = (y4 * c) - (y5 * a);
	double t_2 = (x * y2) - (z * y3);
	double t_3 = (y2 * t) - (y3 * y);
	double t_4 = (k * y2) - (j * y3);
	double t_5 = (y4 * b) - (y5 * i);
	double t_6 = ((j * t) - (k * y)) * t_5;
	double t_7 = (b * a) - (i * c);
	double t_8 = t_7 * ((y * x) - (t * z));
	double t_9 = (j * x) - (k * z);
	double t_10 = ((b * y0) - (i * y1)) * t_9;
	double t_11 = t_9 * ((y0 * b) - (i * y1));
	double t_12 = (y4 * y1) - (y5 * y0);
	double t_13 = t_4 * t_12;
	double t_14 = ((y2 * k) - (y3 * j)) * t_12;
	double t_15 = (((((k * y) * (y5 * i)) - ((y * b) * (y4 * k))) - ((y5 * t) * (i * j))) - ((t_3 * t_1) - t_14)) + (t_8 - (t_11 - (((y2 * x) - (y3 * z)) * ((c * y0) - (y1 * a)))));
	double t_16 = ((t_6 - ((y3 * y) * ((y5 * a) - (y4 * c)))) + (((y5 * a) * (t * y2)) + t_13)) + ((t_2 * ((c * y0) - (a * y1))) - (t_10 - (((y * x) - (z * t)) * t_7)));
	double t_17 = (t * y2) - (y * y3);
	double tmp;
	if (y4 < -7.206256231996481e+60) {
		tmp = (t_8 - (t_11 - t_6)) - ((t_3 / (1.0 / t_1)) - t_14);
	} else if (y4 < -3.364603505246317e-66) {
		tmp = (((((t * c) * (i * z)) - ((a * t) * (b * z))) - ((y * c) * (i * x))) - t_10) + ((((y0 * c) - (a * y1)) * t_2) - ((t_17 * ((y4 * c) - (a * y5))) - (((y1 * y4) - (y5 * y0)) * t_4)));
	} else if (y4 < -1.2000065055686116e-105) {
		tmp = t_16;
	} else if (y4 < 6.718963124057495e-279) {
		tmp = t_15;
	} else if (y4 < 4.77962681403792e-222) {
		tmp = t_16;
	} else if (y4 < 2.2852241541266835e-175) {
		tmp = t_15;
	} else {
		tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - ((k * (i * (z * y1))) - ((j * (i * (x * y1))) + (y0 * (k * (z * b)))))) + ((z * (y3 * (a * y1))) - ((y2 * (x * (a * y1))) + (y0 * (z * (c * y3)))))) + (((t * j) - (y * k)) * t_5)) - (t_17 * t_1)) + t_13;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = (y4 * c) - (y5 * a)
	t_2 = (x * y2) - (z * y3)
	t_3 = (y2 * t) - (y3 * y)
	t_4 = (k * y2) - (j * y3)
	t_5 = (y4 * b) - (y5 * i)
	t_6 = ((j * t) - (k * y)) * t_5
	t_7 = (b * a) - (i * c)
	t_8 = t_7 * ((y * x) - (t * z))
	t_9 = (j * x) - (k * z)
	t_10 = ((b * y0) - (i * y1)) * t_9
	t_11 = t_9 * ((y0 * b) - (i * y1))
	t_12 = (y4 * y1) - (y5 * y0)
	t_13 = t_4 * t_12
	t_14 = ((y2 * k) - (y3 * j)) * t_12
	t_15 = (((((k * y) * (y5 * i)) - ((y * b) * (y4 * k))) - ((y5 * t) * (i * j))) - ((t_3 * t_1) - t_14)) + (t_8 - (t_11 - (((y2 * x) - (y3 * z)) * ((c * y0) - (y1 * a)))))
	t_16 = ((t_6 - ((y3 * y) * ((y5 * a) - (y4 * c)))) + (((y5 * a) * (t * y2)) + t_13)) + ((t_2 * ((c * y0) - (a * y1))) - (t_10 - (((y * x) - (z * t)) * t_7)))
	t_17 = (t * y2) - (y * y3)
	tmp = 0
	if y4 < -7.206256231996481e+60:
		tmp = (t_8 - (t_11 - t_6)) - ((t_3 / (1.0 / t_1)) - t_14)
	elif y4 < -3.364603505246317e-66:
		tmp = (((((t * c) * (i * z)) - ((a * t) * (b * z))) - ((y * c) * (i * x))) - t_10) + ((((y0 * c) - (a * y1)) * t_2) - ((t_17 * ((y4 * c) - (a * y5))) - (((y1 * y4) - (y5 * y0)) * t_4)))
	elif y4 < -1.2000065055686116e-105:
		tmp = t_16
	elif y4 < 6.718963124057495e-279:
		tmp = t_15
	elif y4 < 4.77962681403792e-222:
		tmp = t_16
	elif y4 < 2.2852241541266835e-175:
		tmp = t_15
	else:
		tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - ((k * (i * (z * y1))) - ((j * (i * (x * y1))) + (y0 * (k * (z * b)))))) + ((z * (y3 * (a * y1))) - ((y2 * (x * (a * y1))) + (y0 * (z * (c * y3)))))) + (((t * j) - (y * k)) * t_5)) - (t_17 * t_1)) + t_13
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(y4 * c) - Float64(y5 * a))
	t_2 = Float64(Float64(x * y2) - Float64(z * y3))
	t_3 = Float64(Float64(y2 * t) - Float64(y3 * y))
	t_4 = Float64(Float64(k * y2) - Float64(j * y3))
	t_5 = Float64(Float64(y4 * b) - Float64(y5 * i))
	t_6 = Float64(Float64(Float64(j * t) - Float64(k * y)) * t_5)
	t_7 = Float64(Float64(b * a) - Float64(i * c))
	t_8 = Float64(t_7 * Float64(Float64(y * x) - Float64(t * z)))
	t_9 = Float64(Float64(j * x) - Float64(k * z))
	t_10 = Float64(Float64(Float64(b * y0) - Float64(i * y1)) * t_9)
	t_11 = Float64(t_9 * Float64(Float64(y0 * b) - Float64(i * y1)))
	t_12 = Float64(Float64(y4 * y1) - Float64(y5 * y0))
	t_13 = Float64(t_4 * t_12)
	t_14 = Float64(Float64(Float64(y2 * k) - Float64(y3 * j)) * t_12)
	t_15 = Float64(Float64(Float64(Float64(Float64(Float64(k * y) * Float64(y5 * i)) - Float64(Float64(y * b) * Float64(y4 * k))) - Float64(Float64(y5 * t) * Float64(i * j))) - Float64(Float64(t_3 * t_1) - t_14)) + Float64(t_8 - Float64(t_11 - Float64(Float64(Float64(y2 * x) - Float64(y3 * z)) * Float64(Float64(c * y0) - Float64(y1 * a))))))
	t_16 = Float64(Float64(Float64(t_6 - Float64(Float64(y3 * y) * Float64(Float64(y5 * a) - Float64(y4 * c)))) + Float64(Float64(Float64(y5 * a) * Float64(t * y2)) + t_13)) + Float64(Float64(t_2 * Float64(Float64(c * y0) - Float64(a * y1))) - Float64(t_10 - Float64(Float64(Float64(y * x) - Float64(z * t)) * t_7))))
	t_17 = Float64(Float64(t * y2) - Float64(y * y3))
	tmp = 0.0
	if (y4 < -7.206256231996481e+60)
		tmp = Float64(Float64(t_8 - Float64(t_11 - t_6)) - Float64(Float64(t_3 / Float64(1.0 / t_1)) - t_14));
	elseif (y4 < -3.364603505246317e-66)
		tmp = Float64(Float64(Float64(Float64(Float64(Float64(t * c) * Float64(i * z)) - Float64(Float64(a * t) * Float64(b * z))) - Float64(Float64(y * c) * Float64(i * x))) - t_10) + Float64(Float64(Float64(Float64(y0 * c) - Float64(a * y1)) * t_2) - Float64(Float64(t_17 * Float64(Float64(y4 * c) - Float64(a * y5))) - Float64(Float64(Float64(y1 * y4) - Float64(y5 * y0)) * t_4))));
	elseif (y4 < -1.2000065055686116e-105)
		tmp = t_16;
	elseif (y4 < 6.718963124057495e-279)
		tmp = t_15;
	elseif (y4 < 4.77962681403792e-222)
		tmp = t_16;
	elseif (y4 < 2.2852241541266835e-175)
		tmp = t_15;
	else
		tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(k * Float64(i * Float64(z * y1))) - Float64(Float64(j * Float64(i * Float64(x * y1))) + Float64(y0 * Float64(k * Float64(z * b)))))) + Float64(Float64(z * Float64(y3 * Float64(a * y1))) - Float64(Float64(y2 * Float64(x * Float64(a * y1))) + Float64(y0 * Float64(z * Float64(c * y3)))))) + Float64(Float64(Float64(t * j) - Float64(y * k)) * t_5)) - Float64(t_17 * t_1)) + t_13);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = (y4 * c) - (y5 * a);
	t_2 = (x * y2) - (z * y3);
	t_3 = (y2 * t) - (y3 * y);
	t_4 = (k * y2) - (j * y3);
	t_5 = (y4 * b) - (y5 * i);
	t_6 = ((j * t) - (k * y)) * t_5;
	t_7 = (b * a) - (i * c);
	t_8 = t_7 * ((y * x) - (t * z));
	t_9 = (j * x) - (k * z);
	t_10 = ((b * y0) - (i * y1)) * t_9;
	t_11 = t_9 * ((y0 * b) - (i * y1));
	t_12 = (y4 * y1) - (y5 * y0);
	t_13 = t_4 * t_12;
	t_14 = ((y2 * k) - (y3 * j)) * t_12;
	t_15 = (((((k * y) * (y5 * i)) - ((y * b) * (y4 * k))) - ((y5 * t) * (i * j))) - ((t_3 * t_1) - t_14)) + (t_8 - (t_11 - (((y2 * x) - (y3 * z)) * ((c * y0) - (y1 * a)))));
	t_16 = ((t_6 - ((y3 * y) * ((y5 * a) - (y4 * c)))) + (((y5 * a) * (t * y2)) + t_13)) + ((t_2 * ((c * y0) - (a * y1))) - (t_10 - (((y * x) - (z * t)) * t_7)));
	t_17 = (t * y2) - (y * y3);
	tmp = 0.0;
	if (y4 < -7.206256231996481e+60)
		tmp = (t_8 - (t_11 - t_6)) - ((t_3 / (1.0 / t_1)) - t_14);
	elseif (y4 < -3.364603505246317e-66)
		tmp = (((((t * c) * (i * z)) - ((a * t) * (b * z))) - ((y * c) * (i * x))) - t_10) + ((((y0 * c) - (a * y1)) * t_2) - ((t_17 * ((y4 * c) - (a * y5))) - (((y1 * y4) - (y5 * y0)) * t_4)));
	elseif (y4 < -1.2000065055686116e-105)
		tmp = t_16;
	elseif (y4 < 6.718963124057495e-279)
		tmp = t_15;
	elseif (y4 < 4.77962681403792e-222)
		tmp = t_16;
	elseif (y4 < 2.2852241541266835e-175)
		tmp = t_15;
	else
		tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - ((k * (i * (z * y1))) - ((j * (i * (x * y1))) + (y0 * (k * (z * b)))))) + ((z * (y3 * (a * y1))) - ((y2 * (x * (a * y1))) + (y0 * (z * (c * y3)))))) + (((t * j) - (y * k)) * t_5)) - (t_17 * t_1)) + t_13;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y2 * t), $MachinePrecision] - N[(y3 * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision] * t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(N[(b * a), $MachinePrecision] - N[(i * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(t$95$7 * N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$10 = N[(N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision] * t$95$9), $MachinePrecision]}, Block[{t$95$11 = N[(t$95$9 * N[(N[(y0 * b), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$12 = N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$13 = N[(t$95$4 * t$95$12), $MachinePrecision]}, Block[{t$95$14 = N[(N[(N[(y2 * k), $MachinePrecision] - N[(y3 * j), $MachinePrecision]), $MachinePrecision] * t$95$12), $MachinePrecision]}, Block[{t$95$15 = N[(N[(N[(N[(N[(N[(k * y), $MachinePrecision] * N[(y5 * i), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] * N[(y4 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y5 * t), $MachinePrecision] * N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$3 * t$95$1), $MachinePrecision] - t$95$14), $MachinePrecision]), $MachinePrecision] + N[(t$95$8 - N[(t$95$11 - N[(N[(N[(y2 * x), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision] * N[(N[(c * y0), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$16 = N[(N[(N[(t$95$6 - N[(N[(y3 * y), $MachinePrecision] * N[(N[(y5 * a), $MachinePrecision] - N[(y4 * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y5 * a), $MachinePrecision] * N[(t * y2), $MachinePrecision]), $MachinePrecision] + t$95$13), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$10 - N[(N[(N[(y * x), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$17 = N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]}, If[Less[y4, -7.206256231996481e+60], N[(N[(t$95$8 - N[(t$95$11 - t$95$6), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$3 / N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision] - t$95$14), $MachinePrecision]), $MachinePrecision], If[Less[y4, -3.364603505246317e-66], N[(N[(N[(N[(N[(N[(t * c), $MachinePrecision] * N[(i * z), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * c), $MachinePrecision] * N[(i * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$10), $MachinePrecision] + N[(N[(N[(N[(y0 * c), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] - N[(N[(t$95$17 * N[(N[(y4 * c), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y1 * y4), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[y4, -1.2000065055686116e-105], t$95$16, If[Less[y4, 6.718963124057495e-279], t$95$15, If[Less[y4, 4.77962681403792e-222], t$95$16, If[Less[y4, 2.2852241541266835e-175], t$95$15, N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(k * N[(i * N[(z * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * N[(i * N[(x * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y0 * N[(k * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(y3 * N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y2 * N[(x * N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y0 * N[(z * N[(c * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * t$95$5), $MachinePrecision]), $MachinePrecision] - N[(t$95$17 * t$95$1), $MachinePrecision]), $MachinePrecision] + t$95$13), $MachinePrecision]]]]]]]]]]]]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y4 \cdot c - y5 \cdot a\\
t_2 := x \cdot y2 - z \cdot y3\\
t_3 := y2 \cdot t - y3 \cdot y\\
t_4 := k \cdot y2 - j \cdot y3\\
t_5 := y4 \cdot b - y5 \cdot i\\
t_6 := \left(j \cdot t - k \cdot y\right) \cdot t\_5\\
t_7 := b \cdot a - i \cdot c\\
t_8 := t\_7 \cdot \left(y \cdot x - t \cdot z\right)\\
t_9 := j \cdot x - k \cdot z\\
t_10 := \left(b \cdot y0 - i \cdot y1\right) \cdot t\_9\\
t_11 := t\_9 \cdot \left(y0 \cdot b - i \cdot y1\right)\\
t_12 := y4 \cdot y1 - y5 \cdot y0\\
t_13 := t\_4 \cdot t\_12\\
t_14 := \left(y2 \cdot k - y3 \cdot j\right) \cdot t\_12\\
t_15 := \left(\left(\left(\left(k \cdot y\right) \cdot \left(y5 \cdot i\right) - \left(y \cdot b\right) \cdot \left(y4 \cdot k\right)\right) - \left(y5 \cdot t\right) \cdot \left(i \cdot j\right)\right) - \left(t\_3 \cdot t\_1 - t\_14\right)\right) + \left(t\_8 - \left(t\_11 - \left(y2 \cdot x - y3 \cdot z\right) \cdot \left(c \cdot y0 - y1 \cdot a\right)\right)\right)\\
t_16 := \left(\left(t\_6 - \left(y3 \cdot y\right) \cdot \left(y5 \cdot a - y4 \cdot c\right)\right) + \left(\left(y5 \cdot a\right) \cdot \left(t \cdot y2\right) + t\_13\right)\right) + \left(t\_2 \cdot \left(c \cdot y0 - a \cdot y1\right) - \left(t\_10 - \left(y \cdot x - z \cdot t\right) \cdot t\_7\right)\right)\\
t_17 := t \cdot y2 - y \cdot y3\\
\mathbf{if}\;y4 < -7.206256231996481 \cdot 10^{+60}:\\
\;\;\;\;\left(t\_8 - \left(t\_11 - t\_6\right)\right) - \left(\frac{t\_3}{\frac{1}{t\_1}} - t\_14\right)\\

\mathbf{elif}\;y4 < -3.364603505246317 \cdot 10^{-66}:\\
\;\;\;\;\left(\left(\left(\left(t \cdot c\right) \cdot \left(i \cdot z\right) - \left(a \cdot t\right) \cdot \left(b \cdot z\right)\right) - \left(y \cdot c\right) \cdot \left(i \cdot x\right)\right) - t\_10\right) + \left(\left(y0 \cdot c - a \cdot y1\right) \cdot t\_2 - \left(t\_17 \cdot \left(y4 \cdot c - a \cdot y5\right) - \left(y1 \cdot y4 - y5 \cdot y0\right) \cdot t\_4\right)\right)\\

\mathbf{elif}\;y4 < -1.2000065055686116 \cdot 10^{-105}:\\
\;\;\;\;t\_16\\

\mathbf{elif}\;y4 < 6.718963124057495 \cdot 10^{-279}:\\
\;\;\;\;t\_15\\

\mathbf{elif}\;y4 < 4.77962681403792 \cdot 10^{-222}:\\
\;\;\;\;t\_16\\

\mathbf{elif}\;y4 < 2.2852241541266835 \cdot 10^{-175}:\\
\;\;\;\;t\_15\\

\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(k \cdot \left(i \cdot \left(z \cdot y1\right)\right) - \left(j \cdot \left(i \cdot \left(x \cdot y1\right)\right) + y0 \cdot \left(k \cdot \left(z \cdot b\right)\right)\right)\right)\right) + \left(z \cdot \left(y3 \cdot \left(a \cdot y1\right)\right) - \left(y2 \cdot \left(x \cdot \left(a \cdot y1\right)\right) + y0 \cdot \left(z \cdot \left(c \cdot y3\right)\right)\right)\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot t\_5\right) - t\_17 \cdot t\_1\right) + t\_13\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2025091 
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :name "Linear.Matrix:det44 from linear-1.19.1.3"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< y4 -7206256231996481000000000000000000000000000000000000000000000) (- (- (* (- (* b a) (* i c)) (- (* y x) (* t z))) (- (* (- (* j x) (* k z)) (- (* y0 b) (* i y1))) (* (- (* j t) (* k y)) (- (* y4 b) (* y5 i))))) (- (/ (- (* y2 t) (* y3 y)) (/ 1 (- (* y4 c) (* y5 a)))) (* (- (* y2 k) (* y3 j)) (- (* y4 y1) (* y5 y0))))) (if (< y4 -3364603505246317/1000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (- (- (* (* t c) (* i z)) (* (* a t) (* b z))) (* (* y c) (* i x))) (* (- (* b y0) (* i y1)) (- (* j x) (* k z)))) (- (* (- (* y0 c) (* a y1)) (- (* x y2) (* z y3))) (- (* (- (* t y2) (* y y3)) (- (* y4 c) (* a y5))) (* (- (* y1 y4) (* y5 y0)) (- (* k y2) (* j y3)))))) (if (< y4 -3000016263921529/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (+ (- (* (- (* j t) (* k y)) (- (* y4 b) (* y5 i))) (* (* y3 y) (- (* y5 a) (* y4 c)))) (+ (* (* y5 a) (* t y2)) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))) (- (* (- (* x y2) (* z y3)) (- (* c y0) (* a y1))) (- (* (- (* b y0) (* i y1)) (- (* j x) (* k z))) (* (- (* y x) (* z t)) (- (* b a) (* i c)))))) (if (< y4 1343792624811499/200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (- (- (* (* k y) (* y5 i)) (* (* y b) (* y4 k))) (* (* y5 t) (* i j))) (- (* (- (* y2 t) (* y3 y)) (- (* y4 c) (* y5 a))) (* (- (* y2 k) (* y3 j)) (- (* y4 y1) (* y5 y0))))) (- (* (- (* b a) (* i c)) (- (* y x) (* t z))) (- (* (- (* j x) (* k z)) (- (* y0 b) (* i y1))) (* (- (* y2 x) (* y3 z)) (- (* c y0) (* y1 a)))))) (if (< y4 29872667587737/6250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (+ (- (* (- (* j t) (* k y)) (- (* y4 b) (* y5 i))) (* (* y3 y) (- (* y5 a) (* y4 c)))) (+ (* (* y5 a) (* t y2)) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))) (- (* (- (* x y2) (* z y3)) (- (* c y0) (* a y1))) (- (* (- (* b y0) (* i y1)) (- (* j x) (* k z))) (* (- (* y x) (* z t)) (- (* b a) (* i c)))))) (if (< y4 4570448308253367/20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (- (- (* (* k y) (* y5 i)) (* (* y b) (* y4 k))) (* (* y5 t) (* i j))) (- (* (- (* y2 t) (* y3 y)) (- (* y4 c) (* y5 a))) (* (- (* y2 k) (* y3 j)) (- (* y4 y1) (* y5 y0))))) (- (* (- (* b a) (* i c)) (- (* y x) (* t z))) (- (* (- (* j x) (* k z)) (- (* y0 b) (* i y1))) (* (- (* y2 x) (* y3 z)) (- (* c y0) (* y1 a)))))) (+ (- (+ (+ (- (* (- (* x y) (* z t)) (- (* a b) (* c i))) (- (* k (* i (* z y1))) (+ (* j (* i (* x y1))) (* y0 (* k (* z b)))))) (- (* z (* y3 (* a y1))) (+ (* y2 (* x (* a y1))) (* y0 (* z (* c y3)))))) (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i)))) (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a)))) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))))))))

  (+ (- (+ (+ (- (* (- (* x y) (* z t)) (- (* a b) (* c i))) (* (- (* x j) (* z k)) (- (* y0 b) (* y1 i)))) (* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a)))) (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i)))) (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a)))) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))