Linear.Matrix:det44 from linear-1.19.1.3

Percentage Accurate: 30.1% → 56.8%
Time: 27.4s
Alternatives: 42
Speedup: 5.6×

Specification

?
\[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
(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]
\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)

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

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

Initial Program: 30.1% accurate, 1.0× speedup?

\[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
(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]
\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)

Alternative 1: 56.8% accurate, 0.5× speedup?

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

\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(z \cdot t\_2\right)\right) + t\_1\\


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

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

    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 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\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) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.3%

      \[\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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in z around inf

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f6441.6%

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites41.6%

      \[\leadsto -1 \cdot \color{blue}{\left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 52.2% accurate, 2.3× speedup?

\[\begin{array}{l} t_1 := k \cdot y2 - j \cdot y3\\ t_2 := j \cdot t - k \cdot y\\ \mathbf{if}\;y4 \leq -8500000000000000757884889654178177794047522530015745844116099963310943954472769886842428117937801507512764288944792928375747102317752152278551394192736733102080:\\ \;\;\;\;y4 \cdot \left(\left(b \cdot t\_2 + y1 \cdot t\_1\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \mathbf{elif}\;y4 \leq \frac{-6428395225932623}{24258095192198577111702804507226602425888844017448384549047688094157046135724638848919975137947601217976370792142673018846430938189293974866316988672518455300069609000325779774222895087993725700394734362401819824232700732090875904}:\\ \;\;\;\;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)\\ \mathbf{elif}\;y4 \leq \frac{4381000474388761}{81129638414606681695789005144064}:\\ \;\;\;\;-1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot t\_2\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)\\ \mathbf{elif}\;y4 \leq 12000000000000000877342586199058230853393914428450460840506851493293349066853514222504360921726288952011328255996371575040188334992629165360465628990341692685271669126513310168027495389342559053777346181820579840:\\ \;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + t\_1 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(y4 \cdot \left(y2 \cdot \left(y1 + -1 \cdot \frac{b \cdot y}{y2}\right)\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (let* ((t_1 (- (* k y2) (* j y3))) (t_2 (- (* j t) (* k y))))
  (if (<=
       y4
       -8500000000000000757884889654178177794047522530015745844116099963310943954472769886842428117937801507512764288944792928375747102317752152278551394192736733102080)
    (* y4 (- (+ (* b t_2) (* y1 t_1)) (* c (- (* t y2) (* y y3)))))
    (if (<=
         y4
         -6428395225932623/24258095192198577111702804507226602425888844017448384549047688094157046135724638848919975137947601217976370792142673018846430938189293974866316988672518455300069609000325779774222895087993725700394734362401819824232700732090875904)
      (*
       x
       (-
        (+ (* y (- (* a b) (* c i))) (* y2 (- (* c y0) (* a y1))))
        (* j (- (* b y0) (* i y1)))))
      (if (<= y4 4381000474388761/81129638414606681695789005144064)
        (*
         -1
         (*
          i
          (-
           (+ (* c (- (* x y) (* t z))) (* y5 t_2))
           (* y1 (- (* j x) (* k z))))))
        (if (<=
             y4
             12000000000000000877342586199058230853393914428450460840506851493293349066853514222504360921726288952011328255996371575040188334992629165360465628990341692685271669126513310168027495389342559053777346181820579840)
          (+
           (* j (* t (- (* b y4) (* i y5))))
           (* t_1 (- (* y4 y1) (* y5 y0))))
          (* k (* y4 (* y2 (+ y1 (* -1 (/ (* b y) y2))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = (k * y2) - (j * y3);
	double t_2 = (j * t) - (k * y);
	double tmp;
	if (y4 <= -8.5e+159) {
		tmp = y4 * (((b * t_2) + (y1 * t_1)) - (c * ((t * y2) - (y * y3))));
	} else if (y4 <= -2.65e-214) {
		tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
	} else if (y4 <= 5.4e-17) {
		tmp = -1.0 * (i * (((c * ((x * y) - (t * z))) + (y5 * t_2)) - (y1 * ((j * x) - (k * z)))));
	} else if (y4 <= 1.2e+211) {
		tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)));
	} else {
		tmp = k * (y4 * (y2 * (y1 + (-1.0 * ((b * y) / y2)))));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (k * y2) - (j * y3)
    t_2 = (j * t) - (k * y)
    if (y4 <= (-8.5d+159)) then
        tmp = y4 * (((b * t_2) + (y1 * t_1)) - (c * ((t * y2) - (y * y3))))
    else if (y4 <= (-2.65d-214)) then
        tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))))
    else if (y4 <= 5.4d-17) then
        tmp = (-1.0d0) * (i * (((c * ((x * y) - (t * z))) + (y5 * t_2)) - (y1 * ((j * x) - (k * z)))))
    else if (y4 <= 1.2d+211) then
        tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)))
    else
        tmp = k * (y4 * (y2 * (y1 + ((-1.0d0) * ((b * y) / y2)))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = (k * y2) - (j * y3);
	double t_2 = (j * t) - (k * y);
	double tmp;
	if (y4 <= -8.5e+159) {
		tmp = y4 * (((b * t_2) + (y1 * t_1)) - (c * ((t * y2) - (y * y3))));
	} else if (y4 <= -2.65e-214) {
		tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
	} else if (y4 <= 5.4e-17) {
		tmp = -1.0 * (i * (((c * ((x * y) - (t * z))) + (y5 * t_2)) - (y1 * ((j * x) - (k * z)))));
	} else if (y4 <= 1.2e+211) {
		tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)));
	} else {
		tmp = k * (y4 * (y2 * (y1 + (-1.0 * ((b * y) / y2)))));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = (k * y2) - (j * y3)
	t_2 = (j * t) - (k * y)
	tmp = 0
	if y4 <= -8.5e+159:
		tmp = y4 * (((b * t_2) + (y1 * t_1)) - (c * ((t * y2) - (y * y3))))
	elif y4 <= -2.65e-214:
		tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))))
	elif y4 <= 5.4e-17:
		tmp = -1.0 * (i * (((c * ((x * y) - (t * z))) + (y5 * t_2)) - (y1 * ((j * x) - (k * z)))))
	elif y4 <= 1.2e+211:
		tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)))
	else:
		tmp = k * (y4 * (y2 * (y1 + (-1.0 * ((b * y) / y2)))))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(k * y2) - Float64(j * y3))
	t_2 = Float64(Float64(j * t) - Float64(k * y))
	tmp = 0.0
	if (y4 <= -8.5e+159)
		tmp = Float64(y4 * Float64(Float64(Float64(b * t_2) + Float64(y1 * t_1)) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3)))));
	elseif (y4 <= -2.65e-214)
		tmp = Float64(x * Float64(Float64(Float64(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 (y4 <= 5.4e-17)
		tmp = Float64(-1.0 * Float64(i * Float64(Float64(Float64(c * Float64(Float64(x * y) - Float64(t * z))) + Float64(y5 * t_2)) - Float64(y1 * Float64(Float64(j * x) - Float64(k * z))))));
	elseif (y4 <= 1.2e+211)
		tmp = Float64(Float64(j * Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))) + Float64(t_1 * Float64(Float64(y4 * y1) - Float64(y5 * y0))));
	else
		tmp = Float64(k * Float64(y4 * Float64(y2 * Float64(y1 + Float64(-1.0 * Float64(Float64(b * y) / y2))))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = (k * y2) - (j * y3);
	t_2 = (j * t) - (k * y);
	tmp = 0.0;
	if (y4 <= -8.5e+159)
		tmp = y4 * (((b * t_2) + (y1 * t_1)) - (c * ((t * y2) - (y * y3))));
	elseif (y4 <= -2.65e-214)
		tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
	elseif (y4 <= 5.4e-17)
		tmp = -1.0 * (i * (((c * ((x * y) - (t * z))) + (y5 * t_2)) - (y1 * ((j * x) - (k * z)))));
	elseif (y4 <= 1.2e+211)
		tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)));
	else
		tmp = k * (y4 * (y2 * (y1 + (-1.0 * ((b * y) / y2)))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -8500000000000000757884889654178177794047522530015745844116099963310943954472769886842428117937801507512764288944792928375747102317752152278551394192736733102080], N[(y4 * N[(N[(N[(b * t$95$2), $MachinePrecision] + N[(y1 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -6428395225932623/24258095192198577111702804507226602425888844017448384549047688094157046135724638848919975137947601217976370792142673018846430938189293974866316988672518455300069609000325779774222895087993725700394734362401819824232700732090875904], N[(x * N[(N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $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[y4, 4381000474388761/81129638414606681695789005144064], N[(-1 * N[(i * N[(N[(N[(c * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y5 * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 12000000000000000877342586199058230853393914428450460840506851493293349066853514222504360921726288952011328255996371575040188334992629165360465628990341692685271669126513310168027495389342559053777346181820579840], N[(N[(j * N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(y4 * N[(y2 * N[(y1 + N[(-1 * N[(N[(b * y), $MachinePrecision] / y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
t_1 := k \cdot y2 - j \cdot y3\\
t_2 := j \cdot t - k \cdot y\\
\mathbf{if}\;y4 \leq -8500000000000000757884889654178177794047522530015745844116099963310943954472769886842428117937801507512764288944792928375747102317752152278551394192736733102080:\\
\;\;\;\;y4 \cdot \left(\left(b \cdot t\_2 + y1 \cdot t\_1\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\

\mathbf{elif}\;y4 \leq \frac{-6428395225932623}{24258095192198577111702804507226602425888844017448384549047688094157046135724638848919975137947601217976370792142673018846430938189293974866316988672518455300069609000325779774222895087993725700394734362401819824232700732090875904}:\\
\;\;\;\;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)\\

\mathbf{elif}\;y4 \leq \frac{4381000474388761}{81129638414606681695789005144064}:\\
\;\;\;\;-1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot t\_2\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)\\

\mathbf{elif}\;y4 \leq 12000000000000000877342586199058230853393914428450460840506851493293349066853514222504360921726288952011328255996371575040188334992629165360465628990341692685271669126513310168027495389342559053777346181820579840:\\
\;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + t\_1 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\

\mathbf{else}:\\
\;\;\;\;k \cdot \left(y4 \cdot \left(y2 \cdot \left(y1 + -1 \cdot \frac{b \cdot y}{y2}\right)\right)\right)\\


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

    1. Initial program 30.1%

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

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

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

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

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

    if -8.5000000000000008e159 < y4 < -2.65e-214

    1. Initial program 30.1%

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

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

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

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

      \[\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)} \]
    5. 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)} \]
    6. 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) \]
    7. Applied rewrites36.6%

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

    if -2.65e-214 < y4 < 5.4000000000000002e-17

    1. Initial program 30.1%

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

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

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

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

      \[\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)} \]
    5. 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)} \]
    6. 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) \]
    7. Applied rewrites36.7%

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

    if 5.4000000000000002e-17 < y4 < 1.2000000000000001e211

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\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) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.3%

      \[\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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in z around inf

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f6441.6%

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites41.6%

      \[\leadsto -1 \cdot \color{blue}{\left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    8. Taylor expanded in j around inf

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

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

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

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

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f6436.9%

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    10. Applied rewrites36.9%

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

    if 1.2000000000000001e211 < y4

    1. Initial program 30.1%

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

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

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

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

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

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

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

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in y2 around inf

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

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

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

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

        \[\leadsto k \cdot \left(y4 \cdot \left(y2 \cdot \left(y1 + -1 \cdot \frac{b \cdot y}{y2}\right)\right)\right) \]
      5. lower-*.f6428.7%

        \[\leadsto k \cdot \left(y4 \cdot \left(y2 \cdot \left(y1 + -1 \cdot \frac{b \cdot y}{y2}\right)\right)\right) \]
    10. Applied rewrites28.7%

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

Alternative 3: 43.1% accurate, 0.6× speedup?

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

\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(z \cdot t\_3\right)\right) + t\_5\\


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

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

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

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

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

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

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

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

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

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

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\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) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.3%

      \[\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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in z around inf

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f6441.6%

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites41.6%

      \[\leadsto -1 \cdot \color{blue}{\left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 4: 42.5% accurate, 2.3× speedup?

\[\begin{array}{l} t_1 := k \cdot y2 - j \cdot y3\\ t_2 := j \cdot t - k \cdot y\\ t_3 := t \cdot y2 - y \cdot y3\\ t_4 := -1 \cdot \left(y5 \cdot \left(\left(i \cdot t\_2 + y0 \cdot t\_1\right) - a \cdot t\_3\right)\right)\\ \mathbf{if}\;y5 \leq -38000000000000000617485884169594647498980675873906489559217761156694042813260640633937655810704639545783262256753138021172900109288301203236382351306160846345871453940582900357319558396532141902448820224:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;y5 \leq \frac{-5265614583427859}{3291009114642412084309938365114701009965471731267159726697218048}:\\ \;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + t\_1 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ \mathbf{elif}\;y5 \leq 48000000000000002317473887049059322983701406565752475984875843518901243107867756883028084096279511040:\\ \;\;\;\;y4 \cdot \left(\left(b \cdot t\_2 + y1 \cdot t\_1\right) - c \cdot t\_3\right)\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (let* ((t_1 (- (* k y2) (* j y3)))
       (t_2 (- (* j t) (* k y)))
       (t_3 (- (* t y2) (* y y3)))
       (t_4 (* -1 (* y5 (- (+ (* i t_2) (* y0 t_1)) (* a t_3))))))
  (if (<=
       y5
       -38000000000000000617485884169594647498980675873906489559217761156694042813260640633937655810704639545783262256753138021172900109288301203236382351306160846345871453940582900357319558396532141902448820224)
    t_4
    (if (<=
         y5
         -5265614583427859/3291009114642412084309938365114701009965471731267159726697218048)
      (+
       (* j (* t (- (* b y4) (* i y5))))
       (* t_1 (- (* y4 y1) (* y5 y0))))
      (if (<=
           y5
           48000000000000002317473887049059322983701406565752475984875843518901243107867756883028084096279511040)
        (* y4 (- (+ (* b t_2) (* y1 t_1)) (* c t_3)))
        t_4)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = (k * y2) - (j * y3);
	double t_2 = (j * t) - (k * y);
	double t_3 = (t * y2) - (y * y3);
	double t_4 = -1.0 * (y5 * (((i * t_2) + (y0 * t_1)) - (a * t_3)));
	double tmp;
	if (y5 <= -3.8e+202) {
		tmp = t_4;
	} else if (y5 <= -1.6e-48) {
		tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)));
	} else if (y5 <= 4.8e+100) {
		tmp = y4 * (((b * t_2) + (y1 * t_1)) - (c * t_3));
	} else {
		tmp = t_4;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_1 = (k * y2) - (j * y3)
    t_2 = (j * t) - (k * y)
    t_3 = (t * y2) - (y * y3)
    t_4 = (-1.0d0) * (y5 * (((i * t_2) + (y0 * t_1)) - (a * t_3)))
    if (y5 <= (-3.8d+202)) then
        tmp = t_4
    else if (y5 <= (-1.6d-48)) then
        tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)))
    else if (y5 <= 4.8d+100) then
        tmp = y4 * (((b * t_2) + (y1 * t_1)) - (c * t_3))
    else
        tmp = t_4
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = (k * y2) - (j * y3);
	double t_2 = (j * t) - (k * y);
	double t_3 = (t * y2) - (y * y3);
	double t_4 = -1.0 * (y5 * (((i * t_2) + (y0 * t_1)) - (a * t_3)));
	double tmp;
	if (y5 <= -3.8e+202) {
		tmp = t_4;
	} else if (y5 <= -1.6e-48) {
		tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)));
	} else if (y5 <= 4.8e+100) {
		tmp = y4 * (((b * t_2) + (y1 * t_1)) - (c * t_3));
	} else {
		tmp = t_4;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = (k * y2) - (j * y3)
	t_2 = (j * t) - (k * y)
	t_3 = (t * y2) - (y * y3)
	t_4 = -1.0 * (y5 * (((i * t_2) + (y0 * t_1)) - (a * t_3)))
	tmp = 0
	if y5 <= -3.8e+202:
		tmp = t_4
	elif y5 <= -1.6e-48:
		tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)))
	elif y5 <= 4.8e+100:
		tmp = y4 * (((b * t_2) + (y1 * t_1)) - (c * t_3))
	else:
		tmp = t_4
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(k * y2) - Float64(j * y3))
	t_2 = Float64(Float64(j * t) - Float64(k * y))
	t_3 = Float64(Float64(t * y2) - Float64(y * y3))
	t_4 = Float64(-1.0 * Float64(y5 * Float64(Float64(Float64(i * t_2) + Float64(y0 * t_1)) - Float64(a * t_3))))
	tmp = 0.0
	if (y5 <= -3.8e+202)
		tmp = t_4;
	elseif (y5 <= -1.6e-48)
		tmp = Float64(Float64(j * Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))) + Float64(t_1 * Float64(Float64(y4 * y1) - Float64(y5 * y0))));
	elseif (y5 <= 4.8e+100)
		tmp = Float64(y4 * Float64(Float64(Float64(b * t_2) + Float64(y1 * t_1)) - Float64(c * t_3)));
	else
		tmp = t_4;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = (k * y2) - (j * y3);
	t_2 = (j * t) - (k * y);
	t_3 = (t * y2) - (y * y3);
	t_4 = -1.0 * (y5 * (((i * t_2) + (y0 * t_1)) - (a * t_3)));
	tmp = 0.0;
	if (y5 <= -3.8e+202)
		tmp = t_4;
	elseif (y5 <= -1.6e-48)
		tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)));
	elseif (y5 <= 4.8e+100)
		tmp = y4 * (((b * t_2) + (y1 * t_1)) - (c * t_3));
	else
		tmp = t_4;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(-1 * N[(y5 * N[(N[(N[(i * t$95$2), $MachinePrecision] + N[(y0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(a * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y5, -38000000000000000617485884169594647498980675873906489559217761156694042813260640633937655810704639545783262256753138021172900109288301203236382351306160846345871453940582900357319558396532141902448820224], t$95$4, If[LessEqual[y5, -5265614583427859/3291009114642412084309938365114701009965471731267159726697218048], N[(N[(j * N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 48000000000000002317473887049059322983701406565752475984875843518901243107867756883028084096279511040], N[(y4 * N[(N[(N[(b * t$95$2), $MachinePrecision] + N[(y1 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(c * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]
\begin{array}{l}
t_1 := k \cdot y2 - j \cdot y3\\
t_2 := j \cdot t - k \cdot y\\
t_3 := t \cdot y2 - y \cdot y3\\
t_4 := -1 \cdot \left(y5 \cdot \left(\left(i \cdot t\_2 + y0 \cdot t\_1\right) - a \cdot t\_3\right)\right)\\
\mathbf{if}\;y5 \leq -38000000000000000617485884169594647498980675873906489559217761156694042813260640633937655810704639545783262256753138021172900109288301203236382351306160846345871453940582900357319558396532141902448820224:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;y5 \leq \frac{-5265614583427859}{3291009114642412084309938365114701009965471731267159726697218048}:\\
\;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + t\_1 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\

\mathbf{elif}\;y5 \leq 48000000000000002317473887049059322983701406565752475984875843518901243107867756883028084096279511040:\\
\;\;\;\;y4 \cdot \left(\left(b \cdot t\_2 + y1 \cdot t\_1\right) - c \cdot t\_3\right)\\

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y5 < -3.8000000000000001e202 or 4.8000000000000002e100 < y5

    1. Initial program 30.1%

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

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

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

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

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

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

    if -3.8000000000000001e202 < y5 < -1.5999999999999999e-48

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\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) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.3%

      \[\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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in z around inf

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f6441.6%

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites41.6%

      \[\leadsto -1 \cdot \color{blue}{\left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    8. Taylor expanded in j around inf

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

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

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

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

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f6436.9%

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    10. Applied rewrites36.9%

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

    if -1.5999999999999999e-48 < y5 < 4.8000000000000002e100

    1. Initial program 30.1%

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

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

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

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

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

Alternative 5: 41.5% accurate, 2.2× speedup?

\[\begin{array}{l} t_1 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ t_2 := a \cdot b - c \cdot i\\ \mathbf{if}\;x \leq -6499999999999999823809460945688469666925113212764529240120263062846011604992:\\ \;\;\;\;t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + t\_1\\ \mathbf{elif}\;x \leq \frac{2087487115172669}{9076030935533343889148330677184451660957398691768765008885326289770145612551296225251271450782204288267814476258502032778653474399077793626653018683486295323382390383590453332169716856898789897889643528945016096228440849041002686084943230837088977557446564364344140092918489677824}:\\ \;\;\;\;t \cdot \left(-1 \cdot \left(y5 \cdot \left(i \cdot j - a \cdot y2\right)\right)\right) + t\_1\\ \mathbf{elif}\;x \leq \frac{8631010391913655}{6393341031047152089869511126616404594173128996177860916959553453312761321102879990006386899074031556935325554936640763689877454191182408307282280448}:\\ \;\;\;\;y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(x \cdot \left(j + -1 \cdot \frac{k \cdot z}{x}\right)\right)\right)\\ \mathbf{elif}\;x \leq 185000000000000009379699471036228158875872544002408448:\\ \;\;\;\;-1 \cdot \left(t \cdot \left(z \cdot t\_2\right)\right) + t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(y \cdot t\_2 + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (let* ((t_1 (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))
       (t_2 (- (* a b) (* c i))))
  (if (<=
       x
       -6499999999999999823809460945688469666925113212764529240120263062846011604992)
    (+ (* t (* c (- (* i z) (* y2 y4)))) t_1)
    (if (<=
         x
         2087487115172669/9076030935533343889148330677184451660957398691768765008885326289770145612551296225251271450782204288267814476258502032778653474399077793626653018683486295323382390383590453332169716856898789897889643528945016096228440849041002686084943230837088977557446564364344140092918489677824)
      (+ (* t (* -1 (* y5 (- (* i j) (* a y2))))) t_1)
      (if (<=
           x
           8631010391913655/6393341031047152089869511126616404594173128996177860916959553453312761321102879990006386899074031556935325554936640763689877454191182408307282280448)
        (*
         y0
         (-
          (* y3 (+ (* -1 (* c z)) (* j y5)))
          (* b (* x (+ j (* -1 (/ (* k z) x)))))))
        (if (<=
             x
             185000000000000009379699471036228158875872544002408448)
          (+ (* -1 (* t (* z t_2))) t_1)
          (*
           x
           (-
            (+ (* y t_2) (* y2 (- (* c y0) (* a y1))))
            (* j (- (* b y0) (* i y1)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
	double t_2 = (a * b) - (c * i);
	double tmp;
	if (x <= -6.5e+75) {
		tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_1;
	} else if (x <= 2.3e-265) {
		tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_1;
	} else if (x <= 1.35e-132) {
		tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * (x * (j + (-1.0 * ((k * z) / x))))));
	} else if (x <= 1.85e+53) {
		tmp = (-1.0 * (t * (z * t_2))) + t_1;
	} else {
		tmp = x * (((y * t_2) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))
    t_2 = (a * b) - (c * i)
    if (x <= (-6.5d+75)) then
        tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_1
    else if (x <= 2.3d-265) then
        tmp = (t * ((-1.0d0) * (y5 * ((i * j) - (a * y2))))) + t_1
    else if (x <= 1.35d-132) then
        tmp = y0 * ((y3 * (((-1.0d0) * (c * z)) + (j * y5))) - (b * (x * (j + ((-1.0d0) * ((k * z) / x))))))
    else if (x <= 1.85d+53) then
        tmp = ((-1.0d0) * (t * (z * t_2))) + t_1
    else
        tmp = x * (((y * t_2) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
	double t_2 = (a * b) - (c * i);
	double tmp;
	if (x <= -6.5e+75) {
		tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_1;
	} else if (x <= 2.3e-265) {
		tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_1;
	} else if (x <= 1.35e-132) {
		tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * (x * (j + (-1.0 * ((k * z) / x))))));
	} else if (x <= 1.85e+53) {
		tmp = (-1.0 * (t * (z * t_2))) + t_1;
	} else {
		tmp = x * (((y * t_2) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))
	t_2 = (a * b) - (c * i)
	tmp = 0
	if x <= -6.5e+75:
		tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_1
	elif x <= 2.3e-265:
		tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_1
	elif x <= 1.35e-132:
		tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * (x * (j + (-1.0 * ((k * z) / x))))))
	elif x <= 1.85e+53:
		tmp = (-1.0 * (t * (z * t_2))) + t_1
	else:
		tmp = x * (((y * t_2) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))
	t_2 = Float64(Float64(a * b) - Float64(c * i))
	tmp = 0.0
	if (x <= -6.5e+75)
		tmp = Float64(Float64(t * Float64(c * Float64(Float64(i * z) - Float64(y2 * y4)))) + t_1);
	elseif (x <= 2.3e-265)
		tmp = Float64(Float64(t * Float64(-1.0 * Float64(y5 * Float64(Float64(i * j) - Float64(a * y2))))) + t_1);
	elseif (x <= 1.35e-132)
		tmp = Float64(y0 * Float64(Float64(y3 * Float64(Float64(-1.0 * Float64(c * z)) + Float64(j * y5))) - Float64(b * Float64(x * Float64(j + Float64(-1.0 * Float64(Float64(k * z) / x)))))));
	elseif (x <= 1.85e+53)
		tmp = Float64(Float64(-1.0 * Float64(t * Float64(z * t_2))) + t_1);
	else
		tmp = Float64(x * Float64(Float64(Float64(y * t_2) + Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
	t_2 = (a * b) - (c * i);
	tmp = 0.0;
	if (x <= -6.5e+75)
		tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_1;
	elseif (x <= 2.3e-265)
		tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_1;
	elseif (x <= 1.35e-132)
		tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * (x * (j + (-1.0 * ((k * z) / x))))));
	elseif (x <= 1.85e+53)
		tmp = (-1.0 * (t * (z * t_2))) + t_1;
	else
		tmp = x * (((y * t_2) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6499999999999999823809460945688469666925113212764529240120263062846011604992], N[(N[(t * N[(c * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 2087487115172669/9076030935533343889148330677184451660957398691768765008885326289770145612551296225251271450782204288267814476258502032778653474399077793626653018683486295323382390383590453332169716856898789897889643528945016096228440849041002686084943230837088977557446564364344140092918489677824], N[(N[(t * N[(-1 * N[(y5 * N[(N[(i * j), $MachinePrecision] - N[(a * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 8631010391913655/6393341031047152089869511126616404594173128996177860916959553453312761321102879990006386899074031556935325554936640763689877454191182408307282280448], N[(y0 * N[(N[(y3 * N[(N[(-1 * N[(c * z), $MachinePrecision]), $MachinePrecision] + N[(j * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(x * N[(j + N[(-1 * N[(N[(k * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 185000000000000009379699471036228158875872544002408448], N[(N[(-1 * N[(t * N[(z * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(x * N[(N[(N[(y * t$95$2), $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}
t_1 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
t_2 := a \cdot b - c \cdot i\\
\mathbf{if}\;x \leq -6499999999999999823809460945688469666925113212764529240120263062846011604992:\\
\;\;\;\;t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + t\_1\\

\mathbf{elif}\;x \leq \frac{2087487115172669}{9076030935533343889148330677184451660957398691768765008885326289770145612551296225251271450782204288267814476258502032778653474399077793626653018683486295323382390383590453332169716856898789897889643528945016096228440849041002686084943230837088977557446564364344140092918489677824}:\\
\;\;\;\;t \cdot \left(-1 \cdot \left(y5 \cdot \left(i \cdot j - a \cdot y2\right)\right)\right) + t\_1\\

\mathbf{elif}\;x \leq \frac{8631010391913655}{6393341031047152089869511126616404594173128996177860916959553453312761321102879990006386899074031556935325554936640763689877454191182408307282280448}:\\
\;\;\;\;y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(x \cdot \left(j + -1 \cdot \frac{k \cdot z}{x}\right)\right)\right)\\

\mathbf{elif}\;x \leq 185000000000000009379699471036228158875872544002408448:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(z \cdot t\_2\right)\right) + t\_1\\

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


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

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\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) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.3%

      \[\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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in c around inf

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

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

        \[\leadsto t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot \color{blue}{y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower-*.f6438.3%

        \[\leadsto t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites38.3%

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

    if -6.4999999999999998e75 < x < 2.2999999999999999e-265

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\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) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.3%

      \[\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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in y5 around -inf

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

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

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

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

        \[\leadsto t \cdot \left(-1 \cdot \left(y5 \cdot \left(i \cdot j - a \cdot y2\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f6435.7%

        \[\leadsto t \cdot \left(-1 \cdot \left(y5 \cdot \left(i \cdot j - a \cdot y2\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites35.7%

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

    if 2.2999999999999999e-265 < x < 1.3499999999999999e-132

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

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

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

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

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      5. lower-*.f6434.7%

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
    7. Applied rewrites34.7%

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

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

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

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

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

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(x \cdot \left(j + -1 \cdot \frac{k \cdot z}{x}\right)\right)\right) \]
      5. lower-*.f6435.0%

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(x \cdot \left(j + -1 \cdot \frac{k \cdot z}{x}\right)\right)\right) \]
    10. Applied rewrites35.0%

      \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(x \cdot \color{blue}{\left(j + -1 \cdot \frac{k \cdot z}{x}\right)}\right)\right) \]

    if 1.3499999999999999e-132 < x < 1.8500000000000001e53

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\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) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.3%

      \[\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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in z around inf

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f6441.6%

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites41.6%

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

    if 1.8500000000000001e53 < x

    1. Initial program 30.1%

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

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

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

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

      \[\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)} \]
    5. 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)} \]
    6. 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) \]
    7. Applied rewrites36.6%

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

Alternative 6: 40.8% accurate, 2.2× speedup?

\[\begin{array}{l} t_1 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ t_2 := a \cdot b - c \cdot i\\ \mathbf{if}\;x \leq -6499999999999999823809460945688469666925113212764529240120263062846011604992:\\ \;\;\;\;t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + t\_1\\ \mathbf{elif}\;x \leq \frac{2087487115172669}{9076030935533343889148330677184451660957398691768765008885326289770145612551296225251271450782204288267814476258502032778653474399077793626653018683486295323382390383590453332169716856898789897889643528945016096228440849041002686084943230837088977557446564364344140092918489677824}:\\ \;\;\;\;t \cdot \left(-1 \cdot \left(y5 \cdot \left(i \cdot j - a \cdot y2\right)\right)\right) + t\_1\\ \mathbf{elif}\;x \leq \frac{8950677443466013}{12786682062094304179739022253232809188346257992355721833919106906625522642205759980012773798148063113870651109873281527379754908382364816614564560896}:\\ \;\;\;\;y0 \cdot \left(y3 \cdot \left(j \cdot \left(y5 + -1 \cdot \frac{c \cdot z}{j}\right)\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{elif}\;x \leq 185000000000000009379699471036228158875872544002408448:\\ \;\;\;\;-1 \cdot \left(t \cdot \left(z \cdot t\_2\right)\right) + t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(y \cdot t\_2 + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (let* ((t_1 (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))
       (t_2 (- (* a b) (* c i))))
  (if (<=
       x
       -6499999999999999823809460945688469666925113212764529240120263062846011604992)
    (+ (* t (* c (- (* i z) (* y2 y4)))) t_1)
    (if (<=
         x
         2087487115172669/9076030935533343889148330677184451660957398691768765008885326289770145612551296225251271450782204288267814476258502032778653474399077793626653018683486295323382390383590453332169716856898789897889643528945016096228440849041002686084943230837088977557446564364344140092918489677824)
      (+ (* t (* -1 (* y5 (- (* i j) (* a y2))))) t_1)
      (if (<=
           x
           8950677443466013/12786682062094304179739022253232809188346257992355721833919106906625522642205759980012773798148063113870651109873281527379754908382364816614564560896)
        (*
         y0
         (-
          (* y3 (* j (+ y5 (* -1 (/ (* c z) j)))))
          (* b (- (* j x) (* k z)))))
        (if (<=
             x
             185000000000000009379699471036228158875872544002408448)
          (+ (* -1 (* t (* z t_2))) t_1)
          (*
           x
           (-
            (+ (* y t_2) (* y2 (- (* c y0) (* a y1))))
            (* j (- (* b y0) (* i y1)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
	double t_2 = (a * b) - (c * i);
	double tmp;
	if (x <= -6.5e+75) {
		tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_1;
	} else if (x <= 2.3e-265) {
		tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_1;
	} else if (x <= 7e-133) {
		tmp = y0 * ((y3 * (j * (y5 + (-1.0 * ((c * z) / j))))) - (b * ((j * x) - (k * z))));
	} else if (x <= 1.85e+53) {
		tmp = (-1.0 * (t * (z * t_2))) + t_1;
	} else {
		tmp = x * (((y * t_2) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))
    t_2 = (a * b) - (c * i)
    if (x <= (-6.5d+75)) then
        tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_1
    else if (x <= 2.3d-265) then
        tmp = (t * ((-1.0d0) * (y5 * ((i * j) - (a * y2))))) + t_1
    else if (x <= 7d-133) then
        tmp = y0 * ((y3 * (j * (y5 + ((-1.0d0) * ((c * z) / j))))) - (b * ((j * x) - (k * z))))
    else if (x <= 1.85d+53) then
        tmp = ((-1.0d0) * (t * (z * t_2))) + t_1
    else
        tmp = x * (((y * t_2) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
	double t_2 = (a * b) - (c * i);
	double tmp;
	if (x <= -6.5e+75) {
		tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_1;
	} else if (x <= 2.3e-265) {
		tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_1;
	} else if (x <= 7e-133) {
		tmp = y0 * ((y3 * (j * (y5 + (-1.0 * ((c * z) / j))))) - (b * ((j * x) - (k * z))));
	} else if (x <= 1.85e+53) {
		tmp = (-1.0 * (t * (z * t_2))) + t_1;
	} else {
		tmp = x * (((y * t_2) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))
	t_2 = (a * b) - (c * i)
	tmp = 0
	if x <= -6.5e+75:
		tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_1
	elif x <= 2.3e-265:
		tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_1
	elif x <= 7e-133:
		tmp = y0 * ((y3 * (j * (y5 + (-1.0 * ((c * z) / j))))) - (b * ((j * x) - (k * z))))
	elif x <= 1.85e+53:
		tmp = (-1.0 * (t * (z * t_2))) + t_1
	else:
		tmp = x * (((y * t_2) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))
	t_2 = Float64(Float64(a * b) - Float64(c * i))
	tmp = 0.0
	if (x <= -6.5e+75)
		tmp = Float64(Float64(t * Float64(c * Float64(Float64(i * z) - Float64(y2 * y4)))) + t_1);
	elseif (x <= 2.3e-265)
		tmp = Float64(Float64(t * Float64(-1.0 * Float64(y5 * Float64(Float64(i * j) - Float64(a * y2))))) + t_1);
	elseif (x <= 7e-133)
		tmp = Float64(y0 * Float64(Float64(y3 * Float64(j * Float64(y5 + Float64(-1.0 * Float64(Float64(c * z) / j))))) - Float64(b * Float64(Float64(j * x) - Float64(k * z)))));
	elseif (x <= 1.85e+53)
		tmp = Float64(Float64(-1.0 * Float64(t * Float64(z * t_2))) + t_1);
	else
		tmp = Float64(x * Float64(Float64(Float64(y * t_2) + Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
	t_2 = (a * b) - (c * i);
	tmp = 0.0;
	if (x <= -6.5e+75)
		tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_1;
	elseif (x <= 2.3e-265)
		tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_1;
	elseif (x <= 7e-133)
		tmp = y0 * ((y3 * (j * (y5 + (-1.0 * ((c * z) / j))))) - (b * ((j * x) - (k * z))));
	elseif (x <= 1.85e+53)
		tmp = (-1.0 * (t * (z * t_2))) + t_1;
	else
		tmp = x * (((y * t_2) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6499999999999999823809460945688469666925113212764529240120263062846011604992], N[(N[(t * N[(c * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 2087487115172669/9076030935533343889148330677184451660957398691768765008885326289770145612551296225251271450782204288267814476258502032778653474399077793626653018683486295323382390383590453332169716856898789897889643528945016096228440849041002686084943230837088977557446564364344140092918489677824], N[(N[(t * N[(-1 * N[(y5 * N[(N[(i * j), $MachinePrecision] - N[(a * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 8950677443466013/12786682062094304179739022253232809188346257992355721833919106906625522642205759980012773798148063113870651109873281527379754908382364816614564560896], N[(y0 * N[(N[(y3 * N[(j * N[(y5 + N[(-1 * N[(N[(c * z), $MachinePrecision] / j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 185000000000000009379699471036228158875872544002408448], N[(N[(-1 * N[(t * N[(z * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(x * N[(N[(N[(y * t$95$2), $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}
t_1 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
t_2 := a \cdot b - c \cdot i\\
\mathbf{if}\;x \leq -6499999999999999823809460945688469666925113212764529240120263062846011604992:\\
\;\;\;\;t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + t\_1\\

\mathbf{elif}\;x \leq \frac{2087487115172669}{9076030935533343889148330677184451660957398691768765008885326289770145612551296225251271450782204288267814476258502032778653474399077793626653018683486295323382390383590453332169716856898789897889643528945016096228440849041002686084943230837088977557446564364344140092918489677824}:\\
\;\;\;\;t \cdot \left(-1 \cdot \left(y5 \cdot \left(i \cdot j - a \cdot y2\right)\right)\right) + t\_1\\

\mathbf{elif}\;x \leq \frac{8950677443466013}{12786682062094304179739022253232809188346257992355721833919106906625522642205759980012773798148063113870651109873281527379754908382364816614564560896}:\\
\;\;\;\;y0 \cdot \left(y3 \cdot \left(j \cdot \left(y5 + -1 \cdot \frac{c \cdot z}{j}\right)\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)\\

\mathbf{elif}\;x \leq 185000000000000009379699471036228158875872544002408448:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(z \cdot t\_2\right)\right) + t\_1\\

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


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

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\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) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.3%

      \[\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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in c around inf

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

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

        \[\leadsto t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot \color{blue}{y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower-*.f6438.3%

        \[\leadsto t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites38.3%

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

    if -6.4999999999999998e75 < x < 2.2999999999999999e-265

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\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) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.3%

      \[\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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in y5 around -inf

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

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

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

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

        \[\leadsto t \cdot \left(-1 \cdot \left(y5 \cdot \left(i \cdot j - a \cdot y2\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f6435.7%

        \[\leadsto t \cdot \left(-1 \cdot \left(y5 \cdot \left(i \cdot j - a \cdot y2\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites35.7%

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

    if 2.2999999999999999e-265 < x < 7.0000000000000001e-133

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

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

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

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

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      5. lower-*.f6434.7%

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
    7. Applied rewrites34.7%

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

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

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

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

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

        \[\leadsto y0 \cdot \left(y3 \cdot \left(j \cdot \left(y5 + -1 \cdot \frac{c \cdot z}{j}\right)\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      5. lower-*.f6435.4%

        \[\leadsto y0 \cdot \left(y3 \cdot \left(j \cdot \left(y5 + -1 \cdot \frac{c \cdot z}{j}\right)\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
    10. Applied rewrites35.4%

      \[\leadsto y0 \cdot \left(y3 \cdot \left(j \cdot \left(y5 + -1 \cdot \frac{c \cdot z}{j}\right)\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]

    if 7.0000000000000001e-133 < x < 1.8500000000000001e53

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\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) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.3%

      \[\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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in z around inf

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f6441.6%

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites41.6%

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

    if 1.8500000000000001e53 < x

    1. Initial program 30.1%

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

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

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

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

      \[\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)} \]
    5. 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)} \]
    6. 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) \]
    7. Applied rewrites36.6%

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

Alternative 7: 40.7% accurate, 2.6× speedup?

\[\begin{array}{l} t_1 := k \cdot y2 - j \cdot y3\\ t_2 := t\_1 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ \mathbf{if}\;b \leq -1400000000000000066339319380481226426591264940964336348472312222499638886264973300670146220755724521177088:\\ \;\;\;\;y0 \cdot \left(b \cdot \left(k \cdot z - j \cdot x\right)\right)\\ \mathbf{elif}\;b \leq \frac{6699903382837499}{1218164251424999885044172798484398538859528357199375940858488307151618586345803262808201883235251282403163114528926083522932396233150386755822248412039081677441409712494559128733848706936256706044099949184902297359210699740674359368218295451933620701603467350388034693385228573748989263872}:\\ \;\;\;\;t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + t\_2\\ \mathbf{elif}\;b \leq \frac{32108980623861}{4586997231980143023221641790604173881593129978336562247475177678773845752176969616140037106220251373109248}:\\ \;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + t\_2\\ \mathbf{elif}\;b \leq 27999999999999998114078280402402820208055975790824099920499510299126523059902175283592573714148884480:\\ \;\;\;\;-1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + t\_1 \cdot \left(y1 \cdot y4\right)\\ \mathbf{elif}\;b \leq 299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008:\\ \;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (let* ((t_1 (- (* k y2) (* j y3)))
       (t_2 (* t_1 (- (* y4 y1) (* y5 y0)))))
  (if (<=
       b
       -1400000000000000066339319380481226426591264940964336348472312222499638886264973300670146220755724521177088)
    (* y0 (* b (- (* k z) (* j x))))
    (if (<=
         b
         6699903382837499/1218164251424999885044172798484398538859528357199375940858488307151618586345803262808201883235251282403163114528926083522932396233150386755822248412039081677441409712494559128733848706936256706044099949184902297359210699740674359368218295451933620701603467350388034693385228573748989263872)
      (+ (* t (* c (- (* i z) (* y2 y4)))) t_2)
      (if (<=
           b
           32108980623861/4586997231980143023221641790604173881593129978336562247475177678773845752176969616140037106220251373109248)
        (+ (* j (* t (- (* b y4) (* i y5)))) t_2)
        (if (<=
             b
             27999999999999998114078280402402820208055975790824099920499510299126523059902175283592573714148884480)
          (+ (* -1 (* t (* z (- (* a b) (* c i))))) (* t_1 (* y1 y4)))
          (if (<=
               b
               299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008)
            (* t (* y4 (- (* b j) (* c y2))))
            (* (* k (- (* y2 y1) (* b y))) y4))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = (k * y2) - (j * y3);
	double t_2 = t_1 * ((y4 * y1) - (y5 * y0));
	double tmp;
	if (b <= -1.4e+105) {
		tmp = y0 * (b * ((k * z) - (j * x)));
	} else if (b <= 5.5e-273) {
		tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_2;
	} else if (b <= 7e-93) {
		tmp = (j * (t * ((b * y4) - (i * y5)))) + t_2;
	} else if (b <= 2.8e+100) {
		tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (t_1 * (y1 * y4));
	} else if (b <= 3e+263) {
		tmp = t * (y4 * ((b * j) - (c * y2)));
	} else {
		tmp = (k * ((y2 * y1) - (b * y))) * y4;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (k * y2) - (j * y3)
    t_2 = t_1 * ((y4 * y1) - (y5 * y0))
    if (b <= (-1.4d+105)) then
        tmp = y0 * (b * ((k * z) - (j * x)))
    else if (b <= 5.5d-273) then
        tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_2
    else if (b <= 7d-93) then
        tmp = (j * (t * ((b * y4) - (i * y5)))) + t_2
    else if (b <= 2.8d+100) then
        tmp = ((-1.0d0) * (t * (z * ((a * b) - (c * i))))) + (t_1 * (y1 * y4))
    else if (b <= 3d+263) then
        tmp = t * (y4 * ((b * j) - (c * y2)))
    else
        tmp = (k * ((y2 * y1) - (b * y))) * y4
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = (k * y2) - (j * y3);
	double t_2 = t_1 * ((y4 * y1) - (y5 * y0));
	double tmp;
	if (b <= -1.4e+105) {
		tmp = y0 * (b * ((k * z) - (j * x)));
	} else if (b <= 5.5e-273) {
		tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_2;
	} else if (b <= 7e-93) {
		tmp = (j * (t * ((b * y4) - (i * y5)))) + t_2;
	} else if (b <= 2.8e+100) {
		tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (t_1 * (y1 * y4));
	} else if (b <= 3e+263) {
		tmp = t * (y4 * ((b * j) - (c * y2)));
	} else {
		tmp = (k * ((y2 * y1) - (b * y))) * y4;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = (k * y2) - (j * y3)
	t_2 = t_1 * ((y4 * y1) - (y5 * y0))
	tmp = 0
	if b <= -1.4e+105:
		tmp = y0 * (b * ((k * z) - (j * x)))
	elif b <= 5.5e-273:
		tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_2
	elif b <= 7e-93:
		tmp = (j * (t * ((b * y4) - (i * y5)))) + t_2
	elif b <= 2.8e+100:
		tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (t_1 * (y1 * y4))
	elif b <= 3e+263:
		tmp = t * (y4 * ((b * j) - (c * y2)))
	else:
		tmp = (k * ((y2 * y1) - (b * y))) * y4
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(k * y2) - Float64(j * y3))
	t_2 = Float64(t_1 * Float64(Float64(y4 * y1) - Float64(y5 * y0)))
	tmp = 0.0
	if (b <= -1.4e+105)
		tmp = Float64(y0 * Float64(b * Float64(Float64(k * z) - Float64(j * x))));
	elseif (b <= 5.5e-273)
		tmp = Float64(Float64(t * Float64(c * Float64(Float64(i * z) - Float64(y2 * y4)))) + t_2);
	elseif (b <= 7e-93)
		tmp = Float64(Float64(j * Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))) + t_2);
	elseif (b <= 2.8e+100)
		tmp = Float64(Float64(-1.0 * Float64(t * Float64(z * Float64(Float64(a * b) - Float64(c * i))))) + Float64(t_1 * Float64(y1 * y4)));
	elseif (b <= 3e+263)
		tmp = Float64(t * Float64(y4 * Float64(Float64(b * j) - Float64(c * y2))));
	else
		tmp = Float64(Float64(k * Float64(Float64(y2 * y1) - Float64(b * y))) * y4);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = (k * y2) - (j * y3);
	t_2 = t_1 * ((y4 * y1) - (y5 * y0));
	tmp = 0.0;
	if (b <= -1.4e+105)
		tmp = y0 * (b * ((k * z) - (j * x)));
	elseif (b <= 5.5e-273)
		tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_2;
	elseif (b <= 7e-93)
		tmp = (j * (t * ((b * y4) - (i * y5)))) + t_2;
	elseif (b <= 2.8e+100)
		tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (t_1 * (y1 * y4));
	elseif (b <= 3e+263)
		tmp = t * (y4 * ((b * j) - (c * y2)));
	else
		tmp = (k * ((y2 * y1) - (b * y))) * y4;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1400000000000000066339319380481226426591264940964336348472312222499638886264973300670146220755724521177088], N[(y0 * N[(b * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6699903382837499/1218164251424999885044172798484398538859528357199375940858488307151618586345803262808201883235251282403163114528926083522932396233150386755822248412039081677441409712494559128733848706936256706044099949184902297359210699740674359368218295451933620701603467350388034693385228573748989263872], N[(N[(t * N[(c * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[b, 32108980623861/4586997231980143023221641790604173881593129978336562247475177678773845752176969616140037106220251373109248], N[(N[(j * N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[b, 27999999999999998114078280402402820208055975790824099920499510299126523059902175283592573714148884480], N[(N[(-1 * N[(t * N[(z * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008], N[(t * N[(y4 * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(k * N[(N[(y2 * y1), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y4), $MachinePrecision]]]]]]]]
\begin{array}{l}
t_1 := k \cdot y2 - j \cdot y3\\
t_2 := t\_1 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;b \leq -1400000000000000066339319380481226426591264940964336348472312222499638886264973300670146220755724521177088:\\
\;\;\;\;y0 \cdot \left(b \cdot \left(k \cdot z - j \cdot x\right)\right)\\

\mathbf{elif}\;b \leq \frac{6699903382837499}{1218164251424999885044172798484398538859528357199375940858488307151618586345803262808201883235251282403163114528926083522932396233150386755822248412039081677441409712494559128733848706936256706044099949184902297359210699740674359368218295451933620701603467350388034693385228573748989263872}:\\
\;\;\;\;t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + t\_2\\

\mathbf{elif}\;b \leq \frac{32108980623861}{4586997231980143023221641790604173881593129978336562247475177678773845752176969616140037106220251373109248}:\\
\;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + t\_2\\

\mathbf{elif}\;b \leq 27999999999999998114078280402402820208055975790824099920499510299126523059902175283592573714148884480:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + t\_1 \cdot \left(y1 \cdot y4\right)\\

\mathbf{elif}\;b \leq 299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008:\\
\;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\

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


\end{array}
Derivation
  1. Split input into 6 regimes
  2. if b < -1.4000000000000001e105

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

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

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

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

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

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

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

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

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

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
      2. lower-*.f6417.4%

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
    10. Applied rewrites17.4%

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

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

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

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

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

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

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

    if -1.4000000000000001e105 < b < 5.4999999999999997e-273

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\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) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.3%

      \[\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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in c around inf

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

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

        \[\leadsto t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot \color{blue}{y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower-*.f6438.3%

        \[\leadsto t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites38.3%

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

    if 5.4999999999999997e-273 < b < 6.9999999999999997e-93

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\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) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.3%

      \[\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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in z around inf

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f6441.6%

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites41.6%

      \[\leadsto -1 \cdot \color{blue}{\left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    8. Taylor expanded in j around inf

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

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

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

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

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f6436.9%

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    10. Applied rewrites36.9%

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

    if 6.9999999999999997e-93 < b < 2.7999999999999998e100

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\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) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.3%

      \[\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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in z around inf

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f6441.6%

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites41.6%

      \[\leadsto -1 \cdot \color{blue}{\left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    8. Taylor expanded in y0 around 0

      \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \color{blue}{\left(y1 \cdot y4\right)} \]
    9. Step-by-step derivation
      1. lower-*.f6434.9%

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y1 \cdot \color{blue}{y4}\right) \]
    10. Applied rewrites34.9%

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

    if 2.7999999999999998e100 < b < 2.9999999999999999e263

    1. Initial program 30.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.9999999999999999e263 < b

    1. Initial program 30.1%

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

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

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

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

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

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

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

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

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

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

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

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right) \cdot y4\right) \]
      4. associate-*r*N/A

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

        \[\leadsto \left(k \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \cdot y4 \]
      6. lower-*.f6426.8%

        \[\leadsto \left(k \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \cdot y4 \]
      7. lift-+.f64N/A

        \[\leadsto \left(k \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \cdot y4 \]
      8. +-commutativeN/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 + -1 \cdot \left(b \cdot y\right)\right)\right) \cdot y4 \]
      9. lift-*.f64N/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 + -1 \cdot \left(b \cdot y\right)\right)\right) \cdot y4 \]
      10. mul-1-negN/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 + \left(\mathsf{neg}\left(b \cdot y\right)\right)\right)\right) \cdot y4 \]
      11. sub-flip-reverseN/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 - b \cdot y\right)\right) \cdot y4 \]
      12. lower--.f6426.8%

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 - b \cdot y\right)\right) \cdot y4 \]
      13. lift-*.f64N/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 - b \cdot y\right)\right) \cdot y4 \]
      14. *-commutativeN/A

        \[\leadsto \left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4 \]
      15. lower-*.f6426.8%

        \[\leadsto \left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4 \]
    9. Applied rewrites26.8%

      \[\leadsto \left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4 \]
  3. Recombined 6 regimes into one program.
  4. Add Preprocessing

Alternative 8: 40.7% accurate, 2.4× speedup?

\[\begin{array}{l} t_1 := k \cdot y2 - j \cdot y3\\ t_2 := t\_1 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ \mathbf{if}\;x \leq -6499999999999999823809460945688469666925113212764529240120263062846011604992:\\ \;\;\;\;t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + t\_2\\ \mathbf{elif}\;x \leq \frac{4632619933486419}{386051661123868214325895970762095083331216144111904370034983364157543830047598546775742309000849007597326427200921653578548066591998660043462778854257084865420374725869305346230443778499781067545394454342790117394565596548890481374012190543459242928201313126587598361115137891035519604744312911050121319319358268243968}:\\ \;\;\;\;t \cdot \left(-1 \cdot \left(y5 \cdot \left(i \cdot j - a \cdot y2\right)\right)\right) + t\_2\\ \mathbf{elif}\;x \leq 270000000000000009569115433929078079667710628289132363776:\\ \;\;\;\;y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot t\_1\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\ \mathbf{else}:\\ \;\;\;\;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)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (let* ((t_1 (- (* k y2) (* j y3)))
       (t_2 (* t_1 (- (* y4 y1) (* y5 y0)))))
  (if (<=
       x
       -6499999999999999823809460945688469666925113212764529240120263062846011604992)
    (+ (* t (* c (- (* i z) (* y2 y4)))) t_2)
    (if (<=
         x
         4632619933486419/386051661123868214325895970762095083331216144111904370034983364157543830047598546775742309000849007597326427200921653578548066591998660043462778854257084865420374725869305346230443778499781067545394454342790117394565596548890481374012190543459242928201313126587598361115137891035519604744312911050121319319358268243968)
      (+ (* t (* -1 (* y5 (- (* i j) (* a y2))))) t_2)
      (if (<=
           x
           270000000000000009569115433929078079667710628289132363776)
        (*
         y4
         (-
          (+ (* b (- (* j t) (* k y))) (* y1 t_1))
          (* c (- (* t y2) (* y y3)))))
        (*
         x
         (-
          (+ (* y (- (* a b) (* c i))) (* y2 (- (* c y0) (* a y1))))
          (* j (- (* b y0) (* i y1))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = (k * y2) - (j * y3);
	double t_2 = t_1 * ((y4 * y1) - (y5 * y0));
	double tmp;
	if (x <= -6.5e+75) {
		tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_2;
	} else if (x <= 1.2e-302) {
		tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_2;
	} else if (x <= 2.7e+56) {
		tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_1)) - (c * ((t * y2) - (y * y3))));
	} else {
		tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (k * y2) - (j * y3)
    t_2 = t_1 * ((y4 * y1) - (y5 * y0))
    if (x <= (-6.5d+75)) then
        tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_2
    else if (x <= 1.2d-302) then
        tmp = (t * ((-1.0d0) * (y5 * ((i * j) - (a * y2))))) + t_2
    else if (x <= 2.7d+56) then
        tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_1)) - (c * ((t * y2) - (y * y3))))
    else
        tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = (k * y2) - (j * y3);
	double t_2 = t_1 * ((y4 * y1) - (y5 * y0));
	double tmp;
	if (x <= -6.5e+75) {
		tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_2;
	} else if (x <= 1.2e-302) {
		tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_2;
	} else if (x <= 2.7e+56) {
		tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_1)) - (c * ((t * y2) - (y * y3))));
	} else {
		tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = (k * y2) - (j * y3)
	t_2 = t_1 * ((y4 * y1) - (y5 * y0))
	tmp = 0
	if x <= -6.5e+75:
		tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_2
	elif x <= 1.2e-302:
		tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_2
	elif x <= 2.7e+56:
		tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_1)) - (c * ((t * y2) - (y * y3))))
	else:
		tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(k * y2) - Float64(j * y3))
	t_2 = Float64(t_1 * Float64(Float64(y4 * y1) - Float64(y5 * y0)))
	tmp = 0.0
	if (x <= -6.5e+75)
		tmp = Float64(Float64(t * Float64(c * Float64(Float64(i * z) - Float64(y2 * y4)))) + t_2);
	elseif (x <= 1.2e-302)
		tmp = Float64(Float64(t * Float64(-1.0 * Float64(y5 * Float64(Float64(i * j) - Float64(a * y2))))) + t_2);
	elseif (x <= 2.7e+56)
		tmp = Float64(y4 * Float64(Float64(Float64(b * Float64(Float64(j * t) - Float64(k * y))) + Float64(y1 * t_1)) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3)))));
	else
		tmp = Float64(x * Float64(Float64(Float64(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
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = (k * y2) - (j * y3);
	t_2 = t_1 * ((y4 * y1) - (y5 * y0));
	tmp = 0.0;
	if (x <= -6.5e+75)
		tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_2;
	elseif (x <= 1.2e-302)
		tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_2;
	elseif (x <= 2.7e+56)
		tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_1)) - (c * ((t * y2) - (y * y3))));
	else
		tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6499999999999999823809460945688469666925113212764529240120263062846011604992], N[(N[(t * N[(c * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[x, 4632619933486419/386051661123868214325895970762095083331216144111904370034983364157543830047598546775742309000849007597326427200921653578548066591998660043462778854257084865420374725869305346230443778499781067545394454342790117394565596548890481374012190543459242928201313126587598361115137891035519604744312911050121319319358268243968], N[(N[(t * N[(-1 * N[(y5 * N[(N[(i * j), $MachinePrecision] - N[(a * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[x, 270000000000000009569115433929078079667710628289132363776], N[(y4 * N[(N[(N[(b * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y1 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $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}
t_1 := k \cdot y2 - j \cdot y3\\
t_2 := t\_1 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;x \leq -6499999999999999823809460945688469666925113212764529240120263062846011604992:\\
\;\;\;\;t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + t\_2\\

\mathbf{elif}\;x \leq \frac{4632619933486419}{386051661123868214325895970762095083331216144111904370034983364157543830047598546775742309000849007597326427200921653578548066591998660043462778854257084865420374725869305346230443778499781067545394454342790117394565596548890481374012190543459242928201313126587598361115137891035519604744312911050121319319358268243968}:\\
\;\;\;\;t \cdot \left(-1 \cdot \left(y5 \cdot \left(i \cdot j - a \cdot y2\right)\right)\right) + t\_2\\

\mathbf{elif}\;x \leq 270000000000000009569115433929078079667710628289132363776:\\
\;\;\;\;y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot t\_1\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\

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


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

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\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) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.3%

      \[\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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in c around inf

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

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

        \[\leadsto t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot \color{blue}{y4}\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f64N/A

        \[\leadsto t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      4. lower-*.f6438.3%

        \[\leadsto t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites38.3%

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

    if -6.4999999999999998e75 < x < 1.2000000000000001e-302

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\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) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.3%

      \[\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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in y5 around -inf

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

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

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

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

        \[\leadsto t \cdot \left(-1 \cdot \left(y5 \cdot \left(i \cdot j - a \cdot y2\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f6435.7%

        \[\leadsto t \cdot \left(-1 \cdot \left(y5 \cdot \left(i \cdot j - a \cdot y2\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites35.7%

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

    if 1.2000000000000001e-302 < x < 2.7000000000000001e56

    1. Initial program 30.1%

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

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

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

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

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

    if 2.7000000000000001e56 < x

    1. Initial program 30.1%

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

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

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

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

      \[\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)} \]
    5. 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)} \]
    6. 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) \]
    7. Applied rewrites36.6%

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

Alternative 9: 40.5% accurate, 2.7× speedup?

\[\begin{array}{l} \mathbf{if}\;b \leq -360000000000000000689643030864480745037743845815469124015009265255776556713435952146045012238944916471808:\\ \;\;\;\;y0 \cdot \left(b \cdot \left(k \cdot z - j \cdot x\right)\right)\\ \mathbf{elif}\;b \leq 27999999999999998114078280402402820208055975790824099920499510299126523059902175283592573714148884480:\\ \;\;\;\;-1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ \mathbf{elif}\;b \leq 299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008:\\ \;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     b
     -360000000000000000689643030864480745037743845815469124015009265255776556713435952146045012238944916471808)
  (* y0 (* b (- (* k z) (* j x))))
  (if (<=
       b
       27999999999999998114078280402402820208055975790824099920499510299126523059902175283592573714148884480)
    (+
     (* -1 (* t (* z (- (* a b) (* c i)))))
     (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))
    (if (<=
         b
         299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008)
      (* t (* y4 (- (* b j) (* c y2))))
      (* (* k (- (* y2 y1) (* b y))) y4)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (b <= -3.6e+104) {
		tmp = y0 * (b * ((k * z) - (j * x)));
	} else if (b <= 2.8e+100) {
		tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
	} else if (b <= 3e+263) {
		tmp = t * (y4 * ((b * j) - (c * y2)));
	} else {
		tmp = (k * ((y2 * y1) - (b * y))) * y4;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (b <= (-3.6d+104)) then
        tmp = y0 * (b * ((k * z) - (j * x)))
    else if (b <= 2.8d+100) then
        tmp = ((-1.0d0) * (t * (z * ((a * b) - (c * i))))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
    else if (b <= 3d+263) then
        tmp = t * (y4 * ((b * j) - (c * y2)))
    else
        tmp = (k * ((y2 * y1) - (b * y))) * y4
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (b <= -3.6e+104) {
		tmp = y0 * (b * ((k * z) - (j * x)));
	} else if (b <= 2.8e+100) {
		tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
	} else if (b <= 3e+263) {
		tmp = t * (y4 * ((b * j) - (c * y2)));
	} else {
		tmp = (k * ((y2 * y1) - (b * y))) * y4;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if b <= -3.6e+104:
		tmp = y0 * (b * ((k * z) - (j * x)))
	elif b <= 2.8e+100:
		tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
	elif b <= 3e+263:
		tmp = t * (y4 * ((b * j) - (c * y2)))
	else:
		tmp = (k * ((y2 * y1) - (b * y))) * y4
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (b <= -3.6e+104)
		tmp = Float64(y0 * Float64(b * Float64(Float64(k * z) - Float64(j * x))));
	elseif (b <= 2.8e+100)
		tmp = Float64(Float64(-1.0 * Float64(t * Float64(z * Float64(Float64(a * b) - Float64(c * i))))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))));
	elseif (b <= 3e+263)
		tmp = Float64(t * Float64(y4 * Float64(Float64(b * j) - Float64(c * y2))));
	else
		tmp = Float64(Float64(k * Float64(Float64(y2 * y1) - Float64(b * y))) * y4);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (b <= -3.6e+104)
		tmp = y0 * (b * ((k * z) - (j * x)));
	elseif (b <= 2.8e+100)
		tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
	elseif (b <= 3e+263)
		tmp = t * (y4 * ((b * j) - (c * y2)));
	else
		tmp = (k * ((y2 * y1) - (b * y))) * y4;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[b, -360000000000000000689643030864480745037743845815469124015009265255776556713435952146045012238944916471808], N[(y0 * N[(b * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 27999999999999998114078280402402820208055975790824099920499510299126523059902175283592573714148884480], N[(N[(-1 * N[(t * N[(z * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008], N[(t * N[(y4 * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(k * N[(N[(y2 * y1), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y4), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;b \leq -360000000000000000689643030864480745037743845815469124015009265255776556713435952146045012238944916471808:\\
\;\;\;\;y0 \cdot \left(b \cdot \left(k \cdot z - j \cdot x\right)\right)\\

\mathbf{elif}\;b \leq 27999999999999998114078280402402820208055975790824099920499510299126523059902175283592573714148884480:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\

\mathbf{elif}\;b \leq 299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008:\\
\;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\

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


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -3.6e104

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

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

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

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

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

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

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

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

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

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
      2. lower-*.f6417.4%

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
    10. Applied rewrites17.4%

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

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

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

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

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

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

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

    if -3.6e104 < b < 2.7999999999999998e100

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\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) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.3%

      \[\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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in z around inf

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f6441.6%

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites41.6%

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

    if 2.7999999999999998e100 < b < 2.9999999999999999e263

    1. Initial program 30.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.9999999999999999e263 < b

    1. Initial program 30.1%

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

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

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

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

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

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

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

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

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

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

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

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right) \cdot y4\right) \]
      4. associate-*r*N/A

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

        \[\leadsto \left(k \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \cdot y4 \]
      6. lower-*.f6426.8%

        \[\leadsto \left(k \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \cdot y4 \]
      7. lift-+.f64N/A

        \[\leadsto \left(k \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \cdot y4 \]
      8. +-commutativeN/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 + -1 \cdot \left(b \cdot y\right)\right)\right) \cdot y4 \]
      9. lift-*.f64N/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 + -1 \cdot \left(b \cdot y\right)\right)\right) \cdot y4 \]
      10. mul-1-negN/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 + \left(\mathsf{neg}\left(b \cdot y\right)\right)\right)\right) \cdot y4 \]
      11. sub-flip-reverseN/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 - b \cdot y\right)\right) \cdot y4 \]
      12. lower--.f6426.8%

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 - b \cdot y\right)\right) \cdot y4 \]
      13. lift-*.f64N/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 - b \cdot y\right)\right) \cdot y4 \]
      14. *-commutativeN/A

        \[\leadsto \left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4 \]
      15. lower-*.f6426.8%

        \[\leadsto \left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4 \]
    9. Applied rewrites26.8%

      \[\leadsto \left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4 \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 10: 40.4% accurate, 2.8× speedup?

\[\begin{array}{l} t_1 := k \cdot y2 - j \cdot y3\\ \mathbf{if}\;b \leq -3899999999999999945461141794519936127493000930527525343470307404393285846037704029382996182171648000:\\ \;\;\;\;y0 \cdot \left(b \cdot \left(k \cdot z - j \cdot x\right)\right)\\ \mathbf{elif}\;b \leq \frac{32108980623861}{4586997231980143023221641790604173881593129978336562247475177678773845752176969616140037106220251373109248}:\\ \;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + t\_1 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ \mathbf{elif}\;b \leq 27999999999999998114078280402402820208055975790824099920499510299126523059902175283592573714148884480:\\ \;\;\;\;-1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + t\_1 \cdot \left(y1 \cdot y4\right)\\ \mathbf{elif}\;b \leq 299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008:\\ \;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (let* ((t_1 (- (* k y2) (* j y3))))
  (if (<=
       b
       -3899999999999999945461141794519936127493000930527525343470307404393285846037704029382996182171648000)
    (* y0 (* b (- (* k z) (* j x))))
    (if (<=
         b
         32108980623861/4586997231980143023221641790604173881593129978336562247475177678773845752176969616140037106220251373109248)
      (+
       (* j (* t (- (* b y4) (* i y5))))
       (* t_1 (- (* y4 y1) (* y5 y0))))
      (if (<=
           b
           27999999999999998114078280402402820208055975790824099920499510299126523059902175283592573714148884480)
        (+ (* -1 (* t (* z (- (* a b) (* c i))))) (* t_1 (* y1 y4)))
        (if (<=
             b
             299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008)
          (* t (* y4 (- (* b j) (* c y2))))
          (* (* k (- (* y2 y1) (* b y))) y4)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = (k * y2) - (j * y3);
	double tmp;
	if (b <= -3.9e+99) {
		tmp = y0 * (b * ((k * z) - (j * x)));
	} else if (b <= 7e-93) {
		tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)));
	} else if (b <= 2.8e+100) {
		tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (t_1 * (y1 * y4));
	} else if (b <= 3e+263) {
		tmp = t * (y4 * ((b * j) - (c * y2)));
	} else {
		tmp = (k * ((y2 * y1) - (b * y))) * y4;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (k * y2) - (j * y3)
    if (b <= (-3.9d+99)) then
        tmp = y0 * (b * ((k * z) - (j * x)))
    else if (b <= 7d-93) then
        tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)))
    else if (b <= 2.8d+100) then
        tmp = ((-1.0d0) * (t * (z * ((a * b) - (c * i))))) + (t_1 * (y1 * y4))
    else if (b <= 3d+263) then
        tmp = t * (y4 * ((b * j) - (c * y2)))
    else
        tmp = (k * ((y2 * y1) - (b * y))) * y4
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = (k * y2) - (j * y3);
	double tmp;
	if (b <= -3.9e+99) {
		tmp = y0 * (b * ((k * z) - (j * x)));
	} else if (b <= 7e-93) {
		tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)));
	} else if (b <= 2.8e+100) {
		tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (t_1 * (y1 * y4));
	} else if (b <= 3e+263) {
		tmp = t * (y4 * ((b * j) - (c * y2)));
	} else {
		tmp = (k * ((y2 * y1) - (b * y))) * y4;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = (k * y2) - (j * y3)
	tmp = 0
	if b <= -3.9e+99:
		tmp = y0 * (b * ((k * z) - (j * x)))
	elif b <= 7e-93:
		tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)))
	elif b <= 2.8e+100:
		tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (t_1 * (y1 * y4))
	elif b <= 3e+263:
		tmp = t * (y4 * ((b * j) - (c * y2)))
	else:
		tmp = (k * ((y2 * y1) - (b * y))) * y4
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(Float64(k * y2) - Float64(j * y3))
	tmp = 0.0
	if (b <= -3.9e+99)
		tmp = Float64(y0 * Float64(b * Float64(Float64(k * z) - Float64(j * x))));
	elseif (b <= 7e-93)
		tmp = Float64(Float64(j * Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))) + Float64(t_1 * Float64(Float64(y4 * y1) - Float64(y5 * y0))));
	elseif (b <= 2.8e+100)
		tmp = Float64(Float64(-1.0 * Float64(t * Float64(z * Float64(Float64(a * b) - Float64(c * i))))) + Float64(t_1 * Float64(y1 * y4)));
	elseif (b <= 3e+263)
		tmp = Float64(t * Float64(y4 * Float64(Float64(b * j) - Float64(c * y2))));
	else
		tmp = Float64(Float64(k * Float64(Float64(y2 * y1) - Float64(b * y))) * y4);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = (k * y2) - (j * y3);
	tmp = 0.0;
	if (b <= -3.9e+99)
		tmp = y0 * (b * ((k * z) - (j * x)));
	elseif (b <= 7e-93)
		tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)));
	elseif (b <= 2.8e+100)
		tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (t_1 * (y1 * y4));
	elseif (b <= 3e+263)
		tmp = t * (y4 * ((b * j) - (c * y2)));
	else
		tmp = (k * ((y2 * y1) - (b * y))) * y4;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3899999999999999945461141794519936127493000930527525343470307404393285846037704029382996182171648000], N[(y0 * N[(b * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 32108980623861/4586997231980143023221641790604173881593129978336562247475177678773845752176969616140037106220251373109248], N[(N[(j * N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 27999999999999998114078280402402820208055975790824099920499510299126523059902175283592573714148884480], N[(N[(-1 * N[(t * N[(z * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008], N[(t * N[(y4 * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(k * N[(N[(y2 * y1), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y4), $MachinePrecision]]]]]]
\begin{array}{l}
t_1 := k \cdot y2 - j \cdot y3\\
\mathbf{if}\;b \leq -3899999999999999945461141794519936127493000930527525343470307404393285846037704029382996182171648000:\\
\;\;\;\;y0 \cdot \left(b \cdot \left(k \cdot z - j \cdot x\right)\right)\\

\mathbf{elif}\;b \leq \frac{32108980623861}{4586997231980143023221641790604173881593129978336562247475177678773845752176969616140037106220251373109248}:\\
\;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + t\_1 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\

\mathbf{elif}\;b \leq 27999999999999998114078280402402820208055975790824099920499510299126523059902175283592573714148884480:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + t\_1 \cdot \left(y1 \cdot y4\right)\\

\mathbf{elif}\;b \leq 299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008:\\
\;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\

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


\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -3.8999999999999999e99

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

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

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

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

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

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

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

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

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

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
      2. lower-*.f6417.4%

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
    10. Applied rewrites17.4%

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

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

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

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

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

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

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

    if -3.8999999999999999e99 < b < 6.9999999999999997e-93

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\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) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.3%

      \[\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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in z around inf

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f6441.6%

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites41.6%

      \[\leadsto -1 \cdot \color{blue}{\left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    8. Taylor expanded in j around inf

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

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

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

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

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      5. lower-*.f6436.9%

        \[\leadsto j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    10. Applied rewrites36.9%

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

    if 6.9999999999999997e-93 < b < 2.7999999999999998e100

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\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) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.3%

      \[\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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in z around inf

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f6441.6%

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites41.6%

      \[\leadsto -1 \cdot \color{blue}{\left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    8. Taylor expanded in y0 around 0

      \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \color{blue}{\left(y1 \cdot y4\right)} \]
    9. Step-by-step derivation
      1. lower-*.f6434.9%

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y1 \cdot \color{blue}{y4}\right) \]
    10. Applied rewrites34.9%

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

    if 2.7999999999999998e100 < b < 2.9999999999999999e263

    1. Initial program 30.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.9999999999999999e263 < b

    1. Initial program 30.1%

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

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

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

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

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

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

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

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

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

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

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

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right) \cdot y4\right) \]
      4. associate-*r*N/A

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

        \[\leadsto \left(k \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \cdot y4 \]
      6. lower-*.f6426.8%

        \[\leadsto \left(k \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \cdot y4 \]
      7. lift-+.f64N/A

        \[\leadsto \left(k \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \cdot y4 \]
      8. +-commutativeN/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 + -1 \cdot \left(b \cdot y\right)\right)\right) \cdot y4 \]
      9. lift-*.f64N/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 + -1 \cdot \left(b \cdot y\right)\right)\right) \cdot y4 \]
      10. mul-1-negN/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 + \left(\mathsf{neg}\left(b \cdot y\right)\right)\right)\right) \cdot y4 \]
      11. sub-flip-reverseN/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 - b \cdot y\right)\right) \cdot y4 \]
      12. lower--.f6426.8%

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 - b \cdot y\right)\right) \cdot y4 \]
      13. lift-*.f64N/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 - b \cdot y\right)\right) \cdot y4 \]
      14. *-commutativeN/A

        \[\leadsto \left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4 \]
      15. lower-*.f6426.8%

        \[\leadsto \left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4 \]
    9. Applied rewrites26.8%

      \[\leadsto \left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4 \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 11: 38.4% accurate, 2.9× speedup?

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

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

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

\mathbf{elif}\;b \leq 11000000000000000429907094311986039073376264690926666025575357939115934813687797945126004417626112:\\
\;\;\;\;\left(t \cdot z\right) \cdot \left(i \cdot c - b \cdot a\right) - \left(y5 \cdot y0 - y4 \cdot y1\right) \cdot \left(y2 \cdot k - y3 \cdot j\right)\\

\mathbf{elif}\;b \leq 299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008:\\
\;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\

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


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -3.6e104

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

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

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

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

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

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

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

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

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

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
      2. lower-*.f6417.4%

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
    10. Applied rewrites17.4%

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

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

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

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

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

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

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

    if -3.6e104 < b < 1.1e97

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\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) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.3%

      \[\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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in z around inf

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f6441.6%

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites41.6%

      \[\leadsto -1 \cdot \color{blue}{\left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    8. Applied rewrites40.3%

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

    if 1.1e97 < b < 2.9999999999999999e263

    1. Initial program 30.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.9999999999999999e263 < b

    1. Initial program 30.1%

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

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

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

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

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

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

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

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

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

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

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

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right) \cdot y4\right) \]
      4. associate-*r*N/A

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

        \[\leadsto \left(k \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \cdot y4 \]
      6. lower-*.f6426.8%

        \[\leadsto \left(k \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \cdot y4 \]
      7. lift-+.f64N/A

        \[\leadsto \left(k \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \cdot y4 \]
      8. +-commutativeN/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 + -1 \cdot \left(b \cdot y\right)\right)\right) \cdot y4 \]
      9. lift-*.f64N/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 + -1 \cdot \left(b \cdot y\right)\right)\right) \cdot y4 \]
      10. mul-1-negN/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 + \left(\mathsf{neg}\left(b \cdot y\right)\right)\right)\right) \cdot y4 \]
      11. sub-flip-reverseN/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 - b \cdot y\right)\right) \cdot y4 \]
      12. lower--.f6426.8%

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 - b \cdot y\right)\right) \cdot y4 \]
      13. lift-*.f64N/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 - b \cdot y\right)\right) \cdot y4 \]
      14. *-commutativeN/A

        \[\leadsto \left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4 \]
      15. lower-*.f6426.8%

        \[\leadsto \left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4 \]
    9. Applied rewrites26.8%

      \[\leadsto \left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4 \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 12: 37.6% accurate, 3.0× speedup?

\[\begin{array}{l} \mathbf{if}\;b \leq -92000000000000007560497522100101586454983492192393498837630850382161806382776094458065936992048149679833088:\\ \;\;\;\;y0 \cdot \left(b \cdot \left(k \cdot z - j \cdot x\right)\right)\\ \mathbf{elif}\;b \leq 5800000000000000491381392949641216:\\ \;\;\;\;c \cdot \left(i \cdot \left(t \cdot z\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\ \mathbf{elif}\;b \leq 1800000000000000058357033097399808317966072120241339071222870621616153142099836813228748647020474988352389939997833686437574213632:\\ \;\;\;\;y4 \cdot \left(-1 \cdot \left(y3 \cdot \left(j \cdot y1 - c \cdot y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     b
     -92000000000000007560497522100101586454983492192393498837630850382161806382776094458065936992048149679833088)
  (* y0 (* b (- (* k z) (* j x))))
  (if (<= b 5800000000000000491381392949641216)
    (+
     (* c (* i (* t z)))
     (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))
    (if (<=
         b
         1800000000000000058357033097399808317966072120241339071222870621616153142099836813228748647020474988352389939997833686437574213632)
      (* y4 (* -1 (* y3 (- (* j y1) (* c y)))))
      (*
       y0
       (-
        (* y3 (+ (* -1 (* c z)) (* j y5)))
        (* b (- (* j x) (* k z)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (b <= -9.2e+106) {
		tmp = y0 * (b * ((k * z) - (j * x)));
	} else if (b <= 5.8e+33) {
		tmp = (c * (i * (t * z))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
	} else if (b <= 1.8e+129) {
		tmp = y4 * (-1.0 * (y3 * ((j * y1) - (c * y))));
	} else {
		tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * ((j * x) - (k * z))));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (b <= (-9.2d+106)) then
        tmp = y0 * (b * ((k * z) - (j * x)))
    else if (b <= 5.8d+33) then
        tmp = (c * (i * (t * z))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
    else if (b <= 1.8d+129) then
        tmp = y4 * ((-1.0d0) * (y3 * ((j * y1) - (c * y))))
    else
        tmp = y0 * ((y3 * (((-1.0d0) * (c * z)) + (j * y5))) - (b * ((j * x) - (k * z))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (b <= -9.2e+106) {
		tmp = y0 * (b * ((k * z) - (j * x)));
	} else if (b <= 5.8e+33) {
		tmp = (c * (i * (t * z))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
	} else if (b <= 1.8e+129) {
		tmp = y4 * (-1.0 * (y3 * ((j * y1) - (c * y))));
	} else {
		tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * ((j * x) - (k * z))));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if b <= -9.2e+106:
		tmp = y0 * (b * ((k * z) - (j * x)))
	elif b <= 5.8e+33:
		tmp = (c * (i * (t * z))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
	elif b <= 1.8e+129:
		tmp = y4 * (-1.0 * (y3 * ((j * y1) - (c * y))))
	else:
		tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * ((j * x) - (k * z))))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (b <= -9.2e+106)
		tmp = Float64(y0 * Float64(b * Float64(Float64(k * z) - Float64(j * x))));
	elseif (b <= 5.8e+33)
		tmp = Float64(Float64(c * Float64(i * Float64(t * z))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))));
	elseif (b <= 1.8e+129)
		tmp = Float64(y4 * Float64(-1.0 * Float64(y3 * Float64(Float64(j * y1) - Float64(c * y)))));
	else
		tmp = Float64(y0 * Float64(Float64(y3 * Float64(Float64(-1.0 * Float64(c * z)) + Float64(j * y5))) - Float64(b * Float64(Float64(j * x) - Float64(k * z)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (b <= -9.2e+106)
		tmp = y0 * (b * ((k * z) - (j * x)));
	elseif (b <= 5.8e+33)
		tmp = (c * (i * (t * z))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
	elseif (b <= 1.8e+129)
		tmp = y4 * (-1.0 * (y3 * ((j * y1) - (c * y))));
	else
		tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * ((j * x) - (k * z))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[b, -92000000000000007560497522100101586454983492192393498837630850382161806382776094458065936992048149679833088], N[(y0 * N[(b * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5800000000000000491381392949641216], N[(N[(c * N[(i * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1800000000000000058357033097399808317966072120241339071222870621616153142099836813228748647020474988352389939997833686437574213632], N[(y4 * N[(-1 * N[(y3 * N[(N[(j * y1), $MachinePrecision] - N[(c * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y0 * N[(N[(y3 * N[(N[(-1 * N[(c * z), $MachinePrecision]), $MachinePrecision] + N[(j * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;b \leq -92000000000000007560497522100101586454983492192393498837630850382161806382776094458065936992048149679833088:\\
\;\;\;\;y0 \cdot \left(b \cdot \left(k \cdot z - j \cdot x\right)\right)\\

\mathbf{elif}\;b \leq 5800000000000000491381392949641216:\\
\;\;\;\;c \cdot \left(i \cdot \left(t \cdot z\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\

\mathbf{elif}\;b \leq 1800000000000000058357033097399808317966072120241339071222870621616153142099836813228748647020474988352389939997833686437574213632:\\
\;\;\;\;y4 \cdot \left(-1 \cdot \left(y3 \cdot \left(j \cdot y1 - c \cdot y\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)\\


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -9.2000000000000008e106

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

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

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

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

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

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

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

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

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

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
      2. lower-*.f6417.4%

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
    10. Applied rewrites17.4%

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

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

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

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

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

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

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

    if -9.2000000000000008e106 < b < 5.8000000000000005e33

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    3. 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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\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) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    4. Applied rewrites36.3%

      \[\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)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    5. Taylor expanded in z around inf

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      6. lower-*.f6441.6%

        \[\leadsto -1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    7. Applied rewrites41.6%

      \[\leadsto -1 \cdot \color{blue}{\left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right)} + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    8. Taylor expanded in a around 0

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

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

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
      3. lower-*.f6439.1%

        \[\leadsto c \cdot \left(i \cdot \left(t \cdot z\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    10. Applied rewrites39.1%

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

    if 5.8000000000000005e33 < b < 1.8000000000000001e129

    1. Initial program 30.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8000000000000001e129 < b

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

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

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

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

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      5. lower-*.f6434.7%

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
    7. Applied rewrites34.7%

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

Alternative 13: 36.5% accurate, 2.5× speedup?

\[\begin{array}{l} \mathbf{if}\;y4 \leq -235000000000000002925094269901874079879837067681657234384705854986725262726097242269821124197300069980790676947583977772489313485868588652453278526004332208404051373736432761311382436609757234254301415158021495202374483968:\\ \;\;\;\;k \cdot \left(\left(y4 \cdot \left(-b\right)\right) \cdot y + \left(y2 \cdot y1\right) \cdot y4\right)\\ \mathbf{elif}\;y4 \leq -1299999999999999950031673044027917767540736:\\ \;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\ \mathbf{elif}\;y4 \leq \frac{-3949107279145325}{1081947199765842424529591879509026010150599323721976877318063532086628152436172512203606540057921920808293160946190599534351047801861499980289103827892100253508375928829962412377562148201321351276593628996016513851695161943555198441141036848674890703850575013678567420592128}:\\ \;\;\;\;y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)\\ \mathbf{elif}\;y4 \leq \frac{86858970270951}{2554675596204441358920157072687153364566337613357385653123260470319631221592274004204746195830573697394358331960566393912284720625143799885746139901804584218009607261377389665942448283448784623593796296633016222711463437382554714097777734743613496521609114760800967733302218873894840332707692544}:\\ \;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\ \mathbf{elif}\;y4 \leq 999999999999999959416724456350362731491996089648451439669739009806703922950954425516032:\\ \;\;\;\;y0 \cdot \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)\\ \mathbf{else}:\\ \;\;\;\;y2 \cdot \left(y4 \cdot \left(t \cdot \left(\frac{k \cdot y1}{t} - c\right)\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     y4
     -235000000000000002925094269901874079879837067681657234384705854986725262726097242269821124197300069980790676947583977772489313485868588652453278526004332208404051373736432761311382436609757234254301415158021495202374483968)
  (* k (+ (* (* y4 (- b)) y) (* (* y2 y1) y4)))
  (if (<= y4 -1299999999999999950031673044027917767540736)
    (* t (* y4 (- (* b j) (* c y2))))
    (if (<=
         y4
         -3949107279145325/1081947199765842424529591879509026010150599323721976877318063532086628152436172512203606540057921920808293160946190599534351047801861499980289103827892100253508375928829962412377562148201321351276593628996016513851695161943555198441141036848674890703850575013678567420592128)
      (*
       y0
       (-
        (* y3 (+ (* -1 (* c z)) (* j y5)))
        (* b (- (* j x) (* k z)))))
      (if (<=
           y4
           86858970270951/2554675596204441358920157072687153364566337613357385653123260470319631221592274004204746195830573697394358331960566393912284720625143799885746139901804584218009607261377389665942448283448784623593796296633016222711463437382554714097777734743613496521609114760800967733302218873894840332707692544)
        (* x (* y2 (- (* c y0) (* a y1))))
        (if (<=
             y4
             999999999999999959416724456350362731491996089648451439669739009806703922950954425516032)
          (*
           y0
           (+
            (* -1 (* y5 (- (* k y2) (* j y3))))
            (* c (- (* x y2) (* y3 z)))))
          (* y2 (* y4 (* t (- (/ (* k y1) t) c))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y4 <= -2.35e+221) {
		tmp = k * (((y4 * -b) * y) + ((y2 * y1) * y4));
	} else if (y4 <= -1.3e+42) {
		tmp = t * (y4 * ((b * j) - (c * y2)));
	} else if (y4 <= -3.65e-258) {
		tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * ((j * x) - (k * z))));
	} else if (y4 <= 3.4e-281) {
		tmp = x * (y2 * ((c * y0) - (a * y1)));
	} else if (y4 <= 1e+87) {
		tmp = y0 * ((-1.0 * (y5 * ((k * y2) - (j * y3)))) + (c * ((x * y2) - (y3 * z))));
	} else {
		tmp = y2 * (y4 * (t * (((k * y1) / t) - c)));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (y4 <= (-2.35d+221)) then
        tmp = k * (((y4 * -b) * y) + ((y2 * y1) * y4))
    else if (y4 <= (-1.3d+42)) then
        tmp = t * (y4 * ((b * j) - (c * y2)))
    else if (y4 <= (-3.65d-258)) then
        tmp = y0 * ((y3 * (((-1.0d0) * (c * z)) + (j * y5))) - (b * ((j * x) - (k * z))))
    else if (y4 <= 3.4d-281) then
        tmp = x * (y2 * ((c * y0) - (a * y1)))
    else if (y4 <= 1d+87) then
        tmp = y0 * (((-1.0d0) * (y5 * ((k * y2) - (j * y3)))) + (c * ((x * y2) - (y3 * z))))
    else
        tmp = y2 * (y4 * (t * (((k * y1) / t) - c)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y4 <= -2.35e+221) {
		tmp = k * (((y4 * -b) * y) + ((y2 * y1) * y4));
	} else if (y4 <= -1.3e+42) {
		tmp = t * (y4 * ((b * j) - (c * y2)));
	} else if (y4 <= -3.65e-258) {
		tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * ((j * x) - (k * z))));
	} else if (y4 <= 3.4e-281) {
		tmp = x * (y2 * ((c * y0) - (a * y1)));
	} else if (y4 <= 1e+87) {
		tmp = y0 * ((-1.0 * (y5 * ((k * y2) - (j * y3)))) + (c * ((x * y2) - (y3 * z))));
	} else {
		tmp = y2 * (y4 * (t * (((k * y1) / t) - c)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y4 <= -2.35e+221:
		tmp = k * (((y4 * -b) * y) + ((y2 * y1) * y4))
	elif y4 <= -1.3e+42:
		tmp = t * (y4 * ((b * j) - (c * y2)))
	elif y4 <= -3.65e-258:
		tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * ((j * x) - (k * z))))
	elif y4 <= 3.4e-281:
		tmp = x * (y2 * ((c * y0) - (a * y1)))
	elif y4 <= 1e+87:
		tmp = y0 * ((-1.0 * (y5 * ((k * y2) - (j * y3)))) + (c * ((x * y2) - (y3 * z))))
	else:
		tmp = y2 * (y4 * (t * (((k * y1) / t) - c)))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (y4 <= -2.35e+221)
		tmp = Float64(k * Float64(Float64(Float64(y4 * Float64(-b)) * y) + Float64(Float64(y2 * y1) * y4)));
	elseif (y4 <= -1.3e+42)
		tmp = Float64(t * Float64(y4 * Float64(Float64(b * j) - Float64(c * y2))));
	elseif (y4 <= -3.65e-258)
		tmp = Float64(y0 * Float64(Float64(y3 * Float64(Float64(-1.0 * Float64(c * z)) + Float64(j * y5))) - Float64(b * Float64(Float64(j * x) - Float64(k * z)))));
	elseif (y4 <= 3.4e-281)
		tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1))));
	elseif (y4 <= 1e+87)
		tmp = Float64(y0 * Float64(Float64(-1.0 * Float64(y5 * Float64(Float64(k * y2) - Float64(j * y3)))) + Float64(c * Float64(Float64(x * y2) - Float64(y3 * z)))));
	else
		tmp = Float64(y2 * Float64(y4 * Float64(t * Float64(Float64(Float64(k * y1) / t) - c))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (y4 <= -2.35e+221)
		tmp = k * (((y4 * -b) * y) + ((y2 * y1) * y4));
	elseif (y4 <= -1.3e+42)
		tmp = t * (y4 * ((b * j) - (c * y2)));
	elseif (y4 <= -3.65e-258)
		tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * ((j * x) - (k * z))));
	elseif (y4 <= 3.4e-281)
		tmp = x * (y2 * ((c * y0) - (a * y1)));
	elseif (y4 <= 1e+87)
		tmp = y0 * ((-1.0 * (y5 * ((k * y2) - (j * y3)))) + (c * ((x * y2) - (y3 * z))));
	else
		tmp = y2 * (y4 * (t * (((k * y1) / t) - c)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y4, -235000000000000002925094269901874079879837067681657234384705854986725262726097242269821124197300069980790676947583977772489313485868588652453278526004332208404051373736432761311382436609757234254301415158021495202374483968], N[(k * N[(N[(N[(y4 * (-b)), $MachinePrecision] * y), $MachinePrecision] + N[(N[(y2 * y1), $MachinePrecision] * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -1299999999999999950031673044027917767540736], N[(t * N[(y4 * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -3949107279145325/1081947199765842424529591879509026010150599323721976877318063532086628152436172512203606540057921920808293160946190599534351047801861499980289103827892100253508375928829962412377562148201321351276593628996016513851695161943555198441141036848674890703850575013678567420592128], N[(y0 * N[(N[(y3 * N[(N[(-1 * N[(c * z), $MachinePrecision]), $MachinePrecision] + N[(j * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 86858970270951/2554675596204441358920157072687153364566337613357385653123260470319631221592274004204746195830573697394358331960566393912284720625143799885746139901804584218009607261377389665942448283448784623593796296633016222711463437382554714097777734743613496521609114760800967733302218873894840332707692544], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 999999999999999959416724456350362731491996089648451439669739009806703922950954425516032], N[(y0 * N[(N[(-1 * N[(y5 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y2 * N[(y4 * N[(t * N[(N[(N[(k * y1), $MachinePrecision] / t), $MachinePrecision] - c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -235000000000000002925094269901874079879837067681657234384705854986725262726097242269821124197300069980790676947583977772489313485868588652453278526004332208404051373736432761311382436609757234254301415158021495202374483968:\\
\;\;\;\;k \cdot \left(\left(y4 \cdot \left(-b\right)\right) \cdot y + \left(y2 \cdot y1\right) \cdot y4\right)\\

\mathbf{elif}\;y4 \leq -1299999999999999950031673044027917767540736:\\
\;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\

\mathbf{elif}\;y4 \leq \frac{-3949107279145325}{1081947199765842424529591879509026010150599323721976877318063532086628152436172512203606540057921920808293160946190599534351047801861499980289103827892100253508375928829962412377562148201321351276593628996016513851695161943555198441141036848674890703850575013678567420592128}:\\
\;\;\;\;y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)\\

\mathbf{elif}\;y4 \leq \frac{86858970270951}{2554675596204441358920157072687153364566337613357385653123260470319631221592274004204746195830573697394358331960566393912284720625143799885746139901804584218009607261377389665942448283448784623593796296633016222711463437382554714097777734743613496521609114760800967733302218873894840332707692544}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\

\mathbf{elif}\;y4 \leq 999999999999999959416724456350362731491996089648451439669739009806703922950954425516032:\\
\;\;\;\;y0 \cdot \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)\\

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


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

    1. Initial program 30.1%

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

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

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

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

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

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

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

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

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

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

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

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

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

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right)\right) + \left(y1 \cdot y2\right) \cdot y4\right) \]
      6. lift-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right)\right) + \left(y1 \cdot y2\right) \cdot y4\right) \]
      7. mul-1-negN/A

        \[\leadsto k \cdot \left(y4 \cdot \left(\mathsf{neg}\left(b \cdot y\right)\right) + \left(y1 \cdot y2\right) \cdot y4\right) \]
      8. lift-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(\mathsf{neg}\left(b \cdot y\right)\right) + \left(y1 \cdot y2\right) \cdot y4\right) \]
      9. distribute-lft-neg-inN/A

        \[\leadsto k \cdot \left(y4 \cdot \left(\left(\mathsf{neg}\left(b\right)\right) \cdot y\right) + \left(y1 \cdot y2\right) \cdot y4\right) \]
      10. associate-*r*N/A

        \[\leadsto k \cdot \left(\left(y4 \cdot \left(\mathsf{neg}\left(b\right)\right)\right) \cdot y + \left(y1 \cdot y2\right) \cdot y4\right) \]
      11. lower-*.f64N/A

        \[\leadsto k \cdot \left(\left(y4 \cdot \left(\mathsf{neg}\left(b\right)\right)\right) \cdot y + \left(y1 \cdot y2\right) \cdot y4\right) \]
      12. lower-*.f64N/A

        \[\leadsto k \cdot \left(\left(y4 \cdot \left(\mathsf{neg}\left(b\right)\right)\right) \cdot y + \left(y1 \cdot y2\right) \cdot y4\right) \]
      13. lower-neg.f64N/A

        \[\leadsto k \cdot \left(\left(y4 \cdot \left(-b\right)\right) \cdot y + \left(y1 \cdot y2\right) \cdot y4\right) \]
      14. lower-*.f6424.5%

        \[\leadsto k \cdot \left(\left(y4 \cdot \left(-b\right)\right) \cdot y + \left(y1 \cdot y2\right) \cdot y4\right) \]
      15. lift-*.f64N/A

        \[\leadsto k \cdot \left(\left(y4 \cdot \left(-b\right)\right) \cdot y + \left(y1 \cdot y2\right) \cdot y4\right) \]
      16. *-commutativeN/A

        \[\leadsto k \cdot \left(\left(y4 \cdot \left(-b\right)\right) \cdot y + \left(y2 \cdot y1\right) \cdot y4\right) \]
      17. lower-*.f6424.5%

        \[\leadsto k \cdot \left(\left(y4 \cdot \left(-b\right)\right) \cdot y + \left(y2 \cdot y1\right) \cdot y4\right) \]
    9. Applied rewrites24.5%

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

    if -2.35e221 < y4 < -1.3e42

    1. Initial program 30.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3e42 < y4 < -3.6500000000000001e-258

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

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

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

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

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      5. lower-*.f6434.7%

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
    7. Applied rewrites34.7%

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

    if -3.6500000000000001e-258 < y4 < 3.3999999999999998e-281

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites37.0%

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

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

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

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

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

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

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

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

    if 3.3999999999999998e-281 < y4 < 9.9999999999999996e86

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

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

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

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

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

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

        \[\leadsto y0 \cdot \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) \]
      5. lower-*.f64N/A

        \[\leadsto y0 \cdot \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) \]
      6. lower-*.f64N/A

        \[\leadsto y0 \cdot \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) \]
      7. lower-*.f64N/A

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

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

        \[\leadsto y0 \cdot \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) \]
      10. lower-*.f6435.9%

        \[\leadsto y0 \cdot \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) \]
    7. Applied rewrites35.9%

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

    if 9.9999999999999996e86 < y4

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites37.0%

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

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

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

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

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

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    8. Taylor expanded in t around inf

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

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

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

        \[\leadsto y2 \cdot \left(y4 \cdot \left(t \cdot \left(\frac{k \cdot y1}{t} - c\right)\right)\right) \]
      4. lower-*.f6429.2%

        \[\leadsto y2 \cdot \left(y4 \cdot \left(t \cdot \left(\frac{k \cdot y1}{t} - c\right)\right)\right) \]
    10. Applied rewrites29.2%

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

Alternative 14: 35.3% accurate, 3.0× speedup?

\[\begin{array}{l} t_1 := y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\\ \mathbf{if}\;j \leq -3099999999999999823412385594704568514241442104585215148436057313951308986708446003484408380942569811609113025348650524748073790938900088122559221825969634660461245147043218254488528067251441368715360270960030278553543114752:\\ \;\;\;\;-1 \cdot \left(y0 \cdot t\_1\right)\\ \mathbf{elif}\;j \leq -17500000000000000519396039778088108581907286668586516480:\\ \;\;\;\;y4 \cdot \left(-1 \cdot \left(y3 \cdot \left(j \cdot y1 - c \cdot y\right)\right)\right)\\ \mathbf{elif}\;j \leq \frac{3036760475089333}{1167984798111281975972139931059274579172666497855631342228273284582214442805421410945513679697247078343332431250840168271536308408672112127552681297848886832192510636636227827221215793215130566656}:\\ \;\;\;\;y0 \cdot \left(-1 \cdot t\_1 + c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\ \mathbf{elif}\;j \leq \frac{4253529586511731}{42535295865117307932921825928971026432}:\\ \;\;\;\;k \cdot \left(y4 \cdot \left(y2 \cdot \left(y1 + -1 \cdot \frac{b \cdot y}{y2}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y5 \cdot j - c \cdot z\right) \cdot y3 - \left(j \cdot x\right) \cdot b\right) \cdot y0\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (let* ((t_1 (* y5 (- (* k y2) (* j y3)))))
  (if (<=
       j
       -3099999999999999823412385594704568514241442104585215148436057313951308986708446003484408380942569811609113025348650524748073790938900088122559221825969634660461245147043218254488528067251441368715360270960030278553543114752)
    (* -1 (* y0 t_1))
    (if (<=
         j
         -17500000000000000519396039778088108581907286668586516480)
      (* y4 (* -1 (* y3 (- (* j y1) (* c y)))))
      (if (<=
           j
           3036760475089333/1167984798111281975972139931059274579172666497855631342228273284582214442805421410945513679697247078343332431250840168271536308408672112127552681297848886832192510636636227827221215793215130566656)
        (* y0 (+ (* -1 t_1) (* c (- (* x y2) (* y3 z)))))
        (if (<=
             j
             4253529586511731/42535295865117307932921825928971026432)
          (* k (* y4 (* y2 (+ y1 (* -1 (/ (* b y) y2))))))
          (* (- (* (- (* y5 j) (* c z)) y3) (* (* j x) b)) 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) {
	double t_1 = y5 * ((k * y2) - (j * y3));
	double tmp;
	if (j <= -3.1e+222) {
		tmp = -1.0 * (y0 * t_1);
	} else if (j <= -1.75e+55) {
		tmp = y4 * (-1.0 * (y3 * ((j * y1) - (c * y))));
	} else if (j <= 2.6e-180) {
		tmp = y0 * ((-1.0 * t_1) + (c * ((x * y2) - (y3 * z))));
	} else if (j <= 1e-22) {
		tmp = k * (y4 * (y2 * (y1 + (-1.0 * ((b * y) / y2)))));
	} else {
		tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y5 * ((k * y2) - (j * y3))
    if (j <= (-3.1d+222)) then
        tmp = (-1.0d0) * (y0 * t_1)
    else if (j <= (-1.75d+55)) then
        tmp = y4 * ((-1.0d0) * (y3 * ((j * y1) - (c * y))))
    else if (j <= 2.6d-180) then
        tmp = y0 * (((-1.0d0) * t_1) + (c * ((x * y2) - (y3 * z))))
    else if (j <= 1d-22) then
        tmp = k * (y4 * (y2 * (y1 + ((-1.0d0) * ((b * y) / y2)))))
    else
        tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y5 * ((k * y2) - (j * y3));
	double tmp;
	if (j <= -3.1e+222) {
		tmp = -1.0 * (y0 * t_1);
	} else if (j <= -1.75e+55) {
		tmp = y4 * (-1.0 * (y3 * ((j * y1) - (c * y))));
	} else if (j <= 2.6e-180) {
		tmp = y0 * ((-1.0 * t_1) + (c * ((x * y2) - (y3 * z))));
	} else if (j <= 1e-22) {
		tmp = k * (y4 * (y2 * (y1 + (-1.0 * ((b * y) / y2)))));
	} else {
		tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = y5 * ((k * y2) - (j * y3))
	tmp = 0
	if j <= -3.1e+222:
		tmp = -1.0 * (y0 * t_1)
	elif j <= -1.75e+55:
		tmp = y4 * (-1.0 * (y3 * ((j * y1) - (c * y))))
	elif j <= 2.6e-180:
		tmp = y0 * ((-1.0 * t_1) + (c * ((x * y2) - (y3 * z))))
	elif j <= 1e-22:
		tmp = k * (y4 * (y2 * (y1 + (-1.0 * ((b * y) / y2)))))
	else:
		tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(y5 * Float64(Float64(k * y2) - Float64(j * y3)))
	tmp = 0.0
	if (j <= -3.1e+222)
		tmp = Float64(-1.0 * Float64(y0 * t_1));
	elseif (j <= -1.75e+55)
		tmp = Float64(y4 * Float64(-1.0 * Float64(y3 * Float64(Float64(j * y1) - Float64(c * y)))));
	elseif (j <= 2.6e-180)
		tmp = Float64(y0 * Float64(Float64(-1.0 * t_1) + Float64(c * Float64(Float64(x * y2) - Float64(y3 * z)))));
	elseif (j <= 1e-22)
		tmp = Float64(k * Float64(y4 * Float64(y2 * Float64(y1 + Float64(-1.0 * Float64(Float64(b * y) / y2))))));
	else
		tmp = Float64(Float64(Float64(Float64(Float64(y5 * j) - Float64(c * z)) * y3) - Float64(Float64(j * x) * b)) * y0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = y5 * ((k * y2) - (j * y3));
	tmp = 0.0;
	if (j <= -3.1e+222)
		tmp = -1.0 * (y0 * t_1);
	elseif (j <= -1.75e+55)
		tmp = y4 * (-1.0 * (y3 * ((j * y1) - (c * y))));
	elseif (j <= 2.6e-180)
		tmp = y0 * ((-1.0 * t_1) + (c * ((x * y2) - (y3 * z))));
	elseif (j <= 1e-22)
		tmp = k * (y4 * (y2 * (y1 + (-1.0 * ((b * y) / y2)))));
	else
		tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0;
	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[(y5 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -3099999999999999823412385594704568514241442104585215148436057313951308986708446003484408380942569811609113025348650524748073790938900088122559221825969634660461245147043218254488528067251441368715360270960030278553543114752], N[(-1 * N[(y0 * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -17500000000000000519396039778088108581907286668586516480], N[(y4 * N[(-1 * N[(y3 * N[(N[(j * y1), $MachinePrecision] - N[(c * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3036760475089333/1167984798111281975972139931059274579172666497855631342228273284582214442805421410945513679697247078343332431250840168271536308408672112127552681297848886832192510636636227827221215793215130566656], N[(y0 * N[(N[(-1 * t$95$1), $MachinePrecision] + N[(c * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 4253529586511731/42535295865117307932921825928971026432], N[(k * N[(y4 * N[(y2 * N[(y1 + N[(-1 * N[(N[(b * y), $MachinePrecision] / y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(y5 * j), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * y3), $MachinePrecision] - N[(N[(j * x), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision] * y0), $MachinePrecision]]]]]]
\begin{array}{l}
t_1 := y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\\
\mathbf{if}\;j \leq -3099999999999999823412385594704568514241442104585215148436057313951308986708446003484408380942569811609113025348650524748073790938900088122559221825969634660461245147043218254488528067251441368715360270960030278553543114752:\\
\;\;\;\;-1 \cdot \left(y0 \cdot t\_1\right)\\

\mathbf{elif}\;j \leq -17500000000000000519396039778088108581907286668586516480:\\
\;\;\;\;y4 \cdot \left(-1 \cdot \left(y3 \cdot \left(j \cdot y1 - c \cdot y\right)\right)\right)\\

\mathbf{elif}\;j \leq \frac{3036760475089333}{1167984798111281975972139931059274579172666497855631342228273284582214442805421410945513679697247078343332431250840168271536308408672112127552681297848886832192510636636227827221215793215130566656}:\\
\;\;\;\;y0 \cdot \left(-1 \cdot t\_1 + c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\

\mathbf{elif}\;j \leq \frac{4253529586511731}{42535295865117307932921825928971026432}:\\
\;\;\;\;k \cdot \left(y4 \cdot \left(y2 \cdot \left(y1 + -1 \cdot \frac{b \cdot y}{y2}\right)\right)\right)\\

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


\end{array}
Derivation
  1. Split input into 5 regimes
  2. if j < -3.0999999999999998e222

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

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

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. 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-*.f6427.1%

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

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    8. Taylor expanded in b around 0

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

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

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
      3. lower-*.f6417.9%

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
    10. Applied rewrites17.9%

      \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
    11. Taylor expanded in y5 around inf

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

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

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

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

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

        \[\leadsto -1 \cdot \left(y0 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\right) \]
      6. lower-*.f6427.7%

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

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

    if -3.0999999999999998e222 < j < -1.7500000000000001e55

    1. Initial program 30.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7500000000000001e55 < j < 2.5999999999999999e-180

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

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

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

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

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

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

        \[\leadsto y0 \cdot \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) \]
      5. lower-*.f64N/A

        \[\leadsto y0 \cdot \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) \]
      6. lower-*.f64N/A

        \[\leadsto y0 \cdot \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) \]
      7. lower-*.f64N/A

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

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

        \[\leadsto y0 \cdot \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) \]
      10. lower-*.f6435.9%

        \[\leadsto y0 \cdot \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) \]
    7. Applied rewrites35.9%

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

    if 2.5999999999999999e-180 < j < 1e-22

    1. Initial program 30.1%

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

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

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

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

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

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

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

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in y2 around inf

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

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

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

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

        \[\leadsto k \cdot \left(y4 \cdot \left(y2 \cdot \left(y1 + -1 \cdot \frac{b \cdot y}{y2}\right)\right)\right) \]
      5. lower-*.f6428.7%

        \[\leadsto k \cdot \left(y4 \cdot \left(y2 \cdot \left(y1 + -1 \cdot \frac{b \cdot y}{y2}\right)\right)\right) \]
    10. Applied rewrites28.7%

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

    if 1e-22 < j

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

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

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

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

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      5. lower-*.f6434.7%

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
    7. Applied rewrites34.7%

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

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

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot \color{blue}{x}\right)\right) \]
      2. lower-*.f6431.3%

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x\right)\right) \]
    10. Applied rewrites31.3%

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

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

        \[\leadsto \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x\right)\right) \cdot \color{blue}{y0} \]
      3. lower-*.f6431.3%

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

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

Alternative 15: 34.9% accurate, 3.3× speedup?

\[\begin{array}{l} \mathbf{if}\;c \leq -65000000000000001102319847813809242209613085260540269638162639789824362982102521052478487892408822618664445666083226208553839155667882130484891713264000436776425818657509079475219860537393568141661271354245120:\\ \;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\ \mathbf{elif}\;c \leq \frac{4479198687200445}{54624374234151766213262145869588543874209860176411919649966143993970993052202041929903572589539772749766081827581405105732721063150545838738336612780694159737611530891378807262929537318189580490579681412185183043434010607923007170897214483464192}:\\ \;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\ \mathbf{elif}\;c \leq \frac{1892136358191809}{1146749307995035755805410447651043470398282494584140561868794419693461438044242404035009276555062843277312}:\\ \;\;\;\;-1 \cdot \left(y0 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\right)\\ \mathbf{elif}\;c \leq 2599999999999999996988882896693688366983777636187134357388627186633339674055586880534312124416:\\ \;\;\;\;\left(\left(y5 \cdot j - c \cdot z\right) \cdot y3 - \left(j \cdot x\right) \cdot b\right) \cdot y0\\ \mathbf{else}:\\ \;\;\;\;y2 \cdot \left(y4 \cdot \left(t \cdot \left(\frac{k \cdot y1}{t} - c\right)\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     c
     -65000000000000001102319847813809242209613085260540269638162639789824362982102521052478487892408822618664445666083226208553839155667882130484891713264000436776425818657509079475219860537393568141661271354245120)
  (* y2 (* t (- (* a y5) (* c y4))))
  (if (<=
       c
       4479198687200445/54624374234151766213262145869588543874209860176411919649966143993970993052202041929903572589539772749766081827581405105732721063150545838738336612780694159737611530891378807262929537318189580490579681412185183043434010607923007170897214483464192)
    (*
     y2
     (+ (* k (- (* y1 y4) (* y0 y5))) (* x (- (* c y0) (* a y1)))))
    (if (<=
         c
         1892136358191809/1146749307995035755805410447651043470398282494584140561868794419693461438044242404035009276555062843277312)
      (* -1 (* y0 (* y5 (- (* k y2) (* j y3)))))
      (if (<=
           c
           2599999999999999996988882896693688366983777636187134357388627186633339674055586880534312124416)
        (* (- (* (- (* y5 j) (* c z)) y3) (* (* j x) b)) y0)
        (* y2 (* y4 (* t (- (/ (* k y1) t) c)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (c <= -6.5e+208) {
		tmp = y2 * (t * ((a * y5) - (c * y4)));
	} else if (c <= 8.2e-230) {
		tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) + (x * ((c * y0) - (a * y1))));
	} else if (c <= 1.65e-90) {
		tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
	} else if (c <= 2.6e+93) {
		tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0;
	} else {
		tmp = y2 * (y4 * (t * (((k * y1) / t) - c)));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (c <= (-6.5d+208)) then
        tmp = y2 * (t * ((a * y5) - (c * y4)))
    else if (c <= 8.2d-230) then
        tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) + (x * ((c * y0) - (a * y1))))
    else if (c <= 1.65d-90) then
        tmp = (-1.0d0) * (y0 * (y5 * ((k * y2) - (j * y3))))
    else if (c <= 2.6d+93) then
        tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0
    else
        tmp = y2 * (y4 * (t * (((k * y1) / t) - c)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (c <= -6.5e+208) {
		tmp = y2 * (t * ((a * y5) - (c * y4)));
	} else if (c <= 8.2e-230) {
		tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) + (x * ((c * y0) - (a * y1))));
	} else if (c <= 1.65e-90) {
		tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
	} else if (c <= 2.6e+93) {
		tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0;
	} else {
		tmp = y2 * (y4 * (t * (((k * y1) / t) - c)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if c <= -6.5e+208:
		tmp = y2 * (t * ((a * y5) - (c * y4)))
	elif c <= 8.2e-230:
		tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) + (x * ((c * y0) - (a * y1))))
	elif c <= 1.65e-90:
		tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))))
	elif c <= 2.6e+93:
		tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0
	else:
		tmp = y2 * (y4 * (t * (((k * y1) / t) - c)))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (c <= -6.5e+208)
		tmp = Float64(y2 * Float64(t * Float64(Float64(a * y5) - Float64(c * y4))));
	elseif (c <= 8.2e-230)
		tmp = Float64(y2 * Float64(Float64(k * Float64(Float64(y1 * y4) - Float64(y0 * y5))) + Float64(x * Float64(Float64(c * y0) - Float64(a * y1)))));
	elseif (c <= 1.65e-90)
		tmp = Float64(-1.0 * Float64(y0 * Float64(y5 * Float64(Float64(k * y2) - Float64(j * y3)))));
	elseif (c <= 2.6e+93)
		tmp = Float64(Float64(Float64(Float64(Float64(y5 * j) - Float64(c * z)) * y3) - Float64(Float64(j * x) * b)) * y0);
	else
		tmp = Float64(y2 * Float64(y4 * Float64(t * Float64(Float64(Float64(k * y1) / t) - c))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (c <= -6.5e+208)
		tmp = y2 * (t * ((a * y5) - (c * y4)));
	elseif (c <= 8.2e-230)
		tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) + (x * ((c * y0) - (a * y1))));
	elseif (c <= 1.65e-90)
		tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
	elseif (c <= 2.6e+93)
		tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0;
	else
		tmp = y2 * (y4 * (t * (((k * y1) / t) - c)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[c, -65000000000000001102319847813809242209613085260540269638162639789824362982102521052478487892408822618664445666083226208553839155667882130484891713264000436776425818657509079475219860537393568141661271354245120], N[(y2 * N[(t * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4479198687200445/54624374234151766213262145869588543874209860176411919649966143993970993052202041929903572589539772749766081827581405105732721063150545838738336612780694159737611530891378807262929537318189580490579681412185183043434010607923007170897214483464192], N[(y2 * N[(N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1892136358191809/1146749307995035755805410447651043470398282494584140561868794419693461438044242404035009276555062843277312], N[(-1 * N[(y0 * N[(y5 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2599999999999999996988882896693688366983777636187134357388627186633339674055586880534312124416], N[(N[(N[(N[(N[(y5 * j), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * y3), $MachinePrecision] - N[(N[(j * x), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision] * y0), $MachinePrecision], N[(y2 * N[(y4 * N[(t * N[(N[(N[(k * y1), $MachinePrecision] / t), $MachinePrecision] - c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\mathbf{if}\;c \leq -65000000000000001102319847813809242209613085260540269638162639789824362982102521052478487892408822618664445666083226208553839155667882130484891713264000436776425818657509079475219860537393568141661271354245120:\\
\;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\

\mathbf{elif}\;c \leq \frac{4479198687200445}{54624374234151766213262145869588543874209860176411919649966143993970993052202041929903572589539772749766081827581405105732721063150545838738336612780694159737611530891378807262929537318189580490579681412185183043434010607923007170897214483464192}:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\

\mathbf{elif}\;c \leq \frac{1892136358191809}{1146749307995035755805410447651043470398282494584140561868794419693461438044242404035009276555062843277312}:\\
\;\;\;\;-1 \cdot \left(y0 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\right)\\

\mathbf{elif}\;c \leq 2599999999999999996988882896693688366983777636187134357388627186633339674055586880534312124416:\\
\;\;\;\;\left(\left(y5 \cdot j - c \cdot z\right) \cdot y3 - \left(j \cdot x\right) \cdot b\right) \cdot y0\\

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


\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c < -6.5000000000000001e208

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites37.0%

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

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

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

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

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

        \[\leadsto y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right) \]
    7. Applied rewrites27.3%

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

    if -6.5000000000000001e208 < c < 8.2000000000000003e-230

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites37.0%

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

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

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

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

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

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

        \[\leadsto y2 \cdot \left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \]
      6. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \]
      7. lower-*.f64N/A

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

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

        \[\leadsto y2 \cdot \left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \]
      10. lower-*.f6435.1%

        \[\leadsto y2 \cdot \left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \]
    7. Applied rewrites35.1%

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

    if 8.2000000000000003e-230 < c < 1.65e-90

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

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

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. 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-*.f6427.1%

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

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    8. Taylor expanded in b around 0

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

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

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
      3. lower-*.f6417.9%

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
    10. Applied rewrites17.9%

      \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
    11. Taylor expanded in y5 around inf

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

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

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

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

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

        \[\leadsto -1 \cdot \left(y0 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\right) \]
      6. lower-*.f6427.7%

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

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

    if 1.65e-90 < c < 2.6e93

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

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

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

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

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      5. lower-*.f6434.7%

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
    7. Applied rewrites34.7%

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

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

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot \color{blue}{x}\right)\right) \]
      2. lower-*.f6431.3%

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x\right)\right) \]
    10. Applied rewrites31.3%

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

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

        \[\leadsto \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x\right)\right) \cdot \color{blue}{y0} \]
      3. lower-*.f6431.3%

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

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

    if 2.6e93 < c

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites37.0%

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

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

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

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

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

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    8. Taylor expanded in t around inf

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

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

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

        \[\leadsto y2 \cdot \left(y4 \cdot \left(t \cdot \left(\frac{k \cdot y1}{t} - c\right)\right)\right) \]
      4. lower-*.f6429.2%

        \[\leadsto y2 \cdot \left(y4 \cdot \left(t \cdot \left(\frac{k \cdot y1}{t} - c\right)\right)\right) \]
    10. Applied rewrites29.2%

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

Alternative 16: 34.0% accurate, 3.7× speedup?

\[\begin{array}{l} \mathbf{if}\;y4 \leq -235000000000000002925094269901874079879837067681657234384705854986725262726097242269821124197300069980790676947583977772489313485868588652453278526004332208404051373736432761311382436609757234254301415158021495202374483968:\\ \;\;\;\;k \cdot \left(\left(y4 \cdot \left(-b\right)\right) \cdot y + \left(y2 \cdot y1\right) \cdot y4\right)\\ \mathbf{elif}\;y4 \leq -1299999999999999950031673044027917767540736:\\ \;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\ \mathbf{elif}\;y4 \leq \frac{3807566061702267}{1119872371088902105278721140284222139060822748617324767449994550481895935590080472690438746635803557888}:\\ \;\;\;\;\left(\left(y5 \cdot j - c \cdot z\right) \cdot y3 - \left(j \cdot x\right) \cdot b\right) \cdot y0\\ \mathbf{else}:\\ \;\;\;\;y2 \cdot \left(y4 \cdot \left(t \cdot \left(\frac{k \cdot y1}{t} - c\right)\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     y4
     -235000000000000002925094269901874079879837067681657234384705854986725262726097242269821124197300069980790676947583977772489313485868588652453278526004332208404051373736432761311382436609757234254301415158021495202374483968)
  (* k (+ (* (* y4 (- b)) y) (* (* y2 y1) y4)))
  (if (<= y4 -1299999999999999950031673044027917767540736)
    (* t (* y4 (- (* b j) (* c y2))))
    (if (<=
         y4
         3807566061702267/1119872371088902105278721140284222139060822748617324767449994550481895935590080472690438746635803557888)
      (* (- (* (- (* y5 j) (* c z)) y3) (* (* j x) b)) y0)
      (* y2 (* y4 (* t (- (/ (* k y1) t) c))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y4 <= -2.35e+221) {
		tmp = k * (((y4 * -b) * y) + ((y2 * y1) * y4));
	} else if (y4 <= -1.3e+42) {
		tmp = t * (y4 * ((b * j) - (c * y2)));
	} else if (y4 <= 3.4e-87) {
		tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0;
	} else {
		tmp = y2 * (y4 * (t * (((k * y1) / t) - c)));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (y4 <= (-2.35d+221)) then
        tmp = k * (((y4 * -b) * y) + ((y2 * y1) * y4))
    else if (y4 <= (-1.3d+42)) then
        tmp = t * (y4 * ((b * j) - (c * y2)))
    else if (y4 <= 3.4d-87) then
        tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0
    else
        tmp = y2 * (y4 * (t * (((k * y1) / t) - c)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y4 <= -2.35e+221) {
		tmp = k * (((y4 * -b) * y) + ((y2 * y1) * y4));
	} else if (y4 <= -1.3e+42) {
		tmp = t * (y4 * ((b * j) - (c * y2)));
	} else if (y4 <= 3.4e-87) {
		tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0;
	} else {
		tmp = y2 * (y4 * (t * (((k * y1) / t) - c)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y4 <= -2.35e+221:
		tmp = k * (((y4 * -b) * y) + ((y2 * y1) * y4))
	elif y4 <= -1.3e+42:
		tmp = t * (y4 * ((b * j) - (c * y2)))
	elif y4 <= 3.4e-87:
		tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0
	else:
		tmp = y2 * (y4 * (t * (((k * y1) / t) - c)))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (y4 <= -2.35e+221)
		tmp = Float64(k * Float64(Float64(Float64(y4 * Float64(-b)) * y) + Float64(Float64(y2 * y1) * y4)));
	elseif (y4 <= -1.3e+42)
		tmp = Float64(t * Float64(y4 * Float64(Float64(b * j) - Float64(c * y2))));
	elseif (y4 <= 3.4e-87)
		tmp = Float64(Float64(Float64(Float64(Float64(y5 * j) - Float64(c * z)) * y3) - Float64(Float64(j * x) * b)) * y0);
	else
		tmp = Float64(y2 * Float64(y4 * Float64(t * Float64(Float64(Float64(k * y1) / t) - c))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (y4 <= -2.35e+221)
		tmp = k * (((y4 * -b) * y) + ((y2 * y1) * y4));
	elseif (y4 <= -1.3e+42)
		tmp = t * (y4 * ((b * j) - (c * y2)));
	elseif (y4 <= 3.4e-87)
		tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0;
	else
		tmp = y2 * (y4 * (t * (((k * y1) / t) - c)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y4, -235000000000000002925094269901874079879837067681657234384705854986725262726097242269821124197300069980790676947583977772489313485868588652453278526004332208404051373736432761311382436609757234254301415158021495202374483968], N[(k * N[(N[(N[(y4 * (-b)), $MachinePrecision] * y), $MachinePrecision] + N[(N[(y2 * y1), $MachinePrecision] * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -1299999999999999950031673044027917767540736], N[(t * N[(y4 * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 3807566061702267/1119872371088902105278721140284222139060822748617324767449994550481895935590080472690438746635803557888], N[(N[(N[(N[(N[(y5 * j), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * y3), $MachinePrecision] - N[(N[(j * x), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision] * y0), $MachinePrecision], N[(y2 * N[(y4 * N[(t * N[(N[(N[(k * y1), $MachinePrecision] / t), $MachinePrecision] - c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -235000000000000002925094269901874079879837067681657234384705854986725262726097242269821124197300069980790676947583977772489313485868588652453278526004332208404051373736432761311382436609757234254301415158021495202374483968:\\
\;\;\;\;k \cdot \left(\left(y4 \cdot \left(-b\right)\right) \cdot y + \left(y2 \cdot y1\right) \cdot y4\right)\\

\mathbf{elif}\;y4 \leq -1299999999999999950031673044027917767540736:\\
\;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\

\mathbf{elif}\;y4 \leq \frac{3807566061702267}{1119872371088902105278721140284222139060822748617324767449994550481895935590080472690438746635803557888}:\\
\;\;\;\;\left(\left(y5 \cdot j - c \cdot z\right) \cdot y3 - \left(j \cdot x\right) \cdot b\right) \cdot y0\\

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


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

    1. Initial program 30.1%

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

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

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

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

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

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

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

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

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

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

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

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

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

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right)\right) + \left(y1 \cdot y2\right) \cdot y4\right) \]
      6. lift-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right)\right) + \left(y1 \cdot y2\right) \cdot y4\right) \]
      7. mul-1-negN/A

        \[\leadsto k \cdot \left(y4 \cdot \left(\mathsf{neg}\left(b \cdot y\right)\right) + \left(y1 \cdot y2\right) \cdot y4\right) \]
      8. lift-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(\mathsf{neg}\left(b \cdot y\right)\right) + \left(y1 \cdot y2\right) \cdot y4\right) \]
      9. distribute-lft-neg-inN/A

        \[\leadsto k \cdot \left(y4 \cdot \left(\left(\mathsf{neg}\left(b\right)\right) \cdot y\right) + \left(y1 \cdot y2\right) \cdot y4\right) \]
      10. associate-*r*N/A

        \[\leadsto k \cdot \left(\left(y4 \cdot \left(\mathsf{neg}\left(b\right)\right)\right) \cdot y + \left(y1 \cdot y2\right) \cdot y4\right) \]
      11. lower-*.f64N/A

        \[\leadsto k \cdot \left(\left(y4 \cdot \left(\mathsf{neg}\left(b\right)\right)\right) \cdot y + \left(y1 \cdot y2\right) \cdot y4\right) \]
      12. lower-*.f64N/A

        \[\leadsto k \cdot \left(\left(y4 \cdot \left(\mathsf{neg}\left(b\right)\right)\right) \cdot y + \left(y1 \cdot y2\right) \cdot y4\right) \]
      13. lower-neg.f64N/A

        \[\leadsto k \cdot \left(\left(y4 \cdot \left(-b\right)\right) \cdot y + \left(y1 \cdot y2\right) \cdot y4\right) \]
      14. lower-*.f6424.5%

        \[\leadsto k \cdot \left(\left(y4 \cdot \left(-b\right)\right) \cdot y + \left(y1 \cdot y2\right) \cdot y4\right) \]
      15. lift-*.f64N/A

        \[\leadsto k \cdot \left(\left(y4 \cdot \left(-b\right)\right) \cdot y + \left(y1 \cdot y2\right) \cdot y4\right) \]
      16. *-commutativeN/A

        \[\leadsto k \cdot \left(\left(y4 \cdot \left(-b\right)\right) \cdot y + \left(y2 \cdot y1\right) \cdot y4\right) \]
      17. lower-*.f6424.5%

        \[\leadsto k \cdot \left(\left(y4 \cdot \left(-b\right)\right) \cdot y + \left(y2 \cdot y1\right) \cdot y4\right) \]
    9. Applied rewrites24.5%

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

    if -2.35e221 < y4 < -1.3e42

    1. Initial program 30.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3e42 < y4 < 3.3999999999999999e-87

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

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

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

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

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
      5. lower-*.f6434.7%

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right) \]
    7. Applied rewrites34.7%

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

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

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot \color{blue}{x}\right)\right) \]
      2. lower-*.f6431.3%

        \[\leadsto y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x\right)\right) \]
    10. Applied rewrites31.3%

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

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

        \[\leadsto \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x\right)\right) \cdot \color{blue}{y0} \]
      3. lower-*.f6431.3%

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

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

    if 3.3999999999999999e-87 < y4

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites37.0%

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

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

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

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

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

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    8. Taylor expanded in t around inf

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

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

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

        \[\leadsto y2 \cdot \left(y4 \cdot \left(t \cdot \left(\frac{k \cdot y1}{t} - c\right)\right)\right) \]
      4. lower-*.f6429.2%

        \[\leadsto y2 \cdot \left(y4 \cdot \left(t \cdot \left(\frac{k \cdot y1}{t} - c\right)\right)\right) \]
    10. Applied rewrites29.2%

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

Alternative 17: 33.3% accurate, 4.3× speedup?

\[\begin{array}{l} \mathbf{if}\;y5 \leq -39000000000000000606817229049206877946459854479921395901421052636802517465425472427334430206686850459372044953845760:\\ \;\;\;\;-1 \cdot \left(y0 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\right)\\ \mathbf{elif}\;y5 \leq \frac{912488123524439}{2281220308811097609320585802850145662446614253624279965289596258949637583604338693252956405658685699889321154786797203655344352360687718999126330659861107094125997337180132475041437096123301888}:\\ \;\;\;\;y4 \cdot \left(t \cdot \left(b \cdot j - c \cdot y2\right)\right)\\ \mathbf{elif}\;y5 \leq 280000000000000004096594664588964448671612036602103416598011020407542981990321500454912:\\ \;\;\;\;\left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4\\ \mathbf{else}:\\ \;\;\;\;y2 \cdot \left(-1 \cdot \left(y5 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     y5
     -39000000000000000606817229049206877946459854479921395901421052636802517465425472427334430206686850459372044953845760)
  (* -1 (* y0 (* y5 (- (* k y2) (* j y3)))))
  (if (<=
       y5
       912488123524439/2281220308811097609320585802850145662446614253624279965289596258949637583604338693252956405658685699889321154786797203655344352360687718999126330659861107094125997337180132475041437096123301888)
    (* y4 (* t (- (* b j) (* c y2))))
    (if (<=
         y5
         280000000000000004096594664588964448671612036602103416598011020407542981990321500454912)
      (* (* k (- (* y2 y1) (* b y))) y4)
      (* y2 (* -1 (* y5 (- (* k y0) (* a t)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y5 <= -3.9e+115) {
		tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
	} else if (y5 <= 4e-178) {
		tmp = y4 * (t * ((b * j) - (c * y2)));
	} else if (y5 <= 2.8e+86) {
		tmp = (k * ((y2 * y1) - (b * y))) * y4;
	} else {
		tmp = y2 * (-1.0 * (y5 * ((k * y0) - (a * t))));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (y5 <= (-3.9d+115)) then
        tmp = (-1.0d0) * (y0 * (y5 * ((k * y2) - (j * y3))))
    else if (y5 <= 4d-178) then
        tmp = y4 * (t * ((b * j) - (c * y2)))
    else if (y5 <= 2.8d+86) then
        tmp = (k * ((y2 * y1) - (b * y))) * y4
    else
        tmp = y2 * ((-1.0d0) * (y5 * ((k * y0) - (a * t))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y5 <= -3.9e+115) {
		tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
	} else if (y5 <= 4e-178) {
		tmp = y4 * (t * ((b * j) - (c * y2)));
	} else if (y5 <= 2.8e+86) {
		tmp = (k * ((y2 * y1) - (b * y))) * y4;
	} else {
		tmp = y2 * (-1.0 * (y5 * ((k * y0) - (a * t))));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y5 <= -3.9e+115:
		tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))))
	elif y5 <= 4e-178:
		tmp = y4 * (t * ((b * j) - (c * y2)))
	elif y5 <= 2.8e+86:
		tmp = (k * ((y2 * y1) - (b * y))) * y4
	else:
		tmp = y2 * (-1.0 * (y5 * ((k * y0) - (a * t))))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (y5 <= -3.9e+115)
		tmp = Float64(-1.0 * Float64(y0 * Float64(y5 * Float64(Float64(k * y2) - Float64(j * y3)))));
	elseif (y5 <= 4e-178)
		tmp = Float64(y4 * Float64(t * Float64(Float64(b * j) - Float64(c * y2))));
	elseif (y5 <= 2.8e+86)
		tmp = Float64(Float64(k * Float64(Float64(y2 * y1) - Float64(b * y))) * y4);
	else
		tmp = Float64(y2 * Float64(-1.0 * Float64(y5 * Float64(Float64(k * y0) - Float64(a * t)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (y5 <= -3.9e+115)
		tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
	elseif (y5 <= 4e-178)
		tmp = y4 * (t * ((b * j) - (c * y2)));
	elseif (y5 <= 2.8e+86)
		tmp = (k * ((y2 * y1) - (b * y))) * y4;
	else
		tmp = y2 * (-1.0 * (y5 * ((k * y0) - (a * t))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y5, -39000000000000000606817229049206877946459854479921395901421052636802517465425472427334430206686850459372044953845760], N[(-1 * N[(y0 * N[(y5 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 912488123524439/2281220308811097609320585802850145662446614253624279965289596258949637583604338693252956405658685699889321154786797203655344352360687718999126330659861107094125997337180132475041437096123301888], N[(y4 * N[(t * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 280000000000000004096594664588964448671612036602103416598011020407542981990321500454912], N[(N[(k * N[(N[(y2 * y1), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y4), $MachinePrecision], N[(y2 * N[(-1 * N[(y5 * N[(N[(k * y0), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;y5 \leq -39000000000000000606817229049206877946459854479921395901421052636802517465425472427334430206686850459372044953845760:\\
\;\;\;\;-1 \cdot \left(y0 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\right)\\

\mathbf{elif}\;y5 \leq \frac{912488123524439}{2281220308811097609320585802850145662446614253624279965289596258949637583604338693252956405658685699889321154786797203655344352360687718999126330659861107094125997337180132475041437096123301888}:\\
\;\;\;\;y4 \cdot \left(t \cdot \left(b \cdot j - c \cdot y2\right)\right)\\

\mathbf{elif}\;y5 \leq 280000000000000004096594664588964448671612036602103416598011020407542981990321500454912:\\
\;\;\;\;\left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4\\

\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(-1 \cdot \left(y5 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\right)\\


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y5 < -3.9000000000000001e115

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

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

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. 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-*.f6427.1%

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

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    8. Taylor expanded in b around 0

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

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

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
      3. lower-*.f6417.9%

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
    10. Applied rewrites17.9%

      \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
    11. Taylor expanded in y5 around inf

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

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

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

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

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

        \[\leadsto -1 \cdot \left(y0 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\right) \]
      6. lower-*.f6427.7%

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

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

    if -3.9000000000000001e115 < y5 < 3.9999999999999998e-178

    1. Initial program 30.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto y4 \cdot \left(t \cdot \left(b \cdot j - c \cdot y2\right)\right) \]
    7. Applied rewrites27.4%

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

    if 3.9999999999999998e-178 < y5 < 2.8e86

    1. Initial program 30.1%

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

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

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

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

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

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

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

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

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

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

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

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right) \cdot y4\right) \]
      4. associate-*r*N/A

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

        \[\leadsto \left(k \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \cdot y4 \]
      6. lower-*.f6426.8%

        \[\leadsto \left(k \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \cdot y4 \]
      7. lift-+.f64N/A

        \[\leadsto \left(k \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \cdot y4 \]
      8. +-commutativeN/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 + -1 \cdot \left(b \cdot y\right)\right)\right) \cdot y4 \]
      9. lift-*.f64N/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 + -1 \cdot \left(b \cdot y\right)\right)\right) \cdot y4 \]
      10. mul-1-negN/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 + \left(\mathsf{neg}\left(b \cdot y\right)\right)\right)\right) \cdot y4 \]
      11. sub-flip-reverseN/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 - b \cdot y\right)\right) \cdot y4 \]
      12. lower--.f6426.8%

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 - b \cdot y\right)\right) \cdot y4 \]
      13. lift-*.f64N/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 - b \cdot y\right)\right) \cdot y4 \]
      14. *-commutativeN/A

        \[\leadsto \left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4 \]
      15. lower-*.f6426.8%

        \[\leadsto \left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4 \]
    9. Applied rewrites26.8%

      \[\leadsto \left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4 \]

    if 2.8e86 < y5

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites37.0%

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

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

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

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

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

        \[\leadsto y2 \cdot \left(-1 \cdot \left(y5 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\right) \]
      5. lower-*.f6427.0%

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

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

Alternative 18: 33.1% accurate, 4.3× speedup?

\[\begin{array}{l} \mathbf{if}\;y5 \leq -39000000000000000606817229049206877946459854479921395901421052636802517465425472427334430206686850459372044953845760:\\ \;\;\;\;-1 \cdot \left(y0 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\right)\\ \mathbf{elif}\;y5 \leq \frac{912488123524439}{2281220308811097609320585802850145662446614253624279965289596258949637583604338693252956405658685699889321154786797203655344352360687718999126330659861107094125997337180132475041437096123301888}:\\ \;\;\;\;y4 \cdot \left(t \cdot \left(b \cdot j - c \cdot y2\right)\right)\\ \mathbf{elif}\;y5 \leq 260:\\ \;\;\;\;\left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4\\ \mathbf{else}:\\ \;\;\;\;y0 \cdot \left(y2 \cdot \left(-1 \cdot \left(k \cdot y5\right) + c \cdot x\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     y5
     -39000000000000000606817229049206877946459854479921395901421052636802517465425472427334430206686850459372044953845760)
  (* -1 (* y0 (* y5 (- (* k y2) (* j y3)))))
  (if (<=
       y5
       912488123524439/2281220308811097609320585802850145662446614253624279965289596258949637583604338693252956405658685699889321154786797203655344352360687718999126330659861107094125997337180132475041437096123301888)
    (* y4 (* t (- (* b j) (* c y2))))
    (if (<= y5 260)
      (* (* k (- (* y2 y1) (* b y))) y4)
      (* y0 (* y2 (+ (* -1 (* k y5)) (* c 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 (y5 <= -3.9e+115) {
		tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
	} else if (y5 <= 4e-178) {
		tmp = y4 * (t * ((b * j) - (c * y2)));
	} else if (y5 <= 260.0) {
		tmp = (k * ((y2 * y1) - (b * y))) * y4;
	} else {
		tmp = y0 * (y2 * ((-1.0 * (k * y5)) + (c * 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 (y5 <= (-3.9d+115)) then
        tmp = (-1.0d0) * (y0 * (y5 * ((k * y2) - (j * y3))))
    else if (y5 <= 4d-178) then
        tmp = y4 * (t * ((b * j) - (c * y2)))
    else if (y5 <= 260.0d0) then
        tmp = (k * ((y2 * y1) - (b * y))) * y4
    else
        tmp = y0 * (y2 * (((-1.0d0) * (k * y5)) + (c * 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 (y5 <= -3.9e+115) {
		tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
	} else if (y5 <= 4e-178) {
		tmp = y4 * (t * ((b * j) - (c * y2)));
	} else if (y5 <= 260.0) {
		tmp = (k * ((y2 * y1) - (b * y))) * y4;
	} else {
		tmp = y0 * (y2 * ((-1.0 * (k * y5)) + (c * x)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y5 <= -3.9e+115:
		tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))))
	elif y5 <= 4e-178:
		tmp = y4 * (t * ((b * j) - (c * y2)))
	elif y5 <= 260.0:
		tmp = (k * ((y2 * y1) - (b * y))) * y4
	else:
		tmp = y0 * (y2 * ((-1.0 * (k * y5)) + (c * 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 (y5 <= -3.9e+115)
		tmp = Float64(-1.0 * Float64(y0 * Float64(y5 * Float64(Float64(k * y2) - Float64(j * y3)))));
	elseif (y5 <= 4e-178)
		tmp = Float64(y4 * Float64(t * Float64(Float64(b * j) - Float64(c * y2))));
	elseif (y5 <= 260.0)
		tmp = Float64(Float64(k * Float64(Float64(y2 * y1) - Float64(b * y))) * y4);
	else
		tmp = Float64(y0 * Float64(y2 * Float64(Float64(-1.0 * Float64(k * y5)) + Float64(c * 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 (y5 <= -3.9e+115)
		tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
	elseif (y5 <= 4e-178)
		tmp = y4 * (t * ((b * j) - (c * y2)));
	elseif (y5 <= 260.0)
		tmp = (k * ((y2 * y1) - (b * y))) * y4;
	else
		tmp = y0 * (y2 * ((-1.0 * (k * y5)) + (c * 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[y5, -39000000000000000606817229049206877946459854479921395901421052636802517465425472427334430206686850459372044953845760], N[(-1 * N[(y0 * N[(y5 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 912488123524439/2281220308811097609320585802850145662446614253624279965289596258949637583604338693252956405658685699889321154786797203655344352360687718999126330659861107094125997337180132475041437096123301888], N[(y4 * N[(t * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 260], N[(N[(k * N[(N[(y2 * y1), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y4), $MachinePrecision], N[(y0 * N[(y2 * N[(N[(-1 * N[(k * y5), $MachinePrecision]), $MachinePrecision] + N[(c * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;y5 \leq -39000000000000000606817229049206877946459854479921395901421052636802517465425472427334430206686850459372044953845760:\\
\;\;\;\;-1 \cdot \left(y0 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\right)\\

\mathbf{elif}\;y5 \leq \frac{912488123524439}{2281220308811097609320585802850145662446614253624279965289596258949637583604338693252956405658685699889321154786797203655344352360687718999126330659861107094125997337180132475041437096123301888}:\\
\;\;\;\;y4 \cdot \left(t \cdot \left(b \cdot j - c \cdot y2\right)\right)\\

\mathbf{elif}\;y5 \leq 260:\\
\;\;\;\;\left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4\\

\mathbf{else}:\\
\;\;\;\;y0 \cdot \left(y2 \cdot \left(-1 \cdot \left(k \cdot y5\right) + c \cdot x\right)\right)\\


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y5 < -3.9000000000000001e115

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

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

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. 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-*.f6427.1%

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

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    8. Taylor expanded in b around 0

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

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

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
      3. lower-*.f6417.9%

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
    10. Applied rewrites17.9%

      \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
    11. Taylor expanded in y5 around inf

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

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

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

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

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

        \[\leadsto -1 \cdot \left(y0 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\right) \]
      6. lower-*.f6427.7%

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

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

    if -3.9000000000000001e115 < y5 < 3.9999999999999998e-178

    1. Initial program 30.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto y4 \cdot \left(t \cdot \left(b \cdot j - c \cdot y2\right)\right) \]
    7. Applied rewrites27.4%

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

    if 3.9999999999999998e-178 < y5 < 260

    1. Initial program 30.1%

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

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

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

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

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

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

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

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

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

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

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

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right) \cdot y4\right) \]
      4. associate-*r*N/A

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

        \[\leadsto \left(k \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \cdot y4 \]
      6. lower-*.f6426.8%

        \[\leadsto \left(k \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \cdot y4 \]
      7. lift-+.f64N/A

        \[\leadsto \left(k \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \cdot y4 \]
      8. +-commutativeN/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 + -1 \cdot \left(b \cdot y\right)\right)\right) \cdot y4 \]
      9. lift-*.f64N/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 + -1 \cdot \left(b \cdot y\right)\right)\right) \cdot y4 \]
      10. mul-1-negN/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 + \left(\mathsf{neg}\left(b \cdot y\right)\right)\right)\right) \cdot y4 \]
      11. sub-flip-reverseN/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 - b \cdot y\right)\right) \cdot y4 \]
      12. lower--.f6426.8%

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 - b \cdot y\right)\right) \cdot y4 \]
      13. lift-*.f64N/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 - b \cdot y\right)\right) \cdot y4 \]
      14. *-commutativeN/A

        \[\leadsto \left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4 \]
      15. lower-*.f6426.8%

        \[\leadsto \left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4 \]
    9. Applied rewrites26.8%

      \[\leadsto \left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4 \]

    if 260 < y5

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites37.0%

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

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

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

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

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

        \[\leadsto y0 \cdot \left(y2 \cdot \left(-1 \cdot \left(k \cdot y5\right) + c \cdot x\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(y2 \cdot \left(-1 \cdot \left(k \cdot y5\right) + c \cdot x\right)\right) \]
      6. lower-*.f6427.7%

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

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

Alternative 19: 32.3% accurate, 4.3× speedup?

\[\begin{array}{l} t_1 := -1 \cdot \left(y0 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\right)\\ \mathbf{if}\;y5 \leq -39000000000000000606817229049206877946459854479921395901421052636802517465425472427334430206686850459372044953845760:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y5 \leq \frac{912488123524439}{2281220308811097609320585802850145662446614253624279965289596258949637583604338693252956405658685699889321154786797203655344352360687718999126330659861107094125997337180132475041437096123301888}:\\ \;\;\;\;y4 \cdot \left(t \cdot \left(b \cdot j - c \cdot y2\right)\right)\\ \mathbf{elif}\;y5 \leq 19500000000:\\ \;\;\;\;\left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (let* ((t_1 (* -1 (* y0 (* y5 (- (* k y2) (* j y3)))))))
  (if (<=
       y5
       -39000000000000000606817229049206877946459854479921395901421052636802517465425472427334430206686850459372044953845760)
    t_1
    (if (<=
         y5
         912488123524439/2281220308811097609320585802850145662446614253624279965289596258949637583604338693252956405658685699889321154786797203655344352360687718999126330659861107094125997337180132475041437096123301888)
      (* y4 (* t (- (* b j) (* c y2))))
      (if (<= y5 19500000000)
        (* (* k (- (* y2 y1) (* b y))) 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 = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
	double tmp;
	if (y5 <= -3.9e+115) {
		tmp = t_1;
	} else if (y5 <= 4e-178) {
		tmp = y4 * (t * ((b * j) - (c * y2)));
	} else if (y5 <= 19500000000.0) {
		tmp = (k * ((y2 * y1) - (b * y))) * 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 = (-1.0d0) * (y0 * (y5 * ((k * y2) - (j * y3))))
    if (y5 <= (-3.9d+115)) then
        tmp = t_1
    else if (y5 <= 4d-178) then
        tmp = y4 * (t * ((b * j) - (c * y2)))
    else if (y5 <= 19500000000.0d0) then
        tmp = (k * ((y2 * y1) - (b * y))) * 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 = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
	double tmp;
	if (y5 <= -3.9e+115) {
		tmp = t_1;
	} else if (y5 <= 4e-178) {
		tmp = y4 * (t * ((b * j) - (c * y2)));
	} else if (y5 <= 19500000000.0) {
		tmp = (k * ((y2 * y1) - (b * y))) * 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 = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))))
	tmp = 0
	if y5 <= -3.9e+115:
		tmp = t_1
	elif y5 <= 4e-178:
		tmp = y4 * (t * ((b * j) - (c * y2)))
	elif y5 <= 19500000000.0:
		tmp = (k * ((y2 * y1) - (b * y))) * 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(-1.0 * Float64(y0 * Float64(y5 * Float64(Float64(k * y2) - Float64(j * y3)))))
	tmp = 0.0
	if (y5 <= -3.9e+115)
		tmp = t_1;
	elseif (y5 <= 4e-178)
		tmp = Float64(y4 * Float64(t * Float64(Float64(b * j) - Float64(c * y2))));
	elseif (y5 <= 19500000000.0)
		tmp = Float64(Float64(k * Float64(Float64(y2 * y1) - Float64(b * y))) * 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 = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
	tmp = 0.0;
	if (y5 <= -3.9e+115)
		tmp = t_1;
	elseif (y5 <= 4e-178)
		tmp = y4 * (t * ((b * j) - (c * y2)));
	elseif (y5 <= 19500000000.0)
		tmp = (k * ((y2 * y1) - (b * y))) * 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[(-1 * N[(y0 * N[(y5 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y5, -39000000000000000606817229049206877946459854479921395901421052636802517465425472427334430206686850459372044953845760], t$95$1, If[LessEqual[y5, 912488123524439/2281220308811097609320585802850145662446614253624279965289596258949637583604338693252956405658685699889321154786797203655344352360687718999126330659861107094125997337180132475041437096123301888], N[(y4 * N[(t * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 19500000000], N[(N[(k * N[(N[(y2 * y1), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y4), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := -1 \cdot \left(y0 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\right)\\
\mathbf{if}\;y5 \leq -39000000000000000606817229049206877946459854479921395901421052636802517465425472427334430206686850459372044953845760:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y5 \leq \frac{912488123524439}{2281220308811097609320585802850145662446614253624279965289596258949637583604338693252956405658685699889321154786797203655344352360687718999126330659861107094125997337180132475041437096123301888}:\\
\;\;\;\;y4 \cdot \left(t \cdot \left(b \cdot j - c \cdot y2\right)\right)\\

\mathbf{elif}\;y5 \leq 19500000000:\\
\;\;\;\;\left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4\\

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y5 < -3.9000000000000001e115 or 1.95e10 < y5

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

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

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. 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-*.f6427.1%

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

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    8. Taylor expanded in b around 0

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

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

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
      3. lower-*.f6417.9%

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
    10. Applied rewrites17.9%

      \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
    11. Taylor expanded in y5 around inf

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

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

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

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

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

        \[\leadsto -1 \cdot \left(y0 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\right) \]
      6. lower-*.f6427.7%

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

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

    if -3.9000000000000001e115 < y5 < 3.9999999999999998e-178

    1. Initial program 30.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto y4 \cdot \left(t \cdot \left(b \cdot j - c \cdot y2\right)\right) \]
    7. Applied rewrites27.4%

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

    if 3.9999999999999998e-178 < y5 < 1.95e10

    1. Initial program 30.1%

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

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

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

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

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

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

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

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

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

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

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

        \[\leadsto k \cdot \left(\left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right) \cdot y4\right) \]
      4. associate-*r*N/A

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

        \[\leadsto \left(k \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \cdot y4 \]
      6. lower-*.f6426.8%

        \[\leadsto \left(k \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \cdot y4 \]
      7. lift-+.f64N/A

        \[\leadsto \left(k \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \cdot y4 \]
      8. +-commutativeN/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 + -1 \cdot \left(b \cdot y\right)\right)\right) \cdot y4 \]
      9. lift-*.f64N/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 + -1 \cdot \left(b \cdot y\right)\right)\right) \cdot y4 \]
      10. mul-1-negN/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 + \left(\mathsf{neg}\left(b \cdot y\right)\right)\right)\right) \cdot y4 \]
      11. sub-flip-reverseN/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 - b \cdot y\right)\right) \cdot y4 \]
      12. lower--.f6426.8%

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 - b \cdot y\right)\right) \cdot y4 \]
      13. lift-*.f64N/A

        \[\leadsto \left(k \cdot \left(y1 \cdot y2 - b \cdot y\right)\right) \cdot y4 \]
      14. *-commutativeN/A

        \[\leadsto \left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4 \]
      15. lower-*.f6426.8%

        \[\leadsto \left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4 \]
    9. Applied rewrites26.8%

      \[\leadsto \left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4 \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 20: 32.1% accurate, 4.8× speedup?

\[\begin{array}{l} \mathbf{if}\;y4 \leq -20499999999999999049083573240839211087156710910556222747439268135562514181976610085419157159294980529101273476505457110097196150312921216106481682108319928000218574889744426725627686736648205031993476680596884037241405440:\\ \;\;\;\;-1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right)\\ \mathbf{elif}\;y4 \leq -1179999999999999962102276357894053036032:\\ \;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\ \mathbf{elif}\;y4 \leq \frac{6332379880165729}{904625697166532776746648320380374280103671755200316906558262375061821325312}:\\ \;\;\;\;y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     y4
     -20499999999999999049083573240839211087156710910556222747439268135562514181976610085419157159294980529101273476505457110097196150312921216106481682108319928000218574889744426725627686736648205031993476680596884037241405440)
  (* -1 (* b (* k (* y y4))))
  (if (<= y4 -1179999999999999962102276357894053036032)
    (* t (* y4 (- (* b j) (* c y2))))
    (if (<=
         y4
         6332379880165729/904625697166532776746648320380374280103671755200316906558262375061821325312)
      (* y0 (* x (- (* c y2) (* b j))))
      (* c (* y4 (- (* y y3) (* t y2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y4 <= -2.05e+220) {
		tmp = -1.0 * (b * (k * (y * y4)));
	} else if (y4 <= -1.18e+39) {
		tmp = t * (y4 * ((b * j) - (c * y2)));
	} else if (y4 <= 7e-60) {
		tmp = y0 * (x * ((c * y2) - (b * j)));
	} else {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (y4 <= (-2.05d+220)) then
        tmp = (-1.0d0) * (b * (k * (y * y4)))
    else if (y4 <= (-1.18d+39)) then
        tmp = t * (y4 * ((b * j) - (c * y2)))
    else if (y4 <= 7d-60) then
        tmp = y0 * (x * ((c * y2) - (b * j)))
    else
        tmp = c * (y4 * ((y * y3) - (t * y2)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y4 <= -2.05e+220) {
		tmp = -1.0 * (b * (k * (y * y4)));
	} else if (y4 <= -1.18e+39) {
		tmp = t * (y4 * ((b * j) - (c * y2)));
	} else if (y4 <= 7e-60) {
		tmp = y0 * (x * ((c * y2) - (b * j)));
	} else {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y4 <= -2.05e+220:
		tmp = -1.0 * (b * (k * (y * y4)))
	elif y4 <= -1.18e+39:
		tmp = t * (y4 * ((b * j) - (c * y2)))
	elif y4 <= 7e-60:
		tmp = y0 * (x * ((c * y2) - (b * j)))
	else:
		tmp = c * (y4 * ((y * y3) - (t * y2)))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (y4 <= -2.05e+220)
		tmp = Float64(-1.0 * Float64(b * Float64(k * Float64(y * y4))));
	elseif (y4 <= -1.18e+39)
		tmp = Float64(t * Float64(y4 * Float64(Float64(b * j) - Float64(c * y2))));
	elseif (y4 <= 7e-60)
		tmp = Float64(y0 * Float64(x * Float64(Float64(c * y2) - Float64(b * j))));
	else
		tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (y4 <= -2.05e+220)
		tmp = -1.0 * (b * (k * (y * y4)));
	elseif (y4 <= -1.18e+39)
		tmp = t * (y4 * ((b * j) - (c * y2)));
	elseif (y4 <= 7e-60)
		tmp = y0 * (x * ((c * y2) - (b * j)));
	else
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y4, -20499999999999999049083573240839211087156710910556222747439268135562514181976610085419157159294980529101273476505457110097196150312921216106481682108319928000218574889744426725627686736648205031993476680596884037241405440], N[(-1 * N[(b * N[(k * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -1179999999999999962102276357894053036032], N[(t * N[(y4 * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 6332379880165729/904625697166532776746648320380374280103671755200316906558262375061821325312], N[(y0 * N[(x * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -20499999999999999049083573240839211087156710910556222747439268135562514181976610085419157159294980529101273476505457110097196150312921216106481682108319928000218574889744426725627686736648205031993476680596884037241405440:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right)\\

\mathbf{elif}\;y4 \leq -1179999999999999962102276357894053036032:\\
\;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\

\mathbf{elif}\;y4 \leq \frac{6332379880165729}{904625697166532776746648320380374280103671755200316906558262375061821325312}:\\
\;\;\;\;y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\

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


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

    1. Initial program 30.1%

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

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

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

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

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

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

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

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in y around inf

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

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

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

        \[\leadsto -1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right) \]
      4. lower-*.f6417.1%

        \[\leadsto -1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right) \]
    10. Applied rewrites17.1%

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

    if -2.0499999999999999e220 < y4 < -1.18e39

    1. Initial program 30.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.18e39 < y4 < 6.9999999999999995e-60

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

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

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

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

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

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

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

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

    if 6.9999999999999995e-60 < y4

    1. Initial program 30.1%

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

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

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

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

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

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

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

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in c around inf

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

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

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

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

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
      5. lower-*.f6426.9%

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
    10. Applied rewrites26.9%

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

Alternative 21: 32.0% accurate, 4.8× speedup?

\[\begin{array}{l} \mathbf{if}\;y4 \leq -20499999999999999049083573240839211087156710910556222747439268135562514181976610085419157159294980529101273476505457110097196150312921216106481682108319928000218574889744426725627686736648205031993476680596884037241405440:\\ \;\;\;\;-1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right)\\ \mathbf{elif}\;y4 \leq -30000000000000001826021443431825408:\\ \;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\ \mathbf{elif}\;y4 \leq \frac{4742843975160471}{3794275180128377091639574036764685364535950857523710002444946112771297432041422848}:\\ \;\;\;\;y0 \cdot \left(b \cdot \left(k \cdot z - j \cdot x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     y4
     -20499999999999999049083573240839211087156710910556222747439268135562514181976610085419157159294980529101273476505457110097196150312921216106481682108319928000218574889744426725627686736648205031993476680596884037241405440)
  (* -1 (* b (* k (* y y4))))
  (if (<= y4 -30000000000000001826021443431825408)
    (* t (* y4 (- (* b j) (* c y2))))
    (if (<=
         y4
         4742843975160471/3794275180128377091639574036764685364535950857523710002444946112771297432041422848)
      (* y0 (* b (- (* k z) (* j x))))
      (* c (* y4 (- (* y y3) (* t y2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y4 <= -2.05e+220) {
		tmp = -1.0 * (b * (k * (y * y4)));
	} else if (y4 <= -3e+34) {
		tmp = t * (y4 * ((b * j) - (c * y2)));
	} else if (y4 <= 1.25e-66) {
		tmp = y0 * (b * ((k * z) - (j * x)));
	} else {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (y4 <= (-2.05d+220)) then
        tmp = (-1.0d0) * (b * (k * (y * y4)))
    else if (y4 <= (-3d+34)) then
        tmp = t * (y4 * ((b * j) - (c * y2)))
    else if (y4 <= 1.25d-66) then
        tmp = y0 * (b * ((k * z) - (j * x)))
    else
        tmp = c * (y4 * ((y * y3) - (t * y2)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y4 <= -2.05e+220) {
		tmp = -1.0 * (b * (k * (y * y4)));
	} else if (y4 <= -3e+34) {
		tmp = t * (y4 * ((b * j) - (c * y2)));
	} else if (y4 <= 1.25e-66) {
		tmp = y0 * (b * ((k * z) - (j * x)));
	} else {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y4 <= -2.05e+220:
		tmp = -1.0 * (b * (k * (y * y4)))
	elif y4 <= -3e+34:
		tmp = t * (y4 * ((b * j) - (c * y2)))
	elif y4 <= 1.25e-66:
		tmp = y0 * (b * ((k * z) - (j * x)))
	else:
		tmp = c * (y4 * ((y * y3) - (t * y2)))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (y4 <= -2.05e+220)
		tmp = Float64(-1.0 * Float64(b * Float64(k * Float64(y * y4))));
	elseif (y4 <= -3e+34)
		tmp = Float64(t * Float64(y4 * Float64(Float64(b * j) - Float64(c * y2))));
	elseif (y4 <= 1.25e-66)
		tmp = Float64(y0 * Float64(b * Float64(Float64(k * z) - Float64(j * x))));
	else
		tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (y4 <= -2.05e+220)
		tmp = -1.0 * (b * (k * (y * y4)));
	elseif (y4 <= -3e+34)
		tmp = t * (y4 * ((b * j) - (c * y2)));
	elseif (y4 <= 1.25e-66)
		tmp = y0 * (b * ((k * z) - (j * x)));
	else
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y4, -20499999999999999049083573240839211087156710910556222747439268135562514181976610085419157159294980529101273476505457110097196150312921216106481682108319928000218574889744426725627686736648205031993476680596884037241405440], N[(-1 * N[(b * N[(k * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -30000000000000001826021443431825408], N[(t * N[(y4 * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 4742843975160471/3794275180128377091639574036764685364535950857523710002444946112771297432041422848], N[(y0 * N[(b * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -20499999999999999049083573240839211087156710910556222747439268135562514181976610085419157159294980529101273476505457110097196150312921216106481682108319928000218574889744426725627686736648205031993476680596884037241405440:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right)\\

\mathbf{elif}\;y4 \leq -30000000000000001826021443431825408:\\
\;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\

\mathbf{elif}\;y4 \leq \frac{4742843975160471}{3794275180128377091639574036764685364535950857523710002444946112771297432041422848}:\\
\;\;\;\;y0 \cdot \left(b \cdot \left(k \cdot z - j \cdot x\right)\right)\\

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


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

    1. Initial program 30.1%

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

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

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

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

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

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

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

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in y around inf

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

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

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

        \[\leadsto -1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right) \]
      4. lower-*.f6417.1%

        \[\leadsto -1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right) \]
    10. Applied rewrites17.1%

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

    if -2.0499999999999999e220 < y4 < -3.0000000000000002e34

    1. Initial program 30.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.0000000000000002e34 < y4 < 1.2499999999999999e-66

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

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

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

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

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

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

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

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

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

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
      2. lower-*.f6417.4%

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
    10. Applied rewrites17.4%

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

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

        \[\leadsto y0 \cdot \left(b \cdot \left(k \cdot z - \color{blue}{j \cdot x}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y0 \cdot \left(b \cdot \left(k \cdot z - j \cdot \color{blue}{x}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(b \cdot \left(k \cdot z - j \cdot x\right)\right) \]
      4. lower-*.f6427.5%

        \[\leadsto y0 \cdot \left(b \cdot \left(k \cdot z - j \cdot x\right)\right) \]
    13. Applied rewrites27.5%

      \[\leadsto y0 \cdot \left(b \cdot \color{blue}{\left(k \cdot z - j \cdot x\right)}\right) \]

    if 1.2499999999999999e-66 < y4

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.6%

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in c around inf

      \[\leadsto c \cdot \color{blue}{\left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \color{blue}{\left(y \cdot y3 - t \cdot y2\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - \color{blue}{t \cdot y2}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
      5. lower-*.f6426.9%

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
    10. Applied rewrites26.9%

      \[\leadsto c \cdot \color{blue}{\left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 22: 31.8% accurate, 4.8× speedup?

\[\begin{array}{l} \mathbf{if}\;y4 \leq -20499999999999999049083573240839211087156710910556222747439268135562514181976610085419157159294980529101273476505457110097196150312921216106481682108319928000218574889744426725627686736648205031993476680596884037241405440:\\ \;\;\;\;-1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right)\\ \mathbf{elif}\;y4 \leq -1179999999999999962102276357894053036032:\\ \;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\ \mathbf{elif}\;y4 \leq \frac{4553130216154053}{3794275180128377091639574036764685364535950857523710002444946112771297432041422848}:\\ \;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     y4
     -20499999999999999049083573240839211087156710910556222747439268135562514181976610085419157159294980529101273476505457110097196150312921216106481682108319928000218574889744426725627686736648205031993476680596884037241405440)
  (* -1 (* b (* k (* y y4))))
  (if (<= y4 -1179999999999999962102276357894053036032)
    (* t (* y4 (- (* b j) (* c y2))))
    (if (<=
         y4
         4553130216154053/3794275180128377091639574036764685364535950857523710002444946112771297432041422848)
      (* x (* y0 (- (* c y2) (* b j))))
      (* c (* y4 (- (* y y3) (* t y2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y4 <= -2.05e+220) {
		tmp = -1.0 * (b * (k * (y * y4)));
	} else if (y4 <= -1.18e+39) {
		tmp = t * (y4 * ((b * j) - (c * y2)));
	} else if (y4 <= 1.2e-66) {
		tmp = x * (y0 * ((c * y2) - (b * j)));
	} else {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (y4 <= (-2.05d+220)) then
        tmp = (-1.0d0) * (b * (k * (y * y4)))
    else if (y4 <= (-1.18d+39)) then
        tmp = t * (y4 * ((b * j) - (c * y2)))
    else if (y4 <= 1.2d-66) then
        tmp = x * (y0 * ((c * y2) - (b * j)))
    else
        tmp = c * (y4 * ((y * y3) - (t * y2)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y4 <= -2.05e+220) {
		tmp = -1.0 * (b * (k * (y * y4)));
	} else if (y4 <= -1.18e+39) {
		tmp = t * (y4 * ((b * j) - (c * y2)));
	} else if (y4 <= 1.2e-66) {
		tmp = x * (y0 * ((c * y2) - (b * j)));
	} else {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y4 <= -2.05e+220:
		tmp = -1.0 * (b * (k * (y * y4)))
	elif y4 <= -1.18e+39:
		tmp = t * (y4 * ((b * j) - (c * y2)))
	elif y4 <= 1.2e-66:
		tmp = x * (y0 * ((c * y2) - (b * j)))
	else:
		tmp = c * (y4 * ((y * y3) - (t * y2)))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (y4 <= -2.05e+220)
		tmp = Float64(-1.0 * Float64(b * Float64(k * Float64(y * y4))));
	elseif (y4 <= -1.18e+39)
		tmp = Float64(t * Float64(y4 * Float64(Float64(b * j) - Float64(c * y2))));
	elseif (y4 <= 1.2e-66)
		tmp = Float64(x * Float64(y0 * Float64(Float64(c * y2) - Float64(b * j))));
	else
		tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (y4 <= -2.05e+220)
		tmp = -1.0 * (b * (k * (y * y4)));
	elseif (y4 <= -1.18e+39)
		tmp = t * (y4 * ((b * j) - (c * y2)));
	elseif (y4 <= 1.2e-66)
		tmp = x * (y0 * ((c * y2) - (b * j)));
	else
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y4, -20499999999999999049083573240839211087156710910556222747439268135562514181976610085419157159294980529101273476505457110097196150312921216106481682108319928000218574889744426725627686736648205031993476680596884037241405440], N[(-1 * N[(b * N[(k * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -1179999999999999962102276357894053036032], N[(t * N[(y4 * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 4553130216154053/3794275180128377091639574036764685364535950857523710002444946112771297432041422848], N[(x * N[(y0 * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -20499999999999999049083573240839211087156710910556222747439268135562514181976610085419157159294980529101273476505457110097196150312921216106481682108319928000218574889744426725627686736648205031993476680596884037241405440:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right)\\

\mathbf{elif}\;y4 \leq -1179999999999999962102276357894053036032:\\
\;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\

\mathbf{elif}\;y4 \leq \frac{4553130216154053}{3794275180128377091639574036764685364535950857523710002444946112771297432041422848}:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\

\mathbf{else}:\\
\;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y4 < -2.0499999999999999e220

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.6%

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in y around inf

      \[\leadsto -1 \cdot \left(b \cdot \color{blue}{\left(k \cdot \left(y \cdot y4\right)\right)}\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(b \cdot \left(k \cdot \color{blue}{\left(y \cdot y4\right)}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot \color{blue}{y4}\right)\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right) \]
      4. lower-*.f6417.1%

        \[\leadsto -1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right) \]
    10. Applied rewrites17.1%

      \[\leadsto -1 \cdot \left(b \cdot \color{blue}{\left(k \cdot \left(y \cdot y4\right)\right)}\right) \]

    if -2.0499999999999999e220 < y4 < -1.18e39

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.6%

      \[\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)} \]
    5. Taylor expanded in t around inf

      \[\leadsto t \cdot \color{blue}{\left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto t \cdot \left(y4 \cdot \color{blue}{\left(b \cdot j - c \cdot y2\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto t \cdot \left(y4 \cdot \left(b \cdot j - \color{blue}{c \cdot y2}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right) \]
      5. lower-*.f6427.1%

        \[\leadsto t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right) \]
    7. Applied rewrites27.1%

      \[\leadsto t \cdot \color{blue}{\left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)} \]

    if -1.18e39 < y4 < 1.2000000000000001e-66

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. 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-*.f6427.1%

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.1%

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]

    if 1.2000000000000001e-66 < y4

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.6%

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in c around inf

      \[\leadsto c \cdot \color{blue}{\left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \color{blue}{\left(y \cdot y3 - t \cdot y2\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - \color{blue}{t \cdot y2}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
      5. lower-*.f6426.9%

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
    10. Applied rewrites26.9%

      \[\leadsto c \cdot \color{blue}{\left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 23: 31.7% accurate, 5.6× speedup?

\[\begin{array}{l} \mathbf{if}\;y4 \leq -1149999999999999951775834087413247301497768081717526947674205383112736148189884013821227930090315158760150484918503898612399865856:\\ \;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\ \mathbf{elif}\;y4 \leq \frac{3695578824593377}{1119872371088902105278721140284222139060822748617324767449994550481895935590080472690438746635803557888}:\\ \;\;\;\;y0 \cdot \left(j \cdot \left(y3 \cdot y5 - b \cdot x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     y4
     -1149999999999999951775834087413247301497768081717526947674205383112736148189884013821227930090315158760150484918503898612399865856)
  (* b (* y4 (- (* j t) (* k y))))
  (if (<=
       y4
       3695578824593377/1119872371088902105278721140284222139060822748617324767449994550481895935590080472690438746635803557888)
    (* y0 (* j (- (* y3 y5) (* b x))))
    (* c (* y4 (- (* y y3) (* t y2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y4 <= -1.15e+129) {
		tmp = b * (y4 * ((j * t) - (k * y)));
	} else if (y4 <= 3.3e-87) {
		tmp = y0 * (j * ((y3 * y5) - (b * x)));
	} else {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (y4 <= (-1.15d+129)) then
        tmp = b * (y4 * ((j * t) - (k * y)))
    else if (y4 <= 3.3d-87) then
        tmp = y0 * (j * ((y3 * y5) - (b * x)))
    else
        tmp = c * (y4 * ((y * y3) - (t * y2)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y4 <= -1.15e+129) {
		tmp = b * (y4 * ((j * t) - (k * y)));
	} else if (y4 <= 3.3e-87) {
		tmp = y0 * (j * ((y3 * y5) - (b * x)));
	} else {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y4 <= -1.15e+129:
		tmp = b * (y4 * ((j * t) - (k * y)))
	elif y4 <= 3.3e-87:
		tmp = y0 * (j * ((y3 * y5) - (b * x)))
	else:
		tmp = c * (y4 * ((y * y3) - (t * y2)))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (y4 <= -1.15e+129)
		tmp = Float64(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y))));
	elseif (y4 <= 3.3e-87)
		tmp = Float64(y0 * Float64(j * Float64(Float64(y3 * y5) - Float64(b * x))));
	else
		tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (y4 <= -1.15e+129)
		tmp = b * (y4 * ((j * t) - (k * y)));
	elseif (y4 <= 3.3e-87)
		tmp = y0 * (j * ((y3 * y5) - (b * x)));
	else
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y4, -1149999999999999951775834087413247301497768081717526947674205383112736148189884013821227930090315158760150484918503898612399865856], N[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 3695578824593377/1119872371088902105278721140284222139060822748617324767449994550481895935590080472690438746635803557888], N[(y0 * N[(j * N[(N[(y3 * y5), $MachinePrecision] - N[(b * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -1149999999999999951775834087413247301497768081717526947674205383112736148189884013821227930090315158760150484918503898612399865856:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\

\mathbf{elif}\;y4 \leq \frac{3695578824593377}{1119872371088902105278721140284222139060822748617324767449994550481895935590080472690438746635803557888}:\\
\;\;\;\;y0 \cdot \left(j \cdot \left(y3 \cdot y5 - b \cdot x\right)\right)\\

\mathbf{else}:\\
\;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y4 < -1.15e129

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.6%

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in b around inf

      \[\leadsto b \cdot \color{blue}{\left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - \color{blue}{k \cdot y}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot \color{blue}{y}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      5. lower-*.f6427.3%

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
    10. Applied rewrites27.3%

      \[\leadsto b \cdot \color{blue}{\left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)} \]

    if -1.15e129 < y4 < 3.3e-87

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto y0 \cdot \left(x \cdot \color{blue}{\left(c \cdot y2 - b \cdot j\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - \color{blue}{b \cdot j}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot \color{blue}{j}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
      4. lower-*.f6427.5%

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.5%

      \[\leadsto y0 \cdot \left(x \cdot \color{blue}{\left(c \cdot y2 - b \cdot j\right)}\right) \]
    8. Taylor expanded in b around inf

      \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot \color{blue}{j}\right)\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
      2. lower-*.f6417.4%

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
    10. Applied rewrites17.4%

      \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot \color{blue}{j}\right)\right)\right) \]
    11. Taylor expanded in j around inf

      \[\leadsto y0 \cdot \left(j \cdot \color{blue}{\left(y3 \cdot y5 - b \cdot x\right)}\right) \]
    12. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(j \cdot \left(y3 \cdot y5 - \color{blue}{b \cdot x}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y0 \cdot \left(j \cdot \left(y3 \cdot y5 - b \cdot \color{blue}{x}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(j \cdot \left(y3 \cdot y5 - b \cdot x\right)\right) \]
      4. lower-*.f6427.1%

        \[\leadsto y0 \cdot \left(j \cdot \left(y3 \cdot y5 - b \cdot x\right)\right) \]
    13. Applied rewrites27.1%

      \[\leadsto y0 \cdot \left(j \cdot \color{blue}{\left(y3 \cdot y5 - b \cdot x\right)}\right) \]

    if 3.3e-87 < y4

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.6%

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in c around inf

      \[\leadsto c \cdot \color{blue}{\left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \color{blue}{\left(y \cdot y3 - t \cdot y2\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - \color{blue}{t \cdot y2}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
      5. lower-*.f6426.9%

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
    10. Applied rewrites26.9%

      \[\leadsto c \cdot \color{blue}{\left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 24: 31.4% accurate, 5.6× speedup?

\[\begin{array}{l} \mathbf{if}\;y4 \leq -580000000000000009442839750821744349527359899902853629817248546816:\\ \;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\ \mathbf{elif}\;y4 \leq \frac{4553130216154053}{3794275180128377091639574036764685364535950857523710002444946112771297432041422848}:\\ \;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     y4
     -580000000000000009442839750821744349527359899902853629817248546816)
  (* b (* y4 (- (* j t) (* k y))))
  (if (<=
       y4
       4553130216154053/3794275180128377091639574036764685364535950857523710002444946112771297432041422848)
    (* x (* y0 (- (* c y2) (* b j))))
    (* c (* y4 (- (* y y3) (* t y2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y4 <= -5.8e+65) {
		tmp = b * (y4 * ((j * t) - (k * y)));
	} else if (y4 <= 1.2e-66) {
		tmp = x * (y0 * ((c * y2) - (b * j)));
	} else {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (y4 <= (-5.8d+65)) then
        tmp = b * (y4 * ((j * t) - (k * y)))
    else if (y4 <= 1.2d-66) then
        tmp = x * (y0 * ((c * y2) - (b * j)))
    else
        tmp = c * (y4 * ((y * y3) - (t * y2)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y4 <= -5.8e+65) {
		tmp = b * (y4 * ((j * t) - (k * y)));
	} else if (y4 <= 1.2e-66) {
		tmp = x * (y0 * ((c * y2) - (b * j)));
	} else {
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y4 <= -5.8e+65:
		tmp = b * (y4 * ((j * t) - (k * y)))
	elif y4 <= 1.2e-66:
		tmp = x * (y0 * ((c * y2) - (b * j)))
	else:
		tmp = c * (y4 * ((y * y3) - (t * y2)))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (y4 <= -5.8e+65)
		tmp = Float64(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y))));
	elseif (y4 <= 1.2e-66)
		tmp = Float64(x * Float64(y0 * Float64(Float64(c * y2) - Float64(b * j))));
	else
		tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (y4 <= -5.8e+65)
		tmp = b * (y4 * ((j * t) - (k * y)));
	elseif (y4 <= 1.2e-66)
		tmp = x * (y0 * ((c * y2) - (b * j)));
	else
		tmp = c * (y4 * ((y * y3) - (t * y2)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y4, -580000000000000009442839750821744349527359899902853629817248546816], N[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 4553130216154053/3794275180128377091639574036764685364535950857523710002444946112771297432041422848], N[(x * N[(y0 * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -580000000000000009442839750821744349527359899902853629817248546816:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\

\mathbf{elif}\;y4 \leq \frac{4553130216154053}{3794275180128377091639574036764685364535950857523710002444946112771297432041422848}:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\

\mathbf{else}:\\
\;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y4 < -5.8000000000000001e65

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.6%

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in b around inf

      \[\leadsto b \cdot \color{blue}{\left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - \color{blue}{k \cdot y}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot \color{blue}{y}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      5. lower-*.f6427.3%

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
    10. Applied rewrites27.3%

      \[\leadsto b \cdot \color{blue}{\left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)} \]

    if -5.8000000000000001e65 < y4 < 1.2000000000000001e-66

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. 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-*.f6427.1%

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.1%

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]

    if 1.2000000000000001e-66 < y4

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.6%

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in c around inf

      \[\leadsto c \cdot \color{blue}{\left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \color{blue}{\left(y \cdot y3 - t \cdot y2\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - \color{blue}{t \cdot y2}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
      5. lower-*.f6426.9%

        \[\leadsto c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right) \]
    10. Applied rewrites26.9%

      \[\leadsto c \cdot \color{blue}{\left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 25: 31.2% accurate, 4.8× speedup?

\[\begin{array}{l} t_1 := b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\ \mathbf{if}\;y4 \leq -580000000000000009442839750821744349527359899902853629817248546816:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y4 \leq \frac{2630067950774187}{82189623461693336050640466920002010399224059419112091554660639110448939910891887845526039629337319550421608888377784651765928628909121935361372105791435638280550369861381946846744746216942542457363957058371584}:\\ \;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\ \mathbf{elif}\;y4 \leq 30000000000000000315349264840128417763036739601763302338988677653385608694709996861626870991629844457228044594473943904450756031504225012157388756575915313486815642971355216063894773098182757559232483502331158201806157277864180842496:\\ \;\;\;\;t \cdot \left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \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
       -580000000000000009442839750821744349527359899902853629817248546816)
    t_1
    (if (<=
         y4
         2630067950774187/82189623461693336050640466920002010399224059419112091554660639110448939910891887845526039629337319550421608888377784651765928628909121935361372105791435638280550369861381946846744746216942542457363957058371584)
      (* x (* y0 (- (* c y2) (* b j))))
      (if (<=
           y4
           30000000000000000315349264840128417763036739601763302338988677653385608694709996861626870991629844457228044594473943904450756031504225012157388756575915313486815642971355216063894773098182757559232483502331158201806157277864180842496)
        (* t (* y2 (- (* a y5) (* c 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 * (y4 * ((j * t) - (k * y)));
	double tmp;
	if (y4 <= -5.8e+65) {
		tmp = t_1;
	} else if (y4 <= 3.2e-194) {
		tmp = x * (y0 * ((c * y2) - (b * j)));
	} else if (y4 <= 3e+232) {
		tmp = t * (y2 * ((a * y5) - (c * 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 * (y4 * ((j * t) - (k * y)))
    if (y4 <= (-5.8d+65)) then
        tmp = t_1
    else if (y4 <= 3.2d-194) then
        tmp = x * (y0 * ((c * y2) - (b * j)))
    else if (y4 <= 3d+232) then
        tmp = t * (y2 * ((a * y5) - (c * 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 * (y4 * ((j * t) - (k * y)));
	double tmp;
	if (y4 <= -5.8e+65) {
		tmp = t_1;
	} else if (y4 <= 3.2e-194) {
		tmp = x * (y0 * ((c * y2) - (b * j)));
	} else if (y4 <= 3e+232) {
		tmp = t * (y2 * ((a * y5) - (c * 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 * (y4 * ((j * t) - (k * y)))
	tmp = 0
	if y4 <= -5.8e+65:
		tmp = t_1
	elif y4 <= 3.2e-194:
		tmp = x * (y0 * ((c * y2) - (b * j)))
	elif y4 <= 3e+232:
		tmp = t * (y2 * ((a * y5) - (c * 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(y4 * Float64(Float64(j * t) - Float64(k * y))))
	tmp = 0.0
	if (y4 <= -5.8e+65)
		tmp = t_1;
	elseif (y4 <= 3.2e-194)
		tmp = Float64(x * Float64(y0 * Float64(Float64(c * y2) - Float64(b * j))));
	elseif (y4 <= 3e+232)
		tmp = Float64(t * Float64(y2 * Float64(Float64(a * y5) - Float64(c * 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 * (y4 * ((j * t) - (k * y)));
	tmp = 0.0;
	if (y4 <= -5.8e+65)
		tmp = t_1;
	elseif (y4 <= 3.2e-194)
		tmp = x * (y0 * ((c * y2) - (b * j)));
	elseif (y4 <= 3e+232)
		tmp = t * (y2 * ((a * y5) - (c * 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[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -580000000000000009442839750821744349527359899902853629817248546816], t$95$1, If[LessEqual[y4, 2630067950774187/82189623461693336050640466920002010399224059419112091554660639110448939910891887845526039629337319550421608888377784651765928628909121935361372105791435638280550369861381946846744746216942542457363957058371584], N[(x * N[(y0 * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 30000000000000000315349264840128417763036739601763302338988677653385608694709996861626870991629844457228044594473943904450756031504225012157388756575915313486815642971355216063894773098182757559232483502331158201806157277864180842496], N[(t * N[(y2 * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\
\mathbf{if}\;y4 \leq -580000000000000009442839750821744349527359899902853629817248546816:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y4 \leq \frac{2630067950774187}{82189623461693336050640466920002010399224059419112091554660639110448939910891887845526039629337319550421608888377784651765928628909121935361372105791435638280550369861381946846744746216942542457363957058371584}:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\

\mathbf{elif}\;y4 \leq 30000000000000000315349264840128417763036739601763302338988677653385608694709996861626870991629844457228044594473943904450756031504225012157388756575915313486815642971355216063894773098182757559232483502331158201806157277864180842496:\\
\;\;\;\;t \cdot \left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y4 < -5.8000000000000001e65 or 3e232 < y4

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.6%

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in b around inf

      \[\leadsto b \cdot \color{blue}{\left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \color{blue}{\left(j \cdot t - k \cdot y\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - \color{blue}{k \cdot y}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot \color{blue}{y}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
      5. lower-*.f6427.3%

        \[\leadsto b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right) \]
    10. Applied rewrites27.3%

      \[\leadsto b \cdot \color{blue}{\left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)} \]

    if -5.8000000000000001e65 < y4 < 3.2000000000000003e-194

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. 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-*.f6427.1%

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.1%

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]

    if 3.2000000000000003e-194 < y4 < 3e232

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites37.0%

      \[\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)} \]
    5. Taylor expanded in t around inf

      \[\leadsto t \cdot \color{blue}{\left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto t \cdot \left(y2 \cdot \color{blue}{\left(a \cdot y5 - c \cdot y4\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto t \cdot \left(y2 \cdot \left(a \cdot y5 - \color{blue}{c \cdot y4}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto t \cdot \left(y2 \cdot \left(a \cdot y5 - c \cdot \color{blue}{y4}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto t \cdot \left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right) \]
      5. lower-*.f6427.0%

        \[\leadsto t \cdot \left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right) \]
    7. Applied rewrites27.0%

      \[\leadsto t \cdot \color{blue}{\left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 26: 28.5% accurate, 5.6× speedup?

\[\begin{array}{l} \mathbf{if}\;y4 \leq -95000000000000001526752063214666332730830973890337443108643037127901184:\\ \;\;\;\;k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot y4\right)\right)\right)\\ \mathbf{elif}\;y4 \leq \frac{2630067950774187}{82189623461693336050640466920002010399224059419112091554660639110448939910891887845526039629337319550421608888377784651765928628909121935361372105791435638280550369861381946846744746216942542457363957058371584}:\\ \;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     y4
     -95000000000000001526752063214666332730830973890337443108643037127901184)
  (* k (* -1 (* b (* y y4))))
  (if (<=
       y4
       2630067950774187/82189623461693336050640466920002010399224059419112091554660639110448939910891887845526039629337319550421608888377784651765928628909121935361372105791435638280550369861381946846744746216942542457363957058371584)
    (* x (* y0 (- (* c y2) (* b j))))
    (* t (* y2 (- (* a y5) (* c 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 (y4 <= -9.5e+70) {
		tmp = k * (-1.0 * (b * (y * y4)));
	} else if (y4 <= 3.2e-194) {
		tmp = x * (y0 * ((c * y2) - (b * j)));
	} else {
		tmp = t * (y2 * ((a * y5) - (c * 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 (y4 <= (-9.5d+70)) then
        tmp = k * ((-1.0d0) * (b * (y * y4)))
    else if (y4 <= 3.2d-194) then
        tmp = x * (y0 * ((c * y2) - (b * j)))
    else
        tmp = t * (y2 * ((a * y5) - (c * 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 (y4 <= -9.5e+70) {
		tmp = k * (-1.0 * (b * (y * y4)));
	} else if (y4 <= 3.2e-194) {
		tmp = x * (y0 * ((c * y2) - (b * j)));
	} else {
		tmp = t * (y2 * ((a * y5) - (c * y4)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y4 <= -9.5e+70:
		tmp = k * (-1.0 * (b * (y * y4)))
	elif y4 <= 3.2e-194:
		tmp = x * (y0 * ((c * y2) - (b * j)))
	else:
		tmp = t * (y2 * ((a * y5) - (c * 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 (y4 <= -9.5e+70)
		tmp = Float64(k * Float64(-1.0 * Float64(b * Float64(y * y4))));
	elseif (y4 <= 3.2e-194)
		tmp = Float64(x * Float64(y0 * Float64(Float64(c * y2) - Float64(b * j))));
	else
		tmp = Float64(t * Float64(y2 * Float64(Float64(a * y5) - Float64(c * 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 (y4 <= -9.5e+70)
		tmp = k * (-1.0 * (b * (y * y4)));
	elseif (y4 <= 3.2e-194)
		tmp = x * (y0 * ((c * y2) - (b * j)));
	else
		tmp = t * (y2 * ((a * y5) - (c * y4)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y4, -95000000000000001526752063214666332730830973890337443108643037127901184], N[(k * N[(-1 * N[(b * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 2630067950774187/82189623461693336050640466920002010399224059419112091554660639110448939910891887845526039629337319550421608888377784651765928628909121935361372105791435638280550369861381946846744746216942542457363957058371584], N[(x * N[(y0 * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(y2 * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -95000000000000001526752063214666332730830973890337443108643037127901184:\\
\;\;\;\;k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot y4\right)\right)\right)\\

\mathbf{elif}\;y4 \leq \frac{2630067950774187}{82189623461693336050640466920002010399224059419112091554660639110448939910891887845526039629337319550421608888377784651765928628909121935361372105791435638280550369861381946846744746216942542457363957058371584}:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t \cdot \left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y4 < -9.5000000000000002e70

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.6%

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in y around inf

      \[\leadsto k \cdot \left(-1 \cdot \left(b \cdot \color{blue}{\left(y \cdot y4\right)}\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot \color{blue}{y4}\right)\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot y4\right)\right)\right) \]
      3. lower-*.f6417.0%

        \[\leadsto k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot y4\right)\right)\right) \]
    10. Applied rewrites17.0%

      \[\leadsto k \cdot \left(-1 \cdot \left(b \cdot \color{blue}{\left(y \cdot y4\right)}\right)\right) \]

    if -9.5000000000000002e70 < y4 < 3.2000000000000003e-194

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. 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-*.f6427.1%

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.1%

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]

    if 3.2000000000000003e-194 < y4

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites37.0%

      \[\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)} \]
    5. Taylor expanded in t around inf

      \[\leadsto t \cdot \color{blue}{\left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto t \cdot \left(y2 \cdot \color{blue}{\left(a \cdot y5 - c \cdot y4\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto t \cdot \left(y2 \cdot \left(a \cdot y5 - \color{blue}{c \cdot y4}\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto t \cdot \left(y2 \cdot \left(a \cdot y5 - c \cdot \color{blue}{y4}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto t \cdot \left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right) \]
      5. lower-*.f6427.0%

        \[\leadsto t \cdot \left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right) \]
    7. Applied rewrites27.0%

      \[\leadsto t \cdot \color{blue}{\left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 27: 28.3% accurate, 5.6× speedup?

\[\begin{array}{l} \mathbf{if}\;y4 \leq -95000000000000001526752063214666332730830973890337443108643037127901184:\\ \;\;\;\;k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot y4\right)\right)\right)\\ \mathbf{elif}\;y4 \leq 4399999999999999812191971297156271594590950482519112105257629592585322063275105077772926140689872180106556195504042161244909692138580105756647936653603739411261668424494602659154624512:\\ \;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y2 \cdot \left(y4 \cdot \left(-1 \cdot \left(c \cdot t\right)\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     y4
     -95000000000000001526752063214666332730830973890337443108643037127901184)
  (* k (* -1 (* b (* y y4))))
  (if (<=
       y4
       4399999999999999812191971297156271594590950482519112105257629592585322063275105077772926140689872180106556195504042161244909692138580105756647936653603739411261668424494602659154624512)
    (* x (* y0 (- (* c y2) (* b j))))
    (* y2 (* y4 (* -1 (* c t)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y4 <= -9.5e+70) {
		tmp = k * (-1.0 * (b * (y * y4)));
	} else if (y4 <= 4.4e+183) {
		tmp = x * (y0 * ((c * y2) - (b * j)));
	} else {
		tmp = y2 * (y4 * (-1.0 * (c * 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 (y4 <= (-9.5d+70)) then
        tmp = k * ((-1.0d0) * (b * (y * y4)))
    else if (y4 <= 4.4d+183) then
        tmp = x * (y0 * ((c * y2) - (b * j)))
    else
        tmp = y2 * (y4 * ((-1.0d0) * (c * 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 (y4 <= -9.5e+70) {
		tmp = k * (-1.0 * (b * (y * y4)));
	} else if (y4 <= 4.4e+183) {
		tmp = x * (y0 * ((c * y2) - (b * j)));
	} else {
		tmp = y2 * (y4 * (-1.0 * (c * t)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y4 <= -9.5e+70:
		tmp = k * (-1.0 * (b * (y * y4)))
	elif y4 <= 4.4e+183:
		tmp = x * (y0 * ((c * y2) - (b * j)))
	else:
		tmp = y2 * (y4 * (-1.0 * (c * 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 (y4 <= -9.5e+70)
		tmp = Float64(k * Float64(-1.0 * Float64(b * Float64(y * y4))));
	elseif (y4 <= 4.4e+183)
		tmp = Float64(x * Float64(y0 * Float64(Float64(c * y2) - Float64(b * j))));
	else
		tmp = Float64(y2 * Float64(y4 * Float64(-1.0 * Float64(c * 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 (y4 <= -9.5e+70)
		tmp = k * (-1.0 * (b * (y * y4)));
	elseif (y4 <= 4.4e+183)
		tmp = x * (y0 * ((c * y2) - (b * j)));
	else
		tmp = y2 * (y4 * (-1.0 * (c * 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[y4, -95000000000000001526752063214666332730830973890337443108643037127901184], N[(k * N[(-1 * N[(b * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 4399999999999999812191971297156271594590950482519112105257629592585322063275105077772926140689872180106556195504042161244909692138580105756647936653603739411261668424494602659154624512], N[(x * N[(y0 * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y2 * N[(y4 * N[(-1 * N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -95000000000000001526752063214666332730830973890337443108643037127901184:\\
\;\;\;\;k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot y4\right)\right)\right)\\

\mathbf{elif}\;y4 \leq 4399999999999999812191971297156271594590950482519112105257629592585322063275105077772926140689872180106556195504042161244909692138580105756647936653603739411261668424494602659154624512:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(-1 \cdot \left(c \cdot t\right)\right)\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y4 < -9.5000000000000002e70

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.6%

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in y around inf

      \[\leadsto k \cdot \left(-1 \cdot \left(b \cdot \color{blue}{\left(y \cdot y4\right)}\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot \color{blue}{y4}\right)\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot y4\right)\right)\right) \]
      3. lower-*.f6417.0%

        \[\leadsto k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot y4\right)\right)\right) \]
    10. Applied rewrites17.0%

      \[\leadsto k \cdot \left(-1 \cdot \left(b \cdot \color{blue}{\left(y \cdot y4\right)}\right)\right) \]

    if -9.5000000000000002e70 < y4 < 4.3999999999999998e183

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. 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-*.f6427.1%

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.1%

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]

    if 4.3999999999999998e183 < y4

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites37.0%

      \[\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)} \]
    5. Taylor expanded in y4 around inf

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - \color{blue}{c \cdot t}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot \color{blue}{t}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
      4. lower-*.f6426.9%

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    8. Taylor expanded in t around inf

      \[\leadsto y2 \cdot \left(y4 \cdot \left(-1 \cdot \left(c \cdot \color{blue}{t}\right)\right)\right) \]
    9. 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. lower-*.f6417.6%

        \[\leadsto y2 \cdot \left(y4 \cdot \left(-1 \cdot \left(c \cdot t\right)\right)\right) \]
    10. Applied rewrites17.6%

      \[\leadsto y2 \cdot \left(y4 \cdot \left(-1 \cdot \left(c \cdot \color{blue}{t}\right)\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 28: 22.2% accurate, 5.2× speedup?

\[\begin{array}{l} \mathbf{if}\;y4 \leq -10500000000000000230162227660561077800556645328328581521460011546410713612135706429682960169738198235282059140669007091738867696479459408399894400379505191930471048755925787343585935892606024740416562135040:\\ \;\;\;\;-1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right)\\ \mathbf{elif}\;y4 \leq -359999999999999983222784:\\ \;\;\;\;y2 \cdot \left(-1 \cdot \left(c \cdot \left(t \cdot y4\right)\right)\right)\\ \mathbf{elif}\;y4 \leq 105999999999999992687947972006489862327633718848898179017571538741048351473747877828557191622418791320768886340008516950497320117433408019534154826824186436765698985418219486365876224:\\ \;\;\;\;y0 \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot x\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y2 \cdot \left(y4 \cdot \left(-1 \cdot \left(c \cdot t\right)\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     y4
     -10500000000000000230162227660561077800556645328328581521460011546410713612135706429682960169738198235282059140669007091738867696479459408399894400379505191930471048755925787343585935892606024740416562135040)
  (* -1 (* b (* k (* y y4))))
  (if (<= y4 -359999999999999983222784)
    (* y2 (* -1 (* c (* t y4))))
    (if (<=
         y4
         105999999999999992687947972006489862327633718848898179017571538741048351473747877828557191622418791320768886340008516950497320117433408019534154826824186436765698985418219486365876224)
      (* y0 (* -1 (* b (* j x))))
      (* y2 (* y4 (* -1 (* c t))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (y4 <= -1.05e+205) {
		tmp = -1.0 * (b * (k * (y * y4)));
	} else if (y4 <= -3.6e+23) {
		tmp = y2 * (-1.0 * (c * (t * y4)));
	} else if (y4 <= 1.06e+182) {
		tmp = y0 * (-1.0 * (b * (j * x)));
	} else {
		tmp = y2 * (y4 * (-1.0 * (c * 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 (y4 <= (-1.05d+205)) then
        tmp = (-1.0d0) * (b * (k * (y * y4)))
    else if (y4 <= (-3.6d+23)) then
        tmp = y2 * ((-1.0d0) * (c * (t * y4)))
    else if (y4 <= 1.06d+182) then
        tmp = y0 * ((-1.0d0) * (b * (j * x)))
    else
        tmp = y2 * (y4 * ((-1.0d0) * (c * 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 (y4 <= -1.05e+205) {
		tmp = -1.0 * (b * (k * (y * y4)));
	} else if (y4 <= -3.6e+23) {
		tmp = y2 * (-1.0 * (c * (t * y4)));
	} else if (y4 <= 1.06e+182) {
		tmp = y0 * (-1.0 * (b * (j * x)));
	} else {
		tmp = y2 * (y4 * (-1.0 * (c * t)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y4 <= -1.05e+205:
		tmp = -1.0 * (b * (k * (y * y4)))
	elif y4 <= -3.6e+23:
		tmp = y2 * (-1.0 * (c * (t * y4)))
	elif y4 <= 1.06e+182:
		tmp = y0 * (-1.0 * (b * (j * x)))
	else:
		tmp = y2 * (y4 * (-1.0 * (c * 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 (y4 <= -1.05e+205)
		tmp = Float64(-1.0 * Float64(b * Float64(k * Float64(y * y4))));
	elseif (y4 <= -3.6e+23)
		tmp = Float64(y2 * Float64(-1.0 * Float64(c * Float64(t * y4))));
	elseif (y4 <= 1.06e+182)
		tmp = Float64(y0 * Float64(-1.0 * Float64(b * Float64(j * x))));
	else
		tmp = Float64(y2 * Float64(y4 * Float64(-1.0 * Float64(c * 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 (y4 <= -1.05e+205)
		tmp = -1.0 * (b * (k * (y * y4)));
	elseif (y4 <= -3.6e+23)
		tmp = y2 * (-1.0 * (c * (t * y4)));
	elseif (y4 <= 1.06e+182)
		tmp = y0 * (-1.0 * (b * (j * x)));
	else
		tmp = y2 * (y4 * (-1.0 * (c * 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[y4, -10500000000000000230162227660561077800556645328328581521460011546410713612135706429682960169738198235282059140669007091738867696479459408399894400379505191930471048755925787343585935892606024740416562135040], N[(-1 * N[(b * N[(k * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -359999999999999983222784], N[(y2 * N[(-1 * N[(c * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 105999999999999992687947972006489862327633718848898179017571538741048351473747877828557191622418791320768886340008516950497320117433408019534154826824186436765698985418219486365876224], N[(y0 * N[(-1 * N[(b * N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y2 * N[(y4 * N[(-1 * N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -10500000000000000230162227660561077800556645328328581521460011546410713612135706429682960169738198235282059140669007091738867696479459408399894400379505191930471048755925787343585935892606024740416562135040:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right)\\

\mathbf{elif}\;y4 \leq -359999999999999983222784:\\
\;\;\;\;y2 \cdot \left(-1 \cdot \left(c \cdot \left(t \cdot y4\right)\right)\right)\\

\mathbf{elif}\;y4 \leq 105999999999999992687947972006489862327633718848898179017571538741048351473747877828557191622418791320768886340008516950497320117433408019534154826824186436765698985418219486365876224:\\
\;\;\;\;y0 \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot x\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(-1 \cdot \left(c \cdot t\right)\right)\right)\\


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y4 < -1.05e205

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.6%

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in y around inf

      \[\leadsto -1 \cdot \left(b \cdot \color{blue}{\left(k \cdot \left(y \cdot y4\right)\right)}\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(b \cdot \left(k \cdot \color{blue}{\left(y \cdot y4\right)}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot \color{blue}{y4}\right)\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right) \]
      4. lower-*.f6417.1%

        \[\leadsto -1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right) \]
    10. Applied rewrites17.1%

      \[\leadsto -1 \cdot \left(b \cdot \color{blue}{\left(k \cdot \left(y \cdot y4\right)\right)}\right) \]

    if -1.05e205 < y4 < -3.5999999999999998e23

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites37.0%

      \[\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)} \]
    5. Taylor expanded in y4 around inf

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - \color{blue}{c \cdot t}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot \color{blue}{t}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
      4. lower-*.f6426.9%

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    8. Taylor expanded in t around inf

      \[\leadsto y2 \cdot \left(-1 \cdot \left(c \cdot \color{blue}{\left(t \cdot y4\right)}\right)\right) \]
    9. 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-*.f6417.6%

        \[\leadsto y2 \cdot \left(-1 \cdot \left(c \cdot \left(t \cdot y4\right)\right)\right) \]
    10. Applied rewrites17.6%

      \[\leadsto y2 \cdot \left(-1 \cdot \left(c \cdot \color{blue}{\left(t \cdot y4\right)}\right)\right) \]

    if -3.5999999999999998e23 < y4 < 1.0599999999999999e182

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto y0 \cdot \left(x \cdot \color{blue}{\left(c \cdot y2 - b \cdot j\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - \color{blue}{b \cdot j}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot \color{blue}{j}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
      4. lower-*.f6427.5%

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.5%

      \[\leadsto y0 \cdot \left(x \cdot \color{blue}{\left(c \cdot y2 - b \cdot j\right)}\right) \]
    8. Taylor expanded in b around inf

      \[\leadsto y0 \cdot \left(-1 \cdot \left(b \cdot \color{blue}{\left(j \cdot x\right)}\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot \color{blue}{x}\right)\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot x\right)\right)\right) \]
      3. lower-*.f6417.2%

        \[\leadsto y0 \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot x\right)\right)\right) \]
    10. Applied rewrites17.2%

      \[\leadsto y0 \cdot \left(-1 \cdot \left(b \cdot \color{blue}{\left(j \cdot x\right)}\right)\right) \]

    if 1.0599999999999999e182 < y4

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites37.0%

      \[\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)} \]
    5. Taylor expanded in y4 around inf

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - \color{blue}{c \cdot t}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot \color{blue}{t}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
      4. lower-*.f6426.9%

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    8. Taylor expanded in t around inf

      \[\leadsto y2 \cdot \left(y4 \cdot \left(-1 \cdot \left(c \cdot \color{blue}{t}\right)\right)\right) \]
    9. 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. lower-*.f6417.6%

        \[\leadsto y2 \cdot \left(y4 \cdot \left(-1 \cdot \left(c \cdot t\right)\right)\right) \]
    10. Applied rewrites17.6%

      \[\leadsto y2 \cdot \left(y4 \cdot \left(-1 \cdot \left(c \cdot \color{blue}{t}\right)\right)\right) \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 29: 22.1% accurate, 5.2× speedup?

\[\begin{array}{l} t_1 := y2 \cdot \left(-1 \cdot \left(c \cdot \left(t \cdot y4\right)\right)\right)\\ \mathbf{if}\;y4 \leq -10500000000000000230162227660561077800556645328328581521460011546410713612135706429682960169738198235282059140669007091738867696479459408399894400379505191930471048755925787343585935892606024740416562135040:\\ \;\;\;\;-1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right)\\ \mathbf{elif}\;y4 \leq -359999999999999983222784:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y4 \leq 105999999999999992687947972006489862327633718848898179017571538741048351473747877828557191622418791320768886340008516950497320117433408019534154826824186436765698985418219486365876224:\\ \;\;\;\;y0 \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot x\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (let* ((t_1 (* y2 (* -1 (* c (* t y4))))))
  (if (<=
       y4
       -10500000000000000230162227660561077800556645328328581521460011546410713612135706429682960169738198235282059140669007091738867696479459408399894400379505191930471048755925787343585935892606024740416562135040)
    (* -1 (* b (* k (* y y4))))
    (if (<= y4 -359999999999999983222784)
      t_1
      (if (<=
           y4
           105999999999999992687947972006489862327633718848898179017571538741048351473747877828557191622418791320768886340008516950497320117433408019534154826824186436765698985418219486365876224)
        (* y0 (* -1 (* b (* j x))))
        t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y2 * (-1.0 * (c * (t * y4)));
	double tmp;
	if (y4 <= -1.05e+205) {
		tmp = -1.0 * (b * (k * (y * y4)));
	} else if (y4 <= -3.6e+23) {
		tmp = t_1;
	} else if (y4 <= 1.06e+182) {
		tmp = y0 * (-1.0 * (b * (j * x)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y2 * ((-1.0d0) * (c * (t * y4)))
    if (y4 <= (-1.05d+205)) then
        tmp = (-1.0d0) * (b * (k * (y * y4)))
    else if (y4 <= (-3.6d+23)) then
        tmp = t_1
    else if (y4 <= 1.06d+182) then
        tmp = y0 * ((-1.0d0) * (b * (j * x)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double t_1 = y2 * (-1.0 * (c * (t * y4)));
	double tmp;
	if (y4 <= -1.05e+205) {
		tmp = -1.0 * (b * (k * (y * y4)));
	} else if (y4 <= -3.6e+23) {
		tmp = t_1;
	} else if (y4 <= 1.06e+182) {
		tmp = y0 * (-1.0 * (b * (j * x)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	t_1 = y2 * (-1.0 * (c * (t * y4)))
	tmp = 0
	if y4 <= -1.05e+205:
		tmp = -1.0 * (b * (k * (y * y4)))
	elif y4 <= -3.6e+23:
		tmp = t_1
	elif y4 <= 1.06e+182:
		tmp = y0 * (-1.0 * (b * (j * x)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = Float64(y2 * Float64(-1.0 * Float64(c * Float64(t * y4))))
	tmp = 0.0
	if (y4 <= -1.05e+205)
		tmp = Float64(-1.0 * Float64(b * Float64(k * Float64(y * y4))));
	elseif (y4 <= -3.6e+23)
		tmp = t_1;
	elseif (y4 <= 1.06e+182)
		tmp = Float64(y0 * Float64(-1.0 * Float64(b * Float64(j * x))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	t_1 = y2 * (-1.0 * (c * (t * y4)));
	tmp = 0.0;
	if (y4 <= -1.05e+205)
		tmp = -1.0 * (b * (k * (y * y4)));
	elseif (y4 <= -3.6e+23)
		tmp = t_1;
	elseif (y4 <= 1.06e+182)
		tmp = y0 * (-1.0 * (b * (j * x)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y2 * N[(-1 * N[(c * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -10500000000000000230162227660561077800556645328328581521460011546410713612135706429682960169738198235282059140669007091738867696479459408399894400379505191930471048755925787343585935892606024740416562135040], N[(-1 * N[(b * N[(k * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -359999999999999983222784], t$95$1, If[LessEqual[y4, 105999999999999992687947972006489862327633718848898179017571538741048351473747877828557191622418791320768886340008516950497320117433408019534154826824186436765698985418219486365876224], N[(y0 * N[(-1 * N[(b * N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := y2 \cdot \left(-1 \cdot \left(c \cdot \left(t \cdot y4\right)\right)\right)\\
\mathbf{if}\;y4 \leq -10500000000000000230162227660561077800556645328328581521460011546410713612135706429682960169738198235282059140669007091738867696479459408399894400379505191930471048755925787343585935892606024740416562135040:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right)\\

\mathbf{elif}\;y4 \leq -359999999999999983222784:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y4 \leq 105999999999999992687947972006489862327633718848898179017571538741048351473747877828557191622418791320768886340008516950497320117433408019534154826824186436765698985418219486365876224:\\
\;\;\;\;y0 \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot x\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y4 < -1.05e205

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.6%

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in y around inf

      \[\leadsto -1 \cdot \left(b \cdot \color{blue}{\left(k \cdot \left(y \cdot y4\right)\right)}\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(b \cdot \left(k \cdot \color{blue}{\left(y \cdot y4\right)}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot \color{blue}{y4}\right)\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right) \]
      4. lower-*.f6417.1%

        \[\leadsto -1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right) \]
    10. Applied rewrites17.1%

      \[\leadsto -1 \cdot \left(b \cdot \color{blue}{\left(k \cdot \left(y \cdot y4\right)\right)}\right) \]

    if -1.05e205 < y4 < -3.5999999999999998e23 or 1.0599999999999999e182 < y4

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites37.0%

      \[\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)} \]
    5. Taylor expanded in y4 around inf

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - \color{blue}{c \cdot t}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot \color{blue}{t}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
      4. lower-*.f6426.9%

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    8. Taylor expanded in t around inf

      \[\leadsto y2 \cdot \left(-1 \cdot \left(c \cdot \color{blue}{\left(t \cdot y4\right)}\right)\right) \]
    9. 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-*.f6417.6%

        \[\leadsto y2 \cdot \left(-1 \cdot \left(c \cdot \left(t \cdot y4\right)\right)\right) \]
    10. Applied rewrites17.6%

      \[\leadsto y2 \cdot \left(-1 \cdot \left(c \cdot \color{blue}{\left(t \cdot y4\right)}\right)\right) \]

    if -3.5999999999999998e23 < y4 < 1.0599999999999999e182

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto y0 \cdot \left(x \cdot \color{blue}{\left(c \cdot y2 - b \cdot j\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - \color{blue}{b \cdot j}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot \color{blue}{j}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
      4. lower-*.f6427.5%

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.5%

      \[\leadsto y0 \cdot \left(x \cdot \color{blue}{\left(c \cdot y2 - b \cdot j\right)}\right) \]
    8. Taylor expanded in b around inf

      \[\leadsto y0 \cdot \left(-1 \cdot \left(b \cdot \color{blue}{\left(j \cdot x\right)}\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot \color{blue}{x}\right)\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot x\right)\right)\right) \]
      3. lower-*.f6417.2%

        \[\leadsto y0 \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot x\right)\right)\right) \]
    10. Applied rewrites17.2%

      \[\leadsto y0 \cdot \left(-1 \cdot \left(b \cdot \color{blue}{\left(j \cdot x\right)}\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 30: 22.1% accurate, 6.1× speedup?

\[\begin{array}{l} \mathbf{if}\;y4 \leq -59999999999999995156912937696420957419420301676936215618657876227129344:\\ \;\;\;\;k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot y4\right)\right)\right)\\ \mathbf{elif}\;y4 \leq 1850000000000000086213126020982953562417360610123142591667462306089241519987624615538466820102682770192216411087794395738618713790384491872370636589523266841665691372045950613716992:\\ \;\;\;\;y0 \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot x\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     y4
     -59999999999999995156912937696420957419420301676936215618657876227129344)
  (* k (* -1 (* b (* y y4))))
  (if (<=
       y4
       1850000000000000086213126020982953562417360610123142591667462306089241519987624615538466820102682770192216411087794395738618713790384491872370636589523266841665691372045950613716992)
    (* y0 (* -1 (* b (* j x))))
    (* y2 (* y4 (* 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 (y4 <= -6e+70) {
		tmp = k * (-1.0 * (b * (y * y4)));
	} else if (y4 <= 1.85e+180) {
		tmp = y0 * (-1.0 * (b * (j * x)));
	} else {
		tmp = y2 * (y4 * (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 (y4 <= (-6d+70)) then
        tmp = k * ((-1.0d0) * (b * (y * y4)))
    else if (y4 <= 1.85d+180) then
        tmp = y0 * ((-1.0d0) * (b * (j * x)))
    else
        tmp = y2 * (y4 * (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 (y4 <= -6e+70) {
		tmp = k * (-1.0 * (b * (y * y4)));
	} else if (y4 <= 1.85e+180) {
		tmp = y0 * (-1.0 * (b * (j * x)));
	} else {
		tmp = y2 * (y4 * (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 y4 <= -6e+70:
		tmp = k * (-1.0 * (b * (y * y4)))
	elif y4 <= 1.85e+180:
		tmp = y0 * (-1.0 * (b * (j * x)))
	else:
		tmp = y2 * (y4 * (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 (y4 <= -6e+70)
		tmp = Float64(k * Float64(-1.0 * Float64(b * Float64(y * y4))));
	elseif (y4 <= 1.85e+180)
		tmp = Float64(y0 * Float64(-1.0 * Float64(b * Float64(j * x))));
	else
		tmp = Float64(y2 * Float64(y4 * 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 (y4 <= -6e+70)
		tmp = k * (-1.0 * (b * (y * y4)));
	elseif (y4 <= 1.85e+180)
		tmp = y0 * (-1.0 * (b * (j * x)));
	else
		tmp = y2 * (y4 * (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[y4, -59999999999999995156912937696420957419420301676936215618657876227129344], N[(k * N[(-1 * N[(b * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 1850000000000000086213126020982953562417360610123142591667462306089241519987624615538466820102682770192216411087794395738618713790384491872370636589523266841665691372045950613716992], N[(y0 * N[(-1 * N[(b * N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y2 * N[(y4 * N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -59999999999999995156912937696420957419420301676936215618657876227129344:\\
\;\;\;\;k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot y4\right)\right)\right)\\

\mathbf{elif}\;y4 \leq 1850000000000000086213126020982953562417360610123142591667462306089241519987624615538466820102682770192216411087794395738618713790384491872370636589523266841665691372045950613716992:\\
\;\;\;\;y0 \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot x\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y4 < -5.9999999999999995e70

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.6%

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in y around inf

      \[\leadsto k \cdot \left(-1 \cdot \left(b \cdot \color{blue}{\left(y \cdot y4\right)}\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot \color{blue}{y4}\right)\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot y4\right)\right)\right) \]
      3. lower-*.f6417.0%

        \[\leadsto k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot y4\right)\right)\right) \]
    10. Applied rewrites17.0%

      \[\leadsto k \cdot \left(-1 \cdot \left(b \cdot \color{blue}{\left(y \cdot y4\right)}\right)\right) \]

    if -5.9999999999999995e70 < y4 < 1.8500000000000001e180

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto y0 \cdot \left(x \cdot \color{blue}{\left(c \cdot y2 - b \cdot j\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - \color{blue}{b \cdot j}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot \color{blue}{j}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
      4. lower-*.f6427.5%

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.5%

      \[\leadsto y0 \cdot \left(x \cdot \color{blue}{\left(c \cdot y2 - b \cdot j\right)}\right) \]
    8. Taylor expanded in b around inf

      \[\leadsto y0 \cdot \left(-1 \cdot \left(b \cdot \color{blue}{\left(j \cdot x\right)}\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot \color{blue}{x}\right)\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot x\right)\right)\right) \]
      3. lower-*.f6417.2%

        \[\leadsto y0 \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot x\right)\right)\right) \]
    10. Applied rewrites17.2%

      \[\leadsto y0 \cdot \left(-1 \cdot \left(b \cdot \color{blue}{\left(j \cdot x\right)}\right)\right) \]

    if 1.8500000000000001e180 < y4

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites37.0%

      \[\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)} \]
    5. Taylor expanded in y4 around inf

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - \color{blue}{c \cdot t}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot \color{blue}{t}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
      4. lower-*.f6426.9%

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    8. Taylor expanded in t around 0

      \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f6416.8%

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right) \]
    10. Applied rewrites16.8%

      \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 31: 21.7% accurate, 5.6× speedup?

\[\begin{array}{l} \mathbf{if}\;b \leq -101999999999999994211605678262383332680468213278501237048897552095448954825144283129551018746232818586615808:\\ \;\;\;\;x \cdot \left(y0 \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right)\\ \mathbf{elif}\;b \leq \frac{-872305872233851}{41538374868278621028243970633760768}:\\ \;\;\;\;\left(y0 \cdot x\right) \cdot \left(y2 \cdot c\right)\\ \mathbf{elif}\;b \leq 5000000000000000367879369238556249198788031076088728399622928950675879571901095101025339828076544:\\ \;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(-b\right) \cdot j\right) \cdot x\right) \cdot y0\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     b
     -101999999999999994211605678262383332680468213278501237048897552095448954825144283129551018746232818586615808)
  (* x (* y0 (* -1 (* b j))))
  (if (<= b -872305872233851/41538374868278621028243970633760768)
    (* (* y0 x) (* y2 c))
    (if (<=
         b
         5000000000000000367879369238556249198788031076088728399622928950675879571901095101025339828076544)
      (* y2 (* k (* y1 y4)))
      (* (* (* (- b) j) x) 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) {
	double tmp;
	if (b <= -1.02e+107) {
		tmp = x * (y0 * (-1.0 * (b * j)));
	} else if (b <= -2.1e-20) {
		tmp = (y0 * x) * (y2 * c);
	} else if (b <= 5e+96) {
		tmp = y2 * (k * (y1 * y4));
	} else {
		tmp = ((-b * j) * x) * y0;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (b <= (-1.02d+107)) then
        tmp = x * (y0 * ((-1.0d0) * (b * j)))
    else if (b <= (-2.1d-20)) then
        tmp = (y0 * x) * (y2 * c)
    else if (b <= 5d+96) then
        tmp = y2 * (k * (y1 * y4))
    else
        tmp = ((-b * j) * x) * y0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (b <= -1.02e+107) {
		tmp = x * (y0 * (-1.0 * (b * j)));
	} else if (b <= -2.1e-20) {
		tmp = (y0 * x) * (y2 * c);
	} else if (b <= 5e+96) {
		tmp = y2 * (k * (y1 * y4));
	} else {
		tmp = ((-b * j) * x) * y0;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if b <= -1.02e+107:
		tmp = x * (y0 * (-1.0 * (b * j)))
	elif b <= -2.1e-20:
		tmp = (y0 * x) * (y2 * c)
	elif b <= 5e+96:
		tmp = y2 * (k * (y1 * y4))
	else:
		tmp = ((-b * j) * x) * y0
	return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0
	if (b <= -1.02e+107)
		tmp = Float64(x * Float64(y0 * Float64(-1.0 * Float64(b * j))));
	elseif (b <= -2.1e-20)
		tmp = Float64(Float64(y0 * x) * Float64(y2 * c));
	elseif (b <= 5e+96)
		tmp = Float64(y2 * Float64(k * Float64(y1 * y4)));
	else
		tmp = Float64(Float64(Float64(Float64(-b) * j) * x) * y0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (b <= -1.02e+107)
		tmp = x * (y0 * (-1.0 * (b * j)));
	elseif (b <= -2.1e-20)
		tmp = (y0 * x) * (y2 * c);
	elseif (b <= 5e+96)
		tmp = y2 * (k * (y1 * y4));
	else
		tmp = ((-b * j) * x) * y0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[b, -101999999999999994211605678262383332680468213278501237048897552095448954825144283129551018746232818586615808], N[(x * N[(y0 * N[(-1 * N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -872305872233851/41538374868278621028243970633760768], N[(N[(y0 * x), $MachinePrecision] * N[(y2 * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5000000000000000367879369238556249198788031076088728399622928950675879571901095101025339828076544], N[(y2 * N[(k * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[((-b) * j), $MachinePrecision] * x), $MachinePrecision] * y0), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;b \leq -101999999999999994211605678262383332680468213278501237048897552095448954825144283129551018746232818586615808:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right)\\

\mathbf{elif}\;b \leq \frac{-872305872233851}{41538374868278621028243970633760768}:\\
\;\;\;\;\left(y0 \cdot x\right) \cdot \left(y2 \cdot c\right)\\

\mathbf{elif}\;b \leq 5000000000000000367879369238556249198788031076088728399622928950675879571901095101025339828076544:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(\left(-b\right) \cdot j\right) \cdot x\right) \cdot y0\\


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.0199999999999999e107

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. 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-*.f6427.1%

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.1%

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    8. Taylor expanded in b around inf

      \[\leadsto x \cdot \left(y0 \cdot \left(-1 \cdot \left(b \cdot \color{blue}{j}\right)\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(y0 \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
      2. lower-*.f6417.0%

        \[\leadsto x \cdot \left(y0 \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
    10. Applied rewrites17.0%

      \[\leadsto x \cdot \left(y0 \cdot \left(-1 \cdot \left(b \cdot \color{blue}{j}\right)\right)\right) \]

    if -1.0199999999999999e107 < b < -2.0999999999999999e-20

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. 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-*.f6427.1%

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.1%

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    8. Taylor expanded in b around 0

      \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
      3. lower-*.f6417.9%

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
    10. Applied rewrites17.9%

      \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
    11. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \left(x \cdot \left(y0 \cdot y2\right)\right) \cdot c \]
      3. lift-*.f64N/A

        \[\leadsto \left(x \cdot \left(y0 \cdot y2\right)\right) \cdot c \]
      4. lift-*.f64N/A

        \[\leadsto \left(x \cdot \left(y0 \cdot y2\right)\right) \cdot c \]
      5. associate-*r*N/A

        \[\leadsto \left(\left(x \cdot y0\right) \cdot y2\right) \cdot c \]
      6. associate-*l*N/A

        \[\leadsto \left(x \cdot y0\right) \cdot \left(y2 \cdot c\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(x \cdot y0\right) \cdot \left(c \cdot y2\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(x \cdot y0\right) \cdot \left(c \cdot y2\right) \]
      9. *-commutativeN/A

        \[\leadsto \left(y0 \cdot x\right) \cdot \left(c \cdot y2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \left(y0 \cdot x\right) \cdot \left(c \cdot y2\right) \]
      11. *-commutativeN/A

        \[\leadsto \left(y0 \cdot x\right) \cdot \left(y2 \cdot c\right) \]
      12. lower-*.f6417.6%

        \[\leadsto \left(y0 \cdot x\right) \cdot \left(y2 \cdot c\right) \]
    12. Applied rewrites17.6%

      \[\leadsto \left(y0 \cdot x\right) \cdot \left(y2 \cdot c\right) \]

    if -2.0999999999999999e-20 < b < 5.0000000000000004e96

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites37.0%

      \[\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)} \]
    5. Taylor expanded in y4 around inf

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - \color{blue}{c \cdot t}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot \color{blue}{t}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
      4. lower-*.f6426.9%

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    8. Taylor expanded in t around 0

      \[\leadsto y2 \cdot \left(k \cdot \left(y1 \cdot \color{blue}{y4}\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right) \]
      2. lower-*.f6416.7%

        \[\leadsto y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right) \]
    10. Applied rewrites16.7%

      \[\leadsto y2 \cdot \left(k \cdot \left(y1 \cdot \color{blue}{y4}\right)\right) \]

    if 5.0000000000000004e96 < b

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto y0 \cdot \left(x \cdot \color{blue}{\left(c \cdot y2 - b \cdot j\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - \color{blue}{b \cdot j}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot \color{blue}{j}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
      4. lower-*.f6427.5%

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.5%

      \[\leadsto y0 \cdot \left(x \cdot \color{blue}{\left(c \cdot y2 - b \cdot j\right)}\right) \]
    8. Taylor expanded in b around inf

      \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot \color{blue}{j}\right)\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
      2. lower-*.f6417.4%

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
    10. Applied rewrites17.4%

      \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot \color{blue}{j}\right)\right)\right) \]
    11. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto y0 \cdot \color{blue}{\left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \cdot \color{blue}{y0} \]
      3. lower-*.f6417.4%

        \[\leadsto \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \cdot \color{blue}{y0} \]
    12. Applied rewrites17.4%

      \[\leadsto \left(\left(\left(-b\right) \cdot j\right) \cdot x\right) \cdot \color{blue}{y0} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 32: 21.5% accurate, 6.7× speedup?

\[\begin{array}{l} \mathbf{if}\;y4 \leq -62000000000000006029444596520701436180166240548393544860868151823302656:\\ \;\;\;\;k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot y4\right)\right)\right)\\ \mathbf{elif}\;y4 \leq 1850000000000000086213126020982953562417360610123142591667462306089241519987624615538466820102682770192216411087794395738618713790384491872370636589523266841665691372045950613716992:\\ \;\;\;\;\left(\left(\left(-b\right) \cdot j\right) \cdot x\right) \cdot y0\\ \mathbf{else}:\\ \;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     y4
     -62000000000000006029444596520701436180166240548393544860868151823302656)
  (* k (* -1 (* b (* y y4))))
  (if (<=
       y4
       1850000000000000086213126020982953562417360610123142591667462306089241519987624615538466820102682770192216411087794395738618713790384491872370636589523266841665691372045950613716992)
    (* (* (* (- b) j) x) y0)
    (* y2 (* y4 (* 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 (y4 <= -6.2e+70) {
		tmp = k * (-1.0 * (b * (y * y4)));
	} else if (y4 <= 1.85e+180) {
		tmp = ((-b * j) * x) * y0;
	} else {
		tmp = y2 * (y4 * (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 (y4 <= (-6.2d+70)) then
        tmp = k * ((-1.0d0) * (b * (y * y4)))
    else if (y4 <= 1.85d+180) then
        tmp = ((-b * j) * x) * y0
    else
        tmp = y2 * (y4 * (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 (y4 <= -6.2e+70) {
		tmp = k * (-1.0 * (b * (y * y4)));
	} else if (y4 <= 1.85e+180) {
		tmp = ((-b * j) * x) * y0;
	} else {
		tmp = y2 * (y4 * (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 y4 <= -6.2e+70:
		tmp = k * (-1.0 * (b * (y * y4)))
	elif y4 <= 1.85e+180:
		tmp = ((-b * j) * x) * y0
	else:
		tmp = y2 * (y4 * (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 (y4 <= -6.2e+70)
		tmp = Float64(k * Float64(-1.0 * Float64(b * Float64(y * y4))));
	elseif (y4 <= 1.85e+180)
		tmp = Float64(Float64(Float64(Float64(-b) * j) * x) * y0);
	else
		tmp = Float64(y2 * Float64(y4 * 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 (y4 <= -6.2e+70)
		tmp = k * (-1.0 * (b * (y * y4)));
	elseif (y4 <= 1.85e+180)
		tmp = ((-b * j) * x) * y0;
	else
		tmp = y2 * (y4 * (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[y4, -62000000000000006029444596520701436180166240548393544860868151823302656], N[(k * N[(-1 * N[(b * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 1850000000000000086213126020982953562417360610123142591667462306089241519987624615538466820102682770192216411087794395738618713790384491872370636589523266841665691372045950613716992], N[(N[(N[((-b) * j), $MachinePrecision] * x), $MachinePrecision] * y0), $MachinePrecision], N[(y2 * N[(y4 * N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -62000000000000006029444596520701436180166240548393544860868151823302656:\\
\;\;\;\;k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot y4\right)\right)\right)\\

\mathbf{elif}\;y4 \leq 1850000000000000086213126020982953562417360610123142591667462306089241519987624615538466820102682770192216411087794395738618713790384491872370636589523266841665691372045950613716992:\\
\;\;\;\;\left(\left(\left(-b\right) \cdot j\right) \cdot x\right) \cdot y0\\

\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y4 < -6.2000000000000006e70

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.6%

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in y around inf

      \[\leadsto k \cdot \left(-1 \cdot \left(b \cdot \color{blue}{\left(y \cdot y4\right)}\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot \color{blue}{y4}\right)\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot y4\right)\right)\right) \]
      3. lower-*.f6417.0%

        \[\leadsto k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot y4\right)\right)\right) \]
    10. Applied rewrites17.0%

      \[\leadsto k \cdot \left(-1 \cdot \left(b \cdot \color{blue}{\left(y \cdot y4\right)}\right)\right) \]

    if -6.2000000000000006e70 < y4 < 1.8500000000000001e180

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto y0 \cdot \left(x \cdot \color{blue}{\left(c \cdot y2 - b \cdot j\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - \color{blue}{b \cdot j}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot \color{blue}{j}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
      4. lower-*.f6427.5%

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.5%

      \[\leadsto y0 \cdot \left(x \cdot \color{blue}{\left(c \cdot y2 - b \cdot j\right)}\right) \]
    8. Taylor expanded in b around inf

      \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot \color{blue}{j}\right)\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
      2. lower-*.f6417.4%

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
    10. Applied rewrites17.4%

      \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot \color{blue}{j}\right)\right)\right) \]
    11. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto y0 \cdot \color{blue}{\left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \cdot \color{blue}{y0} \]
      3. lower-*.f6417.4%

        \[\leadsto \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \cdot \color{blue}{y0} \]
    12. Applied rewrites17.4%

      \[\leadsto \left(\left(\left(-b\right) \cdot j\right) \cdot x\right) \cdot \color{blue}{y0} \]

    if 1.8500000000000001e180 < y4

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites37.0%

      \[\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)} \]
    5. Taylor expanded in y4 around inf

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - \color{blue}{c \cdot t}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot \color{blue}{t}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
      4. lower-*.f6426.9%

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    8. Taylor expanded in t around 0

      \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f6416.8%

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right) \]
    10. Applied rewrites16.8%

      \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 33: 21.5% accurate, 6.7× speedup?

\[\begin{array}{l} \mathbf{if}\;y4 \leq -62000000000000006029444596520701436180166240548393544860868151823302656:\\ \;\;\;\;-1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right)\\ \mathbf{elif}\;y4 \leq 1850000000000000086213126020982953562417360610123142591667462306089241519987624615538466820102682770192216411087794395738618713790384491872370636589523266841665691372045950613716992:\\ \;\;\;\;\left(\left(\left(-b\right) \cdot j\right) \cdot x\right) \cdot y0\\ \mathbf{else}:\\ \;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     y4
     -62000000000000006029444596520701436180166240548393544860868151823302656)
  (* -1 (* b (* k (* y y4))))
  (if (<=
       y4
       1850000000000000086213126020982953562417360610123142591667462306089241519987624615538466820102682770192216411087794395738618713790384491872370636589523266841665691372045950613716992)
    (* (* (* (- b) j) x) y0)
    (* y2 (* y4 (* 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 (y4 <= -6.2e+70) {
		tmp = -1.0 * (b * (k * (y * y4)));
	} else if (y4 <= 1.85e+180) {
		tmp = ((-b * j) * x) * y0;
	} else {
		tmp = y2 * (y4 * (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 (y4 <= (-6.2d+70)) then
        tmp = (-1.0d0) * (b * (k * (y * y4)))
    else if (y4 <= 1.85d+180) then
        tmp = ((-b * j) * x) * y0
    else
        tmp = y2 * (y4 * (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 (y4 <= -6.2e+70) {
		tmp = -1.0 * (b * (k * (y * y4)));
	} else if (y4 <= 1.85e+180) {
		tmp = ((-b * j) * x) * y0;
	} else {
		tmp = y2 * (y4 * (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 y4 <= -6.2e+70:
		tmp = -1.0 * (b * (k * (y * y4)))
	elif y4 <= 1.85e+180:
		tmp = ((-b * j) * x) * y0
	else:
		tmp = y2 * (y4 * (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 (y4 <= -6.2e+70)
		tmp = Float64(-1.0 * Float64(b * Float64(k * Float64(y * y4))));
	elseif (y4 <= 1.85e+180)
		tmp = Float64(Float64(Float64(Float64(-b) * j) * x) * y0);
	else
		tmp = Float64(y2 * Float64(y4 * 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 (y4 <= -6.2e+70)
		tmp = -1.0 * (b * (k * (y * y4)));
	elseif (y4 <= 1.85e+180)
		tmp = ((-b * j) * x) * y0;
	else
		tmp = y2 * (y4 * (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[y4, -62000000000000006029444596520701436180166240548393544860868151823302656], N[(-1 * N[(b * N[(k * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 1850000000000000086213126020982953562417360610123142591667462306089241519987624615538466820102682770192216411087794395738618713790384491872370636589523266841665691372045950613716992], N[(N[(N[((-b) * j), $MachinePrecision] * x), $MachinePrecision] * y0), $MachinePrecision], N[(y2 * N[(y4 * N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -62000000000000006029444596520701436180166240548393544860868151823302656:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right)\\

\mathbf{elif}\;y4 \leq 1850000000000000086213126020982953562417360610123142591667462306089241519987624615538466820102682770192216411087794395738618713790384491872370636589523266841665691372045950613716992:\\
\;\;\;\;\left(\left(\left(-b\right) \cdot j\right) \cdot x\right) \cdot y0\\

\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y4 < -6.2000000000000006e70

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.6%

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in y around inf

      \[\leadsto -1 \cdot \left(b \cdot \color{blue}{\left(k \cdot \left(y \cdot y4\right)\right)}\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(b \cdot \left(k \cdot \color{blue}{\left(y \cdot y4\right)}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot \color{blue}{y4}\right)\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right) \]
      4. lower-*.f6417.1%

        \[\leadsto -1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right) \]
    10. Applied rewrites17.1%

      \[\leadsto -1 \cdot \left(b \cdot \color{blue}{\left(k \cdot \left(y \cdot y4\right)\right)}\right) \]

    if -6.2000000000000006e70 < y4 < 1.8500000000000001e180

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto y0 \cdot \left(x \cdot \color{blue}{\left(c \cdot y2 - b \cdot j\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - \color{blue}{b \cdot j}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot \color{blue}{j}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
      4. lower-*.f6427.5%

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.5%

      \[\leadsto y0 \cdot \left(x \cdot \color{blue}{\left(c \cdot y2 - b \cdot j\right)}\right) \]
    8. Taylor expanded in b around inf

      \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot \color{blue}{j}\right)\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
      2. lower-*.f6417.4%

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
    10. Applied rewrites17.4%

      \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot \color{blue}{j}\right)\right)\right) \]
    11. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto y0 \cdot \color{blue}{\left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \cdot \color{blue}{y0} \]
      3. lower-*.f6417.4%

        \[\leadsto \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \cdot \color{blue}{y0} \]
    12. Applied rewrites17.4%

      \[\leadsto \left(\left(\left(-b\right) \cdot j\right) \cdot x\right) \cdot \color{blue}{y0} \]

    if 1.8500000000000001e180 < y4

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites37.0%

      \[\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)} \]
    5. Taylor expanded in y4 around inf

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - \color{blue}{c \cdot t}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot \color{blue}{t}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
      4. lower-*.f6426.9%

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    8. Taylor expanded in t around 0

      \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f6416.8%

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right) \]
    10. Applied rewrites16.8%

      \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 34: 21.4% accurate, 6.7× speedup?

\[\begin{array}{l} t_1 := \left(\left(\left(-b\right) \cdot j\right) \cdot x\right) \cdot y0\\ \mathbf{if}\;b \leq \frac{-7443676776395529}{664613997892457936451903530140172288}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 5000000000000000367879369238556249198788031076088728399622928950675879571901095101025339828076544:\\ \;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \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) j) x) y0)))
  (if (<= b -7443676776395529/664613997892457936451903530140172288)
    t_1
    (if (<=
         b
         5000000000000000367879369238556249198788031076088728399622928950675879571901095101025339828076544)
      (* y2 (* k (* y1 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 * j) * x) * y0;
	double tmp;
	if (b <= -1.12e-20) {
		tmp = t_1;
	} else if (b <= 5e+96) {
		tmp = y2 * (k * (y1 * 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 * j) * x) * y0
    if (b <= (-1.12d-20)) then
        tmp = t_1
    else if (b <= 5d+96) then
        tmp = y2 * (k * (y1 * 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 * j) * x) * y0;
	double tmp;
	if (b <= -1.12e-20) {
		tmp = t_1;
	} else if (b <= 5e+96) {
		tmp = y2 * (k * (y1 * 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 * j) * x) * y0
	tmp = 0
	if b <= -1.12e-20:
		tmp = t_1
	elif b <= 5e+96:
		tmp = y2 * (k * (y1 * 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(Float64(Float64(Float64(-b) * j) * x) * y0)
	tmp = 0.0
	if (b <= -1.12e-20)
		tmp = t_1;
	elseif (b <= 5e+96)
		tmp = Float64(y2 * Float64(k * Float64(y1 * 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 * j) * x) * y0;
	tmp = 0.0;
	if (b <= -1.12e-20)
		tmp = t_1;
	elseif (b <= 5e+96)
		tmp = y2 * (k * (y1 * 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[(N[(N[((-b) * j), $MachinePrecision] * x), $MachinePrecision] * y0), $MachinePrecision]}, If[LessEqual[b, -7443676776395529/664613997892457936451903530140172288], t$95$1, If[LessEqual[b, 5000000000000000367879369238556249198788031076088728399622928950675879571901095101025339828076544], N[(y2 * N[(k * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(\left(\left(-b\right) \cdot j\right) \cdot x\right) \cdot y0\\
\mathbf{if}\;b \leq \frac{-7443676776395529}{664613997892457936451903530140172288}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 5000000000000000367879369238556249198788031076088728399622928950675879571901095101025339828076544:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.12e-20 or 5.0000000000000004e96 < b

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto y0 \cdot \left(x \cdot \color{blue}{\left(c \cdot y2 - b \cdot j\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - \color{blue}{b \cdot j}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot \color{blue}{j}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
      4. lower-*.f6427.5%

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.5%

      \[\leadsto y0 \cdot \left(x \cdot \color{blue}{\left(c \cdot y2 - b \cdot j\right)}\right) \]
    8. Taylor expanded in b around inf

      \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot \color{blue}{j}\right)\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
      2. lower-*.f6417.4%

        \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \]
    10. Applied rewrites17.4%

      \[\leadsto y0 \cdot \left(x \cdot \left(-1 \cdot \left(b \cdot \color{blue}{j}\right)\right)\right) \]
    11. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto y0 \cdot \color{blue}{\left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \cdot \color{blue}{y0} \]
      3. lower-*.f6417.4%

        \[\leadsto \left(x \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right) \cdot \color{blue}{y0} \]
    12. Applied rewrites17.4%

      \[\leadsto \left(\left(\left(-b\right) \cdot j\right) \cdot x\right) \cdot \color{blue}{y0} \]

    if -1.12e-20 < b < 5.0000000000000004e96

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites37.0%

      \[\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)} \]
    5. Taylor expanded in y4 around inf

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - \color{blue}{c \cdot t}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot \color{blue}{t}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
      4. lower-*.f6426.9%

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    8. Taylor expanded in t around 0

      \[\leadsto y2 \cdot \left(k \cdot \left(y1 \cdot \color{blue}{y4}\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right) \]
      2. lower-*.f6416.7%

        \[\leadsto y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right) \]
    10. Applied rewrites16.7%

      \[\leadsto y2 \cdot \left(k \cdot \left(y1 \cdot \color{blue}{y4}\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 35: 20.2% accurate, 7.2× speedup?

\[\begin{array}{l} \mathbf{if}\;y2 \leq -379999999999999990016080260846504022712149994135889713011834025014266823015022099964951506519588864:\\ \;\;\;\;y0 \cdot \left(x \cdot \left(c \cdot y2\right)\right)\\ \mathbf{elif}\;y2 \leq \frac{8437482395119095}{162259276829213363391578010288128}:\\ \;\;\;\;\left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     y2
     -379999999999999990016080260846504022712149994135889713011834025014266823015022099964951506519588864)
  (* y0 (* x (* c y2)))
  (if (<= y2 8437482395119095/162259276829213363391578010288128)
    (* (* c (* y0 x)) y2)
    (* 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 (y2 <= -3.8e+98) {
		tmp = y0 * (x * (c * y2));
	} else if (y2 <= 5.2e-17) {
		tmp = (c * (y0 * x)) * y2;
	} 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 (y2 <= (-3.8d+98)) then
        tmp = y0 * (x * (c * y2))
    else if (y2 <= 5.2d-17) then
        tmp = (c * (y0 * x)) * y2
    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 (y2 <= -3.8e+98) {
		tmp = y0 * (x * (c * y2));
	} else if (y2 <= 5.2e-17) {
		tmp = (c * (y0 * x)) * y2;
	} 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 y2 <= -3.8e+98:
		tmp = y0 * (x * (c * y2))
	elif y2 <= 5.2e-17:
		tmp = (c * (y0 * x)) * y2
	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 (y2 <= -3.8e+98)
		tmp = Float64(y0 * Float64(x * Float64(c * y2)));
	elseif (y2 <= 5.2e-17)
		tmp = Float64(Float64(c * Float64(y0 * x)) * y2);
	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 (y2 <= -3.8e+98)
		tmp = y0 * (x * (c * y2));
	elseif (y2 <= 5.2e-17)
		tmp = (c * (y0 * x)) * y2;
	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[LessEqual[y2, -379999999999999990016080260846504022712149994135889713011834025014266823015022099964951506519588864], N[(y0 * N[(x * N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 8437482395119095/162259276829213363391578010288128], N[(N[(c * N[(y0 * x), $MachinePrecision]), $MachinePrecision] * y2), $MachinePrecision], N[(k * N[(y1 * N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y2 \leq -379999999999999990016080260846504022712149994135889713011834025014266823015022099964951506519588864:\\
\;\;\;\;y0 \cdot \left(x \cdot \left(c \cdot y2\right)\right)\\

\mathbf{elif}\;y2 \leq \frac{8437482395119095}{162259276829213363391578010288128}:\\
\;\;\;\;\left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2\\

\mathbf{else}:\\
\;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y2 < -3.7999999999999999e98

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto y0 \cdot \left(x \cdot \color{blue}{\left(c \cdot y2 - b \cdot j\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - \color{blue}{b \cdot j}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot \color{blue}{j}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
      4. lower-*.f6427.5%

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.5%

      \[\leadsto y0 \cdot \left(x \cdot \color{blue}{\left(c \cdot y2 - b \cdot j\right)}\right) \]
    8. Taylor expanded in b around 0

      \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f6418.0%

        \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2\right)\right) \]
    10. Applied rewrites18.0%

      \[\leadsto y0 \cdot \left(x \cdot \left(c \cdot y2\right)\right) \]

    if -3.7999999999999999e98 < y2 < 5.2000000000000001e-17

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. 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-*.f6427.1%

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.1%

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    8. Taylor expanded in b around 0

      \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
      3. lower-*.f6417.9%

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
    10. Applied rewrites17.9%

      \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
    11. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto c \cdot \left(\left(x \cdot y0\right) \cdot y2\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(c \cdot \left(x \cdot y0\right)\right) \cdot y2 \]
      6. lower-*.f64N/A

        \[\leadsto \left(c \cdot \left(x \cdot y0\right)\right) \cdot y2 \]
      7. lower-*.f64N/A

        \[\leadsto \left(c \cdot \left(x \cdot y0\right)\right) \cdot y2 \]
      8. *-commutativeN/A

        \[\leadsto \left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2 \]
      9. lower-*.f6418.1%

        \[\leadsto \left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2 \]
    12. Applied rewrites18.1%

      \[\leadsto \left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2 \]

    if 5.2000000000000001e-17 < y2

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.6%

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in y around 0

      \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot \color{blue}{y4}\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right) \]
      2. lower-*.f6416.8%

        \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right) \]
    10. Applied rewrites16.8%

      \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot \color{blue}{y4}\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 36: 20.1% accurate, 7.2× speedup?

\[\begin{array}{l} \mathbf{if}\;y2 \leq -159999999999999997285391487193812127684945283850954501149415267193067667456:\\ \;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2\right)\right)\\ \mathbf{elif}\;y2 \leq \frac{8437482395119095}{162259276829213363391578010288128}:\\ \;\;\;\;\left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     y2
     -159999999999999997285391487193812127684945283850954501149415267193067667456)
  (* x (* y0 (* c y2)))
  (if (<= y2 8437482395119095/162259276829213363391578010288128)
    (* (* c (* y0 x)) y2)
    (* 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 (y2 <= -1.6e+74) {
		tmp = x * (y0 * (c * y2));
	} else if (y2 <= 5.2e-17) {
		tmp = (c * (y0 * x)) * y2;
	} 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 (y2 <= (-1.6d+74)) then
        tmp = x * (y0 * (c * y2))
    else if (y2 <= 5.2d-17) then
        tmp = (c * (y0 * x)) * y2
    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 (y2 <= -1.6e+74) {
		tmp = x * (y0 * (c * y2));
	} else if (y2 <= 5.2e-17) {
		tmp = (c * (y0 * x)) * y2;
	} 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 y2 <= -1.6e+74:
		tmp = x * (y0 * (c * y2))
	elif y2 <= 5.2e-17:
		tmp = (c * (y0 * x)) * y2
	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 (y2 <= -1.6e+74)
		tmp = Float64(x * Float64(y0 * Float64(c * y2)));
	elseif (y2 <= 5.2e-17)
		tmp = Float64(Float64(c * Float64(y0 * x)) * y2);
	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 (y2 <= -1.6e+74)
		tmp = x * (y0 * (c * y2));
	elseif (y2 <= 5.2e-17)
		tmp = (c * (y0 * x)) * y2;
	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[LessEqual[y2, -159999999999999997285391487193812127684945283850954501149415267193067667456], N[(x * N[(y0 * N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 8437482395119095/162259276829213363391578010288128], N[(N[(c * N[(y0 * x), $MachinePrecision]), $MachinePrecision] * y2), $MachinePrecision], N[(k * N[(y1 * N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y2 \leq -159999999999999997285391487193812127684945283850954501149415267193067667456:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2\right)\right)\\

\mathbf{elif}\;y2 \leq \frac{8437482395119095}{162259276829213363391578010288128}:\\
\;\;\;\;\left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2\\

\mathbf{else}:\\
\;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y2 < -1.6e74

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. 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-*.f6427.1%

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.1%

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    8. Taylor expanded in b around 0

      \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f6417.9%

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2\right)\right) \]
    10. Applied rewrites17.9%

      \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2\right)\right) \]

    if -1.6e74 < y2 < 5.2000000000000001e-17

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. 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-*.f6427.1%

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.1%

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    8. Taylor expanded in b around 0

      \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
      3. lower-*.f6417.9%

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
    10. Applied rewrites17.9%

      \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
    11. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto c \cdot \left(\left(x \cdot y0\right) \cdot y2\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(c \cdot \left(x \cdot y0\right)\right) \cdot y2 \]
      6. lower-*.f64N/A

        \[\leadsto \left(c \cdot \left(x \cdot y0\right)\right) \cdot y2 \]
      7. lower-*.f64N/A

        \[\leadsto \left(c \cdot \left(x \cdot y0\right)\right) \cdot y2 \]
      8. *-commutativeN/A

        \[\leadsto \left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2 \]
      9. lower-*.f6418.1%

        \[\leadsto \left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2 \]
    12. Applied rewrites18.1%

      \[\leadsto \left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2 \]

    if 5.2000000000000001e-17 < y2

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. Taylor expanded in y4 around inf

      \[\leadsto \color{blue}{y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y4 \cdot \color{blue}{\left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)} \]
      2. lower--.f64N/A

        \[\leadsto y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - \color{blue}{c \cdot \left(t \cdot y2 - y \cdot y3\right)}\right) \]
    4. Applied rewrites36.6%

      \[\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)} \]
    5. 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)} \]
    6. 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-+.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot \color{blue}{y2}\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
      6. lower-*.f6426.5%

        \[\leadsto k \cdot \left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right) \]
    7. Applied rewrites26.5%

      \[\leadsto k \cdot \color{blue}{\left(y4 \cdot \left(-1 \cdot \left(b \cdot y\right) + y1 \cdot y2\right)\right)} \]
    8. Taylor expanded in y around 0

      \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot \color{blue}{y4}\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right) \]
      2. lower-*.f6416.8%

        \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right) \]
    10. Applied rewrites16.8%

      \[\leadsto k \cdot \left(y1 \cdot \left(y2 \cdot \color{blue}{y4}\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 37: 19.4% accurate, 9.2× speedup?

\[\begin{array}{l} \mathbf{if}\;x \leq \frac{2948744166719601}{105312291668557186697918027683670432318895095400549111254310977536}:\\ \;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(c \cdot x\right) \cdot y0\right) \cdot y2\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     x
     2948744166719601/105312291668557186697918027683670432318895095400549111254310977536)
  (* y2 (* k (* y1 y4)))
  (* (* (* c x) y0) y2)))
double code(double x, double y, double z, double t, 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 <= 2.8e-50) {
		tmp = y2 * (k * (y1 * y4));
	} else {
		tmp = ((c * x) * y0) * y2;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    real(8) :: tmp
    if (x <= 2.8d-50) then
        tmp = y2 * (k * (y1 * y4))
    else
        tmp = ((c * x) * y0) * y2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	double tmp;
	if (x <= 2.8e-50) {
		tmp = y2 * (k * (y1 * y4));
	} else {
		tmp = ((c * x) * y0) * y2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if x <= 2.8e-50:
		tmp = y2 * (k * (y1 * y4))
	else:
		tmp = ((c * x) * y0) * y2
	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 <= 2.8e-50)
		tmp = Float64(y2 * Float64(k * Float64(y1 * y4)));
	else
		tmp = Float64(Float64(Float64(c * x) * y0) * y2);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = 0.0;
	if (x <= 2.8e-50)
		tmp = y2 * (k * (y1 * y4));
	else
		tmp = ((c * x) * y0) * y2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[x, 2948744166719601/105312291668557186697918027683670432318895095400549111254310977536], N[(y2 * N[(k * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(c * x), $MachinePrecision] * y0), $MachinePrecision] * y2), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;x \leq \frac{2948744166719601}{105312291668557186697918027683670432318895095400549111254310977536}:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(c \cdot x\right) \cdot y0\right) \cdot y2\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 2.7999999999999998e-50

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites37.0%

      \[\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)} \]
    5. Taylor expanded in y4 around inf

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - \color{blue}{c \cdot t}\right)\right) \]
      2. lower--.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot \color{blue}{t}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
      4. lower-*.f6426.9%

        \[\leadsto y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right) \]
    7. Applied rewrites26.9%

      \[\leadsto y2 \cdot \left(y4 \cdot \color{blue}{\left(k \cdot y1 - c \cdot t\right)}\right) \]
    8. Taylor expanded in t around 0

      \[\leadsto y2 \cdot \left(k \cdot \left(y1 \cdot \color{blue}{y4}\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right) \]
      2. lower-*.f6416.7%

        \[\leadsto y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right) \]
    10. Applied rewrites16.7%

      \[\leadsto y2 \cdot \left(k \cdot \left(y1 \cdot \color{blue}{y4}\right)\right) \]

    if 2.7999999999999998e-50 < x

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. 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-*.f6427.1%

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.1%

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    8. Taylor expanded in b around 0

      \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
      3. lower-*.f6417.9%

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
    10. Applied rewrites17.9%

      \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
    11. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \left(c \cdot x\right) \cdot \left(y0 \cdot y2\right) \]
      4. lift-*.f64N/A

        \[\leadsto \left(c \cdot x\right) \cdot \left(y0 \cdot y2\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(\left(c \cdot x\right) \cdot y0\right) \cdot y2 \]
      6. lower-*.f64N/A

        \[\leadsto \left(\left(c \cdot x\right) \cdot y0\right) \cdot y2 \]
      7. lower-*.f64N/A

        \[\leadsto \left(\left(c \cdot x\right) \cdot y0\right) \cdot y2 \]
      8. lower-*.f6418.2%

        \[\leadsto \left(\left(c \cdot x\right) \cdot y0\right) \cdot y2 \]
    12. Applied rewrites18.2%

      \[\leadsto \left(\left(c \cdot x\right) \cdot y0\right) \cdot y2 \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 38: 19.4% accurate, 7.2× speedup?

\[\begin{array}{l} t_1 := x \cdot \left(y0 \cdot \left(c \cdot y2\right)\right)\\ \mathbf{if}\;y2 \leq -159999999999999997285391487193812127684945283850954501149415267193067667456:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y2 \leq 999999999999999959416724456350362731491996089648451439669739009806703922950954425516032:\\ \;\;\;\;\left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \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)))))
  (if (<=
       y2
       -159999999999999997285391487193812127684945283850954501149415267193067667456)
    t_1
    (if (<=
         y2
         999999999999999959416724456350362731491996089648451439669739009806703922950954425516032)
      (* (* c (* y0 x)) y2)
      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));
	double tmp;
	if (y2 <= -1.6e+74) {
		tmp = t_1;
	} else if (y2 <= 1e+87) {
		tmp = (c * (y0 * x)) * y2;
	} 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))
    if (y2 <= (-1.6d+74)) then
        tmp = t_1
    else if (y2 <= 1d+87) then
        tmp = (c * (y0 * x)) * y2
    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));
	double tmp;
	if (y2 <= -1.6e+74) {
		tmp = t_1;
	} else if (y2 <= 1e+87) {
		tmp = (c * (y0 * x)) * y2;
	} 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))
	tmp = 0
	if y2 <= -1.6e+74:
		tmp = t_1
	elif y2 <= 1e+87:
		tmp = (c * (y0 * x)) * y2
	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(c * y2)))
	tmp = 0.0
	if (y2 <= -1.6e+74)
		tmp = t_1;
	elseif (y2 <= 1e+87)
		tmp = Float64(Float64(c * Float64(y0 * x)) * y2);
	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));
	tmp = 0.0;
	if (y2 <= -1.6e+74)
		tmp = t_1;
	elseif (y2 <= 1e+87)
		tmp = (c * (y0 * x)) * y2;
	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[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y2, -159999999999999997285391487193812127684945283850954501149415267193067667456], t$95$1, If[LessEqual[y2, 999999999999999959416724456350362731491996089648451439669739009806703922950954425516032], N[(N[(c * N[(y0 * x), $MachinePrecision]), $MachinePrecision] * y2), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x \cdot \left(y0 \cdot \left(c \cdot y2\right)\right)\\
\mathbf{if}\;y2 \leq -159999999999999997285391487193812127684945283850954501149415267193067667456:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y2 \leq 999999999999999959416724456350362731491996089648451439669739009806703922950954425516032:\\
\;\;\;\;\left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y2 < -1.6e74 or 9.9999999999999996e86 < y2

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. 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-*.f6427.1%

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.1%

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    8. Taylor expanded in b around 0

      \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2\right)\right) \]
    9. Step-by-step derivation
      1. lower-*.f6417.9%

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2\right)\right) \]
    10. Applied rewrites17.9%

      \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2\right)\right) \]

    if -1.6e74 < y2 < 9.9999999999999996e86

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. 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-*.f6427.1%

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.1%

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    8. Taylor expanded in b around 0

      \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
      3. lower-*.f6417.9%

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
    10. Applied rewrites17.9%

      \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
    11. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto c \cdot \left(\left(x \cdot y0\right) \cdot y2\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(c \cdot \left(x \cdot y0\right)\right) \cdot y2 \]
      6. lower-*.f64N/A

        \[\leadsto \left(c \cdot \left(x \cdot y0\right)\right) \cdot y2 \]
      7. lower-*.f64N/A

        \[\leadsto \left(c \cdot \left(x \cdot y0\right)\right) \cdot y2 \]
      8. *-commutativeN/A

        \[\leadsto \left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2 \]
      9. lower-*.f6418.1%

        \[\leadsto \left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2 \]
    12. Applied rewrites18.1%

      \[\leadsto \left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2 \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 39: 18.2% accurate, 9.2× speedup?

\[\begin{array}{l} \mathbf{if}\;y0 \leq \frac{6039028053441743}{431359146674410236714672241392314090778194310760649159697657763987456}:\\ \;\;\;\;\left(\left(c \cdot x\right) \cdot y0\right) \cdot y2\\ \mathbf{else}:\\ \;\;\;\;\left(y0 \cdot x\right) \cdot \left(y2 \cdot c\right)\\ \end{array} \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (if (<=
     y0
     6039028053441743/431359146674410236714672241392314090778194310760649159697657763987456)
  (* (* (* c x) y0) y2)
  (* (* y0 x) (* y2 c))))
double code(double x, double y, double z, double t, 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 <= 1.4e-53) {
		tmp = ((c * x) * y0) * y2;
	} else {
		tmp = (y0 * x) * (y2 * c);
	}
	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 <= 1.4d-53) then
        tmp = ((c * x) * y0) * y2
    else
        tmp = (y0 * x) * (y2 * c)
    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 <= 1.4e-53) {
		tmp = ((c * x) * y0) * y2;
	} else {
		tmp = (y0 * x) * (y2 * c);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	tmp = 0
	if y0 <= 1.4e-53:
		tmp = ((c * x) * y0) * y2
	else:
		tmp = (y0 * x) * (y2 * c)
	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 <= 1.4e-53)
		tmp = Float64(Float64(Float64(c * x) * y0) * y2);
	else
		tmp = Float64(Float64(y0 * x) * Float64(y2 * c));
	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 <= 1.4e-53)
		tmp = ((c * x) * y0) * y2;
	else
		tmp = (y0 * x) * (y2 * c);
	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, 6039028053441743/431359146674410236714672241392314090778194310760649159697657763987456], N[(N[(N[(c * x), $MachinePrecision] * y0), $MachinePrecision] * y2), $MachinePrecision], N[(N[(y0 * x), $MachinePrecision] * N[(y2 * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;y0 \leq \frac{6039028053441743}{431359146674410236714672241392314090778194310760649159697657763987456}:\\
\;\;\;\;\left(\left(c \cdot x\right) \cdot y0\right) \cdot y2\\

\mathbf{else}:\\
\;\;\;\;\left(y0 \cdot x\right) \cdot \left(y2 \cdot c\right)\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y0 < 1.3999999999999999e-53

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. 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-*.f6427.1%

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.1%

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    8. Taylor expanded in b around 0

      \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
      3. lower-*.f6417.9%

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
    10. Applied rewrites17.9%

      \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
    11. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \left(c \cdot x\right) \cdot \left(y0 \cdot y2\right) \]
      4. lift-*.f64N/A

        \[\leadsto \left(c \cdot x\right) \cdot \left(y0 \cdot y2\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(\left(c \cdot x\right) \cdot y0\right) \cdot y2 \]
      6. lower-*.f64N/A

        \[\leadsto \left(\left(c \cdot x\right) \cdot y0\right) \cdot y2 \]
      7. lower-*.f64N/A

        \[\leadsto \left(\left(c \cdot x\right) \cdot y0\right) \cdot y2 \]
      8. lower-*.f6418.2%

        \[\leadsto \left(\left(c \cdot x\right) \cdot y0\right) \cdot y2 \]
    12. Applied rewrites18.2%

      \[\leadsto \left(\left(c \cdot x\right) \cdot y0\right) \cdot y2 \]

    if 1.3999999999999999e-53 < y0

    1. Initial program 30.1%

      \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
    2. 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)} \]
    3. 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) \]
    4. Applied rewrites38.0%

      \[\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)} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    6. Step-by-step derivation
      1. 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-*.f6427.1%

        \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
    7. Applied rewrites27.1%

      \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
    8. Taylor expanded in b around 0

      \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
      3. lower-*.f6417.9%

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
    10. Applied rewrites17.9%

      \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
    11. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \left(x \cdot \left(y0 \cdot y2\right)\right) \cdot c \]
      3. lift-*.f64N/A

        \[\leadsto \left(x \cdot \left(y0 \cdot y2\right)\right) \cdot c \]
      4. lift-*.f64N/A

        \[\leadsto \left(x \cdot \left(y0 \cdot y2\right)\right) \cdot c \]
      5. associate-*r*N/A

        \[\leadsto \left(\left(x \cdot y0\right) \cdot y2\right) \cdot c \]
      6. associate-*l*N/A

        \[\leadsto \left(x \cdot y0\right) \cdot \left(y2 \cdot c\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(x \cdot y0\right) \cdot \left(c \cdot y2\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(x \cdot y0\right) \cdot \left(c \cdot y2\right) \]
      9. *-commutativeN/A

        \[\leadsto \left(y0 \cdot x\right) \cdot \left(c \cdot y2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \left(y0 \cdot x\right) \cdot \left(c \cdot y2\right) \]
      11. *-commutativeN/A

        \[\leadsto \left(y0 \cdot x\right) \cdot \left(y2 \cdot c\right) \]
      12. lower-*.f6417.6%

        \[\leadsto \left(y0 \cdot x\right) \cdot \left(y2 \cdot c\right) \]
    12. Applied rewrites17.6%

      \[\leadsto \left(y0 \cdot x\right) \cdot \left(y2 \cdot c\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 40: 18.1% accurate, 12.6× speedup?

\[\left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2 \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (* (* c (* y0 x)) y2))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return (c * (y0 * x)) * y2;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    code = (c * (y0 * x)) * y2
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return (c * (y0 * x)) * y2;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	return (c * (y0 * x)) * y2
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	return Float64(Float64(c * Float64(y0 * x)) * y2)
end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = (c * (y0 * x)) * y2;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(N[(c * N[(y0 * x), $MachinePrecision]), $MachinePrecision] * y2), $MachinePrecision]
\left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2
Derivation
  1. Initial program 30.1%

    \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
  2. 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)} \]
  3. 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) \]
  4. Applied rewrites38.0%

    \[\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)} \]
  5. Taylor expanded in x around inf

    \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
  6. Step-by-step derivation
    1. 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-*.f6427.1%

      \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
  7. Applied rewrites27.1%

    \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
  8. Taylor expanded in b around 0

    \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
  9. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) \]
    2. lower-*.f64N/A

      \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
    3. lower-*.f6417.9%

      \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
  10. Applied rewrites17.9%

    \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
  11. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) \]
    2. lift-*.f64N/A

      \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
    3. lift-*.f64N/A

      \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
    4. associate-*r*N/A

      \[\leadsto c \cdot \left(\left(x \cdot y0\right) \cdot y2\right) \]
    5. associate-*r*N/A

      \[\leadsto \left(c \cdot \left(x \cdot y0\right)\right) \cdot y2 \]
    6. lower-*.f64N/A

      \[\leadsto \left(c \cdot \left(x \cdot y0\right)\right) \cdot y2 \]
    7. lower-*.f64N/A

      \[\leadsto \left(c \cdot \left(x \cdot y0\right)\right) \cdot y2 \]
    8. *-commutativeN/A

      \[\leadsto \left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2 \]
    9. lower-*.f6418.1%

      \[\leadsto \left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2 \]
  12. Applied rewrites18.1%

    \[\leadsto \left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2 \]
  13. Add Preprocessing

Alternative 41: 18.1% accurate, 12.6× speedup?

\[c \cdot \left(\left(y2 \cdot x\right) \cdot y0\right) \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (* c (* (* y2 x) 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 c * ((y2 * x) * 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 = c * ((y2 * x) * 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 c * ((y2 * x) * y0);
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	return c * ((y2 * x) * y0)
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	return Float64(c * Float64(Float64(y2 * x) * y0))
end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = c * ((y2 * x) * y0);
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(c * N[(N[(y2 * x), $MachinePrecision] * y0), $MachinePrecision]), $MachinePrecision]
c \cdot \left(\left(y2 \cdot x\right) \cdot y0\right)
Derivation
  1. Initial program 30.1%

    \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
  2. 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)} \]
  3. 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) \]
  4. Applied rewrites38.0%

    \[\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)} \]
  5. Taylor expanded in x around inf

    \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
  6. Step-by-step derivation
    1. 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-*.f6427.1%

      \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
  7. Applied rewrites27.1%

    \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
  8. Taylor expanded in b around 0

    \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
  9. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) \]
    2. lower-*.f64N/A

      \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
    3. lower-*.f6417.9%

      \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
  10. Applied rewrites17.9%

    \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
  11. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
    2. lift-*.f64N/A

      \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
    3. *-commutativeN/A

      \[\leadsto c \cdot \left(x \cdot \left(y2 \cdot y0\right)\right) \]
    4. associate-*r*N/A

      \[\leadsto c \cdot \left(\left(x \cdot y2\right) \cdot y0\right) \]
    5. lower-*.f64N/A

      \[\leadsto c \cdot \left(\left(x \cdot y2\right) \cdot y0\right) \]
    6. *-commutativeN/A

      \[\leadsto c \cdot \left(\left(y2 \cdot x\right) \cdot y0\right) \]
    7. lower-*.f6418.1%

      \[\leadsto c \cdot \left(\left(y2 \cdot x\right) \cdot y0\right) \]
  12. Applied rewrites18.1%

    \[\leadsto c \cdot \left(\left(y2 \cdot x\right) \cdot y0\right) \]
  13. Add Preprocessing

Alternative 42: 17.9% accurate, 12.6× speedup?

\[c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :precision binary64
  (* c (* x (* y0 y2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return c * (x * (y0 * y2));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8), intent (in) :: y0
    real(8), intent (in) :: y1
    real(8), intent (in) :: y2
    real(8), intent (in) :: y3
    real(8), intent (in) :: y4
    real(8), intent (in) :: y5
    code = c * (x * (y0 * y2))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
	return c * (x * (y0 * y2));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5):
	return c * (x * (y0 * y2))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	return Float64(c * Float64(x * Float64(y0 * y2)))
end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
	tmp = c * (x * (y0 * y2));
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(c * N[(x * N[(y0 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right)
Derivation
  1. Initial program 30.1%

    \[\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \]
  2. 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)} \]
  3. 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) \]
  4. Applied rewrites38.0%

    \[\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)} \]
  5. Taylor expanded in x around inf

    \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
  6. Step-by-step derivation
    1. 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-*.f6427.1%

      \[\leadsto x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right) \]
  7. Applied rewrites27.1%

    \[\leadsto x \cdot \color{blue}{\left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)} \]
  8. Taylor expanded in b around 0

    \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
  9. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot \color{blue}{y2}\right)\right) \]
    2. lower-*.f64N/A

      \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
    3. lower-*.f6417.9%

      \[\leadsto c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right) \]
  10. Applied rewrites17.9%

    \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y0 \cdot y2\right)}\right) \]
  11. Add Preprocessing

Reproduce

?
herbie shell --seed 2025271 -o generate:evaluate
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
  :name "Linear.Matrix:det44 from linear-1.19.1.3"
  :precision binary64
  (+ (- (+ (+ (- (* (- (* x y) (* z t)) (- (* a b) (* c i))) (* (- (* x j) (* z k)) (- (* y0 b) (* y1 i)))) (* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a)))) (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i)))) (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a)))) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))