Linear.Matrix:det44 from linear-1.19.1.3

Percentage Accurate: 29.7% → 53.9%
Time: 37.5s
Alternatives: 32
Speedup: 5.0×

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 32 alternatives:

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

Initial Program: 29.7% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 53.9% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y0 \cdot c - y1 \cdot a\\ t_2 := j \cdot t - k \cdot y\\ t_3 := y2 \cdot t - y3 \cdot y\\ t_4 := b \cdot a - i \cdot c\\ t_5 := y0 \cdot b - y1 \cdot i\\ t_6 := \left(\mathsf{fma}\left(t\_4, y, t\_1 \cdot y2\right) - t\_5 \cdot j\right) \cdot x\\ t_7 := \left(-z\right) \cdot \left(\mathsf{fma}\left(t\_4, t, t\_1 \cdot y3\right) - t\_5 \cdot k\right)\\ t_8 := y \cdot x - t \cdot z\\ \mathbf{if}\;x \leq -7.6 \cdot 10^{+176}:\\ \;\;\;\;t\_6\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{+37}:\\ \;\;\;\;t\_7\\ \mathbf{elif}\;x \leq -7.4 \cdot 10^{-261}:\\ \;\;\;\;\left(\mathsf{fma}\left(t\_8, a, t\_2 \cdot y4\right) - \left(j \cdot x - k \cdot z\right) \cdot y0\right) \cdot b\\ \mathbf{elif}\;x \leq 7.8 \cdot 10^{-214}:\\ \;\;\;\;\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(t\_8, b, t\_3 \cdot y5\right)\right) \cdot a\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-176}:\\ \;\;\;\;t\_7\\ \mathbf{elif}\;x \leq 52000000000000:\\ \;\;\;\;\left(\mathsf{fma}\left(t\_2, b, \left(y2 \cdot k - y3 \cdot j\right) \cdot y1\right) - t\_3 \cdot c\right) \cdot y4\\ \mathbf{else}:\\ \;\;\;\;t\_6\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (- (* y0 c) (* y1 a)))
        (t_2 (- (* j t) (* k y)))
        (t_3 (- (* y2 t) (* y3 y)))
        (t_4 (- (* b a) (* i c)))
        (t_5 (- (* y0 b) (* y1 i)))
        (t_6 (* (- (fma t_4 y (* t_1 y2)) (* t_5 j)) x))
        (t_7 (* (- z) (- (fma t_4 t (* t_1 y3)) (* t_5 k))))
        (t_8 (- (* y x) (* t z))))
   (if (<= x -7.6e+176)
     t_6
     (if (<= x -3.5e+37)
       t_7
       (if (<= x -7.4e-261)
         (* (- (fma t_8 a (* t_2 y4)) (* (- (* j x) (* k z)) y0)) b)
         (if (<= x 7.8e-214)
           (* (fma (- (- (* y2 x) (* y3 z))) y1 (fma t_8 b (* t_3 y5))) a)
           (if (<= x 4.5e-176)
             t_7
             (if (<= x 52000000000000.0)
               (* (- (fma t_2 b (* (- (* y2 k) (* y3 j)) y1)) (* t_3 c)) y4)
               t_6))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = (y0 * c) - (y1 * a);
	double t_2 = (j * t) - (k * y);
	double t_3 = (y2 * t) - (y3 * y);
	double t_4 = (b * a) - (i * c);
	double t_5 = (y0 * b) - (y1 * i);
	double t_6 = (fma(t_4, y, (t_1 * y2)) - (t_5 * j)) * x;
	double t_7 = -z * (fma(t_4, t, (t_1 * y3)) - (t_5 * k));
	double t_8 = (y * x) - (t * z);
	double tmp;
	if (x <= -7.6e+176) {
		tmp = t_6;
	} else if (x <= -3.5e+37) {
		tmp = t_7;
	} else if (x <= -7.4e-261) {
		tmp = (fma(t_8, a, (t_2 * y4)) - (((j * x) - (k * z)) * y0)) * b;
	} else if (x <= 7.8e-214) {
		tmp = fma(-((y2 * x) - (y3 * z)), y1, fma(t_8, b, (t_3 * y5))) * a;
	} else if (x <= 4.5e-176) {
		tmp = t_7;
	} else if (x <= 52000000000000.0) {
		tmp = (fma(t_2, b, (((y2 * k) - (y3 * j)) * y1)) - (t_3 * c)) * y4;
	} else {
		tmp = t_6;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(y0 * c) - Float64(y1 * a))
	t_2 = Float64(Float64(j * t) - Float64(k * y))
	t_3 = Float64(Float64(y2 * t) - Float64(y3 * y))
	t_4 = Float64(Float64(b * a) - Float64(i * c))
	t_5 = Float64(Float64(y0 * b) - Float64(y1 * i))
	t_6 = Float64(Float64(fma(t_4, y, Float64(t_1 * y2)) - Float64(t_5 * j)) * x)
	t_7 = Float64(Float64(-z) * Float64(fma(t_4, t, Float64(t_1 * y3)) - Float64(t_5 * k)))
	t_8 = Float64(Float64(y * x) - Float64(t * z))
	tmp = 0.0
	if (x <= -7.6e+176)
		tmp = t_6;
	elseif (x <= -3.5e+37)
		tmp = t_7;
	elseif (x <= -7.4e-261)
		tmp = Float64(Float64(fma(t_8, a, Float64(t_2 * y4)) - Float64(Float64(Float64(j * x) - Float64(k * z)) * y0)) * b);
	elseif (x <= 7.8e-214)
		tmp = Float64(fma(Float64(-Float64(Float64(y2 * x) - Float64(y3 * z))), y1, fma(t_8, b, Float64(t_3 * y5))) * a);
	elseif (x <= 4.5e-176)
		tmp = t_7;
	elseif (x <= 52000000000000.0)
		tmp = Float64(Float64(fma(t_2, b, Float64(Float64(Float64(y2 * k) - Float64(y3 * j)) * y1)) - Float64(t_3 * c)) * y4);
	else
		tmp = t_6;
	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[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y2 * t), $MachinePrecision] - N[(y3 * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(b * a), $MachinePrecision] - N[(i * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$4 * y + N[(t$95$1 * y2), $MachinePrecision]), $MachinePrecision] - N[(t$95$5 * j), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$7 = N[((-z) * N[(N[(t$95$4 * t + N[(t$95$1 * y3), $MachinePrecision]), $MachinePrecision] - N[(t$95$5 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.6e+176], t$95$6, If[LessEqual[x, -3.5e+37], t$95$7, If[LessEqual[x, -7.4e-261], N[(N[(N[(t$95$8 * a + N[(t$95$2 * y4), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision] * y0), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[x, 7.8e-214], N[(N[((-N[(N[(y2 * x), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]) * y1 + N[(t$95$8 * b + N[(t$95$3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[x, 4.5e-176], t$95$7, If[LessEqual[x, 52000000000000.0], N[(N[(N[(t$95$2 * b + N[(N[(N[(y2 * k), $MachinePrecision] - N[(y3 * j), $MachinePrecision]), $MachinePrecision] * y1), $MachinePrecision]), $MachinePrecision] - N[(t$95$3 * c), $MachinePrecision]), $MachinePrecision] * y4), $MachinePrecision], t$95$6]]]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -3.5 \cdot 10^{+37}:\\
\;\;\;\;t\_7\\

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

\mathbf{elif}\;x \leq 7.8 \cdot 10^{-214}:\\
\;\;\;\;\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(t\_8, b, t\_3 \cdot y5\right)\right) \cdot a\\

\mathbf{elif}\;x \leq 4.5 \cdot 10^{-176}:\\
\;\;\;\;t\_7\\

\mathbf{elif}\;x \leq 52000000000000:\\
\;\;\;\;\left(\mathsf{fma}\left(t\_2, b, \left(y2 \cdot k - y3 \cdot j\right) \cdot y1\right) - t\_3 \cdot c\right) \cdot y4\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -7.6000000000000005e176 or 5.2e13 < x

    1. Initial program 23.3%

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

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites53.8%

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

    if -7.6000000000000005e176 < x < -3.5e37 or 7.80000000000000076e-214 < x < 4.5e-176

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

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

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites36.6%

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

    if -3.5e37 < x < -7.4000000000000004e-261

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

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

        \[\leadsto \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) \cdot \color{blue}{b} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{b} \]
    4. Applied rewrites39.8%

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

    if -7.4000000000000004e-261 < x < 7.80000000000000076e-214

    1. Initial program 36.0%

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites35.2%

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

    if 4.5e-176 < x < 5.2e13

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

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

        \[\leadsto \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) \cdot \color{blue}{y4} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{y4} \]
    4. Applied rewrites35.1%

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

Alternative 2: 51.9% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y0 \cdot c - y1 \cdot a\\ t_2 := y \cdot x - t \cdot z\\ t_3 := y2 \cdot x - y3 \cdot z\\ t_4 := y2 \cdot t - y3 \cdot y\\ t_5 := b \cdot a - i \cdot c\\ t_6 := y0 \cdot b - y1 \cdot i\\ t_7 := \left(-z\right) \cdot \left(\mathsf{fma}\left(t\_5, t, t\_1 \cdot y3\right) - t\_6 \cdot k\right)\\ \mathbf{if}\;z \leq -5.5 \cdot 10^{+77}:\\ \;\;\;\;t\_7\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-200}:\\ \;\;\;\;\left(\mathsf{fma}\left(-i, t\_2, t\_3 \cdot y0\right) - t\_4 \cdot y4\right) \cdot c\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-106}:\\ \;\;\;\;\left(\mathsf{fma}\left(t\_5, y, t\_1 \cdot y2\right) - t\_6 \cdot j\right) \cdot x\\ \mathbf{elif}\;z \leq 420000000000:\\ \;\;\;\;\mathsf{fma}\left(-t\_3, y1, \mathsf{fma}\left(t\_2, b, t\_4 \cdot y5\right)\right) \cdot a\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+110}:\\ \;\;\;\;\left(-y3\right) \cdot \left(\mathsf{fma}\left(y4 \cdot y1 - y5 \cdot y0, j, t\_1 \cdot z\right) - \left(y4 \cdot c - y5 \cdot a\right) \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_7\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (- (* y0 c) (* y1 a)))
        (t_2 (- (* y x) (* t z)))
        (t_3 (- (* y2 x) (* y3 z)))
        (t_4 (- (* y2 t) (* y3 y)))
        (t_5 (- (* b a) (* i c)))
        (t_6 (- (* y0 b) (* y1 i)))
        (t_7 (* (- z) (- (fma t_5 t (* t_1 y3)) (* t_6 k)))))
   (if (<= z -5.5e+77)
     t_7
     (if (<= z -9.5e-200)
       (* (- (fma (- i) t_2 (* t_3 y0)) (* t_4 y4)) c)
       (if (<= z 3.4e-106)
         (* (- (fma t_5 y (* t_1 y2)) (* t_6 j)) x)
         (if (<= z 420000000000.0)
           (* (fma (- t_3) y1 (fma t_2 b (* t_4 y5))) a)
           (if (<= z 1.35e+110)
             (*
              (- y3)
              (-
               (fma (- (* y4 y1) (* y5 y0)) j (* t_1 z))
               (* (- (* y4 c) (* y5 a)) y)))
             t_7)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = (y0 * c) - (y1 * a);
	double t_2 = (y * x) - (t * z);
	double t_3 = (y2 * x) - (y3 * z);
	double t_4 = (y2 * t) - (y3 * y);
	double t_5 = (b * a) - (i * c);
	double t_6 = (y0 * b) - (y1 * i);
	double t_7 = -z * (fma(t_5, t, (t_1 * y3)) - (t_6 * k));
	double tmp;
	if (z <= -5.5e+77) {
		tmp = t_7;
	} else if (z <= -9.5e-200) {
		tmp = (fma(-i, t_2, (t_3 * y0)) - (t_4 * y4)) * c;
	} else if (z <= 3.4e-106) {
		tmp = (fma(t_5, y, (t_1 * y2)) - (t_6 * j)) * x;
	} else if (z <= 420000000000.0) {
		tmp = fma(-t_3, y1, fma(t_2, b, (t_4 * y5))) * a;
	} else if (z <= 1.35e+110) {
		tmp = -y3 * (fma(((y4 * y1) - (y5 * y0)), j, (t_1 * z)) - (((y4 * c) - (y5 * a)) * y));
	} else {
		tmp = t_7;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(y0 * c) - Float64(y1 * a))
	t_2 = Float64(Float64(y * x) - Float64(t * z))
	t_3 = Float64(Float64(y2 * x) - Float64(y3 * z))
	t_4 = Float64(Float64(y2 * t) - Float64(y3 * y))
	t_5 = Float64(Float64(b * a) - Float64(i * c))
	t_6 = Float64(Float64(y0 * b) - Float64(y1 * i))
	t_7 = Float64(Float64(-z) * Float64(fma(t_5, t, Float64(t_1 * y3)) - Float64(t_6 * k)))
	tmp = 0.0
	if (z <= -5.5e+77)
		tmp = t_7;
	elseif (z <= -9.5e-200)
		tmp = Float64(Float64(fma(Float64(-i), t_2, Float64(t_3 * y0)) - Float64(t_4 * y4)) * c);
	elseif (z <= 3.4e-106)
		tmp = Float64(Float64(fma(t_5, y, Float64(t_1 * y2)) - Float64(t_6 * j)) * x);
	elseif (z <= 420000000000.0)
		tmp = Float64(fma(Float64(-t_3), y1, fma(t_2, b, Float64(t_4 * y5))) * a);
	elseif (z <= 1.35e+110)
		tmp = Float64(Float64(-y3) * Float64(fma(Float64(Float64(y4 * y1) - Float64(y5 * y0)), j, Float64(t_1 * z)) - Float64(Float64(Float64(y4 * c) - Float64(y5 * a)) * y)));
	else
		tmp = t_7;
	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[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y2 * x), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(y2 * t), $MachinePrecision] - N[(y3 * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(b * a), $MachinePrecision] - N[(i * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[((-z) * N[(N[(t$95$5 * t + N[(t$95$1 * y3), $MachinePrecision]), $MachinePrecision] - N[(t$95$6 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5e+77], t$95$7, If[LessEqual[z, -9.5e-200], N[(N[(N[((-i) * t$95$2 + N[(t$95$3 * y0), $MachinePrecision]), $MachinePrecision] - N[(t$95$4 * y4), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[z, 3.4e-106], N[(N[(N[(t$95$5 * y + N[(t$95$1 * y2), $MachinePrecision]), $MachinePrecision] - N[(t$95$6 * j), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 420000000000.0], N[(N[((-t$95$3) * y1 + N[(t$95$2 * b + N[(t$95$4 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 1.35e+110], N[((-y3) * N[(N[(N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision] * j + N[(t$95$1 * z), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$7]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y0 \cdot c - y1 \cdot a\\
t_2 := y \cdot x - t \cdot z\\
t_3 := y2 \cdot x - y3 \cdot z\\
t_4 := y2 \cdot t - y3 \cdot y\\
t_5 := b \cdot a - i \cdot c\\
t_6 := y0 \cdot b - y1 \cdot i\\
t_7 := \left(-z\right) \cdot \left(\mathsf{fma}\left(t\_5, t, t\_1 \cdot y3\right) - t\_6 \cdot k\right)\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{+77}:\\
\;\;\;\;t\_7\\

\mathbf{elif}\;z \leq -9.5 \cdot 10^{-200}:\\
\;\;\;\;\left(\mathsf{fma}\left(-i, t\_2, t\_3 \cdot y0\right) - t\_4 \cdot y4\right) \cdot c\\

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

\mathbf{elif}\;z \leq 420000000000:\\
\;\;\;\;\mathsf{fma}\left(-t\_3, y1, \mathsf{fma}\left(t\_2, b, t\_4 \cdot y5\right)\right) \cdot a\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -5.50000000000000036e77 or 1.35000000000000005e110 < z

    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. Taylor expanded in z around -inf

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

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites54.7%

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

    if -5.50000000000000036e77 < z < -9.4999999999999995e-200

    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. Taylor expanded in c around inf

      \[\leadsto \color{blue}{c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot \color{blue}{c} \]
    4. Applied rewrites36.9%

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

    if -9.4999999999999995e-200 < z < 3.39999999999999982e-106

    1. Initial program 34.5%

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

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites40.4%

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

    if 3.39999999999999982e-106 < z < 4.2e11

    1. Initial program 31.2%

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites44.6%

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

    if 4.2e11 < z < 1.35000000000000005e110

    1. Initial program 31.2%

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

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

        \[\leadsto \left(-1 \cdot y3\right) \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)} \]
      2. mul-1-negN/A

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

        \[\leadsto \left(\mathsf{neg}\left(y3\right)\right) \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)} \]
      4. lower-neg.f64N/A

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

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

Alternative 3: 47.6% accurate, 2.2× speedup?

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

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

\mathbf{elif}\;x \leq -2.3 \cdot 10^{+35}:\\
\;\;\;\;\mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c\\

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

\mathbf{elif}\;x \leq 6.2 \cdot 10^{-183}:\\
\;\;\;\;\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(t\_1, b, t\_2 \cdot y5\right)\right) \cdot a\\

\mathbf{elif}\;x \leq 52000000000000:\\
\;\;\;\;\left(\mathsf{fma}\left(t\_4, b, \left(y2 \cdot k - y3 \cdot j\right) \cdot y1\right) - t\_2 \cdot c\right) \cdot y4\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -8.4999999999999995e176 or 5.2e13 < x

    1. Initial program 23.3%

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

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites53.9%

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

    if -8.4999999999999995e176 < x < -2.2999999999999998e35

    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. Taylor expanded in c around inf

      \[\leadsto \color{blue}{c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot \color{blue}{c} \]
    4. Applied rewrites37.2%

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-i, y \cdot x - t \cdot z, \left(y2 \cdot x - y3 \cdot z\right) \cdot y0\right) - \left(y2 \cdot t - y3 \cdot y\right) \cdot y4\right) \cdot c} \]
    5. Taylor expanded in y4 around 0

      \[\leadsto \left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot \left(x \cdot y - t \cdot z\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      2. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot \left(x \cdot y - t \cdot z\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      3. lift-neg.f64N/A

        \[\leadsto \left(\left(-i\right) \cdot \left(x \cdot y - t \cdot z\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      5. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      6. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      7. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      9. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      10. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      11. lift-*.f6438.4

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
    7. Applied rewrites38.4%

      \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]

    if -2.2999999999999998e35 < x < -7.4000000000000004e-261

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

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

        \[\leadsto \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) \cdot \color{blue}{b} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{b} \]
    4. Applied rewrites39.8%

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

    if -7.4000000000000004e-261 < x < 6.19999999999999999e-183

    1. Initial program 36.3%

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites36.1%

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

    if 6.19999999999999999e-183 < x < 5.2e13

    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. Taylor expanded in y4 around inf

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

        \[\leadsto \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) \cdot \color{blue}{y4} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{y4} \]
    4. Applied rewrites41.2%

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

Alternative 4: 44.6% accurate, 0.5× speedup?

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

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

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


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

    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. Taylor expanded in x around inf

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites35.9%

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

Alternative 5: 44.2% accurate, 0.5× speedup?

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

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

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


\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.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. Taylor expanded in j around 0

      \[\leadsto \left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \color{blue}{\left(k \cdot y2\right)} \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(y2 \cdot \color{blue}{k}\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      2. lower-*.f6484.9

        \[\leadsto \left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(y2 \cdot \color{blue}{k}\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites84.9%

      \[\leadsto \left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \color{blue}{\left(y2 \cdot k\right)} \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]

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

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

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites35.9%

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

Alternative 6: 43.9% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot t - k \cdot y\\ \mathbf{if}\;y5 \leq -7.5 \cdot 10^{+74}:\\ \;\;\;\;\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\ \mathbf{elif}\;y5 \leq -2.3 \cdot 10^{-287}:\\ \;\;\;\;\mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c\\ \mathbf{elif}\;y5 \leq 6.2 \cdot 10^{-169}:\\ \;\;\;\;\left(\mathsf{fma}\left(t\_1, b, \left(y2 \cdot k - y3 \cdot j\right) \cdot y1\right) - \left(y2 \cdot t - y3 \cdot y\right) \cdot c\right) \cdot y4\\ \mathbf{elif}\;y5 \leq 5.2 \cdot 10^{+104}:\\ \;\;\;\;\left(\mathsf{fma}\left(y \cdot x - t \cdot z, a, t\_1 \cdot y4\right) - \left(j \cdot x - k \cdot z\right) \cdot y0\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t\\ \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 (<= y5 -7.5e+74)
     (* (* y5 (- (* t y2) (* y y3))) a)
     (if (<= y5 -2.3e-287)
       (* (fma (- i) (- (* x y) (* t z)) (* y0 (- (* x y2) (* y3 z)))) c)
       (if (<= y5 6.2e-169)
         (*
          (-
           (fma t_1 b (* (- (* y2 k) (* y3 j)) y1))
           (* (- (* y2 t) (* y3 y)) c))
          y4)
         (if (<= y5 5.2e+104)
           (*
            (-
             (fma (- (* y x) (* t z)) a (* t_1 y4))
             (* (- (* j x) (* k z)) y0))
            b)
           (* (* j (- (* b y4) (* i y5))) 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 (y5 <= -7.5e+74) {
		tmp = (y5 * ((t * y2) - (y * y3))) * a;
	} else if (y5 <= -2.3e-287) {
		tmp = fma(-i, ((x * y) - (t * z)), (y0 * ((x * y2) - (y3 * z)))) * c;
	} else if (y5 <= 6.2e-169) {
		tmp = (fma(t_1, b, (((y2 * k) - (y3 * j)) * y1)) - (((y2 * t) - (y3 * y)) * c)) * y4;
	} else if (y5 <= 5.2e+104) {
		tmp = (fma(((y * x) - (t * z)), a, (t_1 * y4)) - (((j * x) - (k * z)) * y0)) * b;
	} else {
		tmp = (j * ((b * y4) - (i * y5))) * 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 (y5 <= -7.5e+74)
		tmp = Float64(Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))) * a);
	elseif (y5 <= -2.3e-287)
		tmp = Float64(fma(Float64(-i), Float64(Float64(x * y) - Float64(t * z)), Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))) * c);
	elseif (y5 <= 6.2e-169)
		tmp = Float64(Float64(fma(t_1, b, Float64(Float64(Float64(y2 * k) - Float64(y3 * j)) * y1)) - Float64(Float64(Float64(y2 * t) - Float64(y3 * y)) * c)) * y4);
	elseif (y5 <= 5.2e+104)
		tmp = Float64(Float64(fma(Float64(Float64(y * x) - Float64(t * z)), a, Float64(t_1 * y4)) - Float64(Float64(Float64(j * x) - Float64(k * z)) * y0)) * b);
	else
		tmp = Float64(Float64(j * Float64(Float64(b * y4) - Float64(i * y5))) * 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[y5, -7.5e+74], N[(N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y5, -2.3e-287], N[(N[((-i) * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y5, 6.2e-169], N[(N[(N[(t$95$1 * b + N[(N[(N[(y2 * k), $MachinePrecision] - N[(y3 * j), $MachinePrecision]), $MachinePrecision] * y1), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y2 * t), $MachinePrecision] - N[(y3 * y), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision] * y4), $MachinePrecision], If[LessEqual[y5, 5.2e+104], N[(N[(N[(N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] * a + N[(t$95$1 * y4), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision] * y0), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], N[(N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot t - k \cdot y\\
\mathbf{if}\;y5 \leq -7.5 \cdot 10^{+74}:\\
\;\;\;\;\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\

\mathbf{elif}\;y5 \leq -2.3 \cdot 10^{-287}:\\
\;\;\;\;\mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c\\

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

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

\mathbf{else}:\\
\;\;\;\;\left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y5 < -7.5e74

    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. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites41.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y1 around inf

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      2. lower--.f64N/A

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

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      4. lower-*.f6424.7

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    7. Applied rewrites24.7%

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    8. Taylor expanded in y5 around inf

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

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

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

        \[\leadsto \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a \]
      4. lower-*.f6442.6

        \[\leadsto \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a \]
    10. Applied rewrites42.6%

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

    if -7.5e74 < y5 < -2.29999999999999986e-287

    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. Taylor expanded in c around inf

      \[\leadsto \color{blue}{c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot \color{blue}{c} \]
    4. Applied rewrites39.2%

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-i, y \cdot x - t \cdot z, \left(y2 \cdot x - y3 \cdot z\right) \cdot y0\right) - \left(y2 \cdot t - y3 \cdot y\right) \cdot y4\right) \cdot c} \]
    5. Taylor expanded in y4 around 0

      \[\leadsto \left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot \left(x \cdot y - t \cdot z\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      2. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot \left(x \cdot y - t \cdot z\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      3. lift-neg.f64N/A

        \[\leadsto \left(\left(-i\right) \cdot \left(x \cdot y - t \cdot z\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      5. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      6. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      7. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      9. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      10. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      11. lift-*.f6437.1

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

      \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]

    if -2.29999999999999986e-287 < y5 < 6.2000000000000004e-169

    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. Taylor expanded in y4 around inf

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

        \[\leadsto \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) \cdot \color{blue}{y4} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{y4} \]
    4. Applied rewrites37.1%

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

    if 6.2000000000000004e-169 < y5 < 5.20000000000000001e104

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

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

        \[\leadsto \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) \cdot \color{blue}{b} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{b} \]
    4. Applied rewrites38.4%

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

    if 5.20000000000000001e104 < y5

    1. Initial program 20.8%

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

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

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

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

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

      \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
      4. lower-*.f6435.1

        \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
    7. Applied rewrites35.1%

      \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 7: 39.3% accurate, 0.5× speedup?

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

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

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


\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.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. Taylor expanded in x around inf

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites42.1%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(j \cdot \left(y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\right) + \left(j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + \left(\left(a \cdot b - c \cdot i\right) \cdot \left(x \cdot y - t \cdot z\right) + \left(c \cdot y0 - a \cdot y1\right) \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\right)\right) - \left(j \cdot \left(x \cdot \left(b \cdot y0 - i \cdot y1\right)\right) + \left(c \cdot y4 - a \cdot y5\right) \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    6. Applied rewrites71.7%

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

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

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

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites35.9%

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

Alternative 8: 38.1% accurate, 2.7× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\left(y3 \cdot t\_1\right) \cdot a\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y3 < -2.69999999999999983e85

    1. Initial program 22.2%

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites39.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y3 around inf

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

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

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

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1} \cdot z\right) \]
      4. mul-1-negN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y \cdot y5\right)\right) + y1 \cdot z\right) \]
      5. distribute-lft-neg-outN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot y5 + y1 \cdot z\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(\mathsf{neg}\left(y\right), y5, y1 \cdot z\right) \]
      7. lower-neg.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
      8. lower-*.f6437.9

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
    7. Applied rewrites37.9%

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

    if -2.69999999999999983e85 < y3 < 1.96000000000000006e28

    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. Taylor expanded in x around inf

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites39.8%

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

    if 1.96000000000000006e28 < y3

    1. Initial program 25.2%

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites40.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y3 around inf

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

        \[\leadsto \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right) + y1 \cdot z\right)\right) \cdot a \]
      2. mul-1-negN/A

        \[\leadsto \left(y3 \cdot \left(\left(\mathsf{neg}\left(y \cdot y5\right)\right) + y1 \cdot z\right)\right) \cdot a \]
      3. distribute-lft-neg-outN/A

        \[\leadsto \left(y3 \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot y5 + y1 \cdot z\right)\right) \cdot a \]
      4. lower-fma.f64N/A

        \[\leadsto \left(y3 \cdot \mathsf{fma}\left(\mathsf{neg}\left(y\right), y5, y1 \cdot z\right)\right) \cdot a \]
      5. lower-neg.f64N/A

        \[\leadsto \left(y3 \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right)\right) \cdot a \]
      6. lower-*.f6438.8

        \[\leadsto \left(y3 \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right)\right) \cdot a \]
    7. Applied rewrites38.8%

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

Alternative 9: 37.4% accurate, 3.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \leq -2.6 \cdot 10^{+234}:\\ \;\;\;\;\left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t\\ \mathbf{elif}\;i \leq -4.8 \cdot 10^{+130}:\\ \;\;\;\;\left(-z\right) \cdot \left(y0 \cdot \left(c \cdot y3 - b \cdot k\right)\right)\\ \mathbf{elif}\;i \leq -3.9 \cdot 10^{-109}:\\ \;\;\;\;\left(y3 \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right)\right) \cdot a\\ \mathbf{elif}\;i \leq -3.9 \cdot 10^{-280}:\\ \;\;\;\;\left(b \cdot z\right) \cdot \mathsf{fma}\left(-a, t, k \cdot y0\right)\\ \mathbf{elif}\;i \leq 2.6 \cdot 10^{+18}:\\ \;\;\;\;\left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \cdot x\\ \mathbf{elif}\;i \leq 1.6 \cdot 10^{+126}:\\ \;\;\;\;\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot \left(a \cdot b - c \cdot i\right)\right) \cdot x\\ \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.6e+234)
   (* (* j (- (* b y4) (* i y5))) t)
   (if (<= i -4.8e+130)
     (* (- z) (* y0 (- (* c y3) (* b k))))
     (if (<= i -3.9e-109)
       (* (* y3 (fma (- y) y5 (* y1 z))) a)
       (if (<= i -3.9e-280)
         (* (* b z) (fma (- a) t (* k y0)))
         (if (<= i 2.6e+18)
           (* (* y2 (- (* c y0) (* a y1))) x)
           (if (<= i 1.6e+126)
             (* (* y5 (- (* t y2) (* y y3))) a)
             (* (* y (- (* a b) (* c i))) x))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (i <= -2.6e+234) {
		tmp = (j * ((b * y4) - (i * y5))) * t;
	} else if (i <= -4.8e+130) {
		tmp = -z * (y0 * ((c * y3) - (b * k)));
	} else if (i <= -3.9e-109) {
		tmp = (y3 * fma(-y, y5, (y1 * z))) * a;
	} else if (i <= -3.9e-280) {
		tmp = (b * z) * fma(-a, t, (k * y0));
	} else if (i <= 2.6e+18) {
		tmp = (y2 * ((c * y0) - (a * y1))) * x;
	} else if (i <= 1.6e+126) {
		tmp = (y5 * ((t * y2) - (y * y3))) * a;
	} else {
		tmp = (y * ((a * b) - (c * i))) * x;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (i <= -2.6e+234)
		tmp = Float64(Float64(j * Float64(Float64(b * y4) - Float64(i * y5))) * t);
	elseif (i <= -4.8e+130)
		tmp = Float64(Float64(-z) * Float64(y0 * Float64(Float64(c * y3) - Float64(b * k))));
	elseif (i <= -3.9e-109)
		tmp = Float64(Float64(y3 * fma(Float64(-y), y5, Float64(y1 * z))) * a);
	elseif (i <= -3.9e-280)
		tmp = Float64(Float64(b * z) * fma(Float64(-a), t, Float64(k * y0)));
	elseif (i <= 2.6e+18)
		tmp = Float64(Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1))) * x);
	elseif (i <= 1.6e+126)
		tmp = Float64(Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))) * a);
	else
		tmp = Float64(Float64(y * Float64(Float64(a * b) - Float64(c * i))) * x);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[i, -2.6e+234], N[(N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[i, -4.8e+130], N[((-z) * N[(y0 * N[(N[(c * y3), $MachinePrecision] - N[(b * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, -3.9e-109], N[(N[(y3 * N[((-y) * y5 + N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[i, -3.9e-280], N[(N[(b * z), $MachinePrecision] * N[((-a) * t + N[(k * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 2.6e+18], N[(N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[i, 1.6e+126], N[(N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;i \leq -2.6 \cdot 10^{+234}:\\
\;\;\;\;\left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t\\

\mathbf{elif}\;i \leq -4.8 \cdot 10^{+130}:\\
\;\;\;\;\left(-z\right) \cdot \left(y0 \cdot \left(c \cdot y3 - b \cdot k\right)\right)\\

\mathbf{elif}\;i \leq -3.9 \cdot 10^{-109}:\\
\;\;\;\;\left(y3 \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right)\right) \cdot a\\

\mathbf{elif}\;i \leq -3.9 \cdot 10^{-280}:\\
\;\;\;\;\left(b \cdot z\right) \cdot \mathsf{fma}\left(-a, t, k \cdot y0\right)\\

\mathbf{elif}\;i \leq 2.6 \cdot 10^{+18}:\\
\;\;\;\;\left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \cdot x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if i < -2.60000000000000015e234

    1. Initial program 20.8%

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

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

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

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

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

      \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
      4. lower-*.f6439.3

        \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
    7. Applied rewrites39.3%

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

    if -2.60000000000000015e234 < i < -4.80000000000000048e130

    1. Initial program 25.2%

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

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

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites39.1%

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

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

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

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

        \[\leadsto \left(-z\right) \cdot \left(y0 \cdot \left(c \cdot y3 - b \cdot k\right)\right) \]
      4. lower-*.f6425.0

        \[\leadsto \left(-z\right) \cdot \left(y0 \cdot \left(c \cdot y3 - b \cdot k\right)\right) \]
    7. Applied rewrites25.0%

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

    if -4.80000000000000048e130 < i < -3.90000000000000023e-109

    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. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites39.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y3 around inf

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

        \[\leadsto \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right) + y1 \cdot z\right)\right) \cdot a \]
      2. mul-1-negN/A

        \[\leadsto \left(y3 \cdot \left(\left(\mathsf{neg}\left(y \cdot y5\right)\right) + y1 \cdot z\right)\right) \cdot a \]
      3. distribute-lft-neg-outN/A

        \[\leadsto \left(y3 \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot y5 + y1 \cdot z\right)\right) \cdot a \]
      4. lower-fma.f64N/A

        \[\leadsto \left(y3 \cdot \mathsf{fma}\left(\mathsf{neg}\left(y\right), y5, y1 \cdot z\right)\right) \cdot a \]
      5. lower-neg.f64N/A

        \[\leadsto \left(y3 \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right)\right) \cdot a \]
      6. lower-*.f6426.1

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

      \[\leadsto \left(y3 \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right)\right) \cdot a \]

    if -3.90000000000000023e-109 < i < -3.89999999999999998e-280

    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. Taylor expanded in z around -inf

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

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites38.0%

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

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

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

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

        \[\leadsto \left(b \cdot z\right) \cdot \left(-1 \cdot \left(a \cdot t\right) - \color{blue}{-1} \cdot \left(k \cdot y0\right)\right) \]
      4. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(b \cdot z\right) \cdot \left(-1 \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(-1\right)\right) \cdot \color{blue}{\left(k \cdot y0\right)}\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(b \cdot z\right) \cdot \left(\left(-1 \cdot a\right) \cdot t + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(\color{blue}{k} \cdot y0\right)\right) \]
      6. mul-1-negN/A

        \[\leadsto \left(b \cdot z\right) \cdot \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(k \cdot y0\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \left(b \cdot z\right) \cdot \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t + 1 \cdot \left(k \cdot y0\right)\right) \]
      8. *-lft-identityN/A

        \[\leadsto \left(b \cdot z\right) \cdot \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t + k \cdot y0\right) \]
      9. lower-fma.f64N/A

        \[\leadsto \left(b \cdot z\right) \cdot \mathsf{fma}\left(\mathsf{neg}\left(a\right), t, k \cdot y0\right) \]
      10. lower-neg.f64N/A

        \[\leadsto \left(b \cdot z\right) \cdot \mathsf{fma}\left(-a, t, k \cdot y0\right) \]
      11. lower-*.f6427.8

        \[\leadsto \left(b \cdot z\right) \cdot \mathsf{fma}\left(-a, t, k \cdot y0\right) \]
    7. Applied rewrites27.8%

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

    if -3.89999999999999998e-280 < i < 2.6e18

    1. Initial program 33.3%

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

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites39.2%

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

      \[\leadsto \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \cdot x \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \cdot x \]
      4. lower-*.f6427.7

        \[\leadsto \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \cdot x \]
    7. Applied rewrites27.7%

      \[\leadsto \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \cdot x \]

    if 2.6e18 < i < 1.5999999999999999e126

    1. Initial program 28.3%

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites38.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y1 around inf

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      2. lower--.f64N/A

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

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      4. lower-*.f6427.6

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    7. Applied rewrites27.6%

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    8. Taylor expanded in y5 around inf

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

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

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

        \[\leadsto \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a \]
      4. lower-*.f6427.3

        \[\leadsto \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a \]
    10. Applied rewrites27.3%

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

    if 1.5999999999999999e126 < i

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

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites36.4%

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

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

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

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

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

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

      \[\leadsto \left(y \cdot \left(a \cdot b - c \cdot i\right)\right) \cdot x \]
  3. Recombined 7 regimes into one program.
  4. Add Preprocessing

Alternative 10: 33.5% accurate, 3.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y5 \leq -2.2 \cdot 10^{+47}:\\ \;\;\;\;\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\ \mathbf{elif}\;y5 \leq -9.5 \cdot 10^{-101}:\\ \;\;\;\;\left(k \cdot z\right) \cdot \left(b \cdot y0 - i \cdot y1\right)\\ \mathbf{elif}\;y5 \leq -2.4 \cdot 10^{-287}:\\ \;\;\;\;\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c\\ \mathbf{elif}\;y5 \leq 3.5 \cdot 10^{-179}:\\ \;\;\;\;\left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a\\ \mathbf{elif}\;y5 \leq 4.3 \cdot 10^{+104}:\\ \;\;\;\;\left(a \cdot \left(x \cdot y\right) - \left(j \cdot x - k \cdot z\right) \cdot y0\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= y5 -2.2e+47)
   (* (* y5 (- (* t y2) (* y y3))) a)
   (if (<= y5 -9.5e-101)
     (* (* k z) (- (* b y0) (* i y1)))
     (if (<= y5 -2.4e-287)
       (* (* y0 (- (* x y2) (* y3 z))) c)
       (if (<= y5 3.5e-179)
         (* (* y1 (- (* y3 z) (* x y2))) a)
         (if (<= y5 4.3e+104)
           (* (- (* a (* x y)) (* (- (* j x) (* k z)) y0)) b)
           (* (* j (- (* b y4) (* i y5))) 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 (y5 <= -2.2e+47) {
		tmp = (y5 * ((t * y2) - (y * y3))) * a;
	} else if (y5 <= -9.5e-101) {
		tmp = (k * z) * ((b * y0) - (i * y1));
	} else if (y5 <= -2.4e-287) {
		tmp = (y0 * ((x * y2) - (y3 * z))) * c;
	} else if (y5 <= 3.5e-179) {
		tmp = (y1 * ((y3 * z) - (x * y2))) * a;
	} else if (y5 <= 4.3e+104) {
		tmp = ((a * (x * y)) - (((j * x) - (k * z)) * y0)) * b;
	} else {
		tmp = (j * ((b * y4) - (i * y5))) * 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 (y5 <= (-2.2d+47)) then
        tmp = (y5 * ((t * y2) - (y * y3))) * a
    else if (y5 <= (-9.5d-101)) then
        tmp = (k * z) * ((b * y0) - (i * y1))
    else if (y5 <= (-2.4d-287)) then
        tmp = (y0 * ((x * y2) - (y3 * z))) * c
    else if (y5 <= 3.5d-179) then
        tmp = (y1 * ((y3 * z) - (x * y2))) * a
    else if (y5 <= 4.3d+104) then
        tmp = ((a * (x * y)) - (((j * x) - (k * z)) * y0)) * b
    else
        tmp = (j * ((b * y4) - (i * y5))) * 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 (y5 <= -2.2e+47) {
		tmp = (y5 * ((t * y2) - (y * y3))) * a;
	} else if (y5 <= -9.5e-101) {
		tmp = (k * z) * ((b * y0) - (i * y1));
	} else if (y5 <= -2.4e-287) {
		tmp = (y0 * ((x * y2) - (y3 * z))) * c;
	} else if (y5 <= 3.5e-179) {
		tmp = (y1 * ((y3 * z) - (x * y2))) * a;
	} else if (y5 <= 4.3e+104) {
		tmp = ((a * (x * y)) - (((j * x) - (k * z)) * y0)) * b;
	} else {
		tmp = (j * ((b * y4) - (i * y5))) * t;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y5 <= -2.2e+47:
		tmp = (y5 * ((t * y2) - (y * y3))) * a
	elif y5 <= -9.5e-101:
		tmp = (k * z) * ((b * y0) - (i * y1))
	elif y5 <= -2.4e-287:
		tmp = (y0 * ((x * y2) - (y3 * z))) * c
	elif y5 <= 3.5e-179:
		tmp = (y1 * ((y3 * z) - (x * y2))) * a
	elif y5 <= 4.3e+104:
		tmp = ((a * (x * y)) - (((j * x) - (k * z)) * y0)) * b
	else:
		tmp = (j * ((b * y4) - (i * y5))) * 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 (y5 <= -2.2e+47)
		tmp = Float64(Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))) * a);
	elseif (y5 <= -9.5e-101)
		tmp = Float64(Float64(k * z) * Float64(Float64(b * y0) - Float64(i * y1)));
	elseif (y5 <= -2.4e-287)
		tmp = Float64(Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z))) * c);
	elseif (y5 <= 3.5e-179)
		tmp = Float64(Float64(y1 * Float64(Float64(y3 * z) - Float64(x * y2))) * a);
	elseif (y5 <= 4.3e+104)
		tmp = Float64(Float64(Float64(a * Float64(x * y)) - Float64(Float64(Float64(j * x) - Float64(k * z)) * y0)) * b);
	else
		tmp = Float64(Float64(j * Float64(Float64(b * y4) - Float64(i * y5))) * 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 (y5 <= -2.2e+47)
		tmp = (y5 * ((t * y2) - (y * y3))) * a;
	elseif (y5 <= -9.5e-101)
		tmp = (k * z) * ((b * y0) - (i * y1));
	elseif (y5 <= -2.4e-287)
		tmp = (y0 * ((x * y2) - (y3 * z))) * c;
	elseif (y5 <= 3.5e-179)
		tmp = (y1 * ((y3 * z) - (x * y2))) * a;
	elseif (y5 <= 4.3e+104)
		tmp = ((a * (x * y)) - (((j * x) - (k * z)) * y0)) * b;
	else
		tmp = (j * ((b * y4) - (i * y5))) * 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[y5, -2.2e+47], N[(N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y5, -9.5e-101], N[(N[(k * z), $MachinePrecision] * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -2.4e-287], N[(N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y5, 3.5e-179], N[(N[(y1 * N[(N[(y3 * z), $MachinePrecision] - N[(x * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y5, 4.3e+104], N[(N[(N[(a * N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision] * y0), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], N[(N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -2.2 \cdot 10^{+47}:\\
\;\;\;\;\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\

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

\mathbf{elif}\;y5 \leq -2.4 \cdot 10^{-287}:\\
\;\;\;\;\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c\\

\mathbf{elif}\;y5 \leq 3.5 \cdot 10^{-179}:\\
\;\;\;\;\left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a\\

\mathbf{elif}\;y5 \leq 4.3 \cdot 10^{+104}:\\
\;\;\;\;\left(a \cdot \left(x \cdot y\right) - \left(j \cdot x - k \cdot z\right) \cdot y0\right) \cdot b\\

\mathbf{else}:\\
\;\;\;\;\left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t\\


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

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites41.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y1 around inf

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      2. lower--.f64N/A

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

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      4. lower-*.f6425.1

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    7. Applied rewrites25.1%

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    8. Taylor expanded in y5 around inf

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

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

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

        \[\leadsto \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a \]
      4. lower-*.f6441.1

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

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

    if -2.1999999999999999e47 < y5 < -9.49999999999999994e-101

    1. Initial program 33.9%

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

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

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites38.4%

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

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

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

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

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

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

        \[\leadsto \left(k \cdot z\right) \cdot \left(b \cdot y0 - i \cdot y1\right) \]
      6. lower-*.f6424.4

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

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

    if -9.49999999999999994e-101 < y5 < -2.39999999999999999e-287

    1. Initial program 36.0%

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

      \[\leadsto \color{blue}{c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot \color{blue}{c} \]
    4. Applied rewrites39.8%

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-i, y \cdot x - t \cdot z, \left(y2 \cdot x - y3 \cdot z\right) \cdot y0\right) - \left(y2 \cdot t - y3 \cdot y\right) \cdot y4\right) \cdot c} \]
    5. Taylor expanded in y0 around inf

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

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

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

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

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

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

    if -2.39999999999999999e-287 < y5 < 3.50000000000000024e-179

    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. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites37.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y1 around inf

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      2. lower--.f64N/A

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

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      4. lower-*.f6428.4

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    7. Applied rewrites28.4%

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

    if 3.50000000000000024e-179 < y5 < 4.3000000000000002e104

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

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

        \[\leadsto \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) \cdot \color{blue}{b} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{b} \]
    4. Applied rewrites38.7%

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

      \[\leadsto \left(a \cdot \left(x \cdot y\right) - \left(j \cdot x - k \cdot z\right) \cdot y0\right) \cdot b \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

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

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

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

    if 4.3000000000000002e104 < y5

    1. Initial program 20.8%

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

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

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

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

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

      \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
      4. lower-*.f6435.1

        \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
    7. Applied rewrites35.1%

      \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
  3. Recombined 6 regimes into one program.
  4. Add Preprocessing

Alternative 11: 32.0% accurate, 3.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y5 \leq -2.2 \cdot 10^{+47}:\\ \;\;\;\;\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\ \mathbf{elif}\;y5 \leq -9.5 \cdot 10^{-101}:\\ \;\;\;\;\left(k \cdot z\right) \cdot \left(b \cdot y0 - i \cdot y1\right)\\ \mathbf{elif}\;y5 \leq -2.4 \cdot 10^{-287}:\\ \;\;\;\;\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c\\ \mathbf{elif}\;y5 \leq 9.6 \cdot 10^{-179}:\\ \;\;\;\;\left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a\\ \mathbf{elif}\;y5 \leq 1.02 \cdot 10^{-62}:\\ \;\;\;\;\left(b \cdot \left(a \cdot y - j \cdot y0\right)\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= y5 -2.2e+47)
   (* (* y5 (- (* t y2) (* y y3))) a)
   (if (<= y5 -9.5e-101)
     (* (* k z) (- (* b y0) (* i y1)))
     (if (<= y5 -2.4e-287)
       (* (* y0 (- (* x y2) (* y3 z))) c)
       (if (<= y5 9.6e-179)
         (* (* y1 (- (* y3 z) (* x y2))) a)
         (if (<= y5 1.02e-62)
           (* (* b (- (* a y) (* j y0))) x)
           (* (* j (- (* b y4) (* i y5))) 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 (y5 <= -2.2e+47) {
		tmp = (y5 * ((t * y2) - (y * y3))) * a;
	} else if (y5 <= -9.5e-101) {
		tmp = (k * z) * ((b * y0) - (i * y1));
	} else if (y5 <= -2.4e-287) {
		tmp = (y0 * ((x * y2) - (y3 * z))) * c;
	} else if (y5 <= 9.6e-179) {
		tmp = (y1 * ((y3 * z) - (x * y2))) * a;
	} else if (y5 <= 1.02e-62) {
		tmp = (b * ((a * y) - (j * y0))) * x;
	} else {
		tmp = (j * ((b * y4) - (i * y5))) * 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 (y5 <= (-2.2d+47)) then
        tmp = (y5 * ((t * y2) - (y * y3))) * a
    else if (y5 <= (-9.5d-101)) then
        tmp = (k * z) * ((b * y0) - (i * y1))
    else if (y5 <= (-2.4d-287)) then
        tmp = (y0 * ((x * y2) - (y3 * z))) * c
    else if (y5 <= 9.6d-179) then
        tmp = (y1 * ((y3 * z) - (x * y2))) * a
    else if (y5 <= 1.02d-62) then
        tmp = (b * ((a * y) - (j * y0))) * x
    else
        tmp = (j * ((b * y4) - (i * y5))) * 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 (y5 <= -2.2e+47) {
		tmp = (y5 * ((t * y2) - (y * y3))) * a;
	} else if (y5 <= -9.5e-101) {
		tmp = (k * z) * ((b * y0) - (i * y1));
	} else if (y5 <= -2.4e-287) {
		tmp = (y0 * ((x * y2) - (y3 * z))) * c;
	} else if (y5 <= 9.6e-179) {
		tmp = (y1 * ((y3 * z) - (x * y2))) * a;
	} else if (y5 <= 1.02e-62) {
		tmp = (b * ((a * y) - (j * y0))) * x;
	} else {
		tmp = (j * ((b * y4) - (i * y5))) * t;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y5 <= -2.2e+47:
		tmp = (y5 * ((t * y2) - (y * y3))) * a
	elif y5 <= -9.5e-101:
		tmp = (k * z) * ((b * y0) - (i * y1))
	elif y5 <= -2.4e-287:
		tmp = (y0 * ((x * y2) - (y3 * z))) * c
	elif y5 <= 9.6e-179:
		tmp = (y1 * ((y3 * z) - (x * y2))) * a
	elif y5 <= 1.02e-62:
		tmp = (b * ((a * y) - (j * y0))) * x
	else:
		tmp = (j * ((b * y4) - (i * y5))) * 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 (y5 <= -2.2e+47)
		tmp = Float64(Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))) * a);
	elseif (y5 <= -9.5e-101)
		tmp = Float64(Float64(k * z) * Float64(Float64(b * y0) - Float64(i * y1)));
	elseif (y5 <= -2.4e-287)
		tmp = Float64(Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z))) * c);
	elseif (y5 <= 9.6e-179)
		tmp = Float64(Float64(y1 * Float64(Float64(y3 * z) - Float64(x * y2))) * a);
	elseif (y5 <= 1.02e-62)
		tmp = Float64(Float64(b * Float64(Float64(a * y) - Float64(j * y0))) * x);
	else
		tmp = Float64(Float64(j * Float64(Float64(b * y4) - Float64(i * y5))) * 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 (y5 <= -2.2e+47)
		tmp = (y5 * ((t * y2) - (y * y3))) * a;
	elseif (y5 <= -9.5e-101)
		tmp = (k * z) * ((b * y0) - (i * y1));
	elseif (y5 <= -2.4e-287)
		tmp = (y0 * ((x * y2) - (y3 * z))) * c;
	elseif (y5 <= 9.6e-179)
		tmp = (y1 * ((y3 * z) - (x * y2))) * a;
	elseif (y5 <= 1.02e-62)
		tmp = (b * ((a * y) - (j * y0))) * x;
	else
		tmp = (j * ((b * y4) - (i * y5))) * 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[y5, -2.2e+47], N[(N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y5, -9.5e-101], N[(N[(k * z), $MachinePrecision] * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -2.4e-287], N[(N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y5, 9.6e-179], N[(N[(y1 * N[(N[(y3 * z), $MachinePrecision] - N[(x * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y5, 1.02e-62], N[(N[(b * N[(N[(a * y), $MachinePrecision] - N[(j * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], N[(N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -2.2 \cdot 10^{+47}:\\
\;\;\;\;\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\

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

\mathbf{elif}\;y5 \leq -2.4 \cdot 10^{-287}:\\
\;\;\;\;\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c\\

\mathbf{elif}\;y5 \leq 9.6 \cdot 10^{-179}:\\
\;\;\;\;\left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a\\

\mathbf{elif}\;y5 \leq 1.02 \cdot 10^{-62}:\\
\;\;\;\;\left(b \cdot \left(a \cdot y - j \cdot y0\right)\right) \cdot x\\

\mathbf{else}:\\
\;\;\;\;\left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t\\


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

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites41.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y1 around inf

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      2. lower--.f64N/A

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

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      4. lower-*.f6425.1

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    7. Applied rewrites25.1%

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    8. Taylor expanded in y5 around inf

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

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

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

        \[\leadsto \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a \]
      4. lower-*.f6441.1

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

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

    if -2.1999999999999999e47 < y5 < -9.49999999999999994e-101

    1. Initial program 33.9%

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

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

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites38.4%

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

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

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

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

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

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

        \[\leadsto \left(k \cdot z\right) \cdot \left(b \cdot y0 - i \cdot y1\right) \]
      6. lower-*.f6424.4

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

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

    if -9.49999999999999994e-101 < y5 < -2.39999999999999999e-287

    1. Initial program 36.0%

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

      \[\leadsto \color{blue}{c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot \color{blue}{c} \]
    4. Applied rewrites39.8%

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-i, y \cdot x - t \cdot z, \left(y2 \cdot x - y3 \cdot z\right) \cdot y0\right) - \left(y2 \cdot t - y3 \cdot y\right) \cdot y4\right) \cdot c} \]
    5. Taylor expanded in y0 around inf

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

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

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

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

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

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

    if -2.39999999999999999e-287 < y5 < 9.6000000000000002e-179

    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. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites36.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y1 around inf

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      2. lower--.f64N/A

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

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      4. lower-*.f6428.5

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    7. Applied rewrites28.5%

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

    if 9.6000000000000002e-179 < y5 < 1.02000000000000005e-62

    1. Initial program 34.5%

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

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites40.3%

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

      \[\leadsto \left(b \cdot \left(a \cdot y - j \cdot y0\right)\right) \cdot x \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(b \cdot \left(a \cdot y - j \cdot y0\right)\right) \cdot x \]
      2. lower--.f64N/A

        \[\leadsto \left(b \cdot \left(a \cdot y - j \cdot y0\right)\right) \cdot x \]
      3. lower-*.f64N/A

        \[\leadsto \left(b \cdot \left(a \cdot y - j \cdot y0\right)\right) \cdot x \]
      4. lower-*.f6429.6

        \[\leadsto \left(b \cdot \left(a \cdot y - j \cdot y0\right)\right) \cdot x \]
    7. Applied rewrites29.6%

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

    if 1.02000000000000005e-62 < y5

    1. Initial program 25.7%

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

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

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

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

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

      \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
      4. lower-*.f6432.3

        \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
    7. Applied rewrites32.3%

      \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
  3. Recombined 6 regimes into one program.
  4. Add Preprocessing

Alternative 12: 32.0% accurate, 3.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -7.5 \cdot 10^{+74}:\\
\;\;\;\;\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\

\mathbf{elif}\;y5 \leq 8.5 \cdot 10^{+77}:\\
\;\;\;\;\mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c\\

\mathbf{else}:\\
\;\;\;\;\left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y5 < -7.5e74

    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. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites41.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y1 around inf

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      2. lower--.f64N/A

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

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      4. lower-*.f6424.7

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    7. Applied rewrites24.7%

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    8. Taylor expanded in y5 around inf

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

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

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

        \[\leadsto \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a \]
      4. lower-*.f6442.6

        \[\leadsto \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a \]
    10. Applied rewrites42.6%

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

    if -7.5e74 < y5 < 8.50000000000000018e77

    1. Initial program 33.9%

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

      \[\leadsto \color{blue}{c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot \color{blue}{c} \]
    4. Applied rewrites39.1%

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-i, y \cdot x - t \cdot z, \left(y2 \cdot x - y3 \cdot z\right) \cdot y0\right) - \left(y2 \cdot t - y3 \cdot y\right) \cdot y4\right) \cdot c} \]
    5. Taylor expanded in y4 around 0

      \[\leadsto \left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot \left(x \cdot y - t \cdot z\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      2. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot \left(x \cdot y - t \cdot z\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      3. lift-neg.f64N/A

        \[\leadsto \left(\left(-i\right) \cdot \left(x \cdot y - t \cdot z\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      5. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      6. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      7. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      9. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      10. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]
      11. lift-*.f6436.7

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

      \[\leadsto \mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c \]

    if 8.50000000000000018e77 < y5

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

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

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

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

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

      \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
      4. lower-*.f6434.5

        \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
    7. Applied rewrites34.5%

      \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 13: 31.7% accurate, 4.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y1 \cdot \mathsf{fma}\left(-a, y2, i \cdot j\right)\right) \cdot x\\ \mathbf{if}\;y1 \leq -1.25 \cdot 10^{+34}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y1 \leq 2.7 \cdot 10^{-281}:\\ \;\;\;\;\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\ \mathbf{elif}\;y1 \leq 2.05 \cdot 10^{+49}:\\ \;\;\;\;\left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t\\ \mathbf{elif}\;y1 \leq 3.2 \cdot 10^{+167}:\\ \;\;\;\;\left(y3 \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right)\right) \cdot a\\ \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 (* (* y1 (fma (- a) y2 (* i j))) x)))
   (if (<= y1 -1.25e+34)
     t_1
     (if (<= y1 2.7e-281)
       (* (* y5 (- (* t y2) (* y y3))) a)
       (if (<= y1 2.05e+49)
         (* (* j (- (* b y4) (* i y5))) t)
         (if (<= y1 3.2e+167) (* (* y3 (fma (- y) y5 (* y1 z))) a) 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 = (y1 * fma(-a, y2, (i * j))) * x;
	double tmp;
	if (y1 <= -1.25e+34) {
		tmp = t_1;
	} else if (y1 <= 2.7e-281) {
		tmp = (y5 * ((t * y2) - (y * y3))) * a;
	} else if (y1 <= 2.05e+49) {
		tmp = (j * ((b * y4) - (i * y5))) * t;
	} else if (y1 <= 3.2e+167) {
		tmp = (y3 * fma(-y, y5, (y1 * z))) * a;
	} 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(Float64(y1 * fma(Float64(-a), y2, Float64(i * j))) * x)
	tmp = 0.0
	if (y1 <= -1.25e+34)
		tmp = t_1;
	elseif (y1 <= 2.7e-281)
		tmp = Float64(Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))) * a);
	elseif (y1 <= 2.05e+49)
		tmp = Float64(Float64(j * Float64(Float64(b * y4) - Float64(i * y5))) * t);
	elseif (y1 <= 3.2e+167)
		tmp = Float64(Float64(y3 * fma(Float64(-y), y5, Float64(y1 * z))) * a);
	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[(N[(y1 * N[((-a) * y2 + N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[y1, -1.25e+34], t$95$1, If[LessEqual[y1, 2.7e-281], N[(N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y1, 2.05e+49], N[(N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y1, 3.2e+167], N[(N[(y3 * N[((-y) * y5 + N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y1 \cdot \mathsf{fma}\left(-a, y2, i \cdot j\right)\right) \cdot x\\
\mathbf{if}\;y1 \leq -1.25 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y1 \leq 2.7 \cdot 10^{-281}:\\
\;\;\;\;\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\

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

\mathbf{elif}\;y1 \leq 3.2 \cdot 10^{+167}:\\
\;\;\;\;\left(y3 \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right)\right) \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y1 < -1.25e34 or 3.19999999999999981e167 < y1

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

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites38.9%

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

      \[\leadsto \left(y1 \cdot \left(-1 \cdot \left(a \cdot y2\right) - -1 \cdot \left(i \cdot j\right)\right)\right) \cdot x \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(-1 \cdot \left(a \cdot y2\right) - -1 \cdot \left(i \cdot j\right)\right)\right) \cdot x \]
      2. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(y1 \cdot \left(-1 \cdot \left(a \cdot y2\right) + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(i \cdot j\right)\right)\right) \cdot x \]
      3. mul-1-negN/A

        \[\leadsto \left(y1 \cdot \left(\left(\mathsf{neg}\left(a \cdot y2\right)\right) + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(i \cdot j\right)\right)\right) \cdot x \]
      4. distribute-lft-neg-outN/A

        \[\leadsto \left(y1 \cdot \left(\left(\mathsf{neg}\left(a\right)\right) \cdot y2 + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(i \cdot j\right)\right)\right) \cdot x \]
      5. metadata-evalN/A

        \[\leadsto \left(y1 \cdot \left(\left(\mathsf{neg}\left(a\right)\right) \cdot y2 + 1 \cdot \left(i \cdot j\right)\right)\right) \cdot x \]
      6. *-lft-identityN/A

        \[\leadsto \left(y1 \cdot \left(\left(\mathsf{neg}\left(a\right)\right) \cdot y2 + i \cdot j\right)\right) \cdot x \]
      7. lower-fma.f64N/A

        \[\leadsto \left(y1 \cdot \mathsf{fma}\left(\mathsf{neg}\left(a\right), y2, i \cdot j\right)\right) \cdot x \]
      8. lower-neg.f64N/A

        \[\leadsto \left(y1 \cdot \mathsf{fma}\left(-a, y2, i \cdot j\right)\right) \cdot x \]
      9. lower-*.f6442.9

        \[\leadsto \left(y1 \cdot \mathsf{fma}\left(-a, y2, i \cdot j\right)\right) \cdot x \]
    7. Applied rewrites42.9%

      \[\leadsto \left(y1 \cdot \mathsf{fma}\left(-a, y2, i \cdot j\right)\right) \cdot x \]

    if -1.25e34 < y1 < 2.6999999999999999e-281

    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. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites36.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y1 around inf

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      2. lower--.f64N/A

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

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      4. lower-*.f6415.4

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    7. Applied rewrites15.4%

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    8. Taylor expanded in y5 around inf

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

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

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

        \[\leadsto \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a \]
      4. lower-*.f6427.5

        \[\leadsto \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a \]
    10. Applied rewrites27.5%

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

    if 2.6999999999999999e-281 < y1 < 2.05e49

    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. Taylor expanded in t around inf

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

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

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

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

      \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
      4. lower-*.f6428.5

        \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
    7. Applied rewrites28.5%

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

    if 2.05e49 < y1 < 3.19999999999999981e167

    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. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites40.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y3 around inf

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

        \[\leadsto \left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right) + y1 \cdot z\right)\right) \cdot a \]
      2. mul-1-negN/A

        \[\leadsto \left(y3 \cdot \left(\left(\mathsf{neg}\left(y \cdot y5\right)\right) + y1 \cdot z\right)\right) \cdot a \]
      3. distribute-lft-neg-outN/A

        \[\leadsto \left(y3 \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot y5 + y1 \cdot z\right)\right) \cdot a \]
      4. lower-fma.f64N/A

        \[\leadsto \left(y3 \cdot \mathsf{fma}\left(\mathsf{neg}\left(y\right), y5, y1 \cdot z\right)\right) \cdot a \]
      5. lower-neg.f64N/A

        \[\leadsto \left(y3 \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right)\right) \cdot a \]
      6. lower-*.f6433.3

        \[\leadsto \left(y3 \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right)\right) \cdot a \]
    7. Applied rewrites33.3%

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

Alternative 14: 31.5% accurate, 4.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y5 \leq -2.2 \cdot 10^{+47}:\\ \;\;\;\;\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\ \mathbf{elif}\;y5 \leq -9.5 \cdot 10^{-101}:\\ \;\;\;\;\left(k \cdot z\right) \cdot \left(b \cdot y0 - i \cdot y1\right)\\ \mathbf{elif}\;y5 \leq -2.4 \cdot 10^{-287}:\\ \;\;\;\;\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c\\ \mathbf{elif}\;y5 \leq 7.8 \cdot 10^{-169}:\\ \;\;\;\;\left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= y5 -2.2e+47)
   (* (* y5 (- (* t y2) (* y y3))) a)
   (if (<= y5 -9.5e-101)
     (* (* k z) (- (* b y0) (* i y1)))
     (if (<= y5 -2.4e-287)
       (* (* y0 (- (* x y2) (* y3 z))) c)
       (if (<= y5 7.8e-169)
         (* (* y1 (- (* y3 z) (* x y2))) a)
         (* (* j (- (* b y4) (* i y5))) 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 (y5 <= -2.2e+47) {
		tmp = (y5 * ((t * y2) - (y * y3))) * a;
	} else if (y5 <= -9.5e-101) {
		tmp = (k * z) * ((b * y0) - (i * y1));
	} else if (y5 <= -2.4e-287) {
		tmp = (y0 * ((x * y2) - (y3 * z))) * c;
	} else if (y5 <= 7.8e-169) {
		tmp = (y1 * ((y3 * z) - (x * y2))) * a;
	} else {
		tmp = (j * ((b * y4) - (i * y5))) * 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 (y5 <= (-2.2d+47)) then
        tmp = (y5 * ((t * y2) - (y * y3))) * a
    else if (y5 <= (-9.5d-101)) then
        tmp = (k * z) * ((b * y0) - (i * y1))
    else if (y5 <= (-2.4d-287)) then
        tmp = (y0 * ((x * y2) - (y3 * z))) * c
    else if (y5 <= 7.8d-169) then
        tmp = (y1 * ((y3 * z) - (x * y2))) * a
    else
        tmp = (j * ((b * y4) - (i * y5))) * 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 (y5 <= -2.2e+47) {
		tmp = (y5 * ((t * y2) - (y * y3))) * a;
	} else if (y5 <= -9.5e-101) {
		tmp = (k * z) * ((b * y0) - (i * y1));
	} else if (y5 <= -2.4e-287) {
		tmp = (y0 * ((x * y2) - (y3 * z))) * c;
	} else if (y5 <= 7.8e-169) {
		tmp = (y1 * ((y3 * z) - (x * y2))) * a;
	} else {
		tmp = (j * ((b * y4) - (i * y5))) * t;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y5 <= -2.2e+47:
		tmp = (y5 * ((t * y2) - (y * y3))) * a
	elif y5 <= -9.5e-101:
		tmp = (k * z) * ((b * y0) - (i * y1))
	elif y5 <= -2.4e-287:
		tmp = (y0 * ((x * y2) - (y3 * z))) * c
	elif y5 <= 7.8e-169:
		tmp = (y1 * ((y3 * z) - (x * y2))) * a
	else:
		tmp = (j * ((b * y4) - (i * y5))) * 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 (y5 <= -2.2e+47)
		tmp = Float64(Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))) * a);
	elseif (y5 <= -9.5e-101)
		tmp = Float64(Float64(k * z) * Float64(Float64(b * y0) - Float64(i * y1)));
	elseif (y5 <= -2.4e-287)
		tmp = Float64(Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z))) * c);
	elseif (y5 <= 7.8e-169)
		tmp = Float64(Float64(y1 * Float64(Float64(y3 * z) - Float64(x * y2))) * a);
	else
		tmp = Float64(Float64(j * Float64(Float64(b * y4) - Float64(i * y5))) * 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 (y5 <= -2.2e+47)
		tmp = (y5 * ((t * y2) - (y * y3))) * a;
	elseif (y5 <= -9.5e-101)
		tmp = (k * z) * ((b * y0) - (i * y1));
	elseif (y5 <= -2.4e-287)
		tmp = (y0 * ((x * y2) - (y3 * z))) * c;
	elseif (y5 <= 7.8e-169)
		tmp = (y1 * ((y3 * z) - (x * y2))) * a;
	else
		tmp = (j * ((b * y4) - (i * y5))) * 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[y5, -2.2e+47], N[(N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y5, -9.5e-101], N[(N[(k * z), $MachinePrecision] * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -2.4e-287], N[(N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y5, 7.8e-169], N[(N[(y1 * N[(N[(y3 * z), $MachinePrecision] - N[(x * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], N[(N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -2.2 \cdot 10^{+47}:\\
\;\;\;\;\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\

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

\mathbf{elif}\;y5 \leq -2.4 \cdot 10^{-287}:\\
\;\;\;\;\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c\\

\mathbf{elif}\;y5 \leq 7.8 \cdot 10^{-169}:\\
\;\;\;\;\left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a\\

\mathbf{else}:\\
\;\;\;\;\left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y5 < -2.1999999999999999e47

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites41.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y1 around inf

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      2. lower--.f64N/A

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

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      4. lower-*.f6425.1

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    7. Applied rewrites25.1%

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    8. Taylor expanded in y5 around inf

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

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

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

        \[\leadsto \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a \]
      4. lower-*.f6441.1

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

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

    if -2.1999999999999999e47 < y5 < -9.49999999999999994e-101

    1. Initial program 33.9%

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

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

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites38.4%

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

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

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

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

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

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

        \[\leadsto \left(k \cdot z\right) \cdot \left(b \cdot y0 - i \cdot y1\right) \]
      6. lower-*.f6424.4

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

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

    if -9.49999999999999994e-101 < y5 < -2.39999999999999999e-287

    1. Initial program 36.0%

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

      \[\leadsto \color{blue}{c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot \color{blue}{c} \]
    4. Applied rewrites39.8%

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-i, y \cdot x - t \cdot z, \left(y2 \cdot x - y3 \cdot z\right) \cdot y0\right) - \left(y2 \cdot t - y3 \cdot y\right) \cdot y4\right) \cdot c} \]
    5. Taylor expanded in y0 around inf

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

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

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

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

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

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

    if -2.39999999999999999e-287 < y5 < 7.79999999999999954e-169

    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. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites36.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y1 around inf

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      2. lower--.f64N/A

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

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      4. lower-*.f6427.6

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    7. Applied rewrites27.6%

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

    if 7.79999999999999954e-169 < y5

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

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

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

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

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

      \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

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

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

        \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
      4. lower-*.f6429.7

        \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
    7. Applied rewrites29.7%

      \[\leadsto \left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 15: 30.7% accurate, 4.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\ \mathbf{if}\;y5 \leq -2.2 \cdot 10^{+47}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y5 \leq -9.5 \cdot 10^{-101}:\\ \;\;\;\;\left(k \cdot z\right) \cdot \left(b \cdot y0 - i \cdot y1\right)\\ \mathbf{elif}\;y5 \leq -2.4 \cdot 10^{-287}:\\ \;\;\;\;\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c\\ \mathbf{elif}\;y5 \leq 2.1 \cdot 10^{+108}:\\ \;\;\;\;\left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a\\ \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 (* (* y5 (- (* t y2) (* y y3))) a)))
   (if (<= y5 -2.2e+47)
     t_1
     (if (<= y5 -9.5e-101)
       (* (* k z) (- (* b y0) (* i y1)))
       (if (<= y5 -2.4e-287)
         (* (* y0 (- (* x y2) (* y3 z))) c)
         (if (<= y5 2.1e+108) (* (* y1 (- (* y3 z) (* x y2))) a) 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 = (y5 * ((t * y2) - (y * y3))) * a;
	double tmp;
	if (y5 <= -2.2e+47) {
		tmp = t_1;
	} else if (y5 <= -9.5e-101) {
		tmp = (k * z) * ((b * y0) - (i * y1));
	} else if (y5 <= -2.4e-287) {
		tmp = (y0 * ((x * y2) - (y3 * z))) * c;
	} else if (y5 <= 2.1e+108) {
		tmp = (y1 * ((y3 * z) - (x * y2))) * a;
	} 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 = (y5 * ((t * y2) - (y * y3))) * a
    if (y5 <= (-2.2d+47)) then
        tmp = t_1
    else if (y5 <= (-9.5d-101)) then
        tmp = (k * z) * ((b * y0) - (i * y1))
    else if (y5 <= (-2.4d-287)) then
        tmp = (y0 * ((x * y2) - (y3 * z))) * c
    else if (y5 <= 2.1d+108) then
        tmp = (y1 * ((y3 * z) - (x * y2))) * a
    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 = (y5 * ((t * y2) - (y * y3))) * a;
	double tmp;
	if (y5 <= -2.2e+47) {
		tmp = t_1;
	} else if (y5 <= -9.5e-101) {
		tmp = (k * z) * ((b * y0) - (i * y1));
	} else if (y5 <= -2.4e-287) {
		tmp = (y0 * ((x * y2) - (y3 * z))) * c;
	} else if (y5 <= 2.1e+108) {
		tmp = (y1 * ((y3 * z) - (x * y2))) * a;
	} 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 = (y5 * ((t * y2) - (y * y3))) * a
	tmp = 0
	if y5 <= -2.2e+47:
		tmp = t_1
	elif y5 <= -9.5e-101:
		tmp = (k * z) * ((b * y0) - (i * y1))
	elif y5 <= -2.4e-287:
		tmp = (y0 * ((x * y2) - (y3 * z))) * c
	elif y5 <= 2.1e+108:
		tmp = (y1 * ((y3 * z) - (x * y2))) * a
	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(Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))) * a)
	tmp = 0.0
	if (y5 <= -2.2e+47)
		tmp = t_1;
	elseif (y5 <= -9.5e-101)
		tmp = Float64(Float64(k * z) * Float64(Float64(b * y0) - Float64(i * y1)));
	elseif (y5 <= -2.4e-287)
		tmp = Float64(Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z))) * c);
	elseif (y5 <= 2.1e+108)
		tmp = Float64(Float64(y1 * Float64(Float64(y3 * z) - Float64(x * y2))) * a);
	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 = (y5 * ((t * y2) - (y * y3))) * a;
	tmp = 0.0;
	if (y5 <= -2.2e+47)
		tmp = t_1;
	elseif (y5 <= -9.5e-101)
		tmp = (k * z) * ((b * y0) - (i * y1));
	elseif (y5 <= -2.4e-287)
		tmp = (y0 * ((x * y2) - (y3 * z))) * c;
	elseif (y5 <= 2.1e+108)
		tmp = (y1 * ((y3 * z) - (x * y2))) * a;
	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[(N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[y5, -2.2e+47], t$95$1, If[LessEqual[y5, -9.5e-101], N[(N[(k * z), $MachinePrecision] * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -2.4e-287], N[(N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y5, 2.1e+108], N[(N[(y1 * N[(N[(y3 * z), $MachinePrecision] - N[(x * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y5 \leq -2.4 \cdot 10^{-287}:\\
\;\;\;\;\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c\\

\mathbf{elif}\;y5 \leq 2.1 \cdot 10^{+108}:\\
\;\;\;\;\left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y5 < -2.1999999999999999e47 or 2.1000000000000001e108 < y5

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites41.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y1 around inf

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      2. lower--.f64N/A

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

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      4. lower-*.f6425.0

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    7. Applied rewrites25.0%

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    8. Taylor expanded in y5 around inf

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

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

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

        \[\leadsto \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a \]
      4. lower-*.f6441.5

        \[\leadsto \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a \]
    10. Applied rewrites41.5%

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

    if -2.1999999999999999e47 < y5 < -9.49999999999999994e-101

    1. Initial program 33.9%

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

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

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites38.4%

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

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

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

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

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

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

        \[\leadsto \left(k \cdot z\right) \cdot \left(b \cdot y0 - i \cdot y1\right) \]
      6. lower-*.f6424.4

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

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

    if -9.49999999999999994e-101 < y5 < -2.39999999999999999e-287

    1. Initial program 36.0%

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

      \[\leadsto \color{blue}{c \cdot \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(i \cdot \left(x \cdot y - t \cdot z\right)\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot \color{blue}{c} \]
    4. Applied rewrites39.8%

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-i, y \cdot x - t \cdot z, \left(y2 \cdot x - y3 \cdot z\right) \cdot y0\right) - \left(y2 \cdot t - y3 \cdot y\right) \cdot y4\right) \cdot c} \]
    5. Taylor expanded in y0 around inf

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

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

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

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

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

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

    if -2.39999999999999999e-287 < y5 < 2.1000000000000001e108

    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. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites37.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y1 around inf

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      2. lower--.f64N/A

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

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      4. lower-*.f6427.2

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    7. Applied rewrites27.2%

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 16: 30.6% accurate, 4.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\ \mathbf{if}\;y5 \leq -2.2 \cdot 10^{+47}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y5 \leq -4.9 \cdot 10^{-101}:\\ \;\;\;\;\left(k \cdot z\right) \cdot \left(b \cdot y0 - i \cdot y1\right)\\ \mathbf{elif}\;y5 \leq -2.3 \cdot 10^{-287}:\\ \;\;\;\;\left(x \cdot y0\right) \cdot \left(c \cdot y2 - b \cdot j\right)\\ \mathbf{elif}\;y5 \leq 2.1 \cdot 10^{+108}:\\ \;\;\;\;\left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a\\ \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 (* (* y5 (- (* t y2) (* y y3))) a)))
   (if (<= y5 -2.2e+47)
     t_1
     (if (<= y5 -4.9e-101)
       (* (* k z) (- (* b y0) (* i y1)))
       (if (<= y5 -2.3e-287)
         (* (* x y0) (- (* c y2) (* b j)))
         (if (<= y5 2.1e+108) (* (* y1 (- (* y3 z) (* x y2))) a) 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 = (y5 * ((t * y2) - (y * y3))) * a;
	double tmp;
	if (y5 <= -2.2e+47) {
		tmp = t_1;
	} else if (y5 <= -4.9e-101) {
		tmp = (k * z) * ((b * y0) - (i * y1));
	} else if (y5 <= -2.3e-287) {
		tmp = (x * y0) * ((c * y2) - (b * j));
	} else if (y5 <= 2.1e+108) {
		tmp = (y1 * ((y3 * z) - (x * y2))) * a;
	} 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 = (y5 * ((t * y2) - (y * y3))) * a
    if (y5 <= (-2.2d+47)) then
        tmp = t_1
    else if (y5 <= (-4.9d-101)) then
        tmp = (k * z) * ((b * y0) - (i * y1))
    else if (y5 <= (-2.3d-287)) then
        tmp = (x * y0) * ((c * y2) - (b * j))
    else if (y5 <= 2.1d+108) then
        tmp = (y1 * ((y3 * z) - (x * y2))) * a
    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 = (y5 * ((t * y2) - (y * y3))) * a;
	double tmp;
	if (y5 <= -2.2e+47) {
		tmp = t_1;
	} else if (y5 <= -4.9e-101) {
		tmp = (k * z) * ((b * y0) - (i * y1));
	} else if (y5 <= -2.3e-287) {
		tmp = (x * y0) * ((c * y2) - (b * j));
	} else if (y5 <= 2.1e+108) {
		tmp = (y1 * ((y3 * z) - (x * y2))) * a;
	} 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 = (y5 * ((t * y2) - (y * y3))) * a
	tmp = 0
	if y5 <= -2.2e+47:
		tmp = t_1
	elif y5 <= -4.9e-101:
		tmp = (k * z) * ((b * y0) - (i * y1))
	elif y5 <= -2.3e-287:
		tmp = (x * y0) * ((c * y2) - (b * j))
	elif y5 <= 2.1e+108:
		tmp = (y1 * ((y3 * z) - (x * y2))) * a
	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(Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))) * a)
	tmp = 0.0
	if (y5 <= -2.2e+47)
		tmp = t_1;
	elseif (y5 <= -4.9e-101)
		tmp = Float64(Float64(k * z) * Float64(Float64(b * y0) - Float64(i * y1)));
	elseif (y5 <= -2.3e-287)
		tmp = Float64(Float64(x * y0) * Float64(Float64(c * y2) - Float64(b * j)));
	elseif (y5 <= 2.1e+108)
		tmp = Float64(Float64(y1 * Float64(Float64(y3 * z) - Float64(x * y2))) * a);
	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 = (y5 * ((t * y2) - (y * y3))) * a;
	tmp = 0.0;
	if (y5 <= -2.2e+47)
		tmp = t_1;
	elseif (y5 <= -4.9e-101)
		tmp = (k * z) * ((b * y0) - (i * y1));
	elseif (y5 <= -2.3e-287)
		tmp = (x * y0) * ((c * y2) - (b * j));
	elseif (y5 <= 2.1e+108)
		tmp = (y1 * ((y3 * z) - (x * y2))) * a;
	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[(N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[y5, -2.2e+47], t$95$1, If[LessEqual[y5, -4.9e-101], N[(N[(k * z), $MachinePrecision] * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -2.3e-287], N[(N[(x * y0), $MachinePrecision] * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 2.1e+108], N[(N[(y1 * N[(N[(y3 * z), $MachinePrecision] - N[(x * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y5 \leq -2.3 \cdot 10^{-287}:\\
\;\;\;\;\left(x \cdot y0\right) \cdot \left(c \cdot y2 - b \cdot j\right)\\

\mathbf{elif}\;y5 \leq 2.1 \cdot 10^{+108}:\\
\;\;\;\;\left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y5 < -2.1999999999999999e47 or 2.1000000000000001e108 < y5

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites41.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y1 around inf

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      2. lower--.f64N/A

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

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      4. lower-*.f6425.0

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    7. Applied rewrites25.0%

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    8. Taylor expanded in y5 around inf

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

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

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

        \[\leadsto \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a \]
      4. lower-*.f6441.5

        \[\leadsto \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a \]
    10. Applied rewrites41.5%

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

    if -2.1999999999999999e47 < y5 < -4.9e-101

    1. Initial program 34.0%

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

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

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites38.3%

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

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

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

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

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

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

        \[\leadsto \left(k \cdot z\right) \cdot \left(b \cdot y0 - i \cdot y1\right) \]
      6. lower-*.f6424.4

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

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

    if -4.9e-101 < y5 < -2.29999999999999986e-287

    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. Taylor expanded in x around inf

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites40.6%

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

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

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

        \[\leadsto \left(x \cdot y0\right) \cdot \left(c \cdot y2 - b \cdot j\right) \]
      6. lower-*.f6424.5

        \[\leadsto \left(x \cdot y0\right) \cdot \left(c \cdot y2 - b \cdot j\right) \]
    7. Applied rewrites24.5%

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

    if -2.29999999999999986e-287 < y5 < 2.1000000000000001e108

    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. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites37.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y1 around inf

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      2. lower--.f64N/A

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

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      4. lower-*.f6427.2

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    7. Applied rewrites27.2%

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 17: 30.3% accurate, 4.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a \cdot y5\right) \cdot \left(t \cdot y2 - y \cdot y3\right)\\ \mathbf{if}\;y5 \leq -2.2 \cdot 10^{+47}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y5 \leq -4.9 \cdot 10^{-101}:\\ \;\;\;\;\left(k \cdot z\right) \cdot \left(b \cdot y0 - i \cdot y1\right)\\ \mathbf{elif}\;y5 \leq -2.3 \cdot 10^{-287}:\\ \;\;\;\;\left(x \cdot y0\right) \cdot \left(c \cdot y2 - b \cdot j\right)\\ \mathbf{elif}\;y5 \leq 2.1 \cdot 10^{+108}:\\ \;\;\;\;\left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a\\ \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 y5) (- (* t y2) (* y y3)))))
   (if (<= y5 -2.2e+47)
     t_1
     (if (<= y5 -4.9e-101)
       (* (* k z) (- (* b y0) (* i y1)))
       (if (<= y5 -2.3e-287)
         (* (* x y0) (- (* c y2) (* b j)))
         (if (<= y5 2.1e+108) (* (* y1 (- (* y3 z) (* x y2))) a) 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 * y5) * ((t * y2) - (y * y3));
	double tmp;
	if (y5 <= -2.2e+47) {
		tmp = t_1;
	} else if (y5 <= -4.9e-101) {
		tmp = (k * z) * ((b * y0) - (i * y1));
	} else if (y5 <= -2.3e-287) {
		tmp = (x * y0) * ((c * y2) - (b * j));
	} else if (y5 <= 2.1e+108) {
		tmp = (y1 * ((y3 * z) - (x * y2))) * a;
	} 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 * y5) * ((t * y2) - (y * y3))
    if (y5 <= (-2.2d+47)) then
        tmp = t_1
    else if (y5 <= (-4.9d-101)) then
        tmp = (k * z) * ((b * y0) - (i * y1))
    else if (y5 <= (-2.3d-287)) then
        tmp = (x * y0) * ((c * y2) - (b * j))
    else if (y5 <= 2.1d+108) then
        tmp = (y1 * ((y3 * z) - (x * y2))) * a
    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 * y5) * ((t * y2) - (y * y3));
	double tmp;
	if (y5 <= -2.2e+47) {
		tmp = t_1;
	} else if (y5 <= -4.9e-101) {
		tmp = (k * z) * ((b * y0) - (i * y1));
	} else if (y5 <= -2.3e-287) {
		tmp = (x * y0) * ((c * y2) - (b * j));
	} else if (y5 <= 2.1e+108) {
		tmp = (y1 * ((y3 * z) - (x * y2))) * a;
	} 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 * y5) * ((t * y2) - (y * y3))
	tmp = 0
	if y5 <= -2.2e+47:
		tmp = t_1
	elif y5 <= -4.9e-101:
		tmp = (k * z) * ((b * y0) - (i * y1))
	elif y5 <= -2.3e-287:
		tmp = (x * y0) * ((c * y2) - (b * j))
	elif y5 <= 2.1e+108:
		tmp = (y1 * ((y3 * z) - (x * y2))) * a
	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(Float64(a * y5) * Float64(Float64(t * y2) - Float64(y * y3)))
	tmp = 0.0
	if (y5 <= -2.2e+47)
		tmp = t_1;
	elseif (y5 <= -4.9e-101)
		tmp = Float64(Float64(k * z) * Float64(Float64(b * y0) - Float64(i * y1)));
	elseif (y5 <= -2.3e-287)
		tmp = Float64(Float64(x * y0) * Float64(Float64(c * y2) - Float64(b * j)));
	elseif (y5 <= 2.1e+108)
		tmp = Float64(Float64(y1 * Float64(Float64(y3 * z) - Float64(x * y2))) * a);
	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 * y5) * ((t * y2) - (y * y3));
	tmp = 0.0;
	if (y5 <= -2.2e+47)
		tmp = t_1;
	elseif (y5 <= -4.9e-101)
		tmp = (k * z) * ((b * y0) - (i * y1));
	elseif (y5 <= -2.3e-287)
		tmp = (x * y0) * ((c * y2) - (b * j));
	elseif (y5 <= 2.1e+108)
		tmp = (y1 * ((y3 * z) - (x * y2))) * a;
	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[(N[(a * y5), $MachinePrecision] * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y5, -2.2e+47], t$95$1, If[LessEqual[y5, -4.9e-101], N[(N[(k * z), $MachinePrecision] * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -2.3e-287], N[(N[(x * y0), $MachinePrecision] * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 2.1e+108], N[(N[(y1 * N[(N[(y3 * z), $MachinePrecision] - N[(x * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y5 \leq -2.3 \cdot 10^{-287}:\\
\;\;\;\;\left(x \cdot y0\right) \cdot \left(c \cdot y2 - b \cdot j\right)\\

\mathbf{elif}\;y5 \leq 2.1 \cdot 10^{+108}:\\
\;\;\;\;\left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y5 < -2.1999999999999999e47 or 2.1000000000000001e108 < y5

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites41.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y5 around inf

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

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

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

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

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

        \[\leadsto \left(a \cdot y5\right) \cdot \left(t \cdot y2 - y \cdot y3\right) \]
      6. lift-*.f6438.7

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

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

    if -2.1999999999999999e47 < y5 < -4.9e-101

    1. Initial program 34.0%

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

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

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites38.3%

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

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

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

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

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

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

        \[\leadsto \left(k \cdot z\right) \cdot \left(b \cdot y0 - i \cdot y1\right) \]
      6. lower-*.f6424.4

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

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

    if -4.9e-101 < y5 < -2.29999999999999986e-287

    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. Taylor expanded in x around inf

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites40.6%

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

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

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

        \[\leadsto \left(x \cdot y0\right) \cdot \left(c \cdot y2 - b \cdot j\right) \]
      6. lower-*.f6424.5

        \[\leadsto \left(x \cdot y0\right) \cdot \left(c \cdot y2 - b \cdot j\right) \]
    7. Applied rewrites24.5%

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

    if -2.29999999999999986e-287 < y5 < 2.1000000000000001e108

    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. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites37.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y1 around inf

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      2. lower--.f64N/A

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

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      4. lower-*.f6427.2

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    7. Applied rewrites27.2%

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 18: 29.9% accurate, 5.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y4 \leq -2.4 \cdot 10^{+89}:\\
\;\;\;\;\left(b \cdot y4\right) \cdot \left(j \cdot t - k \cdot y\right)\\

\mathbf{elif}\;y4 \leq 2.9 \cdot 10^{-61}:\\
\;\;\;\;\left(a \cdot y5\right) \cdot \left(t \cdot y2 - y \cdot y3\right)\\

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

\mathbf{else}:\\
\;\;\;\;\left(y \cdot \left(\left(-k\right) \cdot y4\right)\right) \cdot b\\


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

    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. Taylor expanded in y4 around inf

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

        \[\leadsto \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) \cdot \color{blue}{y4} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{y4} \]
    4. Applied rewrites54.1%

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

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

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

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

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

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

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

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

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

    if -2.40000000000000004e89 < y4 < 2.8999999999999999e-61

    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. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites40.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y5 around inf

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

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

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

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

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

        \[\leadsto \left(a \cdot y5\right) \cdot \left(t \cdot y2 - y \cdot y3\right) \]
      6. lift-*.f6424.7

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

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

    if 2.8999999999999999e-61 < y4 < 1.05000000000000001e102

    1. Initial program 31.2%

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

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites37.2%

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

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

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

        \[\leadsto \left(x \cdot y0\right) \cdot \left(c \cdot y2 - b \cdot j\right) \]
      6. lower-*.f6425.3

        \[\leadsto \left(x \cdot y0\right) \cdot \left(c \cdot y2 - b \cdot j\right) \]
    7. Applied rewrites25.3%

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

    if 1.05000000000000001e102 < y4

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

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

        \[\leadsto \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) \cdot \color{blue}{b} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{b} \]
    4. Applied rewrites39.2%

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

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

        \[\leadsto \left(y \cdot \left(-1 \cdot \left(k \cdot y4\right) + a \cdot x\right)\right) \cdot b \]
      2. mul-1-negN/A

        \[\leadsto \left(y \cdot \left(\left(\mathsf{neg}\left(k \cdot y4\right)\right) + a \cdot x\right)\right) \cdot b \]
      3. distribute-lft-neg-outN/A

        \[\leadsto \left(y \cdot \left(\left(\mathsf{neg}\left(k\right)\right) \cdot y4 + a \cdot x\right)\right) \cdot b \]
      4. lower-fma.f64N/A

        \[\leadsto \left(y \cdot \mathsf{fma}\left(\mathsf{neg}\left(k\right), y4, a \cdot x\right)\right) \cdot b \]
      5. lower-neg.f64N/A

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

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

      \[\leadsto \left(y \cdot \mathsf{fma}\left(-k, y4, a \cdot x\right)\right) \cdot b \]
    8. Taylor expanded in x around 0

      \[\leadsto \left(y \cdot \left(-1 \cdot \left(k \cdot y4\right)\right)\right) \cdot b \]
    9. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(y \cdot \left(\mathsf{neg}\left(k \cdot y4\right)\right)\right) \cdot b \]
      2. distribute-lft-neg-outN/A

        \[\leadsto \left(y \cdot \left(\left(\mathsf{neg}\left(k\right)\right) \cdot y4\right)\right) \cdot b \]
      3. lift-neg.f64N/A

        \[\leadsto \left(y \cdot \left(\left(-k\right) \cdot y4\right)\right) \cdot b \]
      4. lower-*.f6431.9

        \[\leadsto \left(y \cdot \left(\left(-k\right) \cdot y4\right)\right) \cdot b \]
    10. Applied rewrites31.9%

      \[\leadsto \left(y \cdot \left(\left(-k\right) \cdot y4\right)\right) \cdot b \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 19: 29.2% accurate, 5.0× speedup?

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

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

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

\mathbf{elif}\;y5 \leq 1.9 \cdot 10^{-35}:\\
\;\;\;\;\left(x \cdot y0\right) \cdot \left(c \cdot y2 - b \cdot j\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y5 < -2.1999999999999999e47 or 1.9000000000000001e-35 < y5

    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. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites40.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y5 around inf

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

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

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

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

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

        \[\leadsto \left(a \cdot y5\right) \cdot \left(t \cdot y2 - y \cdot y3\right) \]
      6. lift-*.f6435.0

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

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

    if -2.1999999999999999e47 < y5 < -4.9e-101

    1. Initial program 34.0%

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

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

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites38.3%

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

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

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

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

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

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

        \[\leadsto \left(k \cdot z\right) \cdot \left(b \cdot y0 - i \cdot y1\right) \]
      6. lower-*.f6424.4

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

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

    if -4.9e-101 < y5 < 1.9000000000000001e-35

    1. Initial program 34.8%

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

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites40.9%

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

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

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

        \[\leadsto \left(x \cdot y0\right) \cdot \left(c \cdot y2 - b \cdot j\right) \]
      6. lower-*.f6425.4

        \[\leadsto \left(x \cdot y0\right) \cdot \left(c \cdot y2 - b \cdot j\right) \]
    7. Applied rewrites25.4%

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

Alternative 20: 28.4% accurate, 5.2× speedup?

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

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

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.5 \cdot 10^{+44}:\\
\;\;\;\;\left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right)\\

\mathbf{elif}\;c \leq 8 \cdot 10^{-270}:\\
\;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\

\mathbf{elif}\;c \leq 1.52 \cdot 10^{-142}:\\
\;\;\;\;\left(y1 \cdot \left(\left(-x\right) \cdot y2\right)\right) \cdot a\\

\mathbf{elif}\;c \leq 7 \cdot 10^{+54}:\\
\;\;\;\;\left(-a\right) \cdot \left(\left(y \cdot y3\right) \cdot y5\right)\\

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


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

    1. Initial program 25.7%

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

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

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites37.3%

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

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

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

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

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

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

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right) \]
      6. lower-*.f6429.3

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right) \]
    7. Applied rewrites29.3%

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

    if -2.4999999999999998e44 < c < 8.0000000000000003e-270

    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. Taylor expanded in z around -inf

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

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites36.7%

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

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

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

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

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

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

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right) \]
      6. lower-*.f6419.7

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

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

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

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

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

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

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

        \[\leadsto k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right) \]
    10. Applied rewrites28.1%

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

    if 8.0000000000000003e-270 < c < 1.51999999999999992e-142

    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. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites42.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y1 around inf

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      2. lower--.f64N/A

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

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      4. lower-*.f6428.2

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    7. Applied rewrites28.2%

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    8. Taylor expanded in x around inf

      \[\leadsto \left(y1 \cdot \left(-1 \cdot \left(x \cdot y2\right)\right)\right) \cdot a \]
    9. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(y1 \cdot \left(\left(-1 \cdot x\right) \cdot y2\right)\right) \cdot a \]
      2. mul-1-negN/A

        \[\leadsto \left(y1 \cdot \left(\left(\mathsf{neg}\left(x\right)\right) \cdot y2\right)\right) \cdot a \]
      3. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(\left(\mathsf{neg}\left(x\right)\right) \cdot y2\right)\right) \cdot a \]
      4. lower-neg.f6418.9

        \[\leadsto \left(y1 \cdot \left(\left(-x\right) \cdot y2\right)\right) \cdot a \]
    10. Applied rewrites18.9%

      \[\leadsto \left(y1 \cdot \left(\left(-x\right) \cdot y2\right)\right) \cdot a \]

    if 1.51999999999999992e-142 < c < 7.0000000000000002e54

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites40.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y3 around inf

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

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

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

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1} \cdot z\right) \]
      4. mul-1-negN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y \cdot y5\right)\right) + y1 \cdot z\right) \]
      5. distribute-lft-neg-outN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot y5 + y1 \cdot z\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(\mathsf{neg}\left(y\right), y5, y1 \cdot z\right) \]
      7. lower-neg.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
      8. lower-*.f6424.3

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
    7. Applied rewrites24.3%

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

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

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\mathsf{neg}\left(y \cdot y5\right)\right) \]
      2. distribute-lft-neg-outN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot y5\right) \]
      3. lift-neg.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(-y\right) \cdot y5\right) \]
      4. lower-*.f6416.1

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

      \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(-y\right) \cdot y5\right) \]
    11. Taylor expanded in y around inf

      \[\leadsto -1 \cdot \left(a \cdot \color{blue}{\left(y \cdot \left(y3 \cdot y5\right)\right)}\right) \]
    12. Step-by-step derivation
      1. associate-*r*N/A

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

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(y \cdot \left(y3 \cdot y5\right)\right) \]
      3. lower-*.f64N/A

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

        \[\leadsto \left(-a\right) \cdot \left(y \cdot \left(y3 \cdot y5\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(-a\right) \cdot \left(\left(y \cdot y3\right) \cdot y5\right) \]
      6. lower-*.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(\left(y \cdot y3\right) \cdot y5\right) \]
      7. lower-*.f6417.3

        \[\leadsto \left(-a\right) \cdot \left(\left(y \cdot y3\right) \cdot y5\right) \]
    13. Applied rewrites17.3%

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

    if 7.0000000000000002e54 < c

    1. Initial program 22.1%

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

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites35.4%

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

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

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

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      3. lower-*.f64N/A

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      4. lower-*.f6423.4

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    7. Applied rewrites23.4%

      \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    8. Taylor expanded in b around 0

      \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
      2. lower-*.f6415.9

        \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
    10. Applied rewrites15.9%

      \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 21: 27.9% accurate, 4.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.85 \cdot 10^{+167}:\\ \;\;\;\;\left(a \cdot y3\right) \cdot \left(\left(-y\right) \cdot y5\right)\\ \mathbf{elif}\;y \leq -3.4 \cdot 10^{-66}:\\ \;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\ \mathbf{elif}\;y \leq -3.8 \cdot 10^{-155}:\\ \;\;\;\;c \cdot \left(\left(i \cdot t\right) \cdot z\right)\\ \mathbf{elif}\;y \leq 7.4 \cdot 10^{-199}:\\ \;\;\;\;\left(i \cdot \left(j \cdot y1\right)\right) \cdot x\\ \mathbf{elif}\;y \leq 8.8 \cdot 10^{+83}:\\ \;\;\;\;\left(a \cdot y3\right) \cdot \left(y1 \cdot z\right)\\ \mathbf{elif}\;y \leq 2.45 \cdot 10^{+134}:\\ \;\;\;\;\left(y1 \cdot \left(\left(-x\right) \cdot y2\right)\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot \left(a \cdot x\right)\right) \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= y -1.85e+167)
   (* (* a y3) (* (- y) y5))
   (if (<= y -3.4e-66)
     (* a (* y1 (* y3 z)))
     (if (<= y -3.8e-155)
       (* c (* (* i t) z))
       (if (<= y 7.4e-199)
         (* (* i (* j y1)) x)
         (if (<= y 8.8e+83)
           (* (* a y3) (* y1 z))
           (if (<= y 2.45e+134)
             (* (* y1 (* (- x) y2)) a)
             (* (* y (* a x)) b))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y <= -1.85e+167) {
		tmp = (a * y3) * (-y * y5);
	} else if (y <= -3.4e-66) {
		tmp = a * (y1 * (y3 * z));
	} else if (y <= -3.8e-155) {
		tmp = c * ((i * t) * z);
	} else if (y <= 7.4e-199) {
		tmp = (i * (j * y1)) * x;
	} else if (y <= 8.8e+83) {
		tmp = (a * y3) * (y1 * z);
	} else if (y <= 2.45e+134) {
		tmp = (y1 * (-x * y2)) * a;
	} else {
		tmp = (y * (a * x)) * b;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

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

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

\mathbf{elif}\;y \leq -3.8 \cdot 10^{-155}:\\
\;\;\;\;c \cdot \left(\left(i \cdot t\right) \cdot z\right)\\

\mathbf{elif}\;y \leq 7.4 \cdot 10^{-199}:\\
\;\;\;\;\left(i \cdot \left(j \cdot y1\right)\right) \cdot x\\

\mathbf{elif}\;y \leq 8.8 \cdot 10^{+83}:\\
\;\;\;\;\left(a \cdot y3\right) \cdot \left(y1 \cdot z\right)\\

\mathbf{elif}\;y \leq 2.45 \cdot 10^{+134}:\\
\;\;\;\;\left(y1 \cdot \left(\left(-x\right) \cdot y2\right)\right) \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if y < -1.85e167

    1. Initial program 22.3%

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites39.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y3 around inf

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

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

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

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1} \cdot z\right) \]
      4. mul-1-negN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y \cdot y5\right)\right) + y1 \cdot z\right) \]
      5. distribute-lft-neg-outN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot y5 + y1 \cdot z\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(\mathsf{neg}\left(y\right), y5, y1 \cdot z\right) \]
      7. lower-neg.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
      8. lower-*.f6436.8

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
    7. Applied rewrites36.8%

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

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

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\mathsf{neg}\left(y \cdot y5\right)\right) \]
      2. distribute-lft-neg-outN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot y5\right) \]
      3. lift-neg.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(-y\right) \cdot y5\right) \]
      4. lower-*.f6432.2

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(-y\right) \cdot y5\right) \]
    10. Applied rewrites32.2%

      \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(-y\right) \cdot y5\right) \]

    if -1.85e167 < y < -3.39999999999999997e-66

    1. Initial program 30.7%

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites40.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y3 around inf

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

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

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

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1} \cdot z\right) \]
      4. mul-1-negN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y \cdot y5\right)\right) + y1 \cdot z\right) \]
      5. distribute-lft-neg-outN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot y5 + y1 \cdot z\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(\mathsf{neg}\left(y\right), y5, y1 \cdot z\right) \]
      7. lower-neg.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
      8. lower-*.f6424.2

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
    7. Applied rewrites24.2%

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

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

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

        \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
      3. lower-*.f6415.8

        \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
    10. Applied rewrites15.8%

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

    if -3.39999999999999997e-66 < y < -3.7999999999999998e-155

    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. Taylor expanded in z around -inf

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

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites40.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      3. lift-*.f6416.9

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

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

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto c \cdot \left(\left(i \cdot t\right) \cdot z\right) \]
      4. lower-*.f64N/A

        \[\leadsto c \cdot \left(\left(i \cdot t\right) \cdot z\right) \]
      5. lower-*.f6417.2

        \[\leadsto c \cdot \left(\left(i \cdot t\right) \cdot z\right) \]
    12. Applied rewrites17.2%

      \[\leadsto c \cdot \left(\left(i \cdot t\right) \cdot z\right) \]

    if -3.7999999999999998e-155 < y < 7.39999999999999998e-199

    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. Taylor expanded in x around inf

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites33.6%

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

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

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

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      3. lower-*.f64N/A

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

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

      \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    8. Taylor expanded in b around 0

      \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
      2. lower-*.f6419.0

        \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
    10. Applied rewrites19.0%

      \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]

    if 7.39999999999999998e-199 < y < 8.79999999999999995e83

    1. Initial program 32.2%

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites38.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y3 around inf

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

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

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

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1} \cdot z\right) \]
      4. mul-1-negN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y \cdot y5\right)\right) + y1 \cdot z\right) \]
      5. distribute-lft-neg-outN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot y5 + y1 \cdot z\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(\mathsf{neg}\left(y\right), y5, y1 \cdot z\right) \]
      7. lower-neg.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
      8. lower-*.f6421.5

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
    7. Applied rewrites21.5%

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

      \[\leadsto \left(a \cdot y3\right) \cdot \left(y1 \cdot z\right) \]
    9. Step-by-step derivation
      1. lift-*.f6417.7

        \[\leadsto \left(a \cdot y3\right) \cdot \left(y1 \cdot z\right) \]
    10. Applied rewrites17.7%

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

    if 8.79999999999999995e83 < y < 2.44999999999999998e134

    1. Initial program 23.3%

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites36.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y1 around inf

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      2. lower--.f64N/A

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

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      4. lower-*.f6426.6

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    7. Applied rewrites26.6%

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    8. Taylor expanded in x around inf

      \[\leadsto \left(y1 \cdot \left(-1 \cdot \left(x \cdot y2\right)\right)\right) \cdot a \]
    9. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(y1 \cdot \left(\left(-1 \cdot x\right) \cdot y2\right)\right) \cdot a \]
      2. mul-1-negN/A

        \[\leadsto \left(y1 \cdot \left(\left(\mathsf{neg}\left(x\right)\right) \cdot y2\right)\right) \cdot a \]
      3. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(\left(\mathsf{neg}\left(x\right)\right) \cdot y2\right)\right) \cdot a \]
      4. lower-neg.f6417.2

        \[\leadsto \left(y1 \cdot \left(\left(-x\right) \cdot y2\right)\right) \cdot a \]
    10. Applied rewrites17.2%

      \[\leadsto \left(y1 \cdot \left(\left(-x\right) \cdot y2\right)\right) \cdot a \]

    if 2.44999999999999998e134 < y

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

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

        \[\leadsto \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) \cdot \color{blue}{b} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{b} \]
    4. Applied rewrites39.3%

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

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

        \[\leadsto \left(y \cdot \left(-1 \cdot \left(k \cdot y4\right) + a \cdot x\right)\right) \cdot b \]
      2. mul-1-negN/A

        \[\leadsto \left(y \cdot \left(\left(\mathsf{neg}\left(k \cdot y4\right)\right) + a \cdot x\right)\right) \cdot b \]
      3. distribute-lft-neg-outN/A

        \[\leadsto \left(y \cdot \left(\left(\mathsf{neg}\left(k\right)\right) \cdot y4 + a \cdot x\right)\right) \cdot b \]
      4. lower-fma.f64N/A

        \[\leadsto \left(y \cdot \mathsf{fma}\left(\mathsf{neg}\left(k\right), y4, a \cdot x\right)\right) \cdot b \]
      5. lower-neg.f64N/A

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

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

      \[\leadsto \left(y \cdot \mathsf{fma}\left(-k, y4, a \cdot x\right)\right) \cdot b \]
    8. Taylor expanded in x around inf

      \[\leadsto \left(y \cdot \left(a \cdot x\right)\right) \cdot b \]
    9. Step-by-step derivation
      1. lift-*.f6431.6

        \[\leadsto \left(y \cdot \left(a \cdot x\right)\right) \cdot b \]
    10. Applied rewrites31.6%

      \[\leadsto \left(y \cdot \left(a \cdot x\right)\right) \cdot b \]
  3. Recombined 7 regimes into one program.
  4. Add Preprocessing

Alternative 22: 23.1% accurate, 5.8× speedup?

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

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

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -3.6 \cdot 10^{+44}:\\
\;\;\;\;c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right)\\

\mathbf{elif}\;c \leq 1.26 \cdot 10^{-169}:\\
\;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -3.6e44

    1. Initial program 25.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right) \]
      5. lower-*.f6435.1

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

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

    if -3.6e44 < c < 1.26e-169

    1. Initial program 33.9%

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

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

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites36.4%

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

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

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

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

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

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

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right) \]
      6. lower-*.f6419.3

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right) \]
    7. Applied rewrites19.3%

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

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

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

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

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

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

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

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

    if 1.26e-169 < c

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites38.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y5 around inf

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

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

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

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

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

        \[\leadsto \left(a \cdot y5\right) \cdot \left(t \cdot y2 - y \cdot y3\right) \]
      6. lift-*.f6423.9

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

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

Alternative 23: 23.0% accurate, 5.2× speedup?

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

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

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -2 \cdot 10^{+45}:\\
\;\;\;\;\left(c \cdot i\right) \cdot \left(t \cdot z\right)\\

\mathbf{elif}\;c \leq 8 \cdot 10^{-270}:\\
\;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\

\mathbf{elif}\;c \leq 1.52 \cdot 10^{-142}:\\
\;\;\;\;\left(y1 \cdot \left(\left(-x\right) \cdot y2\right)\right) \cdot a\\

\mathbf{elif}\;c \leq 7 \cdot 10^{+54}:\\
\;\;\;\;\left(-a\right) \cdot \left(\left(y \cdot y3\right) \cdot y5\right)\\

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


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

    1. Initial program 25.7%

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

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

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites37.3%

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

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

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

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

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

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

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right) \]
      6. lower-*.f6429.2

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right) \]
    7. Applied rewrites29.2%

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

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

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

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      3. lift-*.f6422.8

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
    10. Applied rewrites22.8%

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

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

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]
      6. lower-*.f64N/A

        \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]
      7. lift-*.f6426.2

        \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]
    12. Applied rewrites26.2%

      \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]

    if -1.9999999999999999e45 < c < 8.0000000000000003e-270

    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. Taylor expanded in z around -inf

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

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites36.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right) \]
    10. Applied rewrites28.1%

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

    if 8.0000000000000003e-270 < c < 1.51999999999999992e-142

    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. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites42.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y1 around inf

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      2. lower--.f64N/A

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

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
      4. lower-*.f6428.2

        \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    7. Applied rewrites28.2%

      \[\leadsto \left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a \]
    8. Taylor expanded in x around inf

      \[\leadsto \left(y1 \cdot \left(-1 \cdot \left(x \cdot y2\right)\right)\right) \cdot a \]
    9. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(y1 \cdot \left(\left(-1 \cdot x\right) \cdot y2\right)\right) \cdot a \]
      2. mul-1-negN/A

        \[\leadsto \left(y1 \cdot \left(\left(\mathsf{neg}\left(x\right)\right) \cdot y2\right)\right) \cdot a \]
      3. lower-*.f64N/A

        \[\leadsto \left(y1 \cdot \left(\left(\mathsf{neg}\left(x\right)\right) \cdot y2\right)\right) \cdot a \]
      4. lower-neg.f6418.9

        \[\leadsto \left(y1 \cdot \left(\left(-x\right) \cdot y2\right)\right) \cdot a \]
    10. Applied rewrites18.9%

      \[\leadsto \left(y1 \cdot \left(\left(-x\right) \cdot y2\right)\right) \cdot a \]

    if 1.51999999999999992e-142 < c < 7.0000000000000002e54

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites40.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y3 around inf

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

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

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

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1} \cdot z\right) \]
      4. mul-1-negN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y \cdot y5\right)\right) + y1 \cdot z\right) \]
      5. distribute-lft-neg-outN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot y5 + y1 \cdot z\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(\mathsf{neg}\left(y\right), y5, y1 \cdot z\right) \]
      7. lower-neg.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
      8. lower-*.f6424.3

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
    7. Applied rewrites24.3%

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

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

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\mathsf{neg}\left(y \cdot y5\right)\right) \]
      2. distribute-lft-neg-outN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot y5\right) \]
      3. lift-neg.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(-y\right) \cdot y5\right) \]
      4. lower-*.f6416.1

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

      \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(-y\right) \cdot y5\right) \]
    11. Taylor expanded in y around inf

      \[\leadsto -1 \cdot \left(a \cdot \color{blue}{\left(y \cdot \left(y3 \cdot y5\right)\right)}\right) \]
    12. Step-by-step derivation
      1. associate-*r*N/A

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

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(y \cdot \left(y3 \cdot y5\right)\right) \]
      3. lower-*.f64N/A

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

        \[\leadsto \left(-a\right) \cdot \left(y \cdot \left(y3 \cdot y5\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(-a\right) \cdot \left(\left(y \cdot y3\right) \cdot y5\right) \]
      6. lower-*.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(\left(y \cdot y3\right) \cdot y5\right) \]
      7. lower-*.f6417.3

        \[\leadsto \left(-a\right) \cdot \left(\left(y \cdot y3\right) \cdot y5\right) \]
    13. Applied rewrites17.3%

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

    if 7.0000000000000002e54 < c

    1. Initial program 22.1%

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

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites35.4%

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

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

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

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      3. lower-*.f64N/A

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      4. lower-*.f6423.4

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    7. Applied rewrites23.4%

      \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    8. Taylor expanded in b around 0

      \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
      2. lower-*.f6415.9

        \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
    10. Applied rewrites15.9%

      \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 24: 22.5% accurate, 5.8× speedup?

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

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

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

\\
\begin{array}{l}
t_1 := k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\mathbf{if}\;z \leq -1.62 \cdot 10^{+159}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.62e159 or 1.10000000000000008e50 < z

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

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

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites54.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right) \]
    10. Applied rewrites41.4%

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

    if -1.62e159 < z < 1.10000000000000008e50

    1. Initial program 32.6%

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites38.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y5 around inf

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

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

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

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

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

        \[\leadsto \left(a \cdot y5\right) \cdot \left(t \cdot y2 - y \cdot y3\right) \]
      6. lift-*.f6425.0

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

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

Alternative 25: 22.5% accurate, 4.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y1 \leq -1.32 \cdot 10^{+79}:\\ \;\;\;\;\left(i \cdot \left(j \cdot y1\right)\right) \cdot x\\ \mathbf{elif}\;y1 \leq -1.5 \cdot 10^{-151}:\\ \;\;\;\;c \cdot \left(i \cdot \left(t \cdot z\right)\right)\\ \mathbf{elif}\;y1 \leq 8 \cdot 10^{-185}:\\ \;\;\;\;\left(-a\right) \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\\ \mathbf{elif}\;y1 \leq 6 \cdot 10^{+51}:\\ \;\;\;\;\left(y \cdot \left(a \cdot x\right)\right) \cdot b\\ \mathbf{elif}\;y1 \leq 3.4 \cdot 10^{+140}:\\ \;\;\;\;\left(a \cdot y3\right) \cdot \left(y1 \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot \left(i \cdot y1\right)\right) \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= y1 -1.32e+79)
   (* (* i (* j y1)) x)
   (if (<= y1 -1.5e-151)
     (* c (* i (* t z)))
     (if (<= y1 8e-185)
       (* (- a) (* y (* y3 y5)))
       (if (<= y1 6e+51)
         (* (* y (* a x)) b)
         (if (<= y1 3.4e+140) (* (* a y3) (* y1 z)) (* (* j (* i y1)) x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y1 <= -1.32e+79) {
		tmp = (i * (j * y1)) * x;
	} else if (y1 <= -1.5e-151) {
		tmp = c * (i * (t * z));
	} else if (y1 <= 8e-185) {
		tmp = -a * (y * (y3 * y5));
	} else if (y1 <= 6e+51) {
		tmp = (y * (a * x)) * b;
	} else if (y1 <= 3.4e+140) {
		tmp = (a * y3) * (y1 * z);
	} else {
		tmp = (j * (i * y1)) * x;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

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

\mathbf{elif}\;y1 \leq -1.5 \cdot 10^{-151}:\\
\;\;\;\;c \cdot \left(i \cdot \left(t \cdot z\right)\right)\\

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

\mathbf{elif}\;y1 \leq 6 \cdot 10^{+51}:\\
\;\;\;\;\left(y \cdot \left(a \cdot x\right)\right) \cdot b\\

\mathbf{elif}\;y1 \leq 3.4 \cdot 10^{+140}:\\
\;\;\;\;\left(a \cdot y3\right) \cdot \left(y1 \cdot z\right)\\

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


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

    1. Initial program 24.0%

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

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites37.8%

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

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

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

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      3. lower-*.f64N/A

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      4. lower-*.f6435.9

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    7. Applied rewrites35.9%

      \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    8. Taylor expanded in b around 0

      \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
      2. lower-*.f6431.5

        \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
    10. Applied rewrites31.5%

      \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]

    if -1.32e79 < y1 < -1.5e-151

    1. Initial program 31.9%

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

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

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites36.1%

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

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

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

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

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

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

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right) \]
      6. lower-*.f6420.3

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right) \]
    7. Applied rewrites20.3%

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

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

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

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      3. lift-*.f6417.5

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
    10. Applied rewrites17.5%

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

    if -1.5e-151 < y1 < 7.9999999999999999e-185

    1. Initial program 34.0%

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites35.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y3 around inf

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

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

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

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1} \cdot z\right) \]
      4. mul-1-negN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y \cdot y5\right)\right) + y1 \cdot z\right) \]
      5. distribute-lft-neg-outN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot y5 + y1 \cdot z\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(\mathsf{neg}\left(y\right), y5, y1 \cdot z\right) \]
      7. lower-neg.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
      8. lower-*.f6418.7

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
    7. Applied rewrites18.7%

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

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

        \[\leadsto \mathsf{neg}\left(a \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right) \]
      2. distribute-lft-neg-inN/A

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

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

        \[\leadsto \left(-a\right) \cdot \left(y \cdot \left(y3 \cdot y5\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(y \cdot \left(y3 \cdot y5\right)\right) \]
      6. lower-*.f6418.9

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

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

    if 7.9999999999999999e-185 < y1 < 6e51

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

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

        \[\leadsto \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) \cdot \color{blue}{b} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{b} \]
    4. Applied rewrites38.8%

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

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

        \[\leadsto \left(y \cdot \left(-1 \cdot \left(k \cdot y4\right) + a \cdot x\right)\right) \cdot b \]
      2. mul-1-negN/A

        \[\leadsto \left(y \cdot \left(\left(\mathsf{neg}\left(k \cdot y4\right)\right) + a \cdot x\right)\right) \cdot b \]
      3. distribute-lft-neg-outN/A

        \[\leadsto \left(y \cdot \left(\left(\mathsf{neg}\left(k\right)\right) \cdot y4 + a \cdot x\right)\right) \cdot b \]
      4. lower-fma.f64N/A

        \[\leadsto \left(y \cdot \mathsf{fma}\left(\mathsf{neg}\left(k\right), y4, a \cdot x\right)\right) \cdot b \]
      5. lower-neg.f64N/A

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

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

      \[\leadsto \left(y \cdot \mathsf{fma}\left(-k, y4, a \cdot x\right)\right) \cdot b \]
    8. Taylor expanded in x around inf

      \[\leadsto \left(y \cdot \left(a \cdot x\right)\right) \cdot b \]
    9. Step-by-step derivation
      1. lift-*.f6417.3

        \[\leadsto \left(y \cdot \left(a \cdot x\right)\right) \cdot b \]
    10. Applied rewrites17.3%

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

    if 6e51 < y1 < 3.4e140

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites39.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y3 around inf

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

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

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

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1} \cdot z\right) \]
      4. mul-1-negN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y \cdot y5\right)\right) + y1 \cdot z\right) \]
      5. distribute-lft-neg-outN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot y5 + y1 \cdot z\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(\mathsf{neg}\left(y\right), y5, y1 \cdot z\right) \]
      7. lower-neg.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
      8. lower-*.f6427.8

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
    7. Applied rewrites27.8%

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

      \[\leadsto \left(a \cdot y3\right) \cdot \left(y1 \cdot z\right) \]
    9. Step-by-step derivation
      1. lift-*.f6421.5

        \[\leadsto \left(a \cdot y3\right) \cdot \left(y1 \cdot z\right) \]
    10. Applied rewrites21.5%

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

    if 3.4e140 < y1

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

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites40.5%

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

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

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

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      3. lower-*.f64N/A

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      4. lower-*.f6437.8

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

      \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    8. Taylor expanded in b around 0

      \[\leadsto \left(j \cdot \left(i \cdot y1\right)\right) \cdot x \]
    9. Step-by-step derivation
      1. lift-*.f6434.9

        \[\leadsto \left(j \cdot \left(i \cdot y1\right)\right) \cdot x \]
    10. Applied rewrites34.9%

      \[\leadsto \left(j \cdot \left(i \cdot y1\right)\right) \cdot x \]
  3. Recombined 6 regimes into one program.
  4. Add Preprocessing

Alternative 26: 22.2% accurate, 5.4× speedup?

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

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

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

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

\mathbf{elif}\;y1 \leq 1.95 \cdot 10^{-184}:\\
\;\;\;\;\left(c \cdot i\right) \cdot \left(t \cdot z\right)\\

\mathbf{elif}\;y1 \leq 6 \cdot 10^{+51}:\\
\;\;\;\;\left(y \cdot \left(a \cdot x\right)\right) \cdot b\\

\mathbf{elif}\;y1 \leq 3.4 \cdot 10^{+140}:\\
\;\;\;\;\left(a \cdot y3\right) \cdot \left(y1 \cdot z\right)\\

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


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

    1. Initial program 24.0%

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

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites37.8%

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

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

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

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      3. lower-*.f64N/A

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      4. lower-*.f6435.9

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    7. Applied rewrites35.9%

      \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    8. Taylor expanded in b around 0

      \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
      2. lower-*.f6431.5

        \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
    10. Applied rewrites31.5%

      \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]

    if -1.32e79 < y1 < 1.94999999999999997e-184

    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. Taylor expanded in z around -inf

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

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites36.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      3. lift-*.f6417.7

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
    10. Applied rewrites17.7%

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

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

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]
      6. lower-*.f64N/A

        \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]
      7. lift-*.f6417.1

        \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]
    12. Applied rewrites17.1%

      \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]

    if 1.94999999999999997e-184 < y1 < 6e51

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

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

        \[\leadsto \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) \cdot \color{blue}{b} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{b} \]
    4. Applied rewrites38.8%

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

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

        \[\leadsto \left(y \cdot \left(-1 \cdot \left(k \cdot y4\right) + a \cdot x\right)\right) \cdot b \]
      2. mul-1-negN/A

        \[\leadsto \left(y \cdot \left(\left(\mathsf{neg}\left(k \cdot y4\right)\right) + a \cdot x\right)\right) \cdot b \]
      3. distribute-lft-neg-outN/A

        \[\leadsto \left(y \cdot \left(\left(\mathsf{neg}\left(k\right)\right) \cdot y4 + a \cdot x\right)\right) \cdot b \]
      4. lower-fma.f64N/A

        \[\leadsto \left(y \cdot \mathsf{fma}\left(\mathsf{neg}\left(k\right), y4, a \cdot x\right)\right) \cdot b \]
      5. lower-neg.f64N/A

        \[\leadsto \left(y \cdot \mathsf{fma}\left(-k, y4, a \cdot x\right)\right) \cdot b \]
      6. lower-*.f6428.0

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

      \[\leadsto \left(y \cdot \mathsf{fma}\left(-k, y4, a \cdot x\right)\right) \cdot b \]
    8. Taylor expanded in x around inf

      \[\leadsto \left(y \cdot \left(a \cdot x\right)\right) \cdot b \]
    9. Step-by-step derivation
      1. lift-*.f6417.3

        \[\leadsto \left(y \cdot \left(a \cdot x\right)\right) \cdot b \]
    10. Applied rewrites17.3%

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

    if 6e51 < y1 < 3.4e140

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites39.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y3 around inf

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

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

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

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1} \cdot z\right) \]
      4. mul-1-negN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y \cdot y5\right)\right) + y1 \cdot z\right) \]
      5. distribute-lft-neg-outN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot y5 + y1 \cdot z\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(\mathsf{neg}\left(y\right), y5, y1 \cdot z\right) \]
      7. lower-neg.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
      8. lower-*.f6427.8

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
    7. Applied rewrites27.8%

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

      \[\leadsto \left(a \cdot y3\right) \cdot \left(y1 \cdot z\right) \]
    9. Step-by-step derivation
      1. lift-*.f6421.5

        \[\leadsto \left(a \cdot y3\right) \cdot \left(y1 \cdot z\right) \]
    10. Applied rewrites21.5%

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

    if 3.4e140 < y1

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

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

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites40.5%

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(b \cdot a - i \cdot c, y, \left(y0 \cdot c - y1 \cdot a\right) \cdot y2\right) - \left(y0 \cdot b - y1 \cdot i\right) \cdot j\right) \cdot x} \]
    5. Taylor expanded in j around inf

      \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      2. lower--.f64N/A

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      3. lower-*.f64N/A

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      4. lower-*.f6437.8

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    7. Applied rewrites37.8%

      \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    8. Taylor expanded in b around 0

      \[\leadsto \left(j \cdot \left(i \cdot y1\right)\right) \cdot x \]
    9. Step-by-step derivation
      1. lift-*.f6434.9

        \[\leadsto \left(j \cdot \left(i \cdot y1\right)\right) \cdot x \]
    10. Applied rewrites34.9%

      \[\leadsto \left(j \cdot \left(i \cdot y1\right)\right) \cdot x \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 27: 22.1% accurate, 6.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y1 \leq -1.32 \cdot 10^{+79}:\\ \;\;\;\;\left(i \cdot \left(j \cdot y1\right)\right) \cdot x\\ \mathbf{elif}\;y1 \leq 1.7 \cdot 10^{-33}:\\ \;\;\;\;\left(c \cdot i\right) \cdot \left(t \cdot z\right)\\ \mathbf{elif}\;y1 \leq 3.4 \cdot 10^{+140}:\\ \;\;\;\;\left(a \cdot y3\right) \cdot \left(y1 \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot \left(i \cdot y1\right)\right) \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= y1 -1.32e+79)
   (* (* i (* j y1)) x)
   (if (<= y1 1.7e-33)
     (* (* c i) (* t z))
     (if (<= y1 3.4e+140) (* (* a y3) (* y1 z)) (* (* j (* i y1)) x)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y1 <= -1.32e+79) {
		tmp = (i * (j * y1)) * x;
	} else if (y1 <= 1.7e-33) {
		tmp = (c * i) * (t * z);
	} else if (y1 <= 3.4e+140) {
		tmp = (a * y3) * (y1 * z);
	} else {
		tmp = (j * (i * y1)) * x;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (y1 <= (-1.32d+79)) then
        tmp = (i * (j * y1)) * x
    else if (y1 <= 1.7d-33) then
        tmp = (c * i) * (t * z)
    else if (y1 <= 3.4d+140) then
        tmp = (a * y3) * (y1 * z)
    else
        tmp = (j * (i * y1)) * x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y1 <= -1.32e+79) {
		tmp = (i * (j * y1)) * x;
	} else if (y1 <= 1.7e-33) {
		tmp = (c * i) * (t * z);
	} else if (y1 <= 3.4e+140) {
		tmp = (a * y3) * (y1 * z);
	} else {
		tmp = (j * (i * y1)) * x;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y1 <= -1.32e+79:
		tmp = (i * (j * y1)) * x
	elif y1 <= 1.7e-33:
		tmp = (c * i) * (t * z)
	elif y1 <= 3.4e+140:
		tmp = (a * y3) * (y1 * z)
	else:
		tmp = (j * (i * y1)) * x
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (y1 <= -1.32e+79)
		tmp = Float64(Float64(i * Float64(j * y1)) * x);
	elseif (y1 <= 1.7e-33)
		tmp = Float64(Float64(c * i) * Float64(t * z));
	elseif (y1 <= 3.4e+140)
		tmp = Float64(Float64(a * y3) * Float64(y1 * z));
	else
		tmp = Float64(Float64(j * Float64(i * y1)) * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (y1 <= -1.32e+79)
		tmp = (i * (j * y1)) * x;
	elseif (y1 <= 1.7e-33)
		tmp = (c * i) * (t * z);
	elseif (y1 <= 3.4e+140)
		tmp = (a * y3) * (y1 * z);
	else
		tmp = (j * (i * y1)) * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y1, -1.32e+79], N[(N[(i * N[(j * y1), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y1, 1.7e-33], N[(N[(c * i), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 3.4e+140], N[(N[(a * y3), $MachinePrecision] * N[(y1 * z), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(i * y1), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y1 \leq -1.32 \cdot 10^{+79}:\\
\;\;\;\;\left(i \cdot \left(j \cdot y1\right)\right) \cdot x\\

\mathbf{elif}\;y1 \leq 1.7 \cdot 10^{-33}:\\
\;\;\;\;\left(c \cdot i\right) \cdot \left(t \cdot z\right)\\

\mathbf{elif}\;y1 \leq 3.4 \cdot 10^{+140}:\\
\;\;\;\;\left(a \cdot y3\right) \cdot \left(y1 \cdot z\right)\\

\mathbf{else}:\\
\;\;\;\;\left(j \cdot \left(i \cdot y1\right)\right) \cdot x\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y1 < -1.32e79

    1. Initial program 24.0%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites37.8%

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(b \cdot a - i \cdot c, y, \left(y0 \cdot c - y1 \cdot a\right) \cdot y2\right) - \left(y0 \cdot b - y1 \cdot i\right) \cdot j\right) \cdot x} \]
    5. Taylor expanded in j around inf

      \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      2. lower--.f64N/A

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      3. lower-*.f64N/A

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      4. lower-*.f6435.9

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    7. Applied rewrites35.9%

      \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    8. Taylor expanded in b around 0

      \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
      2. lower-*.f6431.5

        \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
    10. Applied rewrites31.5%

      \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]

    if -1.32e79 < y1 < 1.7e-33

    1. Initial program 33.3%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in z around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites37.3%

      \[\leadsto \color{blue}{\left(-z\right) \cdot \left(\mathsf{fma}\left(b \cdot a - i \cdot c, t, \left(y0 \cdot c - y1 \cdot a\right) \cdot y3\right) - \left(y0 \cdot b - y1 \cdot i\right) \cdot k\right)} \]
    5. Taylor expanded in i around -inf

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - \color{blue}{k} \cdot y1\right) \]
      4. lower--.f64N/A

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot \color{blue}{y1}\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right) \]
      6. lower-*.f6419.6

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right) \]
    7. Applied rewrites19.6%

      \[\leadsto \left(i \cdot z\right) \cdot \color{blue}{\left(c \cdot t - k \cdot y1\right)} \]
    8. Taylor expanded in t around inf

      \[\leadsto c \cdot \left(i \cdot \color{blue}{\left(t \cdot z\right)}\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot \color{blue}{z}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      3. lift-*.f6417.5

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
    10. Applied rewrites17.5%

      \[\leadsto c \cdot \left(i \cdot \color{blue}{\left(t \cdot z\right)}\right) \]
    11. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot \color{blue}{z}\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]
      6. lower-*.f64N/A

        \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]
      7. lift-*.f6417.2

        \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]
    12. Applied rewrites17.2%

      \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]

    if 1.7e-33 < y1 < 3.4e140

    1. Initial program 30.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. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
      2. lower-*.f64N/A

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites38.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y3 around inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right) + y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1 \cdot z}\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1 \cdot z}\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1} \cdot z\right) \]
      4. mul-1-negN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y \cdot y5\right)\right) + y1 \cdot z\right) \]
      5. distribute-lft-neg-outN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot y5 + y1 \cdot z\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(\mathsf{neg}\left(y\right), y5, y1 \cdot z\right) \]
      7. lower-neg.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
      8. lower-*.f6424.6

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
    7. Applied rewrites24.6%

      \[\leadsto \left(a \cdot y3\right) \cdot \color{blue}{\mathsf{fma}\left(-y, y5, y1 \cdot z\right)} \]
    8. Taylor expanded in y around 0

      \[\leadsto \left(a \cdot y3\right) \cdot \left(y1 \cdot z\right) \]
    9. Step-by-step derivation
      1. lift-*.f6416.6

        \[\leadsto \left(a \cdot y3\right) \cdot \left(y1 \cdot z\right) \]
    10. Applied rewrites16.6%

      \[\leadsto \left(a \cdot y3\right) \cdot \left(y1 \cdot z\right) \]

    if 3.4e140 < y1

    1. Initial program 22.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. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites40.5%

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(b \cdot a - i \cdot c, y, \left(y0 \cdot c - y1 \cdot a\right) \cdot y2\right) - \left(y0 \cdot b - y1 \cdot i\right) \cdot j\right) \cdot x} \]
    5. Taylor expanded in j around inf

      \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      2. lower--.f64N/A

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      3. lower-*.f64N/A

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      4. lower-*.f6437.8

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    7. Applied rewrites37.8%

      \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    8. Taylor expanded in b around 0

      \[\leadsto \left(j \cdot \left(i \cdot y1\right)\right) \cdot x \]
    9. Step-by-step derivation
      1. lift-*.f6434.9

        \[\leadsto \left(j \cdot \left(i \cdot y1\right)\right) \cdot x \]
    10. Applied rewrites34.9%

      \[\leadsto \left(j \cdot \left(i \cdot y1\right)\right) \cdot x \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 28: 21.8% accurate, 6.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(i \cdot \left(j \cdot y1\right)\right) \cdot x\\ \mathbf{if}\;y1 \leq -1.32 \cdot 10^{+79}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y1 \leq 1.7 \cdot 10^{-33}:\\ \;\;\;\;\left(c \cdot i\right) \cdot \left(t \cdot z\right)\\ \mathbf{elif}\;y1 \leq 1.4 \cdot 10^{+165}:\\ \;\;\;\;\left(a \cdot y3\right) \cdot \left(y1 \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* (* i (* j y1)) x)))
   (if (<= y1 -1.32e+79)
     t_1
     (if (<= y1 1.7e-33)
       (* (* c i) (* t z))
       (if (<= y1 1.4e+165) (* (* a y3) (* y1 z)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = (i * (j * y1)) * x;
	double tmp;
	if (y1 <= -1.32e+79) {
		tmp = t_1;
	} else if (y1 <= 1.7e-33) {
		tmp = (c * i) * (t * z);
	} else if (y1 <= 1.4e+165) {
		tmp = (a * y3) * (y1 * z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (i * (j * y1)) * x
    if (y1 <= (-1.32d+79)) then
        tmp = t_1
    else if (y1 <= 1.7d-33) then
        tmp = (c * i) * (t * z)
    else if (y1 <= 1.4d+165) then
        tmp = (a * y3) * (y1 * z)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = (i * (j * y1)) * x;
	double tmp;
	if (y1 <= -1.32e+79) {
		tmp = t_1;
	} else if (y1 <= 1.7e-33) {
		tmp = (c * i) * (t * z);
	} else if (y1 <= 1.4e+165) {
		tmp = (a * y3) * (y1 * z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = (i * (j * y1)) * x
	tmp = 0
	if y1 <= -1.32e+79:
		tmp = t_1
	elif y1 <= 1.7e-33:
		tmp = (c * i) * (t * z)
	elif y1 <= 1.4e+165:
		tmp = (a * y3) * (y1 * z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(i * Float64(j * y1)) * x)
	tmp = 0.0
	if (y1 <= -1.32e+79)
		tmp = t_1;
	elseif (y1 <= 1.7e-33)
		tmp = Float64(Float64(c * i) * Float64(t * z));
	elseif (y1 <= 1.4e+165)
		tmp = Float64(Float64(a * y3) * Float64(y1 * z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = (i * (j * y1)) * x;
	tmp = 0.0;
	if (y1 <= -1.32e+79)
		tmp = t_1;
	elseif (y1 <= 1.7e-33)
		tmp = (c * i) * (t * z);
	elseif (y1 <= 1.4e+165)
		tmp = (a * y3) * (y1 * z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(i * N[(j * y1), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[y1, -1.32e+79], t$95$1, If[LessEqual[y1, 1.7e-33], N[(N[(c * i), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 1.4e+165], N[(N[(a * y3), $MachinePrecision] * N[(y1 * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(i \cdot \left(j \cdot y1\right)\right) \cdot x\\
\mathbf{if}\;y1 \leq -1.32 \cdot 10^{+79}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y1 \leq 1.7 \cdot 10^{-33}:\\
\;\;\;\;\left(c \cdot i\right) \cdot \left(t \cdot z\right)\\

\mathbf{elif}\;y1 \leq 1.4 \cdot 10^{+165}:\\
\;\;\;\;\left(a \cdot y3\right) \cdot \left(y1 \cdot z\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y1 < -1.32e79 or 1.3999999999999999e165 < y1

    1. Initial program 23.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot \color{blue}{x} \]
    4. Applied rewrites38.9%

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(b \cdot a - i \cdot c, y, \left(y0 \cdot c - y1 \cdot a\right) \cdot y2\right) - \left(y0 \cdot b - y1 \cdot i\right) \cdot j\right) \cdot x} \]
    5. Taylor expanded in j around inf

      \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      2. lower--.f64N/A

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      3. lower-*.f64N/A

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
      4. lower-*.f6437.0

        \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    7. Applied rewrites37.0%

      \[\leadsto \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right) \cdot x \]
    8. Taylor expanded in b around 0

      \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
      2. lower-*.f6433.3

        \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]
    10. Applied rewrites33.3%

      \[\leadsto \left(i \cdot \left(j \cdot y1\right)\right) \cdot x \]

    if -1.32e79 < y1 < 1.7e-33

    1. Initial program 33.3%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in z around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites37.3%

      \[\leadsto \color{blue}{\left(-z\right) \cdot \left(\mathsf{fma}\left(b \cdot a - i \cdot c, t, \left(y0 \cdot c - y1 \cdot a\right) \cdot y3\right) - \left(y0 \cdot b - y1 \cdot i\right) \cdot k\right)} \]
    5. Taylor expanded in i around -inf

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - \color{blue}{k} \cdot y1\right) \]
      4. lower--.f64N/A

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot \color{blue}{y1}\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right) \]
      6. lower-*.f6419.6

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right) \]
    7. Applied rewrites19.6%

      \[\leadsto \left(i \cdot z\right) \cdot \color{blue}{\left(c \cdot t - k \cdot y1\right)} \]
    8. Taylor expanded in t around inf

      \[\leadsto c \cdot \left(i \cdot \color{blue}{\left(t \cdot z\right)}\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot \color{blue}{z}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      3. lift-*.f6417.5

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
    10. Applied rewrites17.5%

      \[\leadsto c \cdot \left(i \cdot \color{blue}{\left(t \cdot z\right)}\right) \]
    11. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot \color{blue}{z}\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]
      6. lower-*.f64N/A

        \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]
      7. lift-*.f6417.2

        \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]
    12. Applied rewrites17.2%

      \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]

    if 1.7e-33 < y1 < 1.3999999999999999e165

    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. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
      2. lower-*.f64N/A

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites39.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y3 around inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right) + y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1 \cdot z}\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1 \cdot z}\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1} \cdot z\right) \]
      4. mul-1-negN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y \cdot y5\right)\right) + y1 \cdot z\right) \]
      5. distribute-lft-neg-outN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot y5 + y1 \cdot z\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(\mathsf{neg}\left(y\right), y5, y1 \cdot z\right) \]
      7. lower-neg.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
      8. lower-*.f6426.0

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
    7. Applied rewrites26.0%

      \[\leadsto \left(a \cdot y3\right) \cdot \color{blue}{\mathsf{fma}\left(-y, y5, y1 \cdot z\right)} \]
    8. Taylor expanded in y around 0

      \[\leadsto \left(a \cdot y3\right) \cdot \left(y1 \cdot z\right) \]
    9. Step-by-step derivation
      1. lift-*.f6418.4

        \[\leadsto \left(a \cdot y3\right) \cdot \left(y1 \cdot z\right) \]
    10. Applied rewrites18.4%

      \[\leadsto \left(a \cdot y3\right) \cdot \left(y1 \cdot z\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 29: 21.2% accurate, 7.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y3 \leq -0.88:\\ \;\;\;\;\left(a \cdot y3\right) \cdot \left(y1 \cdot z\right)\\ \mathbf{elif}\;y3 \leq 2.8 \cdot 10^{+124}:\\ \;\;\;\;c \cdot \left(i \cdot \left(t \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= y3 -0.88)
   (* (* a y3) (* y1 z))
   (if (<= y3 2.8e+124) (* c (* i (* t z))) (* a (* y1 (* y3 z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y3 <= -0.88) {
		tmp = (a * y3) * (y1 * z);
	} else if (y3 <= 2.8e+124) {
		tmp = c * (i * (t * z));
	} else {
		tmp = a * (y1 * (y3 * z));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (y3 <= (-0.88d0)) then
        tmp = (a * y3) * (y1 * z)
    else if (y3 <= 2.8d+124) then
        tmp = c * (i * (t * z))
    else
        tmp = a * (y1 * (y3 * z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y3 <= -0.88) {
		tmp = (a * y3) * (y1 * z);
	} else if (y3 <= 2.8e+124) {
		tmp = c * (i * (t * z));
	} else {
		tmp = a * (y1 * (y3 * z));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y3 <= -0.88:
		tmp = (a * y3) * (y1 * z)
	elif y3 <= 2.8e+124:
		tmp = c * (i * (t * z))
	else:
		tmp = a * (y1 * (y3 * z))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (y3 <= -0.88)
		tmp = Float64(Float64(a * y3) * Float64(y1 * z));
	elseif (y3 <= 2.8e+124)
		tmp = Float64(c * Float64(i * Float64(t * z)));
	else
		tmp = Float64(a * Float64(y1 * Float64(y3 * z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (y3 <= -0.88)
		tmp = (a * y3) * (y1 * z);
	elseif (y3 <= 2.8e+124)
		tmp = c * (i * (t * z));
	else
		tmp = a * (y1 * (y3 * z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y3, -0.88], N[(N[(a * y3), $MachinePrecision] * N[(y1 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 2.8e+124], N[(c * N[(i * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(y1 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y3 \leq -0.88:\\
\;\;\;\;\left(a \cdot y3\right) \cdot \left(y1 \cdot z\right)\\

\mathbf{elif}\;y3 \leq 2.8 \cdot 10^{+124}:\\
\;\;\;\;c \cdot \left(i \cdot \left(t \cdot z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y3 < -0.880000000000000004

    1. Initial program 24.0%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
      2. lower-*.f64N/A

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites40.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y3 around inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right) + y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1 \cdot z}\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1 \cdot z}\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1} \cdot z\right) \]
      4. mul-1-negN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y \cdot y5\right)\right) + y1 \cdot z\right) \]
      5. distribute-lft-neg-outN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot y5 + y1 \cdot z\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(\mathsf{neg}\left(y\right), y5, y1 \cdot z\right) \]
      7. lower-neg.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
      8. lower-*.f6435.9

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
    7. Applied rewrites35.9%

      \[\leadsto \left(a \cdot y3\right) \cdot \color{blue}{\mathsf{fma}\left(-y, y5, y1 \cdot z\right)} \]
    8. Taylor expanded in y around 0

      \[\leadsto \left(a \cdot y3\right) \cdot \left(y1 \cdot z\right) \]
    9. Step-by-step derivation
      1. lift-*.f6424.7

        \[\leadsto \left(a \cdot y3\right) \cdot \left(y1 \cdot z\right) \]
    10. Applied rewrites24.7%

      \[\leadsto \left(a \cdot y3\right) \cdot \left(y1 \cdot z\right) \]

    if -0.880000000000000004 < y3 < 2.8e124

    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. Taylor expanded in z around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites35.6%

      \[\leadsto \color{blue}{\left(-z\right) \cdot \left(\mathsf{fma}\left(b \cdot a - i \cdot c, t, \left(y0 \cdot c - y1 \cdot a\right) \cdot y3\right) - \left(y0 \cdot b - y1 \cdot i\right) \cdot k\right)} \]
    5. Taylor expanded in i around -inf

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - \color{blue}{k} \cdot y1\right) \]
      4. lower--.f64N/A

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot \color{blue}{y1}\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right) \]
      6. lower-*.f6425.2

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right) \]
    7. Applied rewrites25.2%

      \[\leadsto \left(i \cdot z\right) \cdot \color{blue}{\left(c \cdot t - k \cdot y1\right)} \]
    8. Taylor expanded in t around inf

      \[\leadsto c \cdot \left(i \cdot \color{blue}{\left(t \cdot z\right)}\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot \color{blue}{z}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      3. lift-*.f6417.1

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
    10. Applied rewrites17.1%

      \[\leadsto c \cdot \left(i \cdot \color{blue}{\left(t \cdot z\right)}\right) \]

    if 2.8e124 < 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. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
      2. lower-*.f64N/A

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites40.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y3 around inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right) + y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1 \cdot z}\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1 \cdot z}\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1} \cdot z\right) \]
      4. mul-1-negN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y \cdot y5\right)\right) + y1 \cdot z\right) \]
      5. distribute-lft-neg-outN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot y5 + y1 \cdot z\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(\mathsf{neg}\left(y\right), y5, y1 \cdot z\right) \]
      7. lower-neg.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
      8. lower-*.f6440.6

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
    7. Applied rewrites40.6%

      \[\leadsto \left(a \cdot y3\right) \cdot \color{blue}{\mathsf{fma}\left(-y, y5, y1 \cdot z\right)} \]
    8. Taylor expanded in y around 0

      \[\leadsto a \cdot \left(y1 \cdot \color{blue}{\left(y3 \cdot z\right)}\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
      3. lower-*.f6432.1

        \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
    10. Applied rewrites32.1%

      \[\leadsto a \cdot \left(y1 \cdot \color{blue}{\left(y3 \cdot z\right)}\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 30: 21.1% accurate, 7.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\ \mathbf{if}\;y3 \leq -0.88:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y3 \leq 2.8 \cdot 10^{+124}:\\ \;\;\;\;c \cdot \left(i \cdot \left(t \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* a (* y1 (* y3 z)))))
   (if (<= y3 -0.88) t_1 (if (<= y3 2.8e+124) (* c (* i (* t z))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = a * (y1 * (y3 * z));
	double tmp;
	if (y3 <= -0.88) {
		tmp = t_1;
	} else if (y3 <= 2.8e+124) {
		tmp = c * (i * (t * z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = a * (y1 * (y3 * z))
    if (y3 <= (-0.88d0)) then
        tmp = t_1
    else if (y3 <= 2.8d+124) then
        tmp = c * (i * (t * z))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = a * (y1 * (y3 * z));
	double tmp;
	if (y3 <= -0.88) {
		tmp = t_1;
	} else if (y3 <= 2.8e+124) {
		tmp = c * (i * (t * z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = a * (y1 * (y3 * z))
	tmp = 0
	if y3 <= -0.88:
		tmp = t_1
	elif y3 <= 2.8e+124:
		tmp = c * (i * (t * z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(a * Float64(y1 * Float64(y3 * z)))
	tmp = 0.0
	if (y3 <= -0.88)
		tmp = t_1;
	elseif (y3 <= 2.8e+124)
		tmp = Float64(c * Float64(i * Float64(t * z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = a * (y1 * (y3 * z));
	tmp = 0.0;
	if (y3 <= -0.88)
		tmp = t_1;
	elseif (y3 <= 2.8e+124)
		tmp = c * (i * (t * z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(a * N[(y1 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y3, -0.88], t$95$1, If[LessEqual[y3, 2.8e+124], N[(c * N[(i * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\
\mathbf{if}\;y3 \leq -0.88:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y3 \leq 2.8 \cdot 10^{+124}:\\
\;\;\;\;c \cdot \left(i \cdot \left(t \cdot z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y3 < -0.880000000000000004 or 2.8e124 < y3

    1. Initial program 23.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. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
      2. lower-*.f64N/A

        \[\leadsto \left(\left(-1 \cdot \left(y1 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites40.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(y \cdot x - t \cdot z, b, \left(y2 \cdot t - y3 \cdot y\right) \cdot y5\right)\right) \cdot a} \]
    5. Taylor expanded in y3 around inf

      \[\leadsto a \cdot \color{blue}{\left(y3 \cdot \left(-1 \cdot \left(y \cdot y5\right) + y1 \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1 \cdot z}\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1 \cdot z}\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(-1 \cdot \left(y \cdot y5\right) + \color{blue}{y1} \cdot z\right) \]
      4. mul-1-negN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y \cdot y5\right)\right) + y1 \cdot z\right) \]
      5. distribute-lft-neg-outN/A

        \[\leadsto \left(a \cdot y3\right) \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot y5 + y1 \cdot z\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(\mathsf{neg}\left(y\right), y5, y1 \cdot z\right) \]
      7. lower-neg.f64N/A

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
      8. lower-*.f6437.7

        \[\leadsto \left(a \cdot y3\right) \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right) \]
    7. Applied rewrites37.7%

      \[\leadsto \left(a \cdot y3\right) \cdot \color{blue}{\mathsf{fma}\left(-y, y5, y1 \cdot z\right)} \]
    8. Taylor expanded in y around 0

      \[\leadsto a \cdot \left(y1 \cdot \color{blue}{\left(y3 \cdot z\right)}\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
      3. lower-*.f6429.1

        \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
    10. Applied rewrites29.1%

      \[\leadsto a \cdot \left(y1 \cdot \color{blue}{\left(y3 \cdot z\right)}\right) \]

    if -0.880000000000000004 < y3 < 2.8e124

    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. Taylor expanded in z around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot z\right) \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)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
    4. Applied rewrites35.6%

      \[\leadsto \color{blue}{\left(-z\right) \cdot \left(\mathsf{fma}\left(b \cdot a - i \cdot c, t, \left(y0 \cdot c - y1 \cdot a\right) \cdot y3\right) - \left(y0 \cdot b - y1 \cdot i\right) \cdot k\right)} \]
    5. Taylor expanded in i around -inf

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - \color{blue}{k} \cdot y1\right) \]
      4. lower--.f64N/A

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot \color{blue}{y1}\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right) \]
      6. lower-*.f6425.2

        \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right) \]
    7. Applied rewrites25.2%

      \[\leadsto \left(i \cdot z\right) \cdot \color{blue}{\left(c \cdot t - k \cdot y1\right)} \]
    8. Taylor expanded in t around inf

      \[\leadsto c \cdot \left(i \cdot \color{blue}{\left(t \cdot z\right)}\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot \color{blue}{z}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
      3. lift-*.f6417.1

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
    10. Applied rewrites17.1%

      \[\leadsto c \cdot \left(i \cdot \color{blue}{\left(t \cdot z\right)}\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 31: 17.0% accurate, 13.6× speedup?

\[\begin{array}{l} \\ \left(c \cdot i\right) \cdot \left(t \cdot z\right) \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (* (* c i) (* t z)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return (c * i) * (t * z);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    code = (c * i) * (t * z)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return (c * i) * (t * z);
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	return (c * i) * (t * z)
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	return Float64(Float64(c * i) * Float64(t * z))
end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = (c * i) * (t * z);
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(N[(c * i), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(c \cdot i\right) \cdot \left(t \cdot z\right)
\end{array}
Derivation
  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. Taylor expanded in z around -inf

    \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
  3. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \left(-1 \cdot z\right) \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)} \]
    2. mul-1-negN/A

      \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
    3. lower-*.f64N/A

      \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
    4. lower-neg.f64N/A

      \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
  4. Applied rewrites37.3%

    \[\leadsto \color{blue}{\left(-z\right) \cdot \left(\mathsf{fma}\left(b \cdot a - i \cdot c, t, \left(y0 \cdot c - y1 \cdot a\right) \cdot y3\right) - \left(y0 \cdot b - y1 \cdot i\right) \cdot k\right)} \]
  5. Taylor expanded in i around -inf

    \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]
  6. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right) \]
    2. lower-*.f64N/A

      \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right) \]
    3. lower-*.f64N/A

      \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - \color{blue}{k} \cdot y1\right) \]
    4. lower--.f64N/A

      \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot \color{blue}{y1}\right) \]
    5. lower-*.f64N/A

      \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right) \]
    6. lower-*.f6424.8

      \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right) \]
  7. Applied rewrites24.8%

    \[\leadsto \left(i \cdot z\right) \cdot \color{blue}{\left(c \cdot t - k \cdot y1\right)} \]
  8. Taylor expanded in t around inf

    \[\leadsto c \cdot \left(i \cdot \color{blue}{\left(t \cdot z\right)}\right) \]
  9. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto c \cdot \left(i \cdot \left(t \cdot \color{blue}{z}\right)\right) \]
    2. lower-*.f64N/A

      \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
    3. lift-*.f6417.0

      \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
  10. Applied rewrites17.0%

    \[\leadsto c \cdot \left(i \cdot \color{blue}{\left(t \cdot z\right)}\right) \]
  11. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto c \cdot \left(i \cdot \left(t \cdot \color{blue}{z}\right)\right) \]
    2. lift-*.f64N/A

      \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
    3. lift-*.f64N/A

      \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
    4. associate-*r*N/A

      \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]
    5. lower-*.f64N/A

      \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]
    6. lower-*.f64N/A

      \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]
    7. lift-*.f6416.6

      \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]
  12. Applied rewrites16.6%

    \[\leadsto \left(c \cdot i\right) \cdot \left(t \cdot z\right) \]
  13. Add Preprocessing

Alternative 32: 16.6% accurate, 13.6× speedup?

\[\begin{array}{l} \\ c \cdot \left(i \cdot \left(t \cdot z\right)\right) \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (* c (* i (* t z))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return c * (i * (t * z));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    code = c * (i * (t * z))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return c * (i * (t * z));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	return c * (i * (t * z))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	return Float64(c * Float64(i * Float64(t * z)))
end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = c * (i * (t * z));
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(c * N[(i * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
c \cdot \left(i \cdot \left(t \cdot z\right)\right)
\end{array}
Derivation
  1. Initial program 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. Taylor expanded in z around -inf

    \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
  3. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \left(-1 \cdot z\right) \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)} \]
    2. mul-1-negN/A

      \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \left(\color{blue}{\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) \]
    3. lower-*.f64N/A

      \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \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)} \]
    4. lower-neg.f64N/A

      \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\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) \]
  4. Applied rewrites37.3%

    \[\leadsto \color{blue}{\left(-z\right) \cdot \left(\mathsf{fma}\left(b \cdot a - i \cdot c, t, \left(y0 \cdot c - y1 \cdot a\right) \cdot y3\right) - \left(y0 \cdot b - y1 \cdot i\right) \cdot k\right)} \]
  5. Taylor expanded in i around -inf

    \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]
  6. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right) \]
    2. lower-*.f64N/A

      \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right) \]
    3. lower-*.f64N/A

      \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - \color{blue}{k} \cdot y1\right) \]
    4. lower--.f64N/A

      \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot \color{blue}{y1}\right) \]
    5. lower-*.f64N/A

      \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right) \]
    6. lower-*.f6424.8

      \[\leadsto \left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right) \]
  7. Applied rewrites24.8%

    \[\leadsto \left(i \cdot z\right) \cdot \color{blue}{\left(c \cdot t - k \cdot y1\right)} \]
  8. Taylor expanded in t around inf

    \[\leadsto c \cdot \left(i \cdot \color{blue}{\left(t \cdot z\right)}\right) \]
  9. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto c \cdot \left(i \cdot \left(t \cdot \color{blue}{z}\right)\right) \]
    2. lower-*.f64N/A

      \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
    3. lift-*.f6417.0

      \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) \]
  10. Applied rewrites17.0%

    \[\leadsto c \cdot \left(i \cdot \color{blue}{\left(t \cdot z\right)}\right) \]
  11. Add Preprocessing

Reproduce

?
herbie shell --seed 2025130 
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :name "Linear.Matrix:det44 from linear-1.19.1.3"
  :precision binary64
  (+ (- (+ (+ (- (* (- (* x y) (* z t)) (- (* a b) (* c i))) (* (- (* x j) (* z k)) (- (* y0 b) (* y1 i)))) (* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a)))) (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i)))) (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a)))) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))