Linear.Matrix:det44 from linear-1.19.1.3

Percentage Accurate: 29.5% → 41.7%
Time: 26.0s
Alternatives: 33
Speedup: 5.6×

Specification

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

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

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 33 alternatives:

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

Initial Program: 29.5% 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: 41.7% accurate, 1.7× speedup?

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

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

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

\mathbf{elif}\;t \leq 1.35 \cdot 10^{-199}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t \leq 2.9 \cdot 10^{-79}:\\
\;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, t\_1, x \cdot t\_5\right) - t \cdot t\_4\right)\\

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

\mathbf{elif}\;t \leq 9 \cdot 10^{+178}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -6.99999999999999999e123

    1. Initial program 21.6%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in 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)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

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

        \[\leadsto 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) - \color{blue}{y2 \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    5. Applied rewrites67.7%

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

    if -6.99999999999999999e123 < t < -1.25000000000000001e-151

    1. Initial program 47.4%

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

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

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

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

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

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

    if -1.25000000000000001e-151 < t < 1.34999999999999995e-199 or 2.9000000000000001e82 < t < 8.9999999999999994e178

    1. Initial program 25.0%

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

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

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

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

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

    if 1.34999999999999995e-199 < t < 2.9000000000000001e-79

    1. Initial program 36.0%

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

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

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

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

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

    if 2.9000000000000001e-79 < t < 2.9000000000000001e82

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.9999999999999994e178 < t

    1. Initial program 14.5%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto i \cdot \color{blue}{\left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification61.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7 \cdot 10^{+123}:\\ \;\;\;\;t \cdot \left(\mathsf{fma}\left(-1, z \cdot \left(a \cdot b - c \cdot i\right), j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - y2 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-151}:\\ \;\;\;\;\left(-y3\right) \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-199}:\\ \;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-79}:\\ \;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{+82}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, a \cdot y - j \cdot y0, \frac{b \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(t \cdot z\right), y4 \cdot \left(j \cdot t - k \cdot y\right)\right) + k \cdot \left(y0 \cdot z\right)\right)}{x}\right)\\ \mathbf{elif}\;t \leq 9 \cdot 10^{+178}:\\ \;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 53.7% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot t\_2\right) - c \cdot t\_1\right)\\


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

    1. Initial program 94.3%

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

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

    1. Initial program 0.0%

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

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

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

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

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

Alternative 3: 42.2% accurate, 2.1× speedup?

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

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

\mathbf{elif}\;i \leq -1.8 \cdot 10^{+91}:\\
\;\;\;\;t \cdot \left(\mathsf{fma}\left(-1, z \cdot \left(a \cdot b - c \cdot i\right), j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - y2 \cdot t\_1\right)\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if i < -1.05e241 or 5.30000000000000015e76 < i

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

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

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

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

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

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

    if -1.05e241 < i < -1.8e91

    1. Initial program 15.2%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in 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)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

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

        \[\leadsto 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) - \color{blue}{y2 \cdot \left(c \cdot y4 - a \cdot y5\right)}\right) \]
    5. Applied rewrites67.0%

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

    if -1.8e91 < i < -5.99999999999999991e-24

    1. Initial program 22.1%

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

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

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

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

      \[\leadsto \color{blue}{y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    6. Taylor expanded in k around inf

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

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

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

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

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

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

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

    if -5.99999999999999991e-24 < i < -3.2999999999999999e-103

    1. Initial program 37.9%

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

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

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

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

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

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

    if -3.2999999999999999e-103 < i < 5.30000000000000015e76

    1. Initial program 35.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -1.05 \cdot 10^{+241}:\\ \;\;\;\;\left(-i\right) \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{elif}\;i \leq -1.8 \cdot 10^{+91}:\\ \;\;\;\;t \cdot \left(\mathsf{fma}\left(-1, z \cdot \left(a \cdot b - c \cdot i\right), j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - y2 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \mathbf{elif}\;i \leq -6 \cdot 10^{-24}:\\ \;\;\;\;k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right)\\ \mathbf{elif}\;i \leq -3.3 \cdot 10^{-103}:\\ \;\;\;\;\left(-y3\right) \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \mathbf{elif}\;i \leq 5.3 \cdot 10^{+76}:\\ \;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-i\right) \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 43.3% accurate, 2.2× speedup?

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

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

\mathbf{elif}\;i \leq -2.1 \cdot 10^{-36}:\\
\;\;\;\;\left(-y5\right) \cdot \left(\mathsf{fma}\left(i, t\_1, y0 \cdot t\_3\right) - a \cdot t\_4\right)\\

\mathbf{elif}\;i \leq -3.3 \cdot 10^{-103}:\\
\;\;\;\;\left(-y3\right) \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\

\mathbf{elif}\;i \leq 5.3 \cdot 10^{+76}:\\
\;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, t\_1, y1 \cdot t\_3\right) - c \cdot t\_4\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if i < -1.49999999999999992e207 or 5.30000000000000015e76 < i

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

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

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

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

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

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

    if -1.49999999999999992e207 < i < -2.09999999999999991e-36

    1. Initial program 18.6%

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

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

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

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

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

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

    if -2.09999999999999991e-36 < i < -3.2999999999999999e-103

    1. Initial program 36.1%

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

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

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

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

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

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

    if -3.2999999999999999e-103 < i < 5.30000000000000015e76

    1. Initial program 35.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -1.5 \cdot 10^{+207}:\\ \;\;\;\;\left(-i\right) \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{elif}\;i \leq -2.1 \cdot 10^{-36}:\\ \;\;\;\;\left(-y5\right) \cdot \left(\mathsf{fma}\left(i, j \cdot t - k \cdot y, y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \mathbf{elif}\;i \leq -3.3 \cdot 10^{-103}:\\ \;\;\;\;\left(-y3\right) \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\ \mathbf{elif}\;i \leq 5.3 \cdot 10^{+76}:\\ \;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-i\right) \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 38.7% accurate, 2.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.5e177

    1. Initial program 12.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.5e177 < t < -3.2000000000000003e-207

    1. Initial program 42.3%

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

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

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

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

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

    if -3.2000000000000003e-207 < t < 4.29999999999999972e181

    1. Initial program 30.3%

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

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

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

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

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

    if 4.29999999999999972e181 < t

    1. Initial program 14.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 38.9% accurate, 2.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y3 \leq -2.1 \cdot 10^{+208}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y3 < -2.0999999999999998e208

    1. Initial program 12.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0999999999999998e208 < y3 < -5.4000000000000002e36

    1. Initial program 37.0%

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

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

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

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

      \[\leadsto \color{blue}{y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    6. Taylor expanded in j around inf

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

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

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

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

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

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

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

    if -5.4000000000000002e36 < y3 < 2.3499999999999999e110

    1. Initial program 33.6%

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

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

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

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

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

    if 2.3499999999999999e110 < y3

    1. Initial program 20.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 45.3% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot t - k \cdot y\\ \mathbf{if}\;i \leq -6.5 \cdot 10^{+55} \lor \neg \left(i \leq 5.3 \cdot 10^{+76}\right):\\ \;\;\;\;\left(-i\right) \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot t\_1\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, t\_1, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \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 (or (<= i -6.5e+55) (not (<= i 5.3e+76)))
     (*
      (- i)
      (- (fma c (- (* x y) (* t z)) (* y5 t_1)) (* y1 (- (* j x) (* k z)))))
     (*
      y4
      (-
       (fma b t_1 (* y1 (- (* k y2) (* j y3))))
       (* c (- (* 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 t_1 = (j * t) - (k * y);
	double tmp;
	if ((i <= -6.5e+55) || !(i <= 5.3e+76)) {
		tmp = -i * (fma(c, ((x * y) - (t * z)), (y5 * t_1)) - (y1 * ((j * x) - (k * z))));
	} else {
		tmp = y4 * (fma(b, t_1, (y1 * ((k * y2) - (j * y3)))) - (c * ((t * y2) - (y * y3))));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(j * t) - Float64(k * y))
	tmp = 0.0
	if ((i <= -6.5e+55) || !(i <= 5.3e+76))
		tmp = Float64(Float64(-i) * Float64(fma(c, Float64(Float64(x * y) - Float64(t * z)), Float64(y5 * t_1)) - Float64(y1 * Float64(Float64(j * x) - Float64(k * z)))));
	else
		tmp = Float64(y4 * Float64(fma(b, t_1, Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3)))));
	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[Or[LessEqual[i, -6.5e+55], N[Not[LessEqual[i, 5.3e+76]], $MachinePrecision]], N[((-i) * N[(N[(c * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y5 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y4 * N[(N[(b * t$95$1 + N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot t - k \cdot y\\
\mathbf{if}\;i \leq -6.5 \cdot 10^{+55} \lor \neg \left(i \leq 5.3 \cdot 10^{+76}\right):\\
\;\;\;\;\left(-i\right) \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot t\_1\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, t\_1, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -6.50000000000000027e55 or 5.30000000000000015e76 < i

    1. Initial program 24.8%

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

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

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

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

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

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

    if -6.50000000000000027e55 < i < 5.30000000000000015e76

    1. Initial program 34.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -6.5 \cdot 10^{+55} \lor \neg \left(i \leq 5.3 \cdot 10^{+76}\right):\\ \;\;\;\;\left(-i\right) \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 30.9% accurate, 2.6× speedup?

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

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

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

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

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

\mathbf{elif}\;y \leq 1.75 \cdot 10^{-192}:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\

\mathbf{elif}\;y \leq 7 \cdot 10^{+61}:\\
\;\;\;\;y4 \cdot \left(y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\

\mathbf{elif}\;y \leq 3.1 \cdot 10^{+111}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y1 \cdot \left(\frac{y \cdot y5}{y1} - z\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if y < -8.40000000000000039e222

    1. Initial program 29.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.40000000000000039e222 < y < -2.40000000000000002e73

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

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

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

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

      \[\leadsto \color{blue}{y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    6. Taylor expanded in k around inf

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

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

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

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

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

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

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

    if -2.40000000000000002e73 < y < -3e-73

    1. Initial program 25.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3e-73 < y < 1.00000000000000007e-285

    1. Initial program 40.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000007e-285 < y < 1.75000000000000007e-192

    1. Initial program 25.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
      5. lower-*.f6457.7

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    8. Applied rewrites57.7%

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

    if 1.75000000000000007e-192 < y < 7.00000000000000036e61

    1. Initial program 35.2%

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

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

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

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

      \[\leadsto \color{blue}{y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    6. Taylor expanded in y1 around inf

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

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

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

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

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

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

    if 7.00000000000000036e61 < y < 3.1e111

    1. Initial program 30.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto i \cdot \left(k \cdot \left(y1 \cdot \left(\frac{y \cdot y5}{y1} - z\right)\right)\right) \]
      4. lift-*.f6462.7

        \[\leadsto i \cdot \left(k \cdot \left(y1 \cdot \left(\frac{y \cdot y5}{y1} - z\right)\right)\right) \]
    11. Applied rewrites62.7%

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

    if 3.1e111 < y

    1. Initial program 25.3%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
  3. Recombined 8 regimes into one program.
  4. Add Preprocessing

Alternative 9: 41.4% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{+246}:\\
\;\;\;\;b \cdot \left(x \cdot \left(a \cdot y - j \cdot y0\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -6.19999999999999977e246

    1. Initial program 7.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto b \cdot \left(x \cdot \left(a \cdot y - j \cdot y0\right)\right) \]
    8. Applied rewrites76.9%

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

    if -6.19999999999999977e246 < x < 4.0000000000000002e117

    1. Initial program 32.1%

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

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

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

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

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

    if 4.0000000000000002e117 < x

    1. Initial program 30.0%

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

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

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

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

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

Alternative 10: 30.8% accurate, 3.1× speedup?

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

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

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

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

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

\mathbf{elif}\;y \leq 1.75 \cdot 10^{-192}:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\

\mathbf{elif}\;y \leq 4.5 \cdot 10^{+33}:\\
\;\;\;\;y4 \cdot \left(y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\

\mathbf{elif}\;y \leq 2.8 \cdot 10^{+86}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if y < -8.40000000000000039e222

    1. Initial program 29.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.40000000000000039e222 < y < -2.40000000000000002e73

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

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

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

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

      \[\leadsto \color{blue}{y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    6. Taylor expanded in k around inf

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

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

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

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

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

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

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

    if -2.40000000000000002e73 < y < -3e-73

    1. Initial program 25.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3e-73 < y < 1.00000000000000007e-285

    1. Initial program 40.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000007e-285 < y < 1.75000000000000007e-192

    1. Initial program 25.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
      5. lower-*.f6457.7

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    8. Applied rewrites57.7%

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

    if 1.75000000000000007e-192 < y < 4.5e33

    1. Initial program 34.7%

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

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

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

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

      \[\leadsto \color{blue}{y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    6. Taylor expanded in y1 around inf

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

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

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

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

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

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

    if 4.5e33 < y < 2.80000000000000004e86

    1. Initial program 37.4%

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

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

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

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

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

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

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

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

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

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

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

    if 2.80000000000000004e86 < y

    1. Initial program 23.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
  3. Recombined 8 regimes into one program.
  4. Add Preprocessing

Alternative 11: 31.4% accurate, 3.1× speedup?

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

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

\mathbf{elif}\;y \leq -3.3 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;y \leq 1.75 \cdot 10^{-192}:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\

\mathbf{elif}\;y \leq 4.5 \cdot 10^{+33}:\\
\;\;\;\;y4 \cdot \left(y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\

\mathbf{elif}\;y \leq 2.8 \cdot 10^{+86}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if y < -4.3999999999999999e221

    1. Initial program 27.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.3999999999999999e221 < y < -3.3e41 or 2.80000000000000004e86 < y

    1. Initial program 22.1%

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

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

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

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

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

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

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

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

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

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

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

    if -3.3e41 < y < -1.20000000000000003e-73

    1. Initial program 29.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.20000000000000003e-73 < y < 1.00000000000000007e-285

    1. Initial program 40.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000007e-285 < y < 1.75000000000000007e-192

    1. Initial program 25.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
      5. lower-*.f6457.7

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    8. Applied rewrites57.7%

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

    if 1.75000000000000007e-192 < y < 4.5e33

    1. Initial program 34.7%

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

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

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

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

      \[\leadsto \color{blue}{y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    6. Taylor expanded in y1 around inf

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

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

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

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

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

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

    if 4.5e33 < y < 2.80000000000000004e86

    1. Initial program 37.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 30.1% accurate, 3.4× speedup?

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

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

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

\\
\begin{array}{l}
t_1 := i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\mathbf{if}\;x \leq -6.1 \cdot 10^{+218}:\\
\;\;\;\;b \cdot \left(x \cdot \left(a \cdot y - j \cdot y0\right)\right)\\

\mathbf{elif}\;x \leq -4.6 \cdot 10^{+101}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -2.1 \cdot 10^{+50}:\\
\;\;\;\;y \cdot \left(y5 \cdot \left(i \cdot k - a \cdot y3\right)\right)\\

\mathbf{elif}\;x \leq 6.6 \cdot 10^{-306}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\

\mathbf{elif}\;x \leq 2.2 \cdot 10^{-127}:\\
\;\;\;\;t\_1\\

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

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


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

    1. Initial program 12.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto b \cdot \left(x \cdot \left(a \cdot y - j \cdot y0\right)\right) \]
    8. Applied rewrites75.0%

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

    if -6.10000000000000021e218 < x < -4.6000000000000003e101 or 6.6000000000000002e-306 < x < 2.2000000000000001e-127

    1. Initial program 44.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.6000000000000003e101 < x < -2.1e50

    1. Initial program 22.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(y5 \cdot \left(i \cdot k - a \cdot y3\right)\right) \]
      5. lower-*.f6467.2

        \[\leadsto y \cdot \left(y5 \cdot \left(i \cdot k - a \cdot y3\right)\right) \]
    8. Applied rewrites67.2%

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

    if -2.1e50 < x < 6.6000000000000002e-306

    1. Initial program 26.6%

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

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

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

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

      \[\leadsto \color{blue}{y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    6. Taylor expanded in y1 around inf

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

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

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

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

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

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

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

    if 2.2000000000000001e-127 < x < 7.19999999999999972e150

    1. Initial program 33.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.19999999999999972e150 < x

    1. Initial program 20.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
      5. lower-*.f6448.9

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    8. Applied rewrites48.9%

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

Alternative 13: 32.3% accurate, 3.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\ \mathbf{if}\;y4 \leq -7.2 \cdot 10^{+216}:\\ \;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\ \mathbf{elif}\;y4 \leq -1.8 \cdot 10^{-23}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y4 \leq 4.8 \cdot 10^{-177}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{elif}\;y4 \leq 1.1 \cdot 10^{-93}:\\ \;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\ \mathbf{elif}\;y4 \leq 5 \cdot 10^{+42}:\\ \;\;\;\;y4 \cdot \left(y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* b (* y4 (- (* j t) (* k y))))))
   (if (<= y4 -7.2e+216)
     (* y2 (* y4 (- (* k y1) (* c t))))
     (if (<= y4 -1.8e-23)
       t_1
       (if (<= y4 4.8e-177)
         (* y3 (* y5 (- (* j y0) (* a y))))
         (if (<= y4 1.1e-93)
           (* x (* y0 (- (* c y2) (* b j))))
           (if (<= y4 5e+42) (* y4 (* y1 (- (* k y2) (* j 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 = b * (y4 * ((j * t) - (k * y)));
	double tmp;
	if (y4 <= -7.2e+216) {
		tmp = y2 * (y4 * ((k * y1) - (c * t)));
	} else if (y4 <= -1.8e-23) {
		tmp = t_1;
	} else if (y4 <= 4.8e-177) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else if (y4 <= 1.1e-93) {
		tmp = x * (y0 * ((c * y2) - (b * j)));
	} else if (y4 <= 5e+42) {
		tmp = y4 * (y1 * ((k * y2) - (j * 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 = b * (y4 * ((j * t) - (k * y)))
    if (y4 <= (-7.2d+216)) then
        tmp = y2 * (y4 * ((k * y1) - (c * t)))
    else if (y4 <= (-1.8d-23)) then
        tmp = t_1
    else if (y4 <= 4.8d-177) then
        tmp = y3 * (y5 * ((j * y0) - (a * y)))
    else if (y4 <= 1.1d-93) then
        tmp = x * (y0 * ((c * y2) - (b * j)))
    else if (y4 <= 5d+42) then
        tmp = y4 * (y1 * ((k * y2) - (j * 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 = b * (y4 * ((j * t) - (k * y)));
	double tmp;
	if (y4 <= -7.2e+216) {
		tmp = y2 * (y4 * ((k * y1) - (c * t)));
	} else if (y4 <= -1.8e-23) {
		tmp = t_1;
	} else if (y4 <= 4.8e-177) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else if (y4 <= 1.1e-93) {
		tmp = x * (y0 * ((c * y2) - (b * j)));
	} else if (y4 <= 5e+42) {
		tmp = y4 * (y1 * ((k * y2) - (j * 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 = b * (y4 * ((j * t) - (k * y)))
	tmp = 0
	if y4 <= -7.2e+216:
		tmp = y2 * (y4 * ((k * y1) - (c * t)))
	elif y4 <= -1.8e-23:
		tmp = t_1
	elif y4 <= 4.8e-177:
		tmp = y3 * (y5 * ((j * y0) - (a * y)))
	elif y4 <= 1.1e-93:
		tmp = x * (y0 * ((c * y2) - (b * j)))
	elif y4 <= 5e+42:
		tmp = y4 * (y1 * ((k * y2) - (j * 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(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y))))
	tmp = 0.0
	if (y4 <= -7.2e+216)
		tmp = Float64(y2 * Float64(y4 * Float64(Float64(k * y1) - Float64(c * t))));
	elseif (y4 <= -1.8e-23)
		tmp = t_1;
	elseif (y4 <= 4.8e-177)
		tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))));
	elseif (y4 <= 1.1e-93)
		tmp = Float64(x * Float64(y0 * Float64(Float64(c * y2) - Float64(b * j))));
	elseif (y4 <= 5e+42)
		tmp = Float64(y4 * Float64(y1 * Float64(Float64(k * y2) - Float64(j * 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 = b * (y4 * ((j * t) - (k * y)));
	tmp = 0.0;
	if (y4 <= -7.2e+216)
		tmp = y2 * (y4 * ((k * y1) - (c * t)));
	elseif (y4 <= -1.8e-23)
		tmp = t_1;
	elseif (y4 <= 4.8e-177)
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	elseif (y4 <= 1.1e-93)
		tmp = x * (y0 * ((c * y2) - (b * j)));
	elseif (y4 <= 5e+42)
		tmp = y4 * (y1 * ((k * y2) - (j * 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[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -7.2e+216], N[(y2 * N[(y4 * N[(N[(k * y1), $MachinePrecision] - N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -1.8e-23], t$95$1, If[LessEqual[y4, 4.8e-177], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 1.1e-93], N[(x * N[(y0 * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 5e+42], N[(y4 * N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\
\mathbf{if}\;y4 \leq -7.2 \cdot 10^{+216}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\

\mathbf{elif}\;y4 \leq -1.8 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y4 \leq 4.8 \cdot 10^{-177}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\

\mathbf{elif}\;y4 \leq 1.1 \cdot 10^{-93}:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\

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

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


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

    1. Initial program 22.2%

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

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

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

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

      \[\leadsto \color{blue}{y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    6. Taylor expanded in y2 around inf

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

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

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

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

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

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

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

    if -7.2000000000000004e216 < y4 < -1.7999999999999999e-23 or 5.00000000000000007e42 < y4

    1. Initial program 27.8%

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

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

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

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

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

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

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

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

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

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

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

    if -1.7999999999999999e-23 < y4 < 4.7999999999999998e-177

    1. Initial program 31.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.7999999999999998e-177 < y4 < 1.09999999999999998e-93

    1. Initial program 37.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
      5. lower-*.f6457.6

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    8. Applied rewrites57.6%

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

    if 1.09999999999999998e-93 < y4 < 5.00000000000000007e42

    1. Initial program 37.9%

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

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

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

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

      \[\leadsto \color{blue}{y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    6. Taylor expanded in y1 around inf

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

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

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

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

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

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

Alternative 14: 30.6% accurate, 3.7× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\
\mathbf{if}\;x \leq -3.4 \cdot 10^{+81}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -2.1 \cdot 10^{+50}:\\
\;\;\;\;y \cdot \left(y5 \cdot \left(i \cdot k - a \cdot y3\right)\right)\\

\mathbf{elif}\;x \leq 6.6 \cdot 10^{-306}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -3.40000000000000003e81 or 7.19999999999999972e150 < x

    1. Initial program 22.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
      5. lower-*.f6449.4

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    8. Applied rewrites49.4%

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

    if -3.40000000000000003e81 < x < -2.1e50

    1. Initial program 25.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(y5 \cdot \left(i \cdot k - a \cdot y3\right)\right) \]
      5. lower-*.f6475.4

        \[\leadsto y \cdot \left(y5 \cdot \left(i \cdot k - a \cdot y3\right)\right) \]
    8. Applied rewrites75.4%

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

    if -2.1e50 < x < 6.6000000000000002e-306

    1. Initial program 26.6%

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

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

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

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

      \[\leadsto \color{blue}{y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    6. Taylor expanded in y1 around inf

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

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

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

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

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

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

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

    if 6.6000000000000002e-306 < x < 2.2000000000000001e-127

    1. Initial program 49.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.2000000000000001e-127 < x < 7.19999999999999972e150

    1. Initial program 33.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 32.4% accurate, 3.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(b \cdot \left(a \cdot y - j \cdot y0\right)\right)\\ \mathbf{if}\;b \leq -2.2 \cdot 10^{+88}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -6 \cdot 10^{-65}:\\ \;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \mathbf{elif}\;b \leq -5.8 \cdot 10^{-217}:\\ \;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\ \mathbf{elif}\;b \leq 2.95 \cdot 10^{-297}:\\ \;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\ \mathbf{elif}\;b \leq 3 \cdot 10^{-68}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\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 (* x (* b (- (* a y) (* j y0))))))
   (if (<= b -2.2e+88)
     t_1
     (if (<= b -6e-65)
       (* a (* y5 (- (* t y2) (* y y3))))
       (if (<= b -5.8e-217)
         (* c (* y0 (- (* x y2) (* y3 z))))
         (if (<= b 2.95e-297)
           (* y1 (* z (- (* a y3) (* i k))))
           (if (<= b 3e-68) (* y3 (* y5 (- (* j y0) (* a y)))) 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 = x * (b * ((a * y) - (j * y0)));
	double tmp;
	if (b <= -2.2e+88) {
		tmp = t_1;
	} else if (b <= -6e-65) {
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	} else if (b <= -5.8e-217) {
		tmp = c * (y0 * ((x * y2) - (y3 * z)));
	} else if (b <= 2.95e-297) {
		tmp = y1 * (z * ((a * y3) - (i * k)));
	} else if (b <= 3e-68) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} 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 = x * (b * ((a * y) - (j * y0)))
    if (b <= (-2.2d+88)) then
        tmp = t_1
    else if (b <= (-6d-65)) then
        tmp = a * (y5 * ((t * y2) - (y * y3)))
    else if (b <= (-5.8d-217)) then
        tmp = c * (y0 * ((x * y2) - (y3 * z)))
    else if (b <= 2.95d-297) then
        tmp = y1 * (z * ((a * y3) - (i * k)))
    else if (b <= 3d-68) then
        tmp = y3 * (y5 * ((j * y0) - (a * y)))
    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 = x * (b * ((a * y) - (j * y0)));
	double tmp;
	if (b <= -2.2e+88) {
		tmp = t_1;
	} else if (b <= -6e-65) {
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	} else if (b <= -5.8e-217) {
		tmp = c * (y0 * ((x * y2) - (y3 * z)));
	} else if (b <= 2.95e-297) {
		tmp = y1 * (z * ((a * y3) - (i * k)));
	} else if (b <= 3e-68) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} 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 = x * (b * ((a * y) - (j * y0)))
	tmp = 0
	if b <= -2.2e+88:
		tmp = t_1
	elif b <= -6e-65:
		tmp = a * (y5 * ((t * y2) - (y * y3)))
	elif b <= -5.8e-217:
		tmp = c * (y0 * ((x * y2) - (y3 * z)))
	elif b <= 2.95e-297:
		tmp = y1 * (z * ((a * y3) - (i * k)))
	elif b <= 3e-68:
		tmp = y3 * (y5 * ((j * y0) - (a * y)))
	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(x * Float64(b * Float64(Float64(a * y) - Float64(j * y0))))
	tmp = 0.0
	if (b <= -2.2e+88)
		tmp = t_1;
	elseif (b <= -6e-65)
		tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))));
	elseif (b <= -5.8e-217)
		tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z))));
	elseif (b <= 2.95e-297)
		tmp = Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k))));
	elseif (b <= 3e-68)
		tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))));
	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 = x * (b * ((a * y) - (j * y0)));
	tmp = 0.0;
	if (b <= -2.2e+88)
		tmp = t_1;
	elseif (b <= -6e-65)
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	elseif (b <= -5.8e-217)
		tmp = c * (y0 * ((x * y2) - (y3 * z)));
	elseif (b <= 2.95e-297)
		tmp = y1 * (z * ((a * y3) - (i * k)));
	elseif (b <= 3e-68)
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	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[(x * N[(b * N[(N[(a * y), $MachinePrecision] - N[(j * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.2e+88], t$95$1, If[LessEqual[b, -6e-65], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -5.8e-217], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.95e-297], N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3e-68], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(b \cdot \left(a \cdot y - j \cdot y0\right)\right)\\
\mathbf{if}\;b \leq -2.2 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -6 \cdot 10^{-65}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\

\mathbf{elif}\;b \leq -5.8 \cdot 10^{-217}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\

\mathbf{elif}\;b \leq 2.95 \cdot 10^{-297}:\\
\;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -2.20000000000000009e88 or 3e-68 < b

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(b \cdot \left(a \cdot y - j \cdot y0\right)\right) \]
      4. lift--.f6441.2

        \[\leadsto x \cdot \left(b \cdot \left(a \cdot y - j \cdot y0\right)\right) \]
    11. Applied rewrites41.2%

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

    if -2.20000000000000009e88 < b < -5.99999999999999996e-65

    1. Initial program 25.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.99999999999999996e-65 < b < -5.79999999999999963e-217

    1. Initial program 60.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.79999999999999963e-217 < b < 2.9499999999999999e-297

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.9499999999999999e-297 < b < 3e-68

    1. Initial program 30.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 32.0% accurate, 3.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(b \cdot \left(a \cdot y - j \cdot y0\right)\right)\\ \mathbf{if}\;b \leq -2.2 \cdot 10^{+88}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -1.35 \cdot 10^{-62}:\\ \;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \mathbf{elif}\;b \leq -4.2 \cdot 10^{-208}:\\ \;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\ \mathbf{elif}\;b \leq 2.95 \cdot 10^{-297}:\\ \;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\ \mathbf{elif}\;b \leq 3 \cdot 10^{-68}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\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 (* x (* b (- (* a y) (* j y0))))))
   (if (<= b -2.2e+88)
     t_1
     (if (<= b -1.35e-62)
       (* a (* y5 (- (* t y2) (* y y3))))
       (if (<= b -4.2e-208)
         (* i (* z (- (* c t) (* k y1))))
         (if (<= b 2.95e-297)
           (* y1 (* z (- (* a y3) (* i k))))
           (if (<= b 3e-68) (* y3 (* y5 (- (* j y0) (* a y)))) 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 = x * (b * ((a * y) - (j * y0)));
	double tmp;
	if (b <= -2.2e+88) {
		tmp = t_1;
	} else if (b <= -1.35e-62) {
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	} else if (b <= -4.2e-208) {
		tmp = i * (z * ((c * t) - (k * y1)));
	} else if (b <= 2.95e-297) {
		tmp = y1 * (z * ((a * y3) - (i * k)));
	} else if (b <= 3e-68) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} 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 = x * (b * ((a * y) - (j * y0)))
    if (b <= (-2.2d+88)) then
        tmp = t_1
    else if (b <= (-1.35d-62)) then
        tmp = a * (y5 * ((t * y2) - (y * y3)))
    else if (b <= (-4.2d-208)) then
        tmp = i * (z * ((c * t) - (k * y1)))
    else if (b <= 2.95d-297) then
        tmp = y1 * (z * ((a * y3) - (i * k)))
    else if (b <= 3d-68) then
        tmp = y3 * (y5 * ((j * y0) - (a * y)))
    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 = x * (b * ((a * y) - (j * y0)));
	double tmp;
	if (b <= -2.2e+88) {
		tmp = t_1;
	} else if (b <= -1.35e-62) {
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	} else if (b <= -4.2e-208) {
		tmp = i * (z * ((c * t) - (k * y1)));
	} else if (b <= 2.95e-297) {
		tmp = y1 * (z * ((a * y3) - (i * k)));
	} else if (b <= 3e-68) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} 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 = x * (b * ((a * y) - (j * y0)))
	tmp = 0
	if b <= -2.2e+88:
		tmp = t_1
	elif b <= -1.35e-62:
		tmp = a * (y5 * ((t * y2) - (y * y3)))
	elif b <= -4.2e-208:
		tmp = i * (z * ((c * t) - (k * y1)))
	elif b <= 2.95e-297:
		tmp = y1 * (z * ((a * y3) - (i * k)))
	elif b <= 3e-68:
		tmp = y3 * (y5 * ((j * y0) - (a * y)))
	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(x * Float64(b * Float64(Float64(a * y) - Float64(j * y0))))
	tmp = 0.0
	if (b <= -2.2e+88)
		tmp = t_1;
	elseif (b <= -1.35e-62)
		tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))));
	elseif (b <= -4.2e-208)
		tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1))));
	elseif (b <= 2.95e-297)
		tmp = Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k))));
	elseif (b <= 3e-68)
		tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))));
	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 = x * (b * ((a * y) - (j * y0)));
	tmp = 0.0;
	if (b <= -2.2e+88)
		tmp = t_1;
	elseif (b <= -1.35e-62)
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	elseif (b <= -4.2e-208)
		tmp = i * (z * ((c * t) - (k * y1)));
	elseif (b <= 2.95e-297)
		tmp = y1 * (z * ((a * y3) - (i * k)));
	elseif (b <= 3e-68)
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	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[(x * N[(b * N[(N[(a * y), $MachinePrecision] - N[(j * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.2e+88], t$95$1, If[LessEqual[b, -1.35e-62], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -4.2e-208], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.95e-297], N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3e-68], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(b \cdot \left(a \cdot y - j \cdot y0\right)\right)\\
\mathbf{if}\;b \leq -2.2 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -1.35 \cdot 10^{-62}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\

\mathbf{elif}\;b \leq -4.2 \cdot 10^{-208}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\

\mathbf{elif}\;b \leq 2.95 \cdot 10^{-297}:\\
\;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -2.20000000000000009e88 or 3e-68 < b

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

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

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

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

      \[\leadsto \color{blue}{b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    6. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(a \cdot y - j \cdot y0\right) + \frac{b \cdot \left(\left(-1 \cdot \left(a \cdot \left(t \cdot z\right)\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - -1 \cdot \left(k \cdot \left(y0 \cdot z\right)\right)\right)}{x}\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \left(a \cdot y - j \cdot y0\right) + \color{blue}{\frac{b \cdot \left(\left(-1 \cdot \left(a \cdot \left(t \cdot z\right)\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - -1 \cdot \left(k \cdot \left(y0 \cdot z\right)\right)\right)}{x}}\right) \]
      2. lower-fma.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, a \cdot y - \color{blue}{j \cdot y0}, \frac{b \cdot \left(\left(-1 \cdot \left(a \cdot \left(t \cdot z\right)\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - -1 \cdot \left(k \cdot \left(y0 \cdot z\right)\right)\right)}{x}\right) \]
      3. lower--.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, a \cdot y - j \cdot \color{blue}{y0}, \frac{b \cdot \left(\left(-1 \cdot \left(a \cdot \left(t \cdot z\right)\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - -1 \cdot \left(k \cdot \left(y0 \cdot z\right)\right)\right)}{x}\right) \]
      4. lower-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, a \cdot y - j \cdot y0, \frac{b \cdot \left(\left(-1 \cdot \left(a \cdot \left(t \cdot z\right)\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - -1 \cdot \left(k \cdot \left(y0 \cdot z\right)\right)\right)}{x}\right) \]
      5. lower-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, a \cdot y - j \cdot y0, \frac{b \cdot \left(\left(-1 \cdot \left(a \cdot \left(t \cdot z\right)\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - -1 \cdot \left(k \cdot \left(y0 \cdot z\right)\right)\right)}{x}\right) \]
      6. lower-/.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, a \cdot y - j \cdot y0, \frac{b \cdot \left(\left(-1 \cdot \left(a \cdot \left(t \cdot z\right)\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - -1 \cdot \left(k \cdot \left(y0 \cdot z\right)\right)\right)}{x}\right) \]
    8. Applied rewrites54.8%

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(b, a \cdot y - j \cdot y0, \frac{b \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(t \cdot z\right), y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - -1 \cdot \left(k \cdot \left(y0 \cdot z\right)\right)\right)}{x}\right)} \]
    9. Taylor expanded in x around inf

      \[\leadsto x \cdot \left(b \cdot \left(a \cdot y - \color{blue}{j \cdot y0}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \left(a \cdot y - j \cdot \color{blue}{y0}\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \left(a \cdot y - j \cdot y0\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \left(a \cdot y - j \cdot y0\right)\right) \]
      4. lift--.f6441.2

        \[\leadsto x \cdot \left(b \cdot \left(a \cdot y - j \cdot y0\right)\right) \]
    11. Applied rewrites41.2%

      \[\leadsto x \cdot \left(b \cdot \left(a \cdot y - \color{blue}{j \cdot y0}\right)\right) \]

    if -2.20000000000000009e88 < b < -1.3500000000000001e-62

    1. Initial program 26.4%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y5 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \color{blue}{\left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{a \cdot \left(t \cdot y2 - y \cdot y3\right)}\right)\right) \]
    5. Applied rewrites40.0%

      \[\leadsto \color{blue}{-1 \cdot \left(y5 \cdot \left(\mathsf{fma}\left(i, j \cdot t - k \cdot y, y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    6. Taylor expanded in a around -inf

      \[\leadsto a \cdot \color{blue}{\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y5 \cdot \color{blue}{\left(t \cdot y2 - y \cdot y3\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - \color{blue}{y \cdot y3}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      5. lift--.f6448.3

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot \color{blue}{y3}\right)\right) \]
    8. Applied rewrites48.3%

      \[\leadsto a \cdot \color{blue}{\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]

    if -1.3500000000000001e-62 < b < -4.20000000000000024e-208

    1. Initial program 57.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \color{blue}{\left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    5. Applied rewrites43.6%

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, a \cdot b - c \cdot i, y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    6. Taylor expanded in i around -inf

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(z \cdot \color{blue}{\left(c \cdot t - k \cdot y1\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot \color{blue}{y1}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
      5. lower-*.f6443.8

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
    8. Applied rewrites43.8%

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]

    if -4.20000000000000024e-208 < b < 2.9499999999999999e-297

    1. Initial program 38.2%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \color{blue}{\left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    5. Applied rewrites39.0%

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, a \cdot b - c \cdot i, y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    6. Taylor expanded in y1 around -inf

      \[\leadsto y1 \cdot \color{blue}{\left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - \color{blue}{i \cdot k}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot \color{blue}{k}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
      5. lower-*.f6448.4

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
    8. Applied rewrites48.4%

      \[\leadsto y1 \cdot \color{blue}{\left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)} \]

    if 2.9499999999999999e-297 < b < 3e-68

    1. Initial program 30.0%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y5 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \color{blue}{\left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{a \cdot \left(t \cdot y2 - y \cdot y3\right)}\right)\right) \]
    5. Applied rewrites44.2%

      \[\leadsto \color{blue}{-1 \cdot \left(y5 \cdot \left(\mathsf{fma}\left(i, j \cdot t - k \cdot y, y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    6. Taylor expanded in y3 around -inf

      \[\leadsto y3 \cdot \color{blue}{\left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \color{blue}{\left(j \cdot y0 - a \cdot y\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - \color{blue}{a \cdot y}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot \color{blue}{y}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
      5. lower-*.f6439.3

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
    8. Applied rewrites39.3%

      \[\leadsto y3 \cdot \color{blue}{\left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)} \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 17: 31.0% accurate, 4.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y0 \leq -2.25 \cdot 10^{+93}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{elif}\;y0 \leq -3.8 \cdot 10^{-191}:\\ \;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\ \mathbf{elif}\;y0 \leq 2.7 \cdot 10^{-233}:\\ \;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \mathbf{elif}\;y0 \leq 1.18 \cdot 10^{+26}:\\ \;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= y0 -2.25e+93)
   (* y3 (* y5 (- (* j y0) (* a y))))
   (if (<= y0 -3.8e-191)
     (* b (* a (- (* x y) (* t z))))
     (if (<= y0 2.7e-233)
       (* a (* y5 (- (* t y2) (* y y3))))
       (if (<= y0 1.18e+26)
         (* b (* y4 (- (* j t) (* k y))))
         (* b (* y0 (- (* k z) (* j x)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y0 <= -2.25e+93) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else if (y0 <= -3.8e-191) {
		tmp = b * (a * ((x * y) - (t * z)));
	} else if (y0 <= 2.7e-233) {
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	} else if (y0 <= 1.18e+26) {
		tmp = b * (y4 * ((j * t) - (k * y)));
	} else {
		tmp = b * (y0 * ((k * z) - (j * x)));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (y0 <= (-2.25d+93)) then
        tmp = y3 * (y5 * ((j * y0) - (a * y)))
    else if (y0 <= (-3.8d-191)) then
        tmp = b * (a * ((x * y) - (t * z)))
    else if (y0 <= 2.7d-233) then
        tmp = a * (y5 * ((t * y2) - (y * y3)))
    else if (y0 <= 1.18d+26) then
        tmp = b * (y4 * ((j * t) - (k * y)))
    else
        tmp = b * (y0 * ((k * z) - (j * x)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y0 <= -2.25e+93) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else if (y0 <= -3.8e-191) {
		tmp = b * (a * ((x * y) - (t * z)));
	} else if (y0 <= 2.7e-233) {
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	} else if (y0 <= 1.18e+26) {
		tmp = b * (y4 * ((j * t) - (k * y)));
	} else {
		tmp = b * (y0 * ((k * z) - (j * x)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y0 <= -2.25e+93:
		tmp = y3 * (y5 * ((j * y0) - (a * y)))
	elif y0 <= -3.8e-191:
		tmp = b * (a * ((x * y) - (t * z)))
	elif y0 <= 2.7e-233:
		tmp = a * (y5 * ((t * y2) - (y * y3)))
	elif y0 <= 1.18e+26:
		tmp = b * (y4 * ((j * t) - (k * y)))
	else:
		tmp = b * (y0 * ((k * z) - (j * x)))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (y0 <= -2.25e+93)
		tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))));
	elseif (y0 <= -3.8e-191)
		tmp = Float64(b * Float64(a * Float64(Float64(x * y) - Float64(t * z))));
	elseif (y0 <= 2.7e-233)
		tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))));
	elseif (y0 <= 1.18e+26)
		tmp = Float64(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y))));
	else
		tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (y0 <= -2.25e+93)
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	elseif (y0 <= -3.8e-191)
		tmp = b * (a * ((x * y) - (t * z)));
	elseif (y0 <= 2.7e-233)
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	elseif (y0 <= 1.18e+26)
		tmp = b * (y4 * ((j * t) - (k * y)));
	else
		tmp = b * (y0 * ((k * z) - (j * x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y0, -2.25e+93], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, -3.8e-191], N[(b * N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 2.7e-233], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 1.18e+26], N[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y0 \leq -2.25 \cdot 10^{+93}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\

\mathbf{elif}\;y0 \leq -3.8 \cdot 10^{-191}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\

\mathbf{elif}\;y0 \leq 2.7 \cdot 10^{-233}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\

\mathbf{elif}\;y0 \leq 1.18 \cdot 10^{+26}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y0 < -2.24999999999999995e93

    1. Initial program 37.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y5 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \color{blue}{\left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{a \cdot \left(t \cdot y2 - y \cdot y3\right)}\right)\right) \]
    5. Applied rewrites49.0%

      \[\leadsto \color{blue}{-1 \cdot \left(y5 \cdot \left(\mathsf{fma}\left(i, j \cdot t - k \cdot y, y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    6. Taylor expanded in y3 around -inf

      \[\leadsto y3 \cdot \color{blue}{\left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \color{blue}{\left(j \cdot y0 - a \cdot y\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - \color{blue}{a \cdot y}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot \color{blue}{y}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
      5. lower-*.f6443.4

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
    8. Applied rewrites43.4%

      \[\leadsto y3 \cdot \color{blue}{\left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)} \]

    if -2.24999999999999995e93 < y0 < -3.7999999999999998e-191

    1. Initial program 27.6%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf

      \[\leadsto \color{blue}{b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \color{blue}{\left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    5. Applied rewrites41.9%

      \[\leadsto \color{blue}{b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    6. Taylor expanded in a around inf

      \[\leadsto b \cdot \left(a \cdot \color{blue}{\left(x \cdot y - t \cdot z\right)}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y - \color{blue}{t \cdot z}\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right) \]
      4. lift--.f6438.6

        \[\leadsto b \cdot \left(a \cdot \left(x \cdot y - t \cdot \color{blue}{z}\right)\right) \]
    8. Applied rewrites38.6%

      \[\leadsto b \cdot \left(a \cdot \color{blue}{\left(x \cdot y - t \cdot z\right)}\right) \]

    if -3.7999999999999998e-191 < y0 < 2.6999999999999999e-233

    1. Initial program 29.2%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y5 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \color{blue}{\left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{a \cdot \left(t \cdot y2 - y \cdot y3\right)}\right)\right) \]
    5. Applied rewrites53.1%

      \[\leadsto \color{blue}{-1 \cdot \left(y5 \cdot \left(\mathsf{fma}\left(i, j \cdot t - k \cdot y, y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    6. Taylor expanded in a around -inf

      \[\leadsto a \cdot \color{blue}{\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y5 \cdot \color{blue}{\left(t \cdot y2 - y \cdot y3\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - \color{blue}{y \cdot y3}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      5. lift--.f6444.9

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot \color{blue}{y3}\right)\right) \]
    8. Applied rewrites44.9%

      \[\leadsto a \cdot \color{blue}{\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]

    if 2.6999999999999999e-233 < y0 < 1.18e26

    1. Initial program 46.9%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf

      \[\leadsto \color{blue}{b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \color{blue}{\left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    5. Applied rewrites43.1%

      \[\leadsto \color{blue}{b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    6. Taylor expanded in y4 around inf

      \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      3. lift--.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot \color{blue}{y}\right)\right) \]
      4. lift-*.f6445.8

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - \color{blue}{k \cdot y}\right)\right) \]
    8. Applied rewrites45.8%

      \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]

    if 1.18e26 < y0

    1. Initial program 17.8%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf

      \[\leadsto \color{blue}{b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \color{blue}{\left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    5. Applied rewrites37.4%

      \[\leadsto \color{blue}{b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    6. Taylor expanded in y0 around inf

      \[\leadsto b \cdot \left(y0 \cdot \color{blue}{\left(k \cdot z - j \cdot x\right)}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \left(y0 \cdot \left(k \cdot z - \color{blue}{j \cdot x}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot \color{blue}{x}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right) \]
      4. lift-*.f6449.9

        \[\leadsto b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right) \]
    8. Applied rewrites49.9%

      \[\leadsto b \cdot \left(y0 \cdot \color{blue}{\left(k \cdot z - j \cdot x\right)}\right) \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 18: 29.9% accurate, 4.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{if}\;j \leq -1.3 \cdot 10^{+250}:\\ \;\;\;\;\left(-i\right) \cdot \left(j \cdot \left(t \cdot y5\right)\right)\\ \mathbf{elif}\;j \leq -8 \cdot 10^{+116}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq 1.95 \cdot 10^{-19}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\ \mathbf{elif}\;j \leq 1.6 \cdot 10^{+144}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* y3 (* y5 (- (* j y0) (* a y))))))
   (if (<= j -1.3e+250)
     (* (- i) (* j (* t y5)))
     (if (<= j -8e+116)
       t_1
       (if (<= j 1.95e-19)
         (* i (* k (- (* y y5) (* y1 z))))
         (if (<= j 1.6e+144) t_1 (* b (* y4 (* j 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 = y3 * (y5 * ((j * y0) - (a * y)));
	double tmp;
	if (j <= -1.3e+250) {
		tmp = -i * (j * (t * y5));
	} else if (j <= -8e+116) {
		tmp = t_1;
	} else if (j <= 1.95e-19) {
		tmp = i * (k * ((y * y5) - (y1 * z)));
	} else if (j <= 1.6e+144) {
		tmp = t_1;
	} else {
		tmp = b * (y4 * (j * 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) :: t_1
    real(8) :: tmp
    t_1 = y3 * (y5 * ((j * y0) - (a * y)))
    if (j <= (-1.3d+250)) then
        tmp = -i * (j * (t * y5))
    else if (j <= (-8d+116)) then
        tmp = t_1
    else if (j <= 1.95d-19) then
        tmp = i * (k * ((y * y5) - (y1 * z)))
    else if (j <= 1.6d+144) then
        tmp = t_1
    else
        tmp = b * (y4 * (j * 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 t_1 = y3 * (y5 * ((j * y0) - (a * y)));
	double tmp;
	if (j <= -1.3e+250) {
		tmp = -i * (j * (t * y5));
	} else if (j <= -8e+116) {
		tmp = t_1;
	} else if (j <= 1.95e-19) {
		tmp = i * (k * ((y * y5) - (y1 * z)));
	} else if (j <= 1.6e+144) {
		tmp = t_1;
	} else {
		tmp = b * (y4 * (j * t));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = y3 * (y5 * ((j * y0) - (a * y)))
	tmp = 0
	if j <= -1.3e+250:
		tmp = -i * (j * (t * y5))
	elif j <= -8e+116:
		tmp = t_1
	elif j <= 1.95e-19:
		tmp = i * (k * ((y * y5) - (y1 * z)))
	elif j <= 1.6e+144:
		tmp = t_1
	else:
		tmp = b * (y4 * (j * t))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))))
	tmp = 0.0
	if (j <= -1.3e+250)
		tmp = Float64(Float64(-i) * Float64(j * Float64(t * y5)));
	elseif (j <= -8e+116)
		tmp = t_1;
	elseif (j <= 1.95e-19)
		tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z))));
	elseif (j <= 1.6e+144)
		tmp = t_1;
	else
		tmp = Float64(b * Float64(y4 * Float64(j * 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)
	t_1 = y3 * (y5 * ((j * y0) - (a * y)));
	tmp = 0.0;
	if (j <= -1.3e+250)
		tmp = -i * (j * (t * y5));
	elseif (j <= -8e+116)
		tmp = t_1;
	elseif (j <= 1.95e-19)
		tmp = i * (k * ((y * y5) - (y1 * z)));
	elseif (j <= 1.6e+144)
		tmp = t_1;
	else
		tmp = b * (y4 * (j * t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.3e+250], N[((-i) * N[(j * N[(t * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -8e+116], t$95$1, If[LessEqual[j, 1.95e-19], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.6e+144], t$95$1, N[(b * N[(y4 * N[(j * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{if}\;j \leq -1.3 \cdot 10^{+250}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot \left(t \cdot y5\right)\right)\\

\mathbf{elif}\;j \leq -8 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;j \leq 1.95 \cdot 10^{-19}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\

\mathbf{elif}\;j \leq 1.6 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if j < -1.30000000000000006e250

    1. Initial program 14.3%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in i around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \color{blue}{\left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    5. Applied rewrites57.2%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    6. Taylor expanded in j around inf

      \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \color{blue}{\left(t \cdot y5 - x \cdot y1\right)}\right)\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5 - \color{blue}{x \cdot y1}\right)\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5 - x \cdot \color{blue}{y1}\right)\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5 - x \cdot y1\right)\right)\right) \]
      4. lower-*.f6471.5

        \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5 - x \cdot y1\right)\right)\right) \]
    8. Applied rewrites71.5%

      \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \color{blue}{\left(t \cdot y5 - x \cdot y1\right)}\right)\right) \]
    9. Taylor expanded in x around 0

      \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5\right)\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6458.2

        \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5\right)\right)\right) \]
    11. Applied rewrites58.2%

      \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5\right)\right)\right) \]

    if -1.30000000000000006e250 < j < -8.00000000000000012e116 or 1.94999999999999998e-19 < j < 1.6e144

    1. Initial program 28.7%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y5 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \color{blue}{\left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{a \cdot \left(t \cdot y2 - y \cdot y3\right)}\right)\right) \]
    5. Applied rewrites45.9%

      \[\leadsto \color{blue}{-1 \cdot \left(y5 \cdot \left(\mathsf{fma}\left(i, j \cdot t - k \cdot y, y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    6. Taylor expanded in y3 around -inf

      \[\leadsto y3 \cdot \color{blue}{\left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \color{blue}{\left(j \cdot y0 - a \cdot y\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - \color{blue}{a \cdot y}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot \color{blue}{y}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
      5. lower-*.f6444.7

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
    8. Applied rewrites44.7%

      \[\leadsto y3 \cdot \color{blue}{\left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)} \]

    if -8.00000000000000012e116 < j < 1.94999999999999998e-19

    1. Initial program 34.9%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in i around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \color{blue}{\left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    5. Applied rewrites40.5%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    6. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6433.7

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    8. Applied rewrites33.7%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]

    if 1.6e144 < j

    1. Initial program 24.0%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf

      \[\leadsto \color{blue}{b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \color{blue}{\left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    5. Applied rewrites30.2%

      \[\leadsto \color{blue}{b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    6. Taylor expanded in y4 around inf

      \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      3. lift--.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot \color{blue}{y}\right)\right) \]
      4. lift-*.f6445.0

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - \color{blue}{k \cdot y}\right)\right) \]
    8. Applied rewrites45.0%

      \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
    9. Taylor expanded in y around 0

      \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6442.0

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t\right)\right) \]
    11. Applied rewrites42.0%

      \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t\right)\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification39.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -1.3 \cdot 10^{+250}:\\ \;\;\;\;\left(-i\right) \cdot \left(j \cdot \left(t \cdot y5\right)\right)\\ \mathbf{elif}\;j \leq -8 \cdot 10^{+116}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{elif}\;j \leq 1.95 \cdot 10^{-19}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\ \mathbf{elif}\;j \leq 1.6 \cdot 10^{+144}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 23.6% accurate, 4.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(\left(-k\right) \cdot \left(y \cdot y4\right)\right)\\ \mathbf{if}\;y \leq -3.3 \cdot 10^{+41}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-83}:\\ \;\;\;\;i \cdot \left(k \cdot \left(\left(-y1\right) \cdot z\right)\right)\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-17}:\\ \;\;\;\;\left(-i\right) \cdot \left(j \cdot \left(t \cdot y5\right)\right)\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+62}:\\ \;\;\;\;y2 \cdot \left(\left(-c\right) \cdot \left(t \cdot y4\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (let* ((t_1 (* b (* (- k) (* y y4)))))
   (if (<= y -3.3e+41)
     t_1
     (if (<= y -9e-83)
       (* i (* k (* (- y1) z)))
       (if (<= y 5.6e-17)
         (* (- i) (* j (* t y5)))
         (if (<= y 9.5e+62) (* y2 (* (- c) (* t y4))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = b * (-k * (y * y4));
	double tmp;
	if (y <= -3.3e+41) {
		tmp = t_1;
	} else if (y <= -9e-83) {
		tmp = i * (k * (-y1 * z));
	} else if (y <= 5.6e-17) {
		tmp = -i * (j * (t * y5));
	} else if (y <= 9.5e+62) {
		tmp = y2 * (-c * (t * y4));
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = b * (-k * (y * y4))
    if (y <= (-3.3d+41)) then
        tmp = t_1
    else if (y <= (-9d-83)) then
        tmp = i * (k * (-y1 * z))
    else if (y <= 5.6d-17) then
        tmp = -i * (j * (t * y5))
    else if (y <= 9.5d+62) then
        tmp = y2 * (-c * (t * y4))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = b * (-k * (y * y4));
	double tmp;
	if (y <= -3.3e+41) {
		tmp = t_1;
	} else if (y <= -9e-83) {
		tmp = i * (k * (-y1 * z));
	} else if (y <= 5.6e-17) {
		tmp = -i * (j * (t * y5));
	} else if (y <= 9.5e+62) {
		tmp = y2 * (-c * (t * y4));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = b * (-k * (y * y4))
	tmp = 0
	if y <= -3.3e+41:
		tmp = t_1
	elif y <= -9e-83:
		tmp = i * (k * (-y1 * z))
	elif y <= 5.6e-17:
		tmp = -i * (j * (t * y5))
	elif y <= 9.5e+62:
		tmp = y2 * (-c * (t * y4))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(b * Float64(Float64(-k) * Float64(y * y4)))
	tmp = 0.0
	if (y <= -3.3e+41)
		tmp = t_1;
	elseif (y <= -9e-83)
		tmp = Float64(i * Float64(k * Float64(Float64(-y1) * z)));
	elseif (y <= 5.6e-17)
		tmp = Float64(Float64(-i) * Float64(j * Float64(t * y5)));
	elseif (y <= 9.5e+62)
		tmp = Float64(y2 * Float64(Float64(-c) * Float64(t * y4)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = b * (-k * (y * y4));
	tmp = 0.0;
	if (y <= -3.3e+41)
		tmp = t_1;
	elseif (y <= -9e-83)
		tmp = i * (k * (-y1 * z));
	elseif (y <= 5.6e-17)
		tmp = -i * (j * (t * y5));
	elseif (y <= 9.5e+62)
		tmp = y2 * (-c * (t * y4));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(b * N[((-k) * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.3e+41], t$95$1, If[LessEqual[y, -9e-83], N[(i * N[(k * N[((-y1) * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.6e-17], N[((-i) * N[(j * N[(t * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.5e+62], N[(y2 * N[((-c) * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot \left(\left(-k\right) \cdot \left(y \cdot y4\right)\right)\\
\mathbf{if}\;y \leq -3.3 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -9 \cdot 10^{-83}:\\
\;\;\;\;i \cdot \left(k \cdot \left(\left(-y1\right) \cdot z\right)\right)\\

\mathbf{elif}\;y \leq 5.6 \cdot 10^{-17}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot \left(t \cdot y5\right)\right)\\

\mathbf{elif}\;y \leq 9.5 \cdot 10^{+62}:\\
\;\;\;\;y2 \cdot \left(\left(-c\right) \cdot \left(t \cdot y4\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.3e41 or 9.5000000000000003e62 < y

    1. Initial program 24.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf

      \[\leadsto \color{blue}{b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \color{blue}{\left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    5. Applied rewrites41.5%

      \[\leadsto \color{blue}{b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    6. Taylor expanded in y4 around inf

      \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      3. lift--.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot \color{blue}{y}\right)\right) \]
      4. lift-*.f6441.0

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - \color{blue}{k \cdot y}\right)\right) \]
    8. Applied rewrites41.0%

      \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
    9. Taylor expanded in y around inf

      \[\leadsto b \cdot \left(-1 \cdot \left(k \cdot \color{blue}{\left(y \cdot y4\right)}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \left(-1 \cdot \left(k \cdot \left(y \cdot \color{blue}{y4}\right)\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto b \cdot \left(-1 \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right) \]
      3. lower-*.f6436.4

        \[\leadsto b \cdot \left(-1 \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right) \]
    11. Applied rewrites36.4%

      \[\leadsto b \cdot \left(-1 \cdot \left(k \cdot \color{blue}{\left(y \cdot y4\right)}\right)\right) \]

    if -3.3e41 < y < -8.99999999999999995e-83

    1. Initial program 29.6%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in i around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \color{blue}{\left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    5. Applied rewrites37.9%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    6. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6445.3

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    8. Applied rewrites45.3%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    9. Taylor expanded in y around 0

      \[\leadsto i \cdot \left(k \cdot \left(-1 \cdot \left(y1 \cdot \color{blue}{z}\right)\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(-1 \cdot \left(y1 \cdot z\right)\right)\right) \]
      2. lift-*.f6442.1

        \[\leadsto i \cdot \left(k \cdot \left(-1 \cdot \left(y1 \cdot z\right)\right)\right) \]
    11. Applied rewrites42.1%

      \[\leadsto i \cdot \left(k \cdot \left(-1 \cdot \left(y1 \cdot \color{blue}{z}\right)\right)\right) \]

    if -8.99999999999999995e-83 < y < 5.5999999999999998e-17

    1. Initial program 36.0%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in i around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \color{blue}{\left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    5. Applied rewrites36.0%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    6. Taylor expanded in j around inf

      \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \color{blue}{\left(t \cdot y5 - x \cdot y1\right)}\right)\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5 - \color{blue}{x \cdot y1}\right)\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5 - x \cdot \color{blue}{y1}\right)\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5 - x \cdot y1\right)\right)\right) \]
      4. lower-*.f6435.1

        \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5 - x \cdot y1\right)\right)\right) \]
    8. Applied rewrites35.1%

      \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \color{blue}{\left(t \cdot y5 - x \cdot y1\right)}\right)\right) \]
    9. Taylor expanded in x around 0

      \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5\right)\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6428.3

        \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5\right)\right)\right) \]
    11. Applied rewrites28.3%

      \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5\right)\right)\right) \]

    if 5.5999999999999998e-17 < y < 9.5000000000000003e62

    1. Initial program 36.4%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    5. Applied rewrites59.8%

      \[\leadsto \color{blue}{y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    6. Taylor expanded in y2 around inf

      \[\leadsto y2 \cdot \color{blue}{\left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - \color{blue}{c \cdot t}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot \color{blue}{t}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
      5. lower-*.f6442.2

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    8. Applied rewrites42.2%

      \[\leadsto y2 \cdot \color{blue}{\left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)} \]
    9. Taylor expanded in t around inf

      \[\leadsto y2 \cdot \left(-1 \cdot \left(c \cdot \color{blue}{\left(t \cdot y4\right)}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(-1 \cdot \left(c \cdot \left(t \cdot \color{blue}{y4}\right)\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(-1 \cdot \left(c \cdot \left(t \cdot y4\right)\right)\right) \]
      3. lower-*.f6446.1

        \[\leadsto y2 \cdot \left(-1 \cdot \left(c \cdot \left(t \cdot y4\right)\right)\right) \]
    11. Applied rewrites46.1%

      \[\leadsto y2 \cdot \left(-1 \cdot \left(c \cdot \color{blue}{\left(t \cdot y4\right)}\right)\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification34.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.3 \cdot 10^{+41}:\\ \;\;\;\;b \cdot \left(\left(-k\right) \cdot \left(y \cdot y4\right)\right)\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-83}:\\ \;\;\;\;i \cdot \left(k \cdot \left(\left(-y1\right) \cdot z\right)\right)\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-17}:\\ \;\;\;\;\left(-i\right) \cdot \left(j \cdot \left(t \cdot y5\right)\right)\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+62}:\\ \;\;\;\;y2 \cdot \left(\left(-c\right) \cdot \left(t \cdot y4\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(-k\right) \cdot \left(y \cdot y4\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 29.3% accurate, 4.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{+109}:\\ \;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{-258}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{+182}:\\ \;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= t -1.5e+109)
   (* a (* y5 (- (* t y2) (* y y3))))
   (if (<= t -2.1e-258)
     (* y3 (* y5 (- (* j y0) (* a y))))
     (if (<= t 8.8e+182)
       (* x (* y0 (- (* c y2) (* b j))))
       (* i (* z (- (* c t) (* k y1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (t <= -1.5e+109) {
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	} else if (t <= -2.1e-258) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else if (t <= 8.8e+182) {
		tmp = x * (y0 * ((c * y2) - (b * j)));
	} else {
		tmp = i * (z * ((c * t) - (k * y1)));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (t <= (-1.5d+109)) then
        tmp = a * (y5 * ((t * y2) - (y * y3)))
    else if (t <= (-2.1d-258)) then
        tmp = y3 * (y5 * ((j * y0) - (a * y)))
    else if (t <= 8.8d+182) then
        tmp = x * (y0 * ((c * y2) - (b * j)))
    else
        tmp = i * (z * ((c * t) - (k * y1)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (t <= -1.5e+109) {
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	} else if (t <= -2.1e-258) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else if (t <= 8.8e+182) {
		tmp = x * (y0 * ((c * y2) - (b * j)));
	} else {
		tmp = i * (z * ((c * t) - (k * y1)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if t <= -1.5e+109:
		tmp = a * (y5 * ((t * y2) - (y * y3)))
	elif t <= -2.1e-258:
		tmp = y3 * (y5 * ((j * y0) - (a * y)))
	elif t <= 8.8e+182:
		tmp = x * (y0 * ((c * y2) - (b * j)))
	else:
		tmp = i * (z * ((c * t) - (k * y1)))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (t <= -1.5e+109)
		tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))));
	elseif (t <= -2.1e-258)
		tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))));
	elseif (t <= 8.8e+182)
		tmp = Float64(x * Float64(y0 * Float64(Float64(c * y2) - Float64(b * j))));
	else
		tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (t <= -1.5e+109)
		tmp = a * (y5 * ((t * y2) - (y * y3)));
	elseif (t <= -2.1e-258)
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	elseif (t <= 8.8e+182)
		tmp = x * (y0 * ((c * y2) - (b * j)));
	else
		tmp = i * (z * ((c * t) - (k * y1)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[t, -1.5e+109], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.1e-258], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.8e+182], N[(x * N[(y0 * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+109}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\

\mathbf{elif}\;t \leq -2.1 \cdot 10^{-258}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\

\mathbf{elif}\;t \leq 8.8 \cdot 10^{+182}:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\

\mathbf{else}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.50000000000000008e109

    1. Initial program 22.5%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y5 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \color{blue}{\left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{a \cdot \left(t \cdot y2 - y \cdot y3\right)}\right)\right) \]
    5. Applied rewrites37.8%

      \[\leadsto \color{blue}{-1 \cdot \left(y5 \cdot \left(\mathsf{fma}\left(i, j \cdot t - k \cdot y, y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    6. Taylor expanded in a around -inf

      \[\leadsto a \cdot \color{blue}{\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(y5 \cdot \color{blue}{\left(t \cdot y2 - y \cdot y3\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - \color{blue}{y \cdot y3}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \]
      5. lift--.f6443.2

        \[\leadsto a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot \color{blue}{y3}\right)\right) \]
    8. Applied rewrites43.2%

      \[\leadsto a \cdot \color{blue}{\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]

    if -1.50000000000000008e109 < t < -2.0999999999999999e-258

    1. Initial program 40.2%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y5 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \color{blue}{\left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{a \cdot \left(t \cdot y2 - y \cdot y3\right)}\right)\right) \]
    5. Applied rewrites49.2%

      \[\leadsto \color{blue}{-1 \cdot \left(y5 \cdot \left(\mathsf{fma}\left(i, j \cdot t - k \cdot y, y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    6. Taylor expanded in y3 around -inf

      \[\leadsto y3 \cdot \color{blue}{\left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \color{blue}{\left(j \cdot y0 - a \cdot y\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - \color{blue}{a \cdot y}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot \color{blue}{y}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
      5. lower-*.f6440.2

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
    8. Applied rewrites40.2%

      \[\leadsto y3 \cdot \color{blue}{\left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)} \]

    if -2.0999999999999999e-258 < t < 8.79999999999999986e182

    1. Initial program 30.9%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y0 around inf

      \[\leadsto \color{blue}{y0 \cdot \left(\left(-1 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) + c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y0 \cdot \color{blue}{\left(\left(-1 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) + c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y0 \cdot \left(\left(-1 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) + c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - \color{blue}{b \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    5. Applied rewrites40.2%

      \[\leadsto \color{blue}{y0 \cdot \left(\mathsf{fma}\left(-1, y5 \cdot \left(k \cdot y2 - j \cdot y3\right), c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    6. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(y0 \cdot \color{blue}{\left(c \cdot y2 - b \cdot j\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - \color{blue}{b \cdot j}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot \color{blue}{j}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
      5. lower-*.f6435.6

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    8. Applied rewrites35.6%

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]

    if 8.79999999999999986e182 < t

    1. Initial program 15.3%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \color{blue}{\left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    5. Applied rewrites51.7%

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, a \cdot b - c \cdot i, y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    6. Taylor expanded in i around -inf

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(z \cdot \color{blue}{\left(c \cdot t - k \cdot y1\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot \color{blue}{y1}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
      5. lower-*.f6455.2

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
    8. Applied rewrites55.2%

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 21: 33.0% accurate, 5.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+168} \lor \neg \left(z \leq 8.5 \cdot 10^{+71}\right):\\ \;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (or (<= z -3.1e+168) (not (<= z 8.5e+71)))
   (* i (* z (- (* c t) (* k y1))))
   (* y3 (* y5 (- (* j y0) (* a y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if ((z <= -3.1e+168) || !(z <= 8.5e+71)) {
		tmp = i * (z * ((c * t) - (k * y1)));
	} else {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if ((z <= (-3.1d+168)) .or. (.not. (z <= 8.5d+71))) then
        tmp = i * (z * ((c * t) - (k * y1)))
    else
        tmp = y3 * (y5 * ((j * y0) - (a * y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if ((z <= -3.1e+168) || !(z <= 8.5e+71)) {
		tmp = i * (z * ((c * t) - (k * y1)));
	} else {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if (z <= -3.1e+168) or not (z <= 8.5e+71):
		tmp = i * (z * ((c * t) - (k * y1)))
	else:
		tmp = y3 * (y5 * ((j * y0) - (a * y)))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if ((z <= -3.1e+168) || !(z <= 8.5e+71))
		tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1))));
	else
		tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if ((z <= -3.1e+168) || ~((z <= 8.5e+71)))
		tmp = i * (z * ((c * t) - (k * y1)));
	else
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[Or[LessEqual[z, -3.1e+168], N[Not[LessEqual[z, 8.5e+71]], $MachinePrecision]], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+168} \lor \neg \left(z \leq 8.5 \cdot 10^{+71}\right):\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.09999999999999996e168 or 8.4999999999999996e71 < z

    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. Add Preprocessing
    3. Taylor expanded in z around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \color{blue}{\left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    5. Applied rewrites54.0%

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, a \cdot b - c \cdot i, y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    6. Taylor expanded in i around -inf

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(z \cdot \color{blue}{\left(c \cdot t - k \cdot y1\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot \color{blue}{y1}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
      5. lower-*.f6453.1

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
    8. Applied rewrites53.1%

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]

    if -3.09999999999999996e168 < z < 8.4999999999999996e71

    1. Initial program 33.7%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y5 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \color{blue}{\left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{a \cdot \left(t \cdot y2 - y \cdot y3\right)}\right)\right) \]
    5. Applied rewrites46.6%

      \[\leadsto \color{blue}{-1 \cdot \left(y5 \cdot \left(\mathsf{fma}\left(i, j \cdot t - k \cdot y, y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    6. Taylor expanded in y3 around -inf

      \[\leadsto y3 \cdot \color{blue}{\left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \color{blue}{\left(j \cdot y0 - a \cdot y\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - \color{blue}{a \cdot y}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot \color{blue}{y}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
      5. lower-*.f6430.3

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
    8. Applied rewrites30.3%

      \[\leadsto y3 \cdot \color{blue}{\left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification37.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+168} \lor \neg \left(z \leq 8.5 \cdot 10^{+71}\right):\\ \;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 33.3% accurate, 5.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{-47}:\\ \;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+71}:\\ \;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= z -4.4e-47)
   (* y1 (* z (- (* a y3) (* i k))))
   (if (<= z 8.5e+71)
     (* y3 (* y5 (- (* j y0) (* a y))))
     (* i (* z (- (* c t) (* k y1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (z <= -4.4e-47) {
		tmp = y1 * (z * ((a * y3) - (i * k)));
	} else if (z <= 8.5e+71) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else {
		tmp = i * (z * ((c * t) - (k * y1)));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (z <= (-4.4d-47)) then
        tmp = y1 * (z * ((a * y3) - (i * k)))
    else if (z <= 8.5d+71) then
        tmp = y3 * (y5 * ((j * y0) - (a * y)))
    else
        tmp = i * (z * ((c * t) - (k * y1)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (z <= -4.4e-47) {
		tmp = y1 * (z * ((a * y3) - (i * k)));
	} else if (z <= 8.5e+71) {
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	} else {
		tmp = i * (z * ((c * t) - (k * y1)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if z <= -4.4e-47:
		tmp = y1 * (z * ((a * y3) - (i * k)))
	elif z <= 8.5e+71:
		tmp = y3 * (y5 * ((j * y0) - (a * y)))
	else:
		tmp = i * (z * ((c * t) - (k * y1)))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (z <= -4.4e-47)
		tmp = Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k))));
	elseif (z <= 8.5e+71)
		tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y))));
	else
		tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (z <= -4.4e-47)
		tmp = y1 * (z * ((a * y3) - (i * k)));
	elseif (z <= 8.5e+71)
		tmp = y3 * (y5 * ((j * y0) - (a * y)));
	else
		tmp = i * (z * ((c * t) - (k * y1)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[z, -4.4e-47], N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+71], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{-47}:\\
\;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\

\mathbf{elif}\;z \leq 8.5 \cdot 10^{+71}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\

\mathbf{else}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.40000000000000037e-47

    1. Initial program 28.6%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \color{blue}{\left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    5. Applied rewrites53.5%

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, a \cdot b - c \cdot i, y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    6. Taylor expanded in y1 around -inf

      \[\leadsto y1 \cdot \color{blue}{\left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - \color{blue}{i \cdot k}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot \color{blue}{k}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
      5. lower-*.f6442.7

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
    8. Applied rewrites42.7%

      \[\leadsto y1 \cdot \color{blue}{\left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)} \]

    if -4.40000000000000037e-47 < z < 8.4999999999999996e71

    1. Initial program 34.0%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y5 around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \color{blue}{\left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(y5 \cdot \left(\left(i \cdot \left(j \cdot t - k \cdot y\right) + y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{a \cdot \left(t \cdot y2 - y \cdot y3\right)}\right)\right) \]
    5. Applied rewrites47.6%

      \[\leadsto \color{blue}{-1 \cdot \left(y5 \cdot \left(\mathsf{fma}\left(i, j \cdot t - k \cdot y, y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)} \]
    6. Taylor expanded in y3 around -inf

      \[\leadsto y3 \cdot \color{blue}{\left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \color{blue}{\left(j \cdot y0 - a \cdot y\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - \color{blue}{a \cdot y}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot \color{blue}{y}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
      5. lower-*.f6430.8

        \[\leadsto y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right) \]
    8. Applied rewrites30.8%

      \[\leadsto y3 \cdot \color{blue}{\left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)} \]

    if 8.4999999999999996e71 < z

    1. Initial program 24.0%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \color{blue}{\left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    5. Applied rewrites44.2%

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, a \cdot b - c \cdot i, y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    6. Taylor expanded in i around -inf

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(z \cdot \color{blue}{\left(c \cdot t - k \cdot y1\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - \color{blue}{k \cdot y1}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot \color{blue}{y1}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
      5. lower-*.f6448.6

        \[\leadsto i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right) \]
    8. Applied rewrites48.6%

      \[\leadsto i \cdot \color{blue}{\left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 23: 29.7% accurate, 5.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;j \leq -2.7 \cdot 10^{-17}:\\ \;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{elif}\;j \leq 3.9 \cdot 10^{+138}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= j -2.7e-17)
   (* i (* y1 (- (* j x) (* k z))))
   (if (<= j 3.9e+138)
     (* i (* k (- (* y y5) (* y1 z))))
     (* b (* y4 (* j 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 (j <= -2.7e-17) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else if (j <= 3.9e+138) {
		tmp = i * (k * ((y * y5) - (y1 * z)));
	} else {
		tmp = b * (y4 * (j * 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 (j <= (-2.7d-17)) then
        tmp = i * (y1 * ((j * x) - (k * z)))
    else if (j <= 3.9d+138) then
        tmp = i * (k * ((y * y5) - (y1 * z)))
    else
        tmp = b * (y4 * (j * 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 (j <= -2.7e-17) {
		tmp = i * (y1 * ((j * x) - (k * z)));
	} else if (j <= 3.9e+138) {
		tmp = i * (k * ((y * y5) - (y1 * z)));
	} else {
		tmp = b * (y4 * (j * t));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if j <= -2.7e-17:
		tmp = i * (y1 * ((j * x) - (k * z)))
	elif j <= 3.9e+138:
		tmp = i * (k * ((y * y5) - (y1 * z)))
	else:
		tmp = b * (y4 * (j * 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 (j <= -2.7e-17)
		tmp = Float64(i * Float64(y1 * Float64(Float64(j * x) - Float64(k * z))));
	elseif (j <= 3.9e+138)
		tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z))));
	else
		tmp = Float64(b * Float64(y4 * Float64(j * 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 (j <= -2.7e-17)
		tmp = i * (y1 * ((j * x) - (k * z)));
	elseif (j <= 3.9e+138)
		tmp = i * (k * ((y * y5) - (y1 * z)));
	else
		tmp = b * (y4 * (j * 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[j, -2.7e-17], N[(i * N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3.9e+138], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(y4 * N[(j * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;j \leq -2.7 \cdot 10^{-17}:\\
\;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\

\mathbf{elif}\;j \leq 3.9 \cdot 10^{+138}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -2.7000000000000001e-17

    1. Initial program 23.9%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in i around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \color{blue}{\left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    5. Applied rewrites41.1%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    6. Taylor expanded in y1 around -inf

      \[\leadsto i \cdot \color{blue}{\left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(y1 \cdot \color{blue}{\left(j \cdot x - k \cdot z\right)}\right) \]
      2. lift-*.f64N/A

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      4. lift--.f64N/A

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot \color{blue}{z}\right)\right) \]
      5. lift-*.f6438.6

        \[\leadsto i \cdot \left(y1 \cdot \left(j \cdot x - \color{blue}{k \cdot z}\right)\right) \]
    8. Applied rewrites38.6%

      \[\leadsto i \cdot \color{blue}{\left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]

    if -2.7000000000000001e-17 < j < 3.8999999999999998e138

    1. Initial program 35.6%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in i around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \color{blue}{\left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    5. Applied rewrites39.5%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    6. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6432.0

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    8. Applied rewrites32.0%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]

    if 3.8999999999999998e138 < j

    1. Initial program 22.6%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf

      \[\leadsto \color{blue}{b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \color{blue}{\left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    5. Applied rewrites28.7%

      \[\leadsto \color{blue}{b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    6. Taylor expanded in y4 around inf

      \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      3. lift--.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot \color{blue}{y}\right)\right) \]
      4. lift-*.f6442.7

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - \color{blue}{k \cdot y}\right)\right) \]
    8. Applied rewrites42.7%

      \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
    9. Taylor expanded in y around 0

      \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6439.9

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t\right)\right) \]
    11. Applied rewrites39.9%

      \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 24: 28.9% accurate, 5.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;j \leq -5.5 \cdot 10^{+110}:\\ \;\;\;\;\left(-i\right) \cdot \left(j \cdot \left(t \cdot y5\right)\right)\\ \mathbf{elif}\;j \leq 3.9 \cdot 10^{+138}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (<= j -5.5e+110)
   (* (- i) (* j (* t y5)))
   (if (<= j 3.9e+138)
     (* i (* k (- (* y y5) (* y1 z))))
     (* b (* y4 (* j 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 (j <= -5.5e+110) {
		tmp = -i * (j * (t * y5));
	} else if (j <= 3.9e+138) {
		tmp = i * (k * ((y * y5) - (y1 * z)));
	} else {
		tmp = b * (y4 * (j * 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 (j <= (-5.5d+110)) then
        tmp = -i * (j * (t * y5))
    else if (j <= 3.9d+138) then
        tmp = i * (k * ((y * y5) - (y1 * z)))
    else
        tmp = b * (y4 * (j * 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 (j <= -5.5e+110) {
		tmp = -i * (j * (t * y5));
	} else if (j <= 3.9e+138) {
		tmp = i * (k * ((y * y5) - (y1 * z)));
	} else {
		tmp = b * (y4 * (j * t));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if j <= -5.5e+110:
		tmp = -i * (j * (t * y5))
	elif j <= 3.9e+138:
		tmp = i * (k * ((y * y5) - (y1 * z)))
	else:
		tmp = b * (y4 * (j * 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 (j <= -5.5e+110)
		tmp = Float64(Float64(-i) * Float64(j * Float64(t * y5)));
	elseif (j <= 3.9e+138)
		tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z))));
	else
		tmp = Float64(b * Float64(y4 * Float64(j * 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 (j <= -5.5e+110)
		tmp = -i * (j * (t * y5));
	elseif (j <= 3.9e+138)
		tmp = i * (k * ((y * y5) - (y1 * z)));
	else
		tmp = b * (y4 * (j * 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[j, -5.5e+110], N[((-i) * N[(j * N[(t * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3.9e+138], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(y4 * N[(j * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;j \leq -5.5 \cdot 10^{+110}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot \left(t \cdot y5\right)\right)\\

\mathbf{elif}\;j \leq 3.9 \cdot 10^{+138}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -5.49999999999999996e110

    1. Initial program 19.2%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in i around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \color{blue}{\left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    5. Applied rewrites42.6%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    6. Taylor expanded in j around inf

      \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \color{blue}{\left(t \cdot y5 - x \cdot y1\right)}\right)\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5 - \color{blue}{x \cdot y1}\right)\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5 - x \cdot \color{blue}{y1}\right)\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5 - x \cdot y1\right)\right)\right) \]
      4. lower-*.f6443.1

        \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5 - x \cdot y1\right)\right)\right) \]
    8. Applied rewrites43.1%

      \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \color{blue}{\left(t \cdot y5 - x \cdot y1\right)}\right)\right) \]
    9. Taylor expanded in x around 0

      \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5\right)\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6435.8

        \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5\right)\right)\right) \]
    11. Applied rewrites35.8%

      \[\leadsto -1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5\right)\right)\right) \]

    if -5.49999999999999996e110 < j < 3.8999999999999998e138

    1. Initial program 35.8%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in i around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \color{blue}{\left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    5. Applied rewrites39.2%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    6. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6432.1

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    8. Applied rewrites32.1%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]

    if 3.8999999999999998e138 < j

    1. Initial program 22.6%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf

      \[\leadsto \color{blue}{b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \color{blue}{\left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    5. Applied rewrites28.7%

      \[\leadsto \color{blue}{b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    6. Taylor expanded in y4 around inf

      \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      3. lift--.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot \color{blue}{y}\right)\right) \]
      4. lift-*.f6442.7

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - \color{blue}{k \cdot y}\right)\right) \]
    8. Applied rewrites42.7%

      \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
    9. Taylor expanded in y around 0

      \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6439.9

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t\right)\right) \]
    11. Applied rewrites39.9%

      \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification33.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -5.5 \cdot 10^{+110}:\\ \;\;\;\;\left(-i\right) \cdot \left(j \cdot \left(t \cdot y5\right)\right)\\ \mathbf{elif}\;j \leq 3.9 \cdot 10^{+138}:\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 22.3% accurate, 5.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\ \mathbf{if}\;z \leq -8 \cdot 10^{-50}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-132}:\\ \;\;\;\;y2 \cdot \left(y4 \cdot \left(\left(-c\right) \cdot t\right)\right)\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+30}:\\ \;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\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 (* y1 (* a (* y3 z)))))
   (if (<= z -8e-50)
     t_1
     (if (<= z 1.05e-132)
       (* y2 (* y4 (* (- c) t)))
       (if (<= z 1.65e+30) (* b (* y4 (* j t))) 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 * (a * (y3 * z));
	double tmp;
	if (z <= -8e-50) {
		tmp = t_1;
	} else if (z <= 1.05e-132) {
		tmp = y2 * (y4 * (-c * t));
	} else if (z <= 1.65e+30) {
		tmp = b * (y4 * (j * t));
	} 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 = y1 * (a * (y3 * z))
    if (z <= (-8d-50)) then
        tmp = t_1
    else if (z <= 1.05d-132) then
        tmp = y2 * (y4 * (-c * t))
    else if (z <= 1.65d+30) then
        tmp = b * (y4 * (j * t))
    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 = y1 * (a * (y3 * z));
	double tmp;
	if (z <= -8e-50) {
		tmp = t_1;
	} else if (z <= 1.05e-132) {
		tmp = y2 * (y4 * (-c * t));
	} else if (z <= 1.65e+30) {
		tmp = b * (y4 * (j * t));
	} 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 = y1 * (a * (y3 * z))
	tmp = 0
	if z <= -8e-50:
		tmp = t_1
	elif z <= 1.05e-132:
		tmp = y2 * (y4 * (-c * t))
	elif z <= 1.65e+30:
		tmp = b * (y4 * (j * t))
	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(y1 * Float64(a * Float64(y3 * z)))
	tmp = 0.0
	if (z <= -8e-50)
		tmp = t_1;
	elseif (z <= 1.05e-132)
		tmp = Float64(y2 * Float64(y4 * Float64(Float64(-c) * t)));
	elseif (z <= 1.65e+30)
		tmp = Float64(b * Float64(y4 * Float64(j * t)));
	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 = y1 * (a * (y3 * z));
	tmp = 0.0;
	if (z <= -8e-50)
		tmp = t_1;
	elseif (z <= 1.05e-132)
		tmp = y2 * (y4 * (-c * t));
	elseif (z <= 1.65e+30)
		tmp = b * (y4 * (j * t));
	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[(y1 * N[(a * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e-50], t$95$1, If[LessEqual[z, 1.05e-132], N[(y2 * N[(y4 * N[((-c) * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e+30], N[(b * N[(y4 * N[(j * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\
\mathbf{if}\;z \leq -8 \cdot 10^{-50}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.05 \cdot 10^{-132}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(\left(-c\right) \cdot t\right)\right)\\

\mathbf{elif}\;z \leq 1.65 \cdot 10^{+30}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.00000000000000006e-50 or 1.65000000000000013e30 < z

    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. Add Preprocessing
    3. Taylor expanded in z around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \color{blue}{\left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    5. Applied rewrites49.1%

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, a \cdot b - c \cdot i, y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    6. Taylor expanded in y1 around -inf

      \[\leadsto y1 \cdot \color{blue}{\left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - \color{blue}{i \cdot k}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot \color{blue}{k}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
      5. lower-*.f6440.2

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
    8. Applied rewrites40.2%

      \[\leadsto y1 \cdot \color{blue}{\left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)} \]
    9. Taylor expanded in a around inf

      \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right) \]
      2. lower-*.f6432.6

        \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right) \]
    11. Applied rewrites32.6%

      \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]

    if -8.00000000000000006e-50 < z < 1.05e-132

    1. Initial program 33.3%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    5. Applied rewrites50.0%

      \[\leadsto \color{blue}{y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    6. Taylor expanded in y2 around inf

      \[\leadsto y2 \cdot \color{blue}{\left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - \color{blue}{c \cdot t}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot \color{blue}{t}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
      5. lower-*.f6430.2

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    8. Applied rewrites30.2%

      \[\leadsto y2 \cdot \color{blue}{\left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)} \]
    9. Taylor expanded in t around inf

      \[\leadsto y2 \cdot \left(y4 \cdot \left(-1 \cdot \left(c \cdot \color{blue}{t}\right)\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(-1 \cdot \left(c \cdot t\right)\right)\right) \]
      2. lift-*.f6426.0

        \[\leadsto y2 \cdot \left(y4 \cdot \left(-1 \cdot \left(c \cdot t\right)\right)\right) \]
    11. Applied rewrites26.0%

      \[\leadsto y2 \cdot \left(y4 \cdot \left(-1 \cdot \left(c \cdot \color{blue}{t}\right)\right)\right) \]

    if 1.05e-132 < z < 1.65000000000000013e30

    1. Initial program 34.3%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf

      \[\leadsto \color{blue}{b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \color{blue}{\left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    5. Applied rewrites45.4%

      \[\leadsto \color{blue}{b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    6. Taylor expanded in y4 around inf

      \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      3. lift--.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot \color{blue}{y}\right)\right) \]
      4. lift-*.f6438.8

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - \color{blue}{k \cdot y}\right)\right) \]
    8. Applied rewrites38.8%

      \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
    9. Taylor expanded in y around 0

      \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6435.9

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t\right)\right) \]
    11. Applied rewrites35.9%

      \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification30.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{-50}:\\ \;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-132}:\\ \;\;\;\;y2 \cdot \left(y4 \cdot \left(\left(-c\right) \cdot t\right)\right)\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+30}:\\ \;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 22.4% accurate, 5.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\ \mathbf{if}\;z \leq -8 \cdot 10^{-50}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-133}:\\ \;\;\;\;y2 \cdot \left(\left(-c\right) \cdot \left(t \cdot y4\right)\right)\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+30}:\\ \;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\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 (* y1 (* a (* y3 z)))))
   (if (<= z -8e-50)
     t_1
     (if (<= z 4e-133)
       (* y2 (* (- c) (* t y4)))
       (if (<= z 1.65e+30) (* b (* y4 (* j t))) 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 * (a * (y3 * z));
	double tmp;
	if (z <= -8e-50) {
		tmp = t_1;
	} else if (z <= 4e-133) {
		tmp = y2 * (-c * (t * y4));
	} else if (z <= 1.65e+30) {
		tmp = b * (y4 * (j * t));
	} 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 = y1 * (a * (y3 * z))
    if (z <= (-8d-50)) then
        tmp = t_1
    else if (z <= 4d-133) then
        tmp = y2 * (-c * (t * y4))
    else if (z <= 1.65d+30) then
        tmp = b * (y4 * (j * t))
    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 = y1 * (a * (y3 * z));
	double tmp;
	if (z <= -8e-50) {
		tmp = t_1;
	} else if (z <= 4e-133) {
		tmp = y2 * (-c * (t * y4));
	} else if (z <= 1.65e+30) {
		tmp = b * (y4 * (j * t));
	} 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 = y1 * (a * (y3 * z))
	tmp = 0
	if z <= -8e-50:
		tmp = t_1
	elif z <= 4e-133:
		tmp = y2 * (-c * (t * y4))
	elif z <= 1.65e+30:
		tmp = b * (y4 * (j * t))
	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(y1 * Float64(a * Float64(y3 * z)))
	tmp = 0.0
	if (z <= -8e-50)
		tmp = t_1;
	elseif (z <= 4e-133)
		tmp = Float64(y2 * Float64(Float64(-c) * Float64(t * y4)));
	elseif (z <= 1.65e+30)
		tmp = Float64(b * Float64(y4 * Float64(j * t)));
	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 = y1 * (a * (y3 * z));
	tmp = 0.0;
	if (z <= -8e-50)
		tmp = t_1;
	elseif (z <= 4e-133)
		tmp = y2 * (-c * (t * y4));
	elseif (z <= 1.65e+30)
		tmp = b * (y4 * (j * t));
	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[(y1 * N[(a * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e-50], t$95$1, If[LessEqual[z, 4e-133], N[(y2 * N[((-c) * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e+30], N[(b * N[(y4 * N[(j * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\
\mathbf{if}\;z \leq -8 \cdot 10^{-50}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4 \cdot 10^{-133}:\\
\;\;\;\;y2 \cdot \left(\left(-c\right) \cdot \left(t \cdot y4\right)\right)\\

\mathbf{elif}\;z \leq 1.65 \cdot 10^{+30}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.00000000000000006e-50 or 1.65000000000000013e30 < z

    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. Add Preprocessing
    3. Taylor expanded in z around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \color{blue}{\left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    5. Applied rewrites49.1%

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, a \cdot b - c \cdot i, y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    6. Taylor expanded in y1 around -inf

      \[\leadsto y1 \cdot \color{blue}{\left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - \color{blue}{i \cdot k}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot \color{blue}{k}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
      5. lower-*.f6440.2

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
    8. Applied rewrites40.2%

      \[\leadsto y1 \cdot \color{blue}{\left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)} \]
    9. Taylor expanded in a around inf

      \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right) \]
      2. lower-*.f6432.6

        \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right) \]
    11. Applied rewrites32.6%

      \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]

    if -8.00000000000000006e-50 < z < 4.0000000000000003e-133

    1. Initial program 33.3%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    5. Applied rewrites50.0%

      \[\leadsto \color{blue}{y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    6. Taylor expanded in y2 around inf

      \[\leadsto y2 \cdot \color{blue}{\left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - \color{blue}{c \cdot t}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot \color{blue}{t}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
      5. lower-*.f6430.2

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    8. Applied rewrites30.2%

      \[\leadsto y2 \cdot \color{blue}{\left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)} \]
    9. Taylor expanded in t around inf

      \[\leadsto y2 \cdot \left(-1 \cdot \left(c \cdot \color{blue}{\left(t \cdot y4\right)}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(-1 \cdot \left(c \cdot \left(t \cdot \color{blue}{y4}\right)\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(-1 \cdot \left(c \cdot \left(t \cdot y4\right)\right)\right) \]
      3. lower-*.f6424.0

        \[\leadsto y2 \cdot \left(-1 \cdot \left(c \cdot \left(t \cdot y4\right)\right)\right) \]
    11. Applied rewrites24.0%

      \[\leadsto y2 \cdot \left(-1 \cdot \left(c \cdot \color{blue}{\left(t \cdot y4\right)}\right)\right) \]

    if 4.0000000000000003e-133 < z < 1.65000000000000013e30

    1. Initial program 34.3%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf

      \[\leadsto \color{blue}{b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \color{blue}{\left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    5. Applied rewrites45.4%

      \[\leadsto \color{blue}{b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    6. Taylor expanded in y4 around inf

      \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      3. lift--.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot \color{blue}{y}\right)\right) \]
      4. lift-*.f6438.8

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - \color{blue}{k \cdot y}\right)\right) \]
    8. Applied rewrites38.8%

      \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
    9. Taylor expanded in y around 0

      \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6435.9

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t\right)\right) \]
    11. Applied rewrites35.9%

      \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification29.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{-50}:\\ \;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-133}:\\ \;\;\;\;y2 \cdot \left(\left(-c\right) \cdot \left(t \cdot y4\right)\right)\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+30}:\\ \;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 27: 22.6% accurate, 5.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\ \mathbf{if}\;z \leq -9.2 \cdot 10^{+41}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-226}:\\ \;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right)\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+30}:\\ \;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\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 (* y1 (* a (* y3 z)))))
   (if (<= z -9.2e+41)
     t_1
     (if (<= z -3e-226)
       (* y2 (* k (* y1 y4)))
       (if (<= z 1.65e+30) (* b (* y4 (* j t))) 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 * (a * (y3 * z));
	double tmp;
	if (z <= -9.2e+41) {
		tmp = t_1;
	} else if (z <= -3e-226) {
		tmp = y2 * (k * (y1 * y4));
	} else if (z <= 1.65e+30) {
		tmp = b * (y4 * (j * t));
	} 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 = y1 * (a * (y3 * z))
    if (z <= (-9.2d+41)) then
        tmp = t_1
    else if (z <= (-3d-226)) then
        tmp = y2 * (k * (y1 * y4))
    else if (z <= 1.65d+30) then
        tmp = b * (y4 * (j * t))
    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 = y1 * (a * (y3 * z));
	double tmp;
	if (z <= -9.2e+41) {
		tmp = t_1;
	} else if (z <= -3e-226) {
		tmp = y2 * (k * (y1 * y4));
	} else if (z <= 1.65e+30) {
		tmp = b * (y4 * (j * t));
	} 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 = y1 * (a * (y3 * z))
	tmp = 0
	if z <= -9.2e+41:
		tmp = t_1
	elif z <= -3e-226:
		tmp = y2 * (k * (y1 * y4))
	elif z <= 1.65e+30:
		tmp = b * (y4 * (j * t))
	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(y1 * Float64(a * Float64(y3 * z)))
	tmp = 0.0
	if (z <= -9.2e+41)
		tmp = t_1;
	elseif (z <= -3e-226)
		tmp = Float64(y2 * Float64(k * Float64(y1 * y4)));
	elseif (z <= 1.65e+30)
		tmp = Float64(b * Float64(y4 * Float64(j * t)));
	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 = y1 * (a * (y3 * z));
	tmp = 0.0;
	if (z <= -9.2e+41)
		tmp = t_1;
	elseif (z <= -3e-226)
		tmp = y2 * (k * (y1 * y4));
	elseif (z <= 1.65e+30)
		tmp = b * (y4 * (j * t));
	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[(y1 * N[(a * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.2e+41], t$95$1, If[LessEqual[z, -3e-226], N[(y2 * N[(k * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e+30], N[(b * N[(y4 * N[(j * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\
\mathbf{if}\;z \leq -9.2 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -3 \cdot 10^{-226}:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right)\\

\mathbf{elif}\;z \leq 1.65 \cdot 10^{+30}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.1999999999999994e41 or 1.65000000000000013e30 < z

    1. Initial program 27.2%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \color{blue}{\left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    5. Applied rewrites49.7%

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, a \cdot b - c \cdot i, y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    6. Taylor expanded in y1 around -inf

      \[\leadsto y1 \cdot \color{blue}{\left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - \color{blue}{i \cdot k}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot \color{blue}{k}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
      5. lower-*.f6441.2

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
    8. Applied rewrites41.2%

      \[\leadsto y1 \cdot \color{blue}{\left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)} \]
    9. Taylor expanded in a around inf

      \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right) \]
      2. lower-*.f6434.1

        \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right) \]
    11. Applied rewrites34.1%

      \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]

    if -9.1999999999999994e41 < z < -2.99999999999999995e-226

    1. Initial program 30.6%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    5. Applied rewrites55.9%

      \[\leadsto \color{blue}{y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    6. Taylor expanded in y2 around inf

      \[\leadsto y2 \cdot \color{blue}{\left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - \color{blue}{c \cdot t}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot \color{blue}{t}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
      5. lower-*.f6433.5

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    8. Applied rewrites33.5%

      \[\leadsto y2 \cdot \color{blue}{\left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)} \]
    9. Taylor expanded in t around 0

      \[\leadsto y2 \cdot \left(k \cdot \left(y1 \cdot \color{blue}{y4}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right) \]
      2. lower-*.f6426.7

        \[\leadsto y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right) \]
    11. Applied rewrites26.7%

      \[\leadsto y2 \cdot \left(k \cdot \left(y1 \cdot \color{blue}{y4}\right)\right) \]

    if -2.99999999999999995e-226 < z < 1.65000000000000013e30

    1. Initial program 35.0%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf

      \[\leadsto \color{blue}{b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \color{blue}{\left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    5. Applied rewrites41.4%

      \[\leadsto \color{blue}{b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    6. Taylor expanded in y4 around inf

      \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      3. lift--.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot \color{blue}{y}\right)\right) \]
      4. lift-*.f6434.7

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - \color{blue}{k \cdot y}\right)\right) \]
    8. Applied rewrites34.7%

      \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
    9. Taylor expanded in y around 0

      \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6424.8

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t\right)\right) \]
    11. Applied rewrites24.8%

      \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 28: 22.9% accurate, 7.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+92} \lor \neg \left(z \leq 3.4 \cdot 10^{+56}\right):\\ \;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (or (<= z -6.8e+92) (not (<= z 3.4e+56)))
   (* y1 (* a (* y3 z)))
   (* b (* j (* t y4)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if ((z <= -6.8e+92) || !(z <= 3.4e+56)) {
		tmp = y1 * (a * (y3 * z));
	} else {
		tmp = b * (j * (t * y4));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if ((z <= (-6.8d+92)) .or. (.not. (z <= 3.4d+56))) then
        tmp = y1 * (a * (y3 * z))
    else
        tmp = b * (j * (t * y4))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if ((z <= -6.8e+92) || !(z <= 3.4e+56)) {
		tmp = y1 * (a * (y3 * z));
	} else {
		tmp = b * (j * (t * y4));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if (z <= -6.8e+92) or not (z <= 3.4e+56):
		tmp = y1 * (a * (y3 * z))
	else:
		tmp = b * (j * (t * y4))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if ((z <= -6.8e+92) || !(z <= 3.4e+56))
		tmp = Float64(y1 * Float64(a * Float64(y3 * z)));
	else
		tmp = Float64(b * Float64(j * Float64(t * y4)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if ((z <= -6.8e+92) || ~((z <= 3.4e+56)))
		tmp = y1 * (a * (y3 * z));
	else
		tmp = b * (j * (t * y4));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[Or[LessEqual[z, -6.8e+92], N[Not[LessEqual[z, 3.4e+56]], $MachinePrecision]], N[(y1 * N[(a * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(j * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+92} \lor \neg \left(z \leq 3.4 \cdot 10^{+56}\right):\\
\;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.7999999999999996e92 or 3.40000000000000001e56 < z

    1. Initial program 25.7%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \color{blue}{\left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    5. Applied rewrites52.7%

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, a \cdot b - c \cdot i, y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    6. Taylor expanded in y1 around -inf

      \[\leadsto y1 \cdot \color{blue}{\left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - \color{blue}{i \cdot k}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot \color{blue}{k}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
      5. lower-*.f6443.3

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
    8. Applied rewrites43.3%

      \[\leadsto y1 \cdot \color{blue}{\left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)} \]
    9. Taylor expanded in a around inf

      \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right) \]
      2. lower-*.f6436.4

        \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right) \]
    11. Applied rewrites36.4%

      \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]

    if -6.7999999999999996e92 < z < 3.40000000000000001e56

    1. Initial program 33.7%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf

      \[\leadsto \color{blue}{b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \color{blue}{\left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y0 \cdot \left(j \cdot x - k \cdot z\right)}\right) \]
    5. Applied rewrites40.4%

      \[\leadsto \color{blue}{b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)} \]
    6. Taylor expanded in y4 around inf

      \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      3. lift--.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot \color{blue}{y}\right)\right) \]
      4. lift-*.f6432.4

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - \color{blue}{k \cdot y}\right)\right) \]
    8. Applied rewrites32.4%

      \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
    9. Taylor expanded in y around 0

      \[\leadsto b \cdot \left(j \cdot \left(t \cdot \color{blue}{y4}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \left(j \cdot \left(t \cdot y4\right)\right) \]
      2. lower-*.f6421.2

        \[\leadsto b \cdot \left(j \cdot \left(t \cdot y4\right)\right) \]
    11. Applied rewrites21.2%

      \[\leadsto b \cdot \left(j \cdot \left(t \cdot \color{blue}{y4}\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification27.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+92} \lor \neg \left(z \leq 3.4 \cdot 10^{+56}\right):\\ \;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 29: 22.1% accurate, 7.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+41} \lor \neg \left(z \leq 10^{+30}\right):\\ \;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (or (<= z -9.2e+41) (not (<= z 1e+30)))
   (* y1 (* a (* y3 z)))
   (* k (* y1 (* y2 y4)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if ((z <= -9.2e+41) || !(z <= 1e+30)) {
		tmp = y1 * (a * (y3 * z));
	} else {
		tmp = k * (y1 * (y2 * y4));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if ((z <= (-9.2d+41)) .or. (.not. (z <= 1d+30))) then
        tmp = y1 * (a * (y3 * z))
    else
        tmp = k * (y1 * (y2 * y4))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if ((z <= -9.2e+41) || !(z <= 1e+30)) {
		tmp = y1 * (a * (y3 * z));
	} else {
		tmp = k * (y1 * (y2 * y4));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if (z <= -9.2e+41) or not (z <= 1e+30):
		tmp = y1 * (a * (y3 * z))
	else:
		tmp = k * (y1 * (y2 * y4))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if ((z <= -9.2e+41) || !(z <= 1e+30))
		tmp = Float64(y1 * Float64(a * Float64(y3 * z)));
	else
		tmp = Float64(k * Float64(y1 * Float64(y2 * y4)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if ((z <= -9.2e+41) || ~((z <= 1e+30)))
		tmp = y1 * (a * (y3 * z));
	else
		tmp = k * (y1 * (y2 * y4));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[Or[LessEqual[z, -9.2e+41], N[Not[LessEqual[z, 1e+30]], $MachinePrecision]], N[(y1 * N[(a * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(y1 * N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+41} \lor \neg \left(z \leq 10^{+30}\right):\\
\;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.1999999999999994e41 or 1e30 < z

    1. Initial program 27.2%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \color{blue}{\left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    5. Applied rewrites49.7%

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, a \cdot b - c \cdot i, y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    6. Taylor expanded in y1 around -inf

      \[\leadsto y1 \cdot \color{blue}{\left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - \color{blue}{i \cdot k}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot \color{blue}{k}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
      5. lower-*.f6441.2

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
    8. Applied rewrites41.2%

      \[\leadsto y1 \cdot \color{blue}{\left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)} \]
    9. Taylor expanded in a around inf

      \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right) \]
      2. lower-*.f6434.1

        \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right) \]
    11. Applied rewrites34.1%

      \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]

    if -9.1999999999999994e41 < z < 1e30

    1. Initial program 33.3%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    5. Applied rewrites48.4%

      \[\leadsto \color{blue}{y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    6. Taylor expanded in y2 around inf

      \[\leadsto y2 \cdot \color{blue}{\left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - \color{blue}{c \cdot t}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot \color{blue}{t}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
      5. lower-*.f6429.4

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    8. Applied rewrites29.4%

      \[\leadsto y2 \cdot \color{blue}{\left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)} \]
    9. Taylor expanded in t around 0

      \[\leadsto k \cdot \left(y1 \cdot \color{blue}{\left(y2 \cdot y4\right)}\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot \color{blue}{y4}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right) \]
      3. lower-*.f6419.1

        \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right) \]
    11. Applied rewrites19.1%

      \[\leadsto k \cdot \left(y1 \cdot \color{blue}{\left(y2 \cdot y4\right)}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification25.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+41} \lor \neg \left(z \leq 10^{+30}\right):\\ \;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 30: 22.4% accurate, 7.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.15 \cdot 10^{+58} \lor \neg \left(y \leq 3.05 \cdot 10^{+22}\right):\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (or (<= y -2.15e+58) (not (<= y 3.05e+22)))
   (* i (* k (* y y5)))
   (* y1 (* z (* a 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 ((y <= -2.15e+58) || !(y <= 3.05e+22)) {
		tmp = i * (k * (y * y5));
	} else {
		tmp = y1 * (z * (a * 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 ((y <= (-2.15d+58)) .or. (.not. (y <= 3.05d+22))) then
        tmp = i * (k * (y * y5))
    else
        tmp = y1 * (z * (a * 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 ((y <= -2.15e+58) || !(y <= 3.05e+22)) {
		tmp = i * (k * (y * y5));
	} else {
		tmp = y1 * (z * (a * y3));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if (y <= -2.15e+58) or not (y <= 3.05e+22):
		tmp = i * (k * (y * y5))
	else:
		tmp = y1 * (z * (a * 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 ((y <= -2.15e+58) || !(y <= 3.05e+22))
		tmp = Float64(i * Float64(k * Float64(y * y5)));
	else
		tmp = Float64(y1 * Float64(z * Float64(a * 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 ((y <= -2.15e+58) || ~((y <= 3.05e+22)))
		tmp = i * (k * (y * y5));
	else
		tmp = y1 * (z * (a * y3));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[Or[LessEqual[y, -2.15e+58], N[Not[LessEqual[y, 3.05e+22]], $MachinePrecision]], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y1 * N[(z * N[(a * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+58} \lor \neg \left(y \leq 3.05 \cdot 10^{+22}\right):\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.14999999999999996e58 or 3.0499999999999999e22 < y

    1. Initial program 25.0%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in i around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \color{blue}{\left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    5. Applied rewrites40.4%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    6. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6432.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    8. Applied rewrites32.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    9. Taylor expanded in y around inf

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6428.4

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
    11. Applied rewrites28.4%

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]

    if -2.14999999999999996e58 < y < 3.0499999999999999e22

    1. Initial program 34.7%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \color{blue}{\left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    5. Applied rewrites40.9%

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, a \cdot b - c \cdot i, y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    6. Taylor expanded in y1 around -inf

      \[\leadsto y1 \cdot \color{blue}{\left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - \color{blue}{i \cdot k}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot \color{blue}{k}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
      5. lower-*.f6431.8

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
    8. Applied rewrites31.8%

      \[\leadsto y1 \cdot \color{blue}{\left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)} \]
    9. Taylor expanded in a around inf

      \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6422.5

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3\right)\right) \]
    11. Applied rewrites22.5%

      \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification25.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.15 \cdot 10^{+58} \lor \neg \left(y \leq 3.05 \cdot 10^{+22}\right):\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 31: 22.3% accurate, 7.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.15 \cdot 10^{+58} \lor \neg \left(y \leq 3.05 \cdot 10^{+22}\right):\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (or (<= y -2.15e+58) (not (<= y 3.05e+22)))
   (* i (* k (* y y5)))
   (* y1 (* a (* 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 ((y <= -2.15e+58) || !(y <= 3.05e+22)) {
		tmp = i * (k * (y * y5));
	} else {
		tmp = y1 * (a * (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 ((y <= (-2.15d+58)) .or. (.not. (y <= 3.05d+22))) then
        tmp = i * (k * (y * y5))
    else
        tmp = y1 * (a * (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 ((y <= -2.15e+58) || !(y <= 3.05e+22)) {
		tmp = i * (k * (y * y5));
	} else {
		tmp = y1 * (a * (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 (y <= -2.15e+58) or not (y <= 3.05e+22):
		tmp = i * (k * (y * y5))
	else:
		tmp = y1 * (a * (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 ((y <= -2.15e+58) || !(y <= 3.05e+22))
		tmp = Float64(i * Float64(k * Float64(y * y5)));
	else
		tmp = Float64(y1 * Float64(a * 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 ((y <= -2.15e+58) || ~((y <= 3.05e+22)))
		tmp = i * (k * (y * y5));
	else
		tmp = y1 * (a * (y3 * z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[Or[LessEqual[y, -2.15e+58], N[Not[LessEqual[y, 3.05e+22]], $MachinePrecision]], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y1 * N[(a * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+58} \lor \neg \left(y \leq 3.05 \cdot 10^{+22}\right):\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.14999999999999996e58 or 3.0499999999999999e22 < y

    1. Initial program 25.0%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in i around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \color{blue}{\left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    5. Applied rewrites40.4%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    6. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6432.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    8. Applied rewrites32.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    9. Taylor expanded in y around inf

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6428.4

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
    11. Applied rewrites28.4%

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]

    if -2.14999999999999996e58 < y < 3.0499999999999999e22

    1. Initial program 34.7%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \color{blue}{\left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    5. Applied rewrites40.9%

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, a \cdot b - c \cdot i, y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    6. Taylor expanded in y1 around -inf

      \[\leadsto y1 \cdot \color{blue}{\left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - \color{blue}{i \cdot k}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot \color{blue}{k}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
      5. lower-*.f6431.8

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
    8. Applied rewrites31.8%

      \[\leadsto y1 \cdot \color{blue}{\left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)} \]
    9. Taylor expanded in a around inf

      \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right) \]
      2. lower-*.f6422.4

        \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right) \]
    11. Applied rewrites22.4%

      \[\leadsto y1 \cdot \left(a \cdot \left(y3 \cdot \color{blue}{z}\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification25.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.15 \cdot 10^{+58} \lor \neg \left(y \leq 3.05 \cdot 10^{+22}\right):\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 32: 22.3% accurate, 7.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{+57} \lor \neg \left(y \leq 3.05 \cdot 10^{+22}\right):\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (if (or (<= y -5.5e+57) (not (<= y 3.05e+22)))
   (* i (* k (* y y5)))
   (* a (* y1 (* y3 z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if ((y <= -5.5e+57) || !(y <= 3.05e+22)) {
		tmp = i * (k * (y * y5));
	} else {
		tmp = a * (y1 * (y3 * z));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if ((y <= (-5.5d+57)) .or. (.not. (y <= 3.05d+22))) then
        tmp = i * (k * (y * y5))
    else
        tmp = a * (y1 * (y3 * z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if ((y <= -5.5e+57) || !(y <= 3.05e+22)) {
		tmp = i * (k * (y * y5));
	} else {
		tmp = a * (y1 * (y3 * z));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if (y <= -5.5e+57) or not (y <= 3.05e+22):
		tmp = i * (k * (y * y5))
	else:
		tmp = a * (y1 * (y3 * z))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if ((y <= -5.5e+57) || !(y <= 3.05e+22))
		tmp = Float64(i * Float64(k * Float64(y * y5)));
	else
		tmp = Float64(a * Float64(y1 * Float64(y3 * z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if ((y <= -5.5e+57) || ~((y <= 3.05e+22)))
		tmp = i * (k * (y * y5));
	else
		tmp = a * (y1 * (y3 * z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[Or[LessEqual[y, -5.5e+57], N[Not[LessEqual[y, 3.05e+22]], $MachinePrecision]], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(y1 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+57} \lor \neg \left(y \leq 3.05 \cdot 10^{+22}\right):\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\

\mathbf{else}:\\
\;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.5000000000000002e57 or 3.0499999999999999e22 < y

    1. Initial program 25.0%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in i around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \color{blue}{\left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
    5. Applied rewrites40.4%

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    6. Taylor expanded in k around -inf

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
      5. lower-*.f6432.8

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    8. Applied rewrites32.8%

      \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
    9. Taylor expanded in y around inf

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
    10. Step-by-step derivation
      1. lift-*.f6428.4

        \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
    11. Applied rewrites28.4%

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]

    if -5.5000000000000002e57 < y < 3.0499999999999999e22

    1. Initial program 34.7%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \color{blue}{\left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto -1 \cdot \left(z \cdot \left(\left(t \cdot \left(a \cdot b - c \cdot i\right) + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - \color{blue}{k \cdot \left(b \cdot y0 - i \cdot y1\right)}\right)\right) \]
    5. Applied rewrites40.9%

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, a \cdot b - c \cdot i, y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)} \]
    6. Taylor expanded in y1 around -inf

      \[\leadsto y1 \cdot \color{blue}{\left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \color{blue}{\left(a \cdot y3 - i \cdot k\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - \color{blue}{i \cdot k}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot \color{blue}{k}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
      5. lower-*.f6431.8

        \[\leadsto y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) \]
    8. Applied rewrites31.8%

      \[\leadsto y1 \cdot \color{blue}{\left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)} \]
    9. Taylor expanded in a around inf

      \[\leadsto a \cdot \left(y1 \cdot \color{blue}{\left(y3 \cdot z\right)}\right) \]
    10. 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-*.f6421.2

        \[\leadsto a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) \]
    11. Applied rewrites21.2%

      \[\leadsto a \cdot \left(y1 \cdot \color{blue}{\left(y3 \cdot z\right)}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification24.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{+57} \lor \neg \left(y \leq 3.05 \cdot 10^{+22}\right):\\ \;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 33: 17.4% accurate, 12.6× speedup?

\[\begin{array}{l} \\ i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
 :precision binary64
 (* i (* k (* y y5))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return i * (k * (y * y5));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    code = i * (k * (y * y5))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return i * (k * (y * y5));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	return i * (k * (y * y5))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	return Float64(i * Float64(k * Float64(y * y5)))
end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = i * (k * (y * y5));
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
i \cdot \left(k \cdot \left(y \cdot y5\right)\right)
\end{array}
Derivation
  1. Initial program 30.6%

    \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
  2. Add Preprocessing
  3. Taylor expanded in i around -inf

    \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
  4. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto -1 \cdot \color{blue}{\left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
    2. lower-*.f64N/A

      \[\leadsto -1 \cdot \left(i \cdot \color{blue}{\left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)}\right) \]
    3. lower--.f64N/A

      \[\leadsto -1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - \color{blue}{y1 \cdot \left(j \cdot x - k \cdot z\right)}\right)\right) \]
  5. Applied rewrites38.0%

    \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot \left(j \cdot t - k \cdot y\right)\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)} \]
  6. Taylor expanded in k around -inf

    \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
  7. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto i \cdot \left(k \cdot \color{blue}{\left(y \cdot y5 - y1 \cdot z\right)}\right) \]
    2. lower-*.f64N/A

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - \color{blue}{y1 \cdot z}\right)\right) \]
    3. lower--.f64N/A

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot \color{blue}{z}\right)\right) \]
    4. lower-*.f64N/A

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
    5. lower-*.f6426.5

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right) \]
  8. Applied rewrites26.5%

    \[\leadsto i \cdot \color{blue}{\left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)} \]
  9. Taylor expanded in y around inf

    \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
  10. Step-by-step derivation
    1. lift-*.f6416.2

      \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
  11. Applied rewrites16.2%

    \[\leadsto i \cdot \left(k \cdot \left(y \cdot y5\right)\right) \]
  12. Add Preprocessing

Reproduce

?
herbie shell --seed 2025085 
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :name "Linear.Matrix:det44 from linear-1.19.1.3"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< y4 -7206256231996481000000000000000000000000000000000000000000000) (- (- (* (- (* b a) (* i c)) (- (* y x) (* t z))) (- (* (- (* j x) (* k z)) (- (* y0 b) (* i y1))) (* (- (* j t) (* k y)) (- (* y4 b) (* y5 i))))) (- (/ (- (* y2 t) (* y3 y)) (/ 1 (- (* y4 c) (* y5 a)))) (* (- (* y2 k) (* y3 j)) (- (* y4 y1) (* y5 y0))))) (if (< y4 -3364603505246317/1000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (- (- (* (* t c) (* i z)) (* (* a t) (* b z))) (* (* y c) (* i x))) (* (- (* b y0) (* i y1)) (- (* j x) (* k z)))) (- (* (- (* y0 c) (* a y1)) (- (* x y2) (* z y3))) (- (* (- (* t y2) (* y y3)) (- (* y4 c) (* a y5))) (* (- (* y1 y4) (* y5 y0)) (- (* k y2) (* j y3)))))) (if (< y4 -3000016263921529/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (+ (- (* (- (* j t) (* k y)) (- (* y4 b) (* y5 i))) (* (* y3 y) (- (* y5 a) (* y4 c)))) (+ (* (* y5 a) (* t y2)) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))) (- (* (- (* x y2) (* z y3)) (- (* c y0) (* a y1))) (- (* (- (* b y0) (* i y1)) (- (* j x) (* k z))) (* (- (* y x) (* z t)) (- (* b a) (* i c)))))) (if (< y4 1343792624811499/200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (- (- (* (* k y) (* y5 i)) (* (* y b) (* y4 k))) (* (* y5 t) (* i j))) (- (* (- (* y2 t) (* y3 y)) (- (* y4 c) (* y5 a))) (* (- (* y2 k) (* y3 j)) (- (* y4 y1) (* y5 y0))))) (- (* (- (* b a) (* i c)) (- (* y x) (* t z))) (- (* (- (* j x) (* k z)) (- (* y0 b) (* i y1))) (* (- (* y2 x) (* y3 z)) (- (* c y0) (* y1 a)))))) (if (< y4 29872667587737/6250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (+ (- (* (- (* j t) (* k y)) (- (* y4 b) (* y5 i))) (* (* y3 y) (- (* y5 a) (* y4 c)))) (+ (* (* y5 a) (* t y2)) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))) (- (* (- (* x y2) (* z y3)) (- (* c y0) (* a y1))) (- (* (- (* b y0) (* i y1)) (- (* j x) (* k z))) (* (- (* y x) (* z t)) (- (* b a) (* i c)))))) (if (< y4 4570448308253367/20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (- (- (* (* k y) (* y5 i)) (* (* y b) (* y4 k))) (* (* y5 t) (* i j))) (- (* (- (* y2 t) (* y3 y)) (- (* y4 c) (* y5 a))) (* (- (* y2 k) (* y3 j)) (- (* y4 y1) (* y5 y0))))) (- (* (- (* b a) (* i c)) (- (* y x) (* t z))) (- (* (- (* j x) (* k z)) (- (* y0 b) (* i y1))) (* (- (* y2 x) (* y3 z)) (- (* c y0) (* y1 a)))))) (+ (- (+ (+ (- (* (- (* x y) (* z t)) (- (* a b) (* c i))) (- (* k (* i (* z y1))) (+ (* j (* i (* x y1))) (* y0 (* k (* z b)))))) (- (* z (* y3 (* a y1))) (+ (* y2 (* x (* a y1))) (* y0 (* z (* c y3)))))) (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i)))) (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a)))) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))))))))

  (+ (- (+ (+ (- (* (- (* x y) (* z t)) (- (* a b) (* c i))) (* (- (* x j) (* z k)) (- (* y0 b) (* y1 i)))) (* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a)))) (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i)))) (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a)))) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))