Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, B

Percentage Accurate: 99.8% → 99.8%
Time: 22.6s
Alternatives: 15
Speedup: 1.0×

Specification

?
\[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
(FPCore (x y z t a b c i)
  :precision binary64
  (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 1/2) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
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)
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
    code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i):
	return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 1/2), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i

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 15 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: 99.8% accurate, 1.0× speedup?

\[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
(FPCore (x y z t a b c i)
  :precision binary64
  (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 1/2) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
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)
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
    code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i):
	return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 1/2), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i

Alternative 1: 95.0% accurate, 0.2× speedup?

\[\begin{array}{l} t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_2 := x \cdot \log y\\ t_3 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_4 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_3\right)\\ \mathbf{if}\;t\_4 \leq 879999999999999958507063942391341293078620439980425991327011484655074736196101580184131712581632:\\ \;\;\;\;\left(\mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_3\right) + \left(t\_1 + \left(t\_2 + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;\left(\left(t\_4 + \left(t\_1 + t\_2\right)\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i\\ \end{array} \]
(FPCore (x y z t a b c i)
  :precision binary64
  (let* ((t_1 (fmin (fmin z t) a))
       (t_2 (* x (log y)))
       (t_3 (fmax (fmin z t) a))
       (t_4 (fmax (fmax z t) t_3)))
  (if (<=
       t_4
       879999999999999958507063942391341293078620439980425991327011484655074736196101580184131712581632)
    (+
     (+ (fmin (fmax z t) t_3) (+ t_1 (+ t_2 (* (log c) (- b 1/2)))))
     (* y i))
    (+ (+ (+ t_4 (+ t_1 t_2)) (* -1/2 (log c))) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = fmin(fmin(z, t), a);
	double t_2 = x * log(y);
	double t_3 = fmax(fmin(z, t), a);
	double t_4 = fmax(fmax(z, t), t_3);
	double tmp;
	if (t_4 <= 8.8e+95) {
		tmp = (fmin(fmax(z, t), t_3) + (t_1 + (t_2 + (log(c) * (b - 0.5))))) + (y * i);
	} else {
		tmp = ((t_4 + (t_1 + t_2)) + (-0.5 * log(c))) + (y * i);
	}
	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)
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) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_1 = fmin(fmin(z, t), a)
    t_2 = x * log(y)
    t_3 = fmax(fmin(z, t), a)
    t_4 = fmax(fmax(z, t), t_3)
    if (t_4 <= 8.8d+95) then
        tmp = (fmin(fmax(z, t), t_3) + (t_1 + (t_2 + (log(c) * (b - 0.5d0))))) + (y * i)
    else
        tmp = ((t_4 + (t_1 + t_2)) + ((-0.5d0) * log(c))) + (y * i)
    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 t_1 = fmin(fmin(z, t), a);
	double t_2 = x * Math.log(y);
	double t_3 = fmax(fmin(z, t), a);
	double t_4 = fmax(fmax(z, t), t_3);
	double tmp;
	if (t_4 <= 8.8e+95) {
		tmp = (fmin(fmax(z, t), t_3) + (t_1 + (t_2 + (Math.log(c) * (b - 0.5))))) + (y * i);
	} else {
		tmp = ((t_4 + (t_1 + t_2)) + (-0.5 * Math.log(c))) + (y * i);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = fmin(fmin(z, t), a)
	t_2 = x * math.log(y)
	t_3 = fmax(fmin(z, t), a)
	t_4 = fmax(fmax(z, t), t_3)
	tmp = 0
	if t_4 <= 8.8e+95:
		tmp = (fmin(fmax(z, t), t_3) + (t_1 + (t_2 + (math.log(c) * (b - 0.5))))) + (y * i)
	else:
		tmp = ((t_4 + (t_1 + t_2)) + (-0.5 * math.log(c))) + (y * i)
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = fmin(fmin(z, t), a)
	t_2 = Float64(x * log(y))
	t_3 = fmax(fmin(z, t), a)
	t_4 = fmax(fmax(z, t), t_3)
	tmp = 0.0
	if (t_4 <= 8.8e+95)
		tmp = Float64(Float64(fmin(fmax(z, t), t_3) + Float64(t_1 + Float64(t_2 + Float64(log(c) * Float64(b - 0.5))))) + Float64(y * i));
	else
		tmp = Float64(Float64(Float64(t_4 + Float64(t_1 + t_2)) + Float64(-0.5 * log(c))) + Float64(y * i));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = min(min(z, t), a);
	t_2 = x * log(y);
	t_3 = max(min(z, t), a);
	t_4 = max(max(z, t), t_3);
	tmp = 0.0;
	if (t_4 <= 8.8e+95)
		tmp = (min(max(z, t), t_3) + (t_1 + (t_2 + (log(c) * (b - 0.5))))) + (y * i);
	else
		tmp = ((t_4 + (t_1 + t_2)) + (-0.5 * log(c))) + (y * i);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[Min[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Max[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$4 = N[Max[N[Max[z, t], $MachinePrecision], t$95$3], $MachinePrecision]}, If[LessEqual[t$95$4, 879999999999999958507063942391341293078620439980425991327011484655074736196101580184131712581632], N[(N[(N[Min[N[Max[z, t], $MachinePrecision], t$95$3], $MachinePrecision] + N[(t$95$1 + N[(t$95$2 + N[(N[Log[c], $MachinePrecision] * N[(b - 1/2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$4 + N[(t$95$1 + t$95$2), $MachinePrecision]), $MachinePrecision] + N[(-1/2 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\
t_2 := x \cdot \log y\\
t_3 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\
t_4 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_3\right)\\
\mathbf{if}\;t\_4 \leq 879999999999999958507063942391341293078620439980425991327011484655074736196101580184131712581632:\\
\;\;\;\;\left(\mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_3\right) + \left(t\_1 + \left(t\_2 + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) + y \cdot i\\

\mathbf{else}:\\
\;\;\;\;\left(\left(t\_4 + \left(t\_1 + t\_2\right)\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 8.7999999999999996e95

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in a around 0

      \[\leadsto \color{blue}{\left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} + y \cdot i \]
    3. Step-by-step derivation
      1. lower-+.f64N/A

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

        \[\leadsto \left(t + \left(z + \color{blue}{\left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)}\right)\right) + y \cdot i \]
      3. lower-+.f64N/A

        \[\leadsto \left(t + \left(z + \left(x \cdot \log y + \color{blue}{\log c \cdot \left(b - \frac{1}{2}\right)}\right)\right)\right) + y \cdot i \]
      4. lower-*.f64N/A

        \[\leadsto \left(t + \left(z + \left(x \cdot \log y + \color{blue}{\log c} \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) + y \cdot i \]
      5. lower-log.f64N/A

        \[\leadsto \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) + y \cdot i \]
      6. lower-*.f64N/A

        \[\leadsto \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \color{blue}{\left(b - \frac{1}{2}\right)}\right)\right)\right) + y \cdot i \]
      7. lower-log.f64N/A

        \[\leadsto \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(\color{blue}{b} - \frac{1}{2}\right)\right)\right)\right) + y \cdot i \]
      8. lower--.f6483.8%

        \[\leadsto \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \color{blue}{\frac{1}{2}}\right)\right)\right)\right) + y \cdot i \]
    4. Applied rewrites83.8%

      \[\leadsto \color{blue}{\left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} + y \cdot i \]

    if 8.7999999999999996e95 < a

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in x around 0

      \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
    3. Step-by-step derivation
      1. Applied rewrites84.5%

        \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
      2. Taylor expanded in b around 0

        \[\leadsto \left(\left(\left(z + t\right) + a\right) + \color{blue}{\frac{-1}{2}} \cdot \log c\right) + y \cdot i \]
      3. Step-by-step derivation
        1. Applied rewrites69.8%

          \[\leadsto \left(\left(\left(z + t\right) + a\right) + \color{blue}{\frac{-1}{2}} \cdot \log c\right) + y \cdot i \]
        2. Taylor expanded in t around 0

          \[\leadsto \left(\color{blue}{\left(a + \left(z + x \cdot \log y\right)\right)} + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
        3. Step-by-step derivation
          1. lower-+.f64N/A

            \[\leadsto \left(\left(a + \color{blue}{\left(z + x \cdot \log y\right)}\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
          2. lower-+.f64N/A

            \[\leadsto \left(\left(a + \left(z + \color{blue}{x \cdot \log y}\right)\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
          3. lower-*.f64N/A

            \[\leadsto \left(\left(a + \left(z + x \cdot \color{blue}{\log y}\right)\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
          4. lower-log.f6469.0%

            \[\leadsto \left(\left(a + \left(z + x \cdot \log y\right)\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
        4. Applied rewrites69.0%

          \[\leadsto \left(\color{blue}{\left(a + \left(z + x \cdot \log y\right)\right)} + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
      4. Recombined 2 regimes into one program.
      5. Add Preprocessing

      Alternative 2: 92.9% accurate, 0.2× speedup?

      \[\begin{array}{l} t_1 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_2 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_3 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_1\right)\\ t_4 := \left(\left(t\_3 + \left(t\_2 + x \cdot \log y\right)\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;x \leq -3550000000000000150029738640376626954316728168075833588523823906463939223777785428892323454743652302061568:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;x \leq 1049999999999999974685639735482438568778688196460848270285520923497646456255682135894950006688309094612255899648:\\ \;\;\;\;\left(\left(\left(t\_2 + \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_1\right)\right) + t\_3\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \]
      (FPCore (x y z t a b c i)
        :precision binary64
        (let* ((t_1 (fmax (fmin z t) a))
             (t_2 (fmin (fmin z t) a))
             (t_3 (fmax (fmax z t) t_1))
             (t_4
              (+
               (+ (+ t_3 (+ t_2 (* x (log y)))) (* -1/2 (log c)))
               (* y i))))
        (if (<=
             x
             -3550000000000000150029738640376626954316728168075833588523823906463939223777785428892323454743652302061568)
          t_4
          (if (<=
               x
               1049999999999999974685639735482438568778688196460848270285520923497646456255682135894950006688309094612255899648)
            (+
             (+ (+ (+ t_2 (fmin (fmax z t) t_1)) t_3) (* (- b 1/2) (log c)))
             (* y i))
            t_4))))
      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
      	double t_1 = fmax(fmin(z, t), a);
      	double t_2 = fmin(fmin(z, t), a);
      	double t_3 = fmax(fmax(z, t), t_1);
      	double t_4 = ((t_3 + (t_2 + (x * log(y)))) + (-0.5 * log(c))) + (y * i);
      	double tmp;
      	if (x <= -3.55e+105) {
      		tmp = t_4;
      	} else if (x <= 1.05e+111) {
      		tmp = (((t_2 + fmin(fmax(z, t), t_1)) + t_3) + ((b - 0.5) * log(c))) + (y * i);
      	} 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)
      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) :: t_1
          real(8) :: t_2
          real(8) :: t_3
          real(8) :: t_4
          real(8) :: tmp
          t_1 = fmax(fmin(z, t), a)
          t_2 = fmin(fmin(z, t), a)
          t_3 = fmax(fmax(z, t), t_1)
          t_4 = ((t_3 + (t_2 + (x * log(y)))) + ((-0.5d0) * log(c))) + (y * i)
          if (x <= (-3.55d+105)) then
              tmp = t_4
          else if (x <= 1.05d+111) then
              tmp = (((t_2 + fmin(fmax(z, t), t_1)) + t_3) + ((b - 0.5d0) * log(c))) + (y * i)
          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 t_1 = fmax(fmin(z, t), a);
      	double t_2 = fmin(fmin(z, t), a);
      	double t_3 = fmax(fmax(z, t), t_1);
      	double t_4 = ((t_3 + (t_2 + (x * Math.log(y)))) + (-0.5 * Math.log(c))) + (y * i);
      	double tmp;
      	if (x <= -3.55e+105) {
      		tmp = t_4;
      	} else if (x <= 1.05e+111) {
      		tmp = (((t_2 + fmin(fmax(z, t), t_1)) + t_3) + ((b - 0.5) * Math.log(c))) + (y * i);
      	} else {
      		tmp = t_4;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b, c, i):
      	t_1 = fmax(fmin(z, t), a)
      	t_2 = fmin(fmin(z, t), a)
      	t_3 = fmax(fmax(z, t), t_1)
      	t_4 = ((t_3 + (t_2 + (x * math.log(y)))) + (-0.5 * math.log(c))) + (y * i)
      	tmp = 0
      	if x <= -3.55e+105:
      		tmp = t_4
      	elif x <= 1.05e+111:
      		tmp = (((t_2 + fmin(fmax(z, t), t_1)) + t_3) + ((b - 0.5) * math.log(c))) + (y * i)
      	else:
      		tmp = t_4
      	return tmp
      
      function code(x, y, z, t, a, b, c, i)
      	t_1 = fmax(fmin(z, t), a)
      	t_2 = fmin(fmin(z, t), a)
      	t_3 = fmax(fmax(z, t), t_1)
      	t_4 = Float64(Float64(Float64(t_3 + Float64(t_2 + Float64(x * log(y)))) + Float64(-0.5 * log(c))) + Float64(y * i))
      	tmp = 0.0
      	if (x <= -3.55e+105)
      		tmp = t_4;
      	elseif (x <= 1.05e+111)
      		tmp = Float64(Float64(Float64(Float64(t_2 + fmin(fmax(z, t), t_1)) + t_3) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i));
      	else
      		tmp = t_4;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b, c, i)
      	t_1 = max(min(z, t), a);
      	t_2 = min(min(z, t), a);
      	t_3 = max(max(z, t), t_1);
      	t_4 = ((t_3 + (t_2 + (x * log(y)))) + (-0.5 * log(c))) + (y * i);
      	tmp = 0.0;
      	if (x <= -3.55e+105)
      		tmp = t_4;
      	elseif (x <= 1.05e+111)
      		tmp = (((t_2 + min(max(z, t), t_1)) + t_3) + ((b - 0.5) * log(c))) + (y * i);
      	else
      		tmp = t_4;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[Max[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$2 = N[Min[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$3 = N[Max[N[Max[z, t], $MachinePrecision], t$95$1], $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$3 + N[(t$95$2 + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1/2 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3550000000000000150029738640376626954316728168075833588523823906463939223777785428892323454743652302061568], t$95$4, If[LessEqual[x, 1049999999999999974685639735482438568778688196460848270285520923497646456255682135894950006688309094612255899648], N[(N[(N[(N[(t$95$2 + N[Min[N[Max[z, t], $MachinePrecision], t$95$1], $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision] + N[(N[(b - 1/2), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]
      
      \begin{array}{l}
      t_1 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\
      t_2 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\
      t_3 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_1\right)\\
      t_4 := \left(\left(t\_3 + \left(t\_2 + x \cdot \log y\right)\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i\\
      \mathbf{if}\;x \leq -3550000000000000150029738640376626954316728168075833588523823906463939223777785428892323454743652302061568:\\
      \;\;\;\;t\_4\\
      
      \mathbf{elif}\;x \leq 1049999999999999974685639735482438568778688196460848270285520923497646456255682135894950006688309094612255899648:\\
      \;\;\;\;\left(\left(\left(t\_2 + \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_1\right)\right) + t\_3\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_4\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < -3.5500000000000002e105 or 1.05e111 < x

        1. Initial program 99.8%

          \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
        2. Taylor expanded in x around 0

          \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
        3. Step-by-step derivation
          1. Applied rewrites84.5%

            \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
          2. Taylor expanded in b around 0

            \[\leadsto \left(\left(\left(z + t\right) + a\right) + \color{blue}{\frac{-1}{2}} \cdot \log c\right) + y \cdot i \]
          3. Step-by-step derivation
            1. Applied rewrites69.8%

              \[\leadsto \left(\left(\left(z + t\right) + a\right) + \color{blue}{\frac{-1}{2}} \cdot \log c\right) + y \cdot i \]
            2. Taylor expanded in t around 0

              \[\leadsto \left(\color{blue}{\left(a + \left(z + x \cdot \log y\right)\right)} + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
            3. Step-by-step derivation
              1. lower-+.f64N/A

                \[\leadsto \left(\left(a + \color{blue}{\left(z + x \cdot \log y\right)}\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
              2. lower-+.f64N/A

                \[\leadsto \left(\left(a + \left(z + \color{blue}{x \cdot \log y}\right)\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
              3. lower-*.f64N/A

                \[\leadsto \left(\left(a + \left(z + x \cdot \color{blue}{\log y}\right)\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
              4. lower-log.f6469.0%

                \[\leadsto \left(\left(a + \left(z + x \cdot \log y\right)\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
            4. Applied rewrites69.0%

              \[\leadsto \left(\color{blue}{\left(a + \left(z + x \cdot \log y\right)\right)} + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]

            if -3.5500000000000002e105 < x < 1.05e111

            1. Initial program 99.8%

              \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
            2. Taylor expanded in x around 0

              \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
            3. Step-by-step derivation
              1. Applied rewrites84.5%

                \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
            4. Recombined 2 regimes into one program.
            5. Add Preprocessing

            Alternative 3: 90.1% accurate, 0.4× speedup?

            \[\begin{array}{l} t_1 := \mathsf{min}\left(t, \mathsf{max}\left(z, a\right)\right)\\ t_2 := x \cdot \log y\\ t_3 := \mathsf{max}\left(t, \mathsf{max}\left(z, a\right)\right)\\ \mathbf{if}\;x \leq -3599999999999999879581681787739427058599582932568556174433318048436749902375581436811618887180905028255744:\\ \;\;\;\;\left(t\_1 + \left(\mathsf{min}\left(z, a\right) + \left(t\_2 + \log c \cdot \frac{-1}{2}\right)\right)\right) + y \cdot i\\ \mathbf{elif}\;x \leq 1049999999999999974685639735482438568778688196460848270285520923497646456255682135894950006688309094612255899648:\\ \;\;\;\;\left(\left(\left(\mathsf{min}\left(z, a\right) + t\_1\right) + t\_3\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;\left(\left(t\_3 + t\_2\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i\\ \end{array} \]
            (FPCore (x y z t a b c i)
              :precision binary64
              (let* ((t_1 (fmin t (fmax z a)))
                   (t_2 (* x (log y)))
                   (t_3 (fmax t (fmax z a))))
              (if (<=
                   x
                   -3599999999999999879581681787739427058599582932568556174433318048436749902375581436811618887180905028255744)
                (+ (+ t_1 (+ (fmin z a) (+ t_2 (* (log c) -1/2)))) (* y i))
                (if (<=
                     x
                     1049999999999999974685639735482438568778688196460848270285520923497646456255682135894950006688309094612255899648)
                  (+ (+ (+ (+ (fmin z a) t_1) t_3) (* (- b 1/2) (log c))) (* y i))
                  (+ (+ (+ t_3 t_2) (* -1/2 (log c))) (* y i))))))
            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
            	double t_1 = fmin(t, fmax(z, a));
            	double t_2 = x * log(y);
            	double t_3 = fmax(t, fmax(z, a));
            	double tmp;
            	if (x <= -3.6e+105) {
            		tmp = (t_1 + (fmin(z, a) + (t_2 + (log(c) * -0.5)))) + (y * i);
            	} else if (x <= 1.05e+111) {
            		tmp = (((fmin(z, a) + t_1) + t_3) + ((b - 0.5) * log(c))) + (y * i);
            	} else {
            		tmp = ((t_3 + t_2) + (-0.5 * log(c))) + (y * i);
            	}
            	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)
            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) :: t_1
                real(8) :: t_2
                real(8) :: t_3
                real(8) :: tmp
                t_1 = fmin(t, fmax(z, a))
                t_2 = x * log(y)
                t_3 = fmax(t, fmax(z, a))
                if (x <= (-3.6d+105)) then
                    tmp = (t_1 + (fmin(z, a) + (t_2 + (log(c) * (-0.5d0))))) + (y * i)
                else if (x <= 1.05d+111) then
                    tmp = (((fmin(z, a) + t_1) + t_3) + ((b - 0.5d0) * log(c))) + (y * i)
                else
                    tmp = ((t_3 + t_2) + ((-0.5d0) * log(c))) + (y * i)
                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 t_1 = fmin(t, fmax(z, a));
            	double t_2 = x * Math.log(y);
            	double t_3 = fmax(t, fmax(z, a));
            	double tmp;
            	if (x <= -3.6e+105) {
            		tmp = (t_1 + (fmin(z, a) + (t_2 + (Math.log(c) * -0.5)))) + (y * i);
            	} else if (x <= 1.05e+111) {
            		tmp = (((fmin(z, a) + t_1) + t_3) + ((b - 0.5) * Math.log(c))) + (y * i);
            	} else {
            		tmp = ((t_3 + t_2) + (-0.5 * Math.log(c))) + (y * i);
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b, c, i):
            	t_1 = fmin(t, fmax(z, a))
            	t_2 = x * math.log(y)
            	t_3 = fmax(t, fmax(z, a))
            	tmp = 0
            	if x <= -3.6e+105:
            		tmp = (t_1 + (fmin(z, a) + (t_2 + (math.log(c) * -0.5)))) + (y * i)
            	elif x <= 1.05e+111:
            		tmp = (((fmin(z, a) + t_1) + t_3) + ((b - 0.5) * math.log(c))) + (y * i)
            	else:
            		tmp = ((t_3 + t_2) + (-0.5 * math.log(c))) + (y * i)
            	return tmp
            
            function code(x, y, z, t, a, b, c, i)
            	t_1 = fmin(t, fmax(z, a))
            	t_2 = Float64(x * log(y))
            	t_3 = fmax(t, fmax(z, a))
            	tmp = 0.0
            	if (x <= -3.6e+105)
            		tmp = Float64(Float64(t_1 + Float64(fmin(z, a) + Float64(t_2 + Float64(log(c) * -0.5)))) + Float64(y * i));
            	elseif (x <= 1.05e+111)
            		tmp = Float64(Float64(Float64(Float64(fmin(z, a) + t_1) + t_3) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i));
            	else
            		tmp = Float64(Float64(Float64(t_3 + t_2) + Float64(-0.5 * log(c))) + Float64(y * i));
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a, b, c, i)
            	t_1 = min(t, max(z, a));
            	t_2 = x * log(y);
            	t_3 = max(t, max(z, a));
            	tmp = 0.0;
            	if (x <= -3.6e+105)
            		tmp = (t_1 + (min(z, a) + (t_2 + (log(c) * -0.5)))) + (y * i);
            	elseif (x <= 1.05e+111)
            		tmp = (((min(z, a) + t_1) + t_3) + ((b - 0.5) * log(c))) + (y * i);
            	else
            		tmp = ((t_3 + t_2) + (-0.5 * log(c))) + (y * i);
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[Min[t, N[Max[z, a], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Max[t, N[Max[z, a], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, -3599999999999999879581681787739427058599582932568556174433318048436749902375581436811618887180905028255744], N[(N[(t$95$1 + N[(N[Min[z, a], $MachinePrecision] + N[(t$95$2 + N[(N[Log[c], $MachinePrecision] * -1/2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1049999999999999974685639735482438568778688196460848270285520923497646456255682135894950006688309094612255899648], N[(N[(N[(N[(N[Min[z, a], $MachinePrecision] + t$95$1), $MachinePrecision] + t$95$3), $MachinePrecision] + N[(N[(b - 1/2), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$3 + t$95$2), $MachinePrecision] + N[(-1/2 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]]]
            
            \begin{array}{l}
            t_1 := \mathsf{min}\left(t, \mathsf{max}\left(z, a\right)\right)\\
            t_2 := x \cdot \log y\\
            t_3 := \mathsf{max}\left(t, \mathsf{max}\left(z, a\right)\right)\\
            \mathbf{if}\;x \leq -3599999999999999879581681787739427058599582932568556174433318048436749902375581436811618887180905028255744:\\
            \;\;\;\;\left(t\_1 + \left(\mathsf{min}\left(z, a\right) + \left(t\_2 + \log c \cdot \frac{-1}{2}\right)\right)\right) + y \cdot i\\
            
            \mathbf{elif}\;x \leq 1049999999999999974685639735482438568778688196460848270285520923497646456255682135894950006688309094612255899648:\\
            \;\;\;\;\left(\left(\left(\mathsf{min}\left(z, a\right) + t\_1\right) + t\_3\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(\left(t\_3 + t\_2\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if x < -3.5999999999999999e105

              1. Initial program 99.8%

                \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
              2. Taylor expanded in a around 0

                \[\leadsto \color{blue}{\left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} + y \cdot i \]
              3. Step-by-step derivation
                1. lower-+.f64N/A

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

                  \[\leadsto \left(t + \left(z + \color{blue}{\left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)}\right)\right) + y \cdot i \]
                3. lower-+.f64N/A

                  \[\leadsto \left(t + \left(z + \left(x \cdot \log y + \color{blue}{\log c \cdot \left(b - \frac{1}{2}\right)}\right)\right)\right) + y \cdot i \]
                4. lower-*.f64N/A

                  \[\leadsto \left(t + \left(z + \left(x \cdot \log y + \color{blue}{\log c} \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) + y \cdot i \]
                5. lower-log.f64N/A

                  \[\leadsto \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) + y \cdot i \]
                6. lower-*.f64N/A

                  \[\leadsto \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \color{blue}{\left(b - \frac{1}{2}\right)}\right)\right)\right) + y \cdot i \]
                7. lower-log.f64N/A

                  \[\leadsto \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(\color{blue}{b} - \frac{1}{2}\right)\right)\right)\right) + y \cdot i \]
                8. lower--.f6483.8%

                  \[\leadsto \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \color{blue}{\frac{1}{2}}\right)\right)\right)\right) + y \cdot i \]
              4. Applied rewrites83.8%

                \[\leadsto \color{blue}{\left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} + y \cdot i \]
              5. Taylor expanded in b around 0

                \[\leadsto \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \frac{-1}{2}\right)\right)\right) + y \cdot i \]
              6. Step-by-step derivation
                1. Applied rewrites69.2%

                  \[\leadsto \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \frac{-1}{2}\right)\right)\right) + y \cdot i \]

                if -3.5999999999999999e105 < x < 1.05e111

                1. Initial program 99.8%

                  \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                2. Taylor expanded in x around 0

                  \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                3. Step-by-step derivation
                  1. Applied rewrites84.5%

                    \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]

                  if 1.05e111 < x

                  1. Initial program 99.8%

                    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                  2. Taylor expanded in x around 0

                    \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                  3. Step-by-step derivation
                    1. Applied rewrites84.5%

                      \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                    2. Taylor expanded in b around 0

                      \[\leadsto \left(\left(\left(z + t\right) + a\right) + \color{blue}{\frac{-1}{2}} \cdot \log c\right) + y \cdot i \]
                    3. Step-by-step derivation
                      1. Applied rewrites69.8%

                        \[\leadsto \left(\left(\left(z + t\right) + a\right) + \color{blue}{\frac{-1}{2}} \cdot \log c\right) + y \cdot i \]
                      2. Taylor expanded in t around 0

                        \[\leadsto \left(\color{blue}{\left(a + \left(z + x \cdot \log y\right)\right)} + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
                      3. Step-by-step derivation
                        1. lower-+.f64N/A

                          \[\leadsto \left(\left(a + \color{blue}{\left(z + x \cdot \log y\right)}\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
                        2. lower-+.f64N/A

                          \[\leadsto \left(\left(a + \left(z + \color{blue}{x \cdot \log y}\right)\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
                        3. lower-*.f64N/A

                          \[\leadsto \left(\left(a + \left(z + x \cdot \color{blue}{\log y}\right)\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
                        4. lower-log.f6469.0%

                          \[\leadsto \left(\left(a + \left(z + x \cdot \log y\right)\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
                      4. Applied rewrites69.0%

                        \[\leadsto \left(\color{blue}{\left(a + \left(z + x \cdot \log y\right)\right)} + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
                      5. Taylor expanded in z around 0

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

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

                          \[\leadsto \left(\left(a + x \cdot \log y\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
                        3. lower-log.f6454.7%

                          \[\leadsto \left(\left(a + x \cdot \log y\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
                      7. Applied rewrites54.7%

                        \[\leadsto \left(\left(a + \color{blue}{x \cdot \log y}\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
                    4. Recombined 3 regimes into one program.
                    5. Add Preprocessing

                    Alternative 4: 90.0% accurate, 0.4× speedup?

                    \[\begin{array}{l} t_1 := \mathsf{min}\left(t, \mathsf{max}\left(z, a\right)\right)\\ t_2 := \mathsf{max}\left(t, \mathsf{max}\left(z, a\right)\right)\\ \mathbf{if}\;x \leq -3599999999999999879581681787739427058599582932568556174433318048436749902375581436811618887180905028255744:\\ \;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot t\_1 - \left(\log y \cdot x + \mathsf{min}\left(z, a\right)\right)\right), \left(\frac{1}{i}\right), 1, y\right)\\ \mathbf{elif}\;x \leq 1049999999999999974685639735482438568778688196460848270285520923497646456255682135894950006688309094612255899648:\\ \;\;\;\;\left(\left(\left(\mathsf{min}\left(z, a\right) + t\_1\right) + t\_2\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;\left(\left(t\_2 + x \cdot \log y\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i\\ \end{array} \]
                    (FPCore (x y z t a b c i)
                      :precision binary64
                      (let* ((t_1 (fmin t (fmax z a))) (t_2 (fmax t (fmax z a))))
                      (if (<=
                           x
                           -3599999999999999879581681787739427058599582932568556174433318048436749902375581436811618887180905028255744)
                        (134-z0z1z2z3z4
                         (- i)
                         (- (* -1 t_1) (+ (* (log y) x) (fmin z a)))
                         (/ 1 i)
                         1
                         y)
                        (if (<=
                             x
                             1049999999999999974685639735482438568778688196460848270285520923497646456255682135894950006688309094612255899648)
                          (+ (+ (+ (+ (fmin z a) t_1) t_2) (* (- b 1/2) (log c))) (* y i))
                          (+ (+ (+ t_2 (* x (log y))) (* -1/2 (log c))) (* y i))))))
                    \begin{array}{l}
                    t_1 := \mathsf{min}\left(t, \mathsf{max}\left(z, a\right)\right)\\
                    t_2 := \mathsf{max}\left(t, \mathsf{max}\left(z, a\right)\right)\\
                    \mathbf{if}\;x \leq -3599999999999999879581681787739427058599582932568556174433318048436749902375581436811618887180905028255744:\\
                    \;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot t\_1 - \left(\log y \cdot x + \mathsf{min}\left(z, a\right)\right)\right), \left(\frac{1}{i}\right), 1, y\right)\\
                    
                    \mathbf{elif}\;x \leq 1049999999999999974685639735482438568778688196460848270285520923497646456255682135894950006688309094612255899648:\\
                    \;\;\;\;\left(\left(\left(\mathsf{min}\left(z, a\right) + t\_1\right) + t\_2\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\left(\left(t\_2 + x \cdot \log y\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i\\
                    
                    
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if x < -3.5999999999999999e105

                      1. Initial program 99.8%

                        \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                      2. Taylor expanded in i around -inf

                        \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)\right)} \]
                      3. Step-by-step derivation
                        1. lower-*.f64N/A

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

                          \[\leadsto -1 \cdot \left(i \cdot \color{blue}{\left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)}\right) \]
                        3. lower-+.f64N/A

                          \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + \color{blue}{-1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}}\right)\right) \]
                        4. lower-*.f64N/A

                          \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + \color{blue}{-1} \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)\right) \]
                        5. lower-*.f64N/A

                          \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \color{blue}{\frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}}\right)\right) \]
                        6. lower-/.f64N/A

                          \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{\color{blue}{i}}\right)\right) \]
                      4. Applied rewrites70.1%

                        \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)\right)} \]
                      5. Applied rewrites98.8%

                        \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \color{blue}{\left(\left(\left(\frac{1}{2} - b\right) \cdot \log c - \left(a + t\right)\right) - \left(\log y \cdot x + z\right)\right)}, \left(\frac{1}{i}\right), 1, y\right) \]
                      6. Taylor expanded in t around inf

                        \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot t - \left(\color{blue}{\log y \cdot x} + z\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                      7. Step-by-step derivation
                        1. lower-*.f6467.1%

                          \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot t - \left(\log y \cdot \color{blue}{x} + z\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                      8. Applied rewrites67.1%

                        \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot t - \left(\color{blue}{\log y \cdot x} + z\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]

                      if -3.5999999999999999e105 < x < 1.05e111

                      1. Initial program 99.8%

                        \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                      2. Taylor expanded in x around 0

                        \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                      3. Step-by-step derivation
                        1. Applied rewrites84.5%

                          \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]

                        if 1.05e111 < x

                        1. Initial program 99.8%

                          \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                        2. Taylor expanded in x around 0

                          \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                        3. Step-by-step derivation
                          1. Applied rewrites84.5%

                            \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                          2. Taylor expanded in b around 0

                            \[\leadsto \left(\left(\left(z + t\right) + a\right) + \color{blue}{\frac{-1}{2}} \cdot \log c\right) + y \cdot i \]
                          3. Step-by-step derivation
                            1. Applied rewrites69.8%

                              \[\leadsto \left(\left(\left(z + t\right) + a\right) + \color{blue}{\frac{-1}{2}} \cdot \log c\right) + y \cdot i \]
                            2. Taylor expanded in t around 0

                              \[\leadsto \left(\color{blue}{\left(a + \left(z + x \cdot \log y\right)\right)} + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
                            3. Step-by-step derivation
                              1. lower-+.f64N/A

                                \[\leadsto \left(\left(a + \color{blue}{\left(z + x \cdot \log y\right)}\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
                              2. lower-+.f64N/A

                                \[\leadsto \left(\left(a + \left(z + \color{blue}{x \cdot \log y}\right)\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
                              3. lower-*.f64N/A

                                \[\leadsto \left(\left(a + \left(z + x \cdot \color{blue}{\log y}\right)\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
                              4. lower-log.f6469.0%

                                \[\leadsto \left(\left(a + \left(z + x \cdot \log y\right)\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
                            4. Applied rewrites69.0%

                              \[\leadsto \left(\color{blue}{\left(a + \left(z + x \cdot \log y\right)\right)} + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
                            5. Taylor expanded in z around 0

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

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

                                \[\leadsto \left(\left(a + x \cdot \log y\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
                              3. lower-log.f6454.7%

                                \[\leadsto \left(\left(a + x \cdot \log y\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
                            7. Applied rewrites54.7%

                              \[\leadsto \left(\left(a + \color{blue}{x \cdot \log y}\right) + \frac{-1}{2} \cdot \log c\right) + y \cdot i \]
                          4. Recombined 3 regimes into one program.
                          5. Add Preprocessing

                          Alternative 5: 89.9% accurate, 0.7× speedup?

                          \[\begin{array}{l} \mathbf{if}\;x \leq -3599999999999999879581681787739427058599582932568556174433318048436749902375581436811618887180905028255744:\\ \;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot \mathsf{min}\left(t, a\right) - \left(\log y \cdot x + z\right)\right), \left(\frac{1}{i}\right), 1, y\right)\\ \mathbf{elif}\;x \leq 4999999999999999681793534688837958868212853663785036782419720361679078139026353774446693497293473788990517591304702846227575332082657167871886131204710002780090859851360619284064431218701999138176915986960331575388717979146899858120583984847024514138112:\\ \;\;\;\;\left(\left(\left(z + \mathsf{min}\left(t, a\right)\right) + \mathsf{max}\left(t, a\right)\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\left(-\log y\right) \cdot x\right), \left(\frac{1}{i}\right), 1, y\right)\\ \end{array} \]
                          (FPCore (x y z t a b c i)
                            :precision binary64
                            (if (<=
                               x
                               -3599999999999999879581681787739427058599582932568556174433318048436749902375581436811618887180905028255744)
                            (134-z0z1z2z3z4
                             (- i)
                             (- (* -1 (fmin t a)) (+ (* (log y) x) z))
                             (/ 1 i)
                             1
                             y)
                            (if (<=
                                 x
                                 4999999999999999681793534688837958868212853663785036782419720361679078139026353774446693497293473788990517591304702846227575332082657167871886131204710002780090859851360619284064431218701999138176915986960331575388717979146899858120583984847024514138112)
                              (+
                               (+ (+ (+ z (fmin t a)) (fmax t a)) (* (- b 1/2) (log c)))
                               (* y i))
                              (134-z0z1z2z3z4 (- i) (* (- (log y)) x) (/ 1 i) 1 y))))
                          \begin{array}{l}
                          \mathbf{if}\;x \leq -3599999999999999879581681787739427058599582932568556174433318048436749902375581436811618887180905028255744:\\
                          \;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot \mathsf{min}\left(t, a\right) - \left(\log y \cdot x + z\right)\right), \left(\frac{1}{i}\right), 1, y\right)\\
                          
                          \mathbf{elif}\;x \leq 4999999999999999681793534688837958868212853663785036782419720361679078139026353774446693497293473788990517591304702846227575332082657167871886131204710002780090859851360619284064431218701999138176915986960331575388717979146899858120583984847024514138112:\\
                          \;\;\;\;\left(\left(\left(z + \mathsf{min}\left(t, a\right)\right) + \mathsf{max}\left(t, a\right)\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\left(-\log y\right) \cdot x\right), \left(\frac{1}{i}\right), 1, y\right)\\
                          
                          
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if x < -3.5999999999999999e105

                            1. Initial program 99.8%

                              \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                            2. Taylor expanded in i around -inf

                              \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)\right)} \]
                            3. Step-by-step derivation
                              1. lower-*.f64N/A

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

                                \[\leadsto -1 \cdot \left(i \cdot \color{blue}{\left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)}\right) \]
                              3. lower-+.f64N/A

                                \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + \color{blue}{-1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}}\right)\right) \]
                              4. lower-*.f64N/A

                                \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + \color{blue}{-1} \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)\right) \]
                              5. lower-*.f64N/A

                                \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \color{blue}{\frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}}\right)\right) \]
                              6. lower-/.f64N/A

                                \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{\color{blue}{i}}\right)\right) \]
                            4. Applied rewrites70.1%

                              \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)\right)} \]
                            5. Applied rewrites98.8%

                              \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \color{blue}{\left(\left(\left(\frac{1}{2} - b\right) \cdot \log c - \left(a + t\right)\right) - \left(\log y \cdot x + z\right)\right)}, \left(\frac{1}{i}\right), 1, y\right) \]
                            6. Taylor expanded in t around inf

                              \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot t - \left(\color{blue}{\log y \cdot x} + z\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                            7. Step-by-step derivation
                              1. lower-*.f6467.1%

                                \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot t - \left(\log y \cdot \color{blue}{x} + z\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                            8. Applied rewrites67.1%

                              \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot t - \left(\color{blue}{\log y \cdot x} + z\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]

                            if -3.5999999999999999e105 < x < 4.9999999999999997e252

                            1. Initial program 99.8%

                              \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                            2. Taylor expanded in x around 0

                              \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                            3. Step-by-step derivation
                              1. Applied rewrites84.5%

                                \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]

                              if 4.9999999999999997e252 < x

                              1. Initial program 99.8%

                                \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                              2. Taylor expanded in i around -inf

                                \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)\right)} \]
                              3. Step-by-step derivation
                                1. lower-*.f64N/A

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

                                  \[\leadsto -1 \cdot \left(i \cdot \color{blue}{\left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)}\right) \]
                                3. lower-+.f64N/A

                                  \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + \color{blue}{-1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}}\right)\right) \]
                                4. lower-*.f64N/A

                                  \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + \color{blue}{-1} \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)\right) \]
                                5. lower-*.f64N/A

                                  \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \color{blue}{\frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}}\right)\right) \]
                                6. lower-/.f64N/A

                                  \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{\color{blue}{i}}\right)\right) \]
                              4. Applied rewrites70.1%

                                \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)\right)} \]
                              5. Applied rewrites98.8%

                                \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \color{blue}{\left(\left(\left(\frac{1}{2} - b\right) \cdot \log c - \left(a + t\right)\right) - \left(\log y \cdot x + z\right)\right)}, \left(\frac{1}{i}\right), 1, y\right) \]
                              6. Taylor expanded in x around inf

                                \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot \color{blue}{\left(x \cdot \log y\right)}\right), \left(\frac{1}{i}\right), 1, y\right) \]
                              7. Step-by-step derivation
                                1. lower-*.f64N/A

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot \left(x \cdot \color{blue}{\log y}\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                2. lower-*.f64N/A

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot \left(x \cdot \log y\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                3. lower-log.f6437.9%

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot \left(x \cdot \log y\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                              8. Applied rewrites37.9%

                                \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot \color{blue}{\left(x \cdot \log y\right)}\right), \left(\frac{1}{i}\right), 1, y\right) \]
                              9. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot \left(x \cdot \color{blue}{\log y}\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                2. mul-1-negN/A

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\mathsf{neg}\left(x \cdot \log y\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                3. lift-log.f64N/A

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\mathsf{neg}\left(x \cdot \log y\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                4. lift-*.f64N/A

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\mathsf{neg}\left(x \cdot \log y\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                5. *-commutativeN/A

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\mathsf{neg}\left(\log y \cdot x\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                6. distribute-lft-neg-inN/A

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\left(\mathsf{neg}\left(\log y\right)\right) \cdot x\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                7. lower-*.f64N/A

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\left(\mathsf{neg}\left(\log y\right)\right) \cdot x\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                8. lower-neg.f64N/A

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\left(-\log y\right) \cdot x\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                9. lift-log.f6437.9%

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\left(-\log y\right) \cdot x\right), \left(\frac{1}{i}\right), 1, y\right) \]
                              10. Applied rewrites37.9%

                                \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\left(-\log y\right) \cdot x\right), \left(\frac{1}{i}\right), 1, y\right) \]
                            4. Recombined 3 regimes into one program.
                            5. Add Preprocessing

                            Alternative 6: 86.8% accurate, 1.5× speedup?

                            \[\begin{array}{l} t_1 := \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\left(-\log y\right) \cdot x\right), \left(\frac{1}{i}\right), 1, y\right)\\ \mathbf{if}\;x \leq -3599999999999999879581681787739427058599582932568556174433318048436749902375581436811618887180905028255744:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 4999999999999999681793534688837958868212853663785036782419720361679078139026353774446693497293473788990517591304702846227575332082657167871886131204710002780090859851360619284064431218701999138176915986960331575388717979146899858120583984847024514138112:\\ \;\;\;\;\left(\left(\left(z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                            (FPCore (x y z t a b c i)
                              :precision binary64
                              (let* ((t_1 (134-z0z1z2z3z4 (- i) (* (- (log y)) x) (/ 1 i) 1 y)))
                              (if (<=
                                   x
                                   -3599999999999999879581681787739427058599582932568556174433318048436749902375581436811618887180905028255744)
                                t_1
                                (if (<=
                                     x
                                     4999999999999999681793534688837958868212853663785036782419720361679078139026353774446693497293473788990517591304702846227575332082657167871886131204710002780090859851360619284064431218701999138176915986960331575388717979146899858120583984847024514138112)
                                  (+ (+ (+ (+ z t) a) (* (- b 1/2) (log c))) (* y i))
                                  t_1))))
                            \begin{array}{l}
                            t_1 := \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\left(-\log y\right) \cdot x\right), \left(\frac{1}{i}\right), 1, y\right)\\
                            \mathbf{if}\;x \leq -3599999999999999879581681787739427058599582932568556174433318048436749902375581436811618887180905028255744:\\
                            \;\;\;\;t\_1\\
                            
                            \mathbf{elif}\;x \leq 4999999999999999681793534688837958868212853663785036782419720361679078139026353774446693497293473788990517591304702846227575332082657167871886131204710002780090859851360619284064431218701999138176915986960331575388717979146899858120583984847024514138112:\\
                            \;\;\;\;\left(\left(\left(z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_1\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if x < -3.5999999999999999e105 or 4.9999999999999997e252 < x

                              1. Initial program 99.8%

                                \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                              2. Taylor expanded in i around -inf

                                \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)\right)} \]
                              3. Step-by-step derivation
                                1. lower-*.f64N/A

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

                                  \[\leadsto -1 \cdot \left(i \cdot \color{blue}{\left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)}\right) \]
                                3. lower-+.f64N/A

                                  \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + \color{blue}{-1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}}\right)\right) \]
                                4. lower-*.f64N/A

                                  \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + \color{blue}{-1} \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)\right) \]
                                5. lower-*.f64N/A

                                  \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \color{blue}{\frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}}\right)\right) \]
                                6. lower-/.f64N/A

                                  \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{\color{blue}{i}}\right)\right) \]
                              4. Applied rewrites70.1%

                                \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)\right)} \]
                              5. Applied rewrites98.8%

                                \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \color{blue}{\left(\left(\left(\frac{1}{2} - b\right) \cdot \log c - \left(a + t\right)\right) - \left(\log y \cdot x + z\right)\right)}, \left(\frac{1}{i}\right), 1, y\right) \]
                              6. Taylor expanded in x around inf

                                \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot \color{blue}{\left(x \cdot \log y\right)}\right), \left(\frac{1}{i}\right), 1, y\right) \]
                              7. Step-by-step derivation
                                1. lower-*.f64N/A

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot \left(x \cdot \color{blue}{\log y}\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                2. lower-*.f64N/A

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot \left(x \cdot \log y\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                3. lower-log.f6437.9%

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot \left(x \cdot \log y\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                              8. Applied rewrites37.9%

                                \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot \color{blue}{\left(x \cdot \log y\right)}\right), \left(\frac{1}{i}\right), 1, y\right) \]
                              9. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot \left(x \cdot \color{blue}{\log y}\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                2. mul-1-negN/A

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\mathsf{neg}\left(x \cdot \log y\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                3. lift-log.f64N/A

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\mathsf{neg}\left(x \cdot \log y\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                4. lift-*.f64N/A

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\mathsf{neg}\left(x \cdot \log y\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                5. *-commutativeN/A

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\mathsf{neg}\left(\log y \cdot x\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                6. distribute-lft-neg-inN/A

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\left(\mathsf{neg}\left(\log y\right)\right) \cdot x\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                7. lower-*.f64N/A

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\left(\mathsf{neg}\left(\log y\right)\right) \cdot x\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                8. lower-neg.f64N/A

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\left(-\log y\right) \cdot x\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                9. lift-log.f6437.9%

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\left(-\log y\right) \cdot x\right), \left(\frac{1}{i}\right), 1, y\right) \]
                              10. Applied rewrites37.9%

                                \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(\left(-\log y\right) \cdot x\right), \left(\frac{1}{i}\right), 1, y\right) \]

                              if -3.5999999999999999e105 < x < 4.9999999999999997e252

                              1. Initial program 99.8%

                                \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                              2. Taylor expanded in x around 0

                                \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                              3. Step-by-step derivation
                                1. Applied rewrites84.5%

                                  \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                              4. Recombined 2 regimes into one program.
                              5. Add Preprocessing

                              Alternative 7: 84.9% accurate, 1.8× speedup?

                              \[\begin{array}{l} \mathbf{if}\;x \leq -2900000000000000069204150533318179972423531164014983082171454639135575083669141427456118715053209327656255939076123855554686929346306229350604672279211178777041260228043399439241445376:\\ \;\;\;\;i \cdot \left(y - \frac{\left(-x\right) \cdot \log y}{i}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i\\ \end{array} \]
                              (FPCore (x y z t a b c i)
                                :precision binary64
                                (if (<=
                                   x
                                   -2900000000000000069204150533318179972423531164014983082171454639135575083669141427456118715053209327656255939076123855554686929346306229350604672279211178777041260228043399439241445376)
                                (* i (- y (/ (* (- x) (log y)) i)))
                                (+ (+ (+ (+ z t) a) (* (- b 1/2) (log c))) (* y i))))
                              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                              	double tmp;
                              	if (x <= -2.9e+183) {
                              		tmp = i * (y - ((-x * log(y)) / i));
                              	} else {
                              		tmp = (((z + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                              	}
                              	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)
                              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) :: tmp
                                  if (x <= (-2.9d+183)) then
                                      tmp = i * (y - ((-x * log(y)) / i))
                                  else
                                      tmp = (((z + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
                                  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 tmp;
                              	if (x <= -2.9e+183) {
                              		tmp = i * (y - ((-x * Math.log(y)) / i));
                              	} else {
                              		tmp = (((z + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t, a, b, c, i):
                              	tmp = 0
                              	if x <= -2.9e+183:
                              		tmp = i * (y - ((-x * math.log(y)) / i))
                              	else:
                              		tmp = (((z + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
                              	return tmp
                              
                              function code(x, y, z, t, a, b, c, i)
                              	tmp = 0.0
                              	if (x <= -2.9e+183)
                              		tmp = Float64(i * Float64(y - Float64(Float64(Float64(-x) * log(y)) / i)));
                              	else
                              		tmp = Float64(Float64(Float64(Float64(z + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i));
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z, t, a, b, c, i)
                              	tmp = 0.0;
                              	if (x <= -2.9e+183)
                              		tmp = i * (y - ((-x * log(y)) / i));
                              	else
                              		tmp = (((z + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -2900000000000000069204150533318179972423531164014983082171454639135575083669141427456118715053209327656255939076123855554686929346306229350604672279211178777041260228043399439241445376], N[(i * N[(y - N[(N[((-x) * N[Log[y], $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(z + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 1/2), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]
                              
                              \begin{array}{l}
                              \mathbf{if}\;x \leq -2900000000000000069204150533318179972423531164014983082171454639135575083669141427456118715053209327656255939076123855554686929346306229350604672279211178777041260228043399439241445376:\\
                              \;\;\;\;i \cdot \left(y - \frac{\left(-x\right) \cdot \log y}{i}\right)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\left(\left(\left(z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i\\
                              
                              
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if x < -2.9000000000000001e183

                                1. Initial program 99.8%

                                  \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                2. Taylor expanded in i around -inf

                                  \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)\right)} \]
                                3. Step-by-step derivation
                                  1. lower-*.f64N/A

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

                                    \[\leadsto -1 \cdot \left(i \cdot \color{blue}{\left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)}\right) \]
                                  3. lower-+.f64N/A

                                    \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + \color{blue}{-1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}}\right)\right) \]
                                  4. lower-*.f64N/A

                                    \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + \color{blue}{-1} \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)\right) \]
                                  5. lower-*.f64N/A

                                    \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \color{blue}{\frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}}\right)\right) \]
                                  6. lower-/.f64N/A

                                    \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{\color{blue}{i}}\right)\right) \]
                                4. Applied rewrites70.1%

                                  \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)\right)} \]
                                5. Applied rewrites98.8%

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \color{blue}{\left(\left(\left(\frac{1}{2} - b\right) \cdot \log c - \left(a + t\right)\right) - \left(\log y \cdot x + z\right)\right)}, \left(\frac{1}{i}\right), 1, y\right) \]
                                6. Taylor expanded in x around inf

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot \color{blue}{\left(x \cdot \log y\right)}\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                7. Step-by-step derivation
                                  1. lower-*.f64N/A

                                    \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot \left(x \cdot \color{blue}{\log y}\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                  2. lower-*.f64N/A

                                    \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot \left(x \cdot \log y\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                  3. lower-log.f6437.9%

                                    \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot \left(x \cdot \log y\right)\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                8. Applied rewrites37.9%

                                  \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \left(-1 \cdot \color{blue}{\left(x \cdot \log y\right)}\right), \left(\frac{1}{i}\right), 1, y\right) \]
                                9. Step-by-step derivation
                                  1. lift-134-z0z1z2z3z4N/A

                                    \[\leadsto \left(-i\right) \cdot \color{blue}{\left(\left(-1 \cdot \left(x \cdot \log y\right)\right) \cdot \frac{1}{i} - 1 \cdot y\right)} \]
                                  2. lift-neg.f64N/A

                                    \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \left(\color{blue}{\left(-1 \cdot \left(x \cdot \log y\right)\right) \cdot \frac{1}{i}} - 1 \cdot y\right) \]
                                  3. distribute-lft-neg-outN/A

                                    \[\leadsto \mathsf{neg}\left(i \cdot \left(\left(-1 \cdot \left(x \cdot \log y\right)\right) \cdot \frac{1}{i} - 1 \cdot y\right)\right) \]
                                  4. distribute-rgt-neg-inN/A

                                    \[\leadsto i \cdot \color{blue}{\left(\mathsf{neg}\left(\left(\left(-1 \cdot \left(x \cdot \log y\right)\right) \cdot \frac{1}{i} - 1 \cdot y\right)\right)\right)} \]
                                  5. sub-negate-revN/A

                                    \[\leadsto i \cdot \left(1 \cdot y - \color{blue}{\left(-1 \cdot \left(x \cdot \log y\right)\right) \cdot \frac{1}{i}}\right) \]
                                  6. lower-*.f64N/A

                                    \[\leadsto i \cdot \color{blue}{\left(1 \cdot y - \left(-1 \cdot \left(x \cdot \log y\right)\right) \cdot \frac{1}{i}\right)} \]
                                  7. lower--.f64N/A

                                    \[\leadsto i \cdot \left(1 \cdot y - \color{blue}{\left(-1 \cdot \left(x \cdot \log y\right)\right) \cdot \frac{1}{i}}\right) \]
                                10. Applied rewrites32.9%

                                  \[\leadsto i \cdot \color{blue}{\left(y - \frac{\left(-x\right) \cdot \log y}{i}\right)} \]

                                if -2.9000000000000001e183 < x

                                1. Initial program 99.8%

                                  \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                2. Taylor expanded in x around 0

                                  \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                3. Step-by-step derivation
                                  1. Applied rewrites84.5%

                                    \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                4. Recombined 2 regimes into one program.
                                5. Add Preprocessing

                                Alternative 8: 84.5% accurate, 1.9× speedup?

                                \[\left(\left(\left(z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                (FPCore (x y z t a b c i)
                                  :precision binary64
                                  (+ (+ (+ (+ z t) a) (* (- b 1/2) (log c))) (* y i)))
                                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                	return (((z + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                                }
                                
                                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)
                                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
                                    code = (((z + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
                                end function
                                
                                public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                	return (((z + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
                                }
                                
                                def code(x, y, z, t, a, b, c, i):
                                	return (((z + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
                                
                                function code(x, y, z, t, a, b, c, i)
                                	return Float64(Float64(Float64(Float64(z + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                                end
                                
                                function tmp = code(x, y, z, t, a, b, c, i)
                                	tmp = (((z + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                                end
                                
                                code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(z + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 1/2), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
                                
                                \left(\left(\left(z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i
                                
                                Derivation
                                1. Initial program 99.8%

                                  \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                2. Taylor expanded in x around 0

                                  \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                3. Step-by-step derivation
                                  1. Applied rewrites84.5%

                                    \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                  2. Add Preprocessing

                                  Alternative 9: 82.9% accurate, 1.9× speedup?

                                  \[\left(\left(\left(z + t\right) + a\right) + b \cdot \log c\right) + y \cdot i \]
                                  (FPCore (x y z t a b c i)
                                    :precision binary64
                                    (+ (+ (+ (+ z t) a) (* b (log c))) (* y i)))
                                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                  	return (((z + t) + a) + (b * log(c))) + (y * i);
                                  }
                                  
                                  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)
                                  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
                                      code = (((z + t) + a) + (b * log(c))) + (y * i)
                                  end function
                                  
                                  public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                  	return (((z + t) + a) + (b * Math.log(c))) + (y * i);
                                  }
                                  
                                  def code(x, y, z, t, a, b, c, i):
                                  	return (((z + t) + a) + (b * math.log(c))) + (y * i)
                                  
                                  function code(x, y, z, t, a, b, c, i)
                                  	return Float64(Float64(Float64(Float64(z + t) + a) + Float64(b * log(c))) + Float64(y * i))
                                  end
                                  
                                  function tmp = code(x, y, z, t, a, b, c, i)
                                  	tmp = (((z + t) + a) + (b * log(c))) + (y * i);
                                  end
                                  
                                  code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(z + t), $MachinePrecision] + a), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
                                  
                                  \left(\left(\left(z + t\right) + a\right) + b \cdot \log c\right) + y \cdot i
                                  
                                  Derivation
                                  1. Initial program 99.8%

                                    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                  2. Taylor expanded in x around 0

                                    \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites84.5%

                                      \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                    2. Taylor expanded in b around inf

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

                                        \[\leadsto \left(\left(\left(z + t\right) + a\right) + b \cdot \color{blue}{\log c}\right) + y \cdot i \]
                                      2. lower-log.f6482.9%

                                        \[\leadsto \left(\left(\left(z + t\right) + a\right) + b \cdot \log c\right) + y \cdot i \]
                                    4. Applied rewrites82.9%

                                      \[\leadsto \left(\left(\left(z + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
                                    5. Add Preprocessing

                                    Alternative 10: 71.4% accurate, 2.0× speedup?

                                    \[\begin{array}{l} t_1 := b \cdot \log c\\ \mathbf{if}\;b \leq -220000000000000007326340945888506653530663275816339520787551061483281194676992796675380578830910283831394710160078130540983823370103972914382310371986209239684302748330385406265864769173821619794310214916639484596526893062295164526571011132358656:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 159999999999999989944552393973900225604372920958349972403300010855230793642961654112601228541105453547752781156718400530593792829447325901273825939842848991414158271414760636416:\\ \;\;\;\;1 \cdot \left(a + \left(t + z\right)\right) + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                    (FPCore (x y z t a b c i)
                                      :precision binary64
                                      (let* ((t_1 (* b (log c))))
                                      (if (<=
                                           b
                                           -220000000000000007326340945888506653530663275816339520787551061483281194676992796675380578830910283831394710160078130540983823370103972914382310371986209239684302748330385406265864769173821619794310214916639484596526893062295164526571011132358656)
                                        t_1
                                        (if (<=
                                             b
                                             159999999999999989944552393973900225604372920958349972403300010855230793642961654112601228541105453547752781156718400530593792829447325901273825939842848991414158271414760636416)
                                          (+ (* 1 (+ a (+ t z))) (* y i))
                                          t_1))))
                                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                    	double t_1 = b * log(c);
                                    	double tmp;
                                    	if (b <= -2.2e+245) {
                                    		tmp = t_1;
                                    	} else if (b <= 1.6e+176) {
                                    		tmp = (1.0 * (a + (t + z))) + (y * i);
                                    	} 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)
                                    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) :: t_1
                                        real(8) :: tmp
                                        t_1 = b * log(c)
                                        if (b <= (-2.2d+245)) then
                                            tmp = t_1
                                        else if (b <= 1.6d+176) then
                                            tmp = (1.0d0 * (a + (t + z))) + (y * i)
                                        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 t_1 = b * Math.log(c);
                                    	double tmp;
                                    	if (b <= -2.2e+245) {
                                    		tmp = t_1;
                                    	} else if (b <= 1.6e+176) {
                                    		tmp = (1.0 * (a + (t + z))) + (y * i);
                                    	} else {
                                    		tmp = t_1;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(x, y, z, t, a, b, c, i):
                                    	t_1 = b * math.log(c)
                                    	tmp = 0
                                    	if b <= -2.2e+245:
                                    		tmp = t_1
                                    	elif b <= 1.6e+176:
                                    		tmp = (1.0 * (a + (t + z))) + (y * i)
                                    	else:
                                    		tmp = t_1
                                    	return tmp
                                    
                                    function code(x, y, z, t, a, b, c, i)
                                    	t_1 = Float64(b * log(c))
                                    	tmp = 0.0
                                    	if (b <= -2.2e+245)
                                    		tmp = t_1;
                                    	elseif (b <= 1.6e+176)
                                    		tmp = Float64(Float64(1.0 * Float64(a + Float64(t + z))) + Float64(y * i));
                                    	else
                                    		tmp = t_1;
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(x, y, z, t, a, b, c, i)
                                    	t_1 = b * log(c);
                                    	tmp = 0.0;
                                    	if (b <= -2.2e+245)
                                    		tmp = t_1;
                                    	elseif (b <= 1.6e+176)
                                    		tmp = (1.0 * (a + (t + z))) + (y * i);
                                    	else
                                    		tmp = t_1;
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -220000000000000007326340945888506653530663275816339520787551061483281194676992796675380578830910283831394710160078130540983823370103972914382310371986209239684302748330385406265864769173821619794310214916639484596526893062295164526571011132358656], t$95$1, If[LessEqual[b, 159999999999999989944552393973900225604372920958349972403300010855230793642961654112601228541105453547752781156718400530593792829447325901273825939842848991414158271414760636416], N[(N[(1 * N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                    
                                    \begin{array}{l}
                                    t_1 := b \cdot \log c\\
                                    \mathbf{if}\;b \leq -220000000000000007326340945888506653530663275816339520787551061483281194676992796675380578830910283831394710160078130540983823370103972914382310371986209239684302748330385406265864769173821619794310214916639484596526893062295164526571011132358656:\\
                                    \;\;\;\;t\_1\\
                                    
                                    \mathbf{elif}\;b \leq 159999999999999989944552393973900225604372920958349972403300010855230793642961654112601228541105453547752781156718400530593792829447325901273825939842848991414158271414760636416:\\
                                    \;\;\;\;1 \cdot \left(a + \left(t + z\right)\right) + y \cdot i\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;t\_1\\
                                    
                                    
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if b < -2.2000000000000001e245 or 1.5999999999999999e176 < b

                                      1. Initial program 99.8%

                                        \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                      2. Taylor expanded in i around -inf

                                        \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)\right)} \]
                                      3. Step-by-step derivation
                                        1. lower-*.f64N/A

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

                                          \[\leadsto -1 \cdot \left(i \cdot \color{blue}{\left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)}\right) \]
                                        3. lower-+.f64N/A

                                          \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + \color{blue}{-1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}}\right)\right) \]
                                        4. lower-*.f64N/A

                                          \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + \color{blue}{-1} \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)\right) \]
                                        5. lower-*.f64N/A

                                          \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \color{blue}{\frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}}\right)\right) \]
                                        6. lower-/.f64N/A

                                          \[\leadsto -1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{\color{blue}{i}}\right)\right) \]
                                      4. Applied rewrites70.1%

                                        \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(-1 \cdot y + -1 \cdot \frac{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{i}\right)\right)} \]
                                      5. Applied rewrites98.8%

                                        \[\leadsto \mathsf{134\_z0z1z2z3z4}\left(\left(-i\right), \color{blue}{\left(\left(\left(\frac{1}{2} - b\right) \cdot \log c - \left(a + t\right)\right) - \left(\log y \cdot x + z\right)\right)}, \left(\frac{1}{i}\right), 1, y\right) \]
                                      6. Taylor expanded in b around inf

                                        \[\leadsto b \cdot \color{blue}{\log c} \]
                                      7. Step-by-step derivation
                                        1. lower-*.f64N/A

                                          \[\leadsto b \cdot \log c \]
                                        2. lower-log.f6416.1%

                                          \[\leadsto b \cdot \log c \]
                                      8. Applied rewrites16.1%

                                        \[\leadsto b \cdot \color{blue}{\log c} \]

                                      if -2.2000000000000001e245 < b < 1.5999999999999999e176

                                      1. Initial program 99.8%

                                        \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                      2. Taylor expanded in x around 0

                                        \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites84.5%

                                          \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                        2. Step-by-step derivation
                                          1. lift-+.f64N/A

                                            \[\leadsto \color{blue}{\left(\left(\left(z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                                          2. lift-*.f64N/A

                                            \[\leadsto \left(\left(\left(z + t\right) + a\right) + \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c}\right) + y \cdot i \]
                                          3. fp-cancel-sign-sub-invN/A

                                            \[\leadsto \color{blue}{\left(\left(\left(z + t\right) + a\right) - \left(\mathsf{neg}\left(\left(b - \frac{1}{2}\right)\right)\right) \cdot \log c\right)} + y \cdot i \]
                                          4. lift--.f64N/A

                                            \[\leadsto \left(\left(\left(z + t\right) + a\right) - \left(\mathsf{neg}\left(\color{blue}{\left(b - \frac{1}{2}\right)}\right)\right) \cdot \log c\right) + y \cdot i \]
                                          5. sub-negate-revN/A

                                            \[\leadsto \left(\left(\left(z + t\right) + a\right) - \color{blue}{\left(\frac{1}{2} - b\right)} \cdot \log c\right) + y \cdot i \]
                                          6. lift--.f64N/A

                                            \[\leadsto \left(\left(\left(z + t\right) + a\right) - \color{blue}{\left(\frac{1}{2} - b\right)} \cdot \log c\right) + y \cdot i \]
                                          7. lift-*.f64N/A

                                            \[\leadsto \left(\left(\left(z + t\right) + a\right) - \color{blue}{\left(\frac{1}{2} - b\right) \cdot \log c}\right) + y \cdot i \]
                                          8. sub-to-multN/A

                                            \[\leadsto \color{blue}{\left(1 - \frac{\left(\frac{1}{2} - b\right) \cdot \log c}{\left(z + t\right) + a}\right) \cdot \left(\left(z + t\right) + a\right)} + y \cdot i \]
                                          9. lower-unsound-*.f64N/A

                                            \[\leadsto \color{blue}{\left(1 - \frac{\left(\frac{1}{2} - b\right) \cdot \log c}{\left(z + t\right) + a}\right) \cdot \left(\left(z + t\right) + a\right)} + y \cdot i \]
                                        3. Applied rewrites83.3%

                                          \[\leadsto \color{blue}{\left(1 - \frac{\left(\frac{1}{2} - b\right) \cdot \log c}{a + \left(t + z\right)}\right) \cdot \left(a + \left(t + z\right)\right)} + y \cdot i \]
                                        4. Taylor expanded in x around inf

                                          \[\leadsto \color{blue}{1} \cdot \left(a + \left(t + z\right)\right) + y \cdot i \]
                                        5. Step-by-step derivation
                                          1. Applied rewrites68.1%

                                            \[\leadsto \color{blue}{1} \cdot \left(a + \left(t + z\right)\right) + y \cdot i \]
                                        6. Recombined 2 regimes into one program.
                                        7. Add Preprocessing

                                        Alternative 11: 68.1% accurate, 11.7× speedup?

                                        \[1 \cdot \left(a + \left(t + z\right)\right) + y \cdot i \]
                                        (FPCore (x y z t a b c i)
                                          :precision binary64
                                          (+ (* 1 (+ a (+ t z))) (* y i)))
                                        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                        	return (1.0 * (a + (t + z))) + (y * i);
                                        }
                                        
                                        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)
                                        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
                                            code = (1.0d0 * (a + (t + z))) + (y * i)
                                        end function
                                        
                                        public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                        	return (1.0 * (a + (t + z))) + (y * i);
                                        }
                                        
                                        def code(x, y, z, t, a, b, c, i):
                                        	return (1.0 * (a + (t + z))) + (y * i)
                                        
                                        function code(x, y, z, t, a, b, c, i)
                                        	return Float64(Float64(1.0 * Float64(a + Float64(t + z))) + Float64(y * i))
                                        end
                                        
                                        function tmp = code(x, y, z, t, a, b, c, i)
                                        	tmp = (1.0 * (a + (t + z))) + (y * i);
                                        end
                                        
                                        code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(1 * N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
                                        
                                        1 \cdot \left(a + \left(t + z\right)\right) + y \cdot i
                                        
                                        Derivation
                                        1. Initial program 99.8%

                                          \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                        2. Taylor expanded in x around 0

                                          \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites84.5%

                                            \[\leadsto \left(\left(\left(\color{blue}{z} + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                          2. Step-by-step derivation
                                            1. lift-+.f64N/A

                                              \[\leadsto \color{blue}{\left(\left(\left(z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                                            2. lift-*.f64N/A

                                              \[\leadsto \left(\left(\left(z + t\right) + a\right) + \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c}\right) + y \cdot i \]
                                            3. fp-cancel-sign-sub-invN/A

                                              \[\leadsto \color{blue}{\left(\left(\left(z + t\right) + a\right) - \left(\mathsf{neg}\left(\left(b - \frac{1}{2}\right)\right)\right) \cdot \log c\right)} + y \cdot i \]
                                            4. lift--.f64N/A

                                              \[\leadsto \left(\left(\left(z + t\right) + a\right) - \left(\mathsf{neg}\left(\color{blue}{\left(b - \frac{1}{2}\right)}\right)\right) \cdot \log c\right) + y \cdot i \]
                                            5. sub-negate-revN/A

                                              \[\leadsto \left(\left(\left(z + t\right) + a\right) - \color{blue}{\left(\frac{1}{2} - b\right)} \cdot \log c\right) + y \cdot i \]
                                            6. lift--.f64N/A

                                              \[\leadsto \left(\left(\left(z + t\right) + a\right) - \color{blue}{\left(\frac{1}{2} - b\right)} \cdot \log c\right) + y \cdot i \]
                                            7. lift-*.f64N/A

                                              \[\leadsto \left(\left(\left(z + t\right) + a\right) - \color{blue}{\left(\frac{1}{2} - b\right) \cdot \log c}\right) + y \cdot i \]
                                            8. sub-to-multN/A

                                              \[\leadsto \color{blue}{\left(1 - \frac{\left(\frac{1}{2} - b\right) \cdot \log c}{\left(z + t\right) + a}\right) \cdot \left(\left(z + t\right) + a\right)} + y \cdot i \]
                                            9. lower-unsound-*.f64N/A

                                              \[\leadsto \color{blue}{\left(1 - \frac{\left(\frac{1}{2} - b\right) \cdot \log c}{\left(z + t\right) + a}\right) \cdot \left(\left(z + t\right) + a\right)} + y \cdot i \]
                                          3. Applied rewrites83.3%

                                            \[\leadsto \color{blue}{\left(1 - \frac{\left(\frac{1}{2} - b\right) \cdot \log c}{a + \left(t + z\right)}\right) \cdot \left(a + \left(t + z\right)\right)} + y \cdot i \]
                                          4. Taylor expanded in x around inf

                                            \[\leadsto \color{blue}{1} \cdot \left(a + \left(t + z\right)\right) + y \cdot i \]
                                          5. Step-by-step derivation
                                            1. Applied rewrites68.1%

                                              \[\leadsto \color{blue}{1} \cdot \left(a + \left(t + z\right)\right) + y \cdot i \]
                                            2. Add Preprocessing

                                            Alternative 12: 67.0% accurate, 0.1× speedup?

                                            \[\begin{array}{l} t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_3 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\ \mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + t\_1\right) + \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\right) + t\_3\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \leq -2000000000:\\ \;\;\;\;y \cdot i + \left(-t\_1\right) \cdot -1\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \left(-1 \cdot t\_3\right) + y \cdot i\\ \end{array} \]
                                            (FPCore (x y z t a b c i)
                                              :precision binary64
                                              (let* ((t_1 (fmin (fmin z t) a))
                                                   (t_2 (fmax (fmin z t) a))
                                                   (t_3 (fmax (fmax z t) t_2)))
                                              (if (<=
                                                   (+
                                                    (+
                                                     (+ (+ (+ (* x (log y)) t_1) (fmin (fmax z t) t_2)) t_3)
                                                     (* (- b 1/2) (log c)))
                                                    (* y i))
                                                   -2000000000)
                                                (+ (* y i) (* (- t_1) -1))
                                                (+ (* -1 (* -1 t_3)) (* y i)))))
                                            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                            	double t_1 = fmin(fmin(z, t), a);
                                            	double t_2 = fmax(fmin(z, t), a);
                                            	double t_3 = fmax(fmax(z, t), t_2);
                                            	double tmp;
                                            	if (((((((x * log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + ((b - 0.5) * log(c))) + (y * i)) <= -2000000000.0) {
                                            		tmp = (y * i) + (-t_1 * -1.0);
                                            	} else {
                                            		tmp = (-1.0 * (-1.0 * t_3)) + (y * i);
                                            	}
                                            	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)
                                            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) :: t_1
                                                real(8) :: t_2
                                                real(8) :: t_3
                                                real(8) :: tmp
                                                t_1 = fmin(fmin(z, t), a)
                                                t_2 = fmax(fmin(z, t), a)
                                                t_3 = fmax(fmax(z, t), t_2)
                                                if (((((((x * log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + ((b - 0.5d0) * log(c))) + (y * i)) <= (-2000000000.0d0)) then
                                                    tmp = (y * i) + (-t_1 * (-1.0d0))
                                                else
                                                    tmp = ((-1.0d0) * ((-1.0d0) * t_3)) + (y * i)
                                                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 t_1 = fmin(fmin(z, t), a);
                                            	double t_2 = fmax(fmin(z, t), a);
                                            	double t_3 = fmax(fmax(z, t), t_2);
                                            	double tmp;
                                            	if (((((((x * Math.log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + ((b - 0.5) * Math.log(c))) + (y * i)) <= -2000000000.0) {
                                            		tmp = (y * i) + (-t_1 * -1.0);
                                            	} else {
                                            		tmp = (-1.0 * (-1.0 * t_3)) + (y * i);
                                            	}
                                            	return tmp;
                                            }
                                            
                                            def code(x, y, z, t, a, b, c, i):
                                            	t_1 = fmin(fmin(z, t), a)
                                            	t_2 = fmax(fmin(z, t), a)
                                            	t_3 = fmax(fmax(z, t), t_2)
                                            	tmp = 0
                                            	if ((((((x * math.log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + ((b - 0.5) * math.log(c))) + (y * i)) <= -2000000000.0:
                                            		tmp = (y * i) + (-t_1 * -1.0)
                                            	else:
                                            		tmp = (-1.0 * (-1.0 * t_3)) + (y * i)
                                            	return tmp
                                            
                                            function code(x, y, z, t, a, b, c, i)
                                            	t_1 = fmin(fmin(z, t), a)
                                            	t_2 = fmax(fmin(z, t), a)
                                            	t_3 = fmax(fmax(z, t), t_2)
                                            	tmp = 0.0
                                            	if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) <= -2000000000.0)
                                            		tmp = Float64(Float64(y * i) + Float64(Float64(-t_1) * -1.0));
                                            	else
                                            		tmp = Float64(Float64(-1.0 * Float64(-1.0 * t_3)) + Float64(y * i));
                                            	end
                                            	return tmp
                                            end
                                            
                                            function tmp_2 = code(x, y, z, t, a, b, c, i)
                                            	t_1 = min(min(z, t), a);
                                            	t_2 = max(min(z, t), a);
                                            	t_3 = max(max(z, t), t_2);
                                            	tmp = 0.0;
                                            	if (((((((x * log(y)) + t_1) + min(max(z, t), t_2)) + t_3) + ((b - 0.5) * log(c))) + (y * i)) <= -2000000000.0)
                                            		tmp = (y * i) + (-t_1 * -1.0);
                                            	else
                                            		tmp = (-1.0 * (-1.0 * t_3)) + (y * i);
                                            	end
                                            	tmp_2 = tmp;
                                            end
                                            
                                            code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[Min[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$3 = N[Max[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + N[Min[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision] + N[(N[(b - 1/2), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], -2000000000], N[(N[(y * i), $MachinePrecision] + N[((-t$95$1) * -1), $MachinePrecision]), $MachinePrecision], N[(N[(-1 * N[(-1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]]
                                            
                                            \begin{array}{l}
                                            t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\
                                            t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\
                                            t_3 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\
                                            \mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + t\_1\right) + \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\right) + t\_3\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \leq -2000000000:\\
                                            \;\;\;\;y \cdot i + \left(-t\_1\right) \cdot -1\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;-1 \cdot \left(-1 \cdot t\_3\right) + y \cdot i\\
                                            
                                            
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 2 regimes
                                            2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -2e9

                                              1. Initial program 99.8%

                                                \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                              2. Taylor expanded in z around -inf

                                                \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(-1 \cdot \frac{a + \left(t + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{z} - 1\right)\right)} + y \cdot i \]
                                              3. Step-by-step derivation
                                                1. lower-*.f64N/A

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

                                                  \[\leadsto -1 \cdot \left(z \cdot \color{blue}{\left(-1 \cdot \frac{a + \left(t + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{z} - 1\right)}\right) + y \cdot i \]
                                                3. lower--.f64N/A

                                                  \[\leadsto -1 \cdot \left(z \cdot \left(-1 \cdot \frac{a + \left(t + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{z} - \color{blue}{1}\right)\right) + y \cdot i \]
                                              4. Applied rewrites72.9%

                                                \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(-1 \cdot \frac{a + \left(t + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{z} - 1\right)\right)} + y \cdot i \]
                                              5. Taylor expanded in z around inf

                                                \[\leadsto -1 \cdot \left(z \cdot -1\right) + y \cdot i \]
                                              6. Step-by-step derivation
                                                1. Applied rewrites37.9%

                                                  \[\leadsto -1 \cdot \left(z \cdot -1\right) + y \cdot i \]
                                                2. Step-by-step derivation
                                                  1. lift-+.f64N/A

                                                    \[\leadsto \color{blue}{-1 \cdot \left(z \cdot -1\right) + y \cdot i} \]
                                                  2. +-commutativeN/A

                                                    \[\leadsto \color{blue}{y \cdot i + -1 \cdot \left(z \cdot -1\right)} \]
                                                  3. lower-+.f6437.9%

                                                    \[\leadsto \color{blue}{y \cdot i + -1 \cdot \left(z \cdot -1\right)} \]
                                                  4. lift-*.f64N/A

                                                    \[\leadsto y \cdot i + -1 \cdot \color{blue}{\left(z \cdot -1\right)} \]
                                                  5. mul-1-negN/A

                                                    \[\leadsto y \cdot i + \left(\mathsf{neg}\left(z \cdot -1\right)\right) \]
                                                3. Applied rewrites37.9%

                                                  \[\leadsto \color{blue}{y \cdot i + \left(-z\right) \cdot -1} \]

                                                if -2e9 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                                                1. Initial program 99.8%

                                                  \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                                2. Taylor expanded in z around -inf

                                                  \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(-1 \cdot \frac{a + \left(t + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{z} - 1\right)\right)} + y \cdot i \]
                                                3. Step-by-step derivation
                                                  1. lower-*.f64N/A

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

                                                    \[\leadsto -1 \cdot \left(z \cdot \color{blue}{\left(-1 \cdot \frac{a + \left(t + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{z} - 1\right)}\right) + y \cdot i \]
                                                  3. lower--.f64N/A

                                                    \[\leadsto -1 \cdot \left(z \cdot \left(-1 \cdot \frac{a + \left(t + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{z} - \color{blue}{1}\right)\right) + y \cdot i \]
                                                4. Applied rewrites72.9%

                                                  \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(-1 \cdot \frac{a + \left(t + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{z} - 1\right)\right)} + y \cdot i \]
                                                5. Taylor expanded in z around inf

                                                  \[\leadsto -1 \cdot \left(z \cdot -1\right) + y \cdot i \]
                                                6. Step-by-step derivation
                                                  1. Applied rewrites37.9%

                                                    \[\leadsto -1 \cdot \left(z \cdot -1\right) + y \cdot i \]
                                                  2. Taylor expanded in a around inf

                                                    \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) + y \cdot i \]
                                                  3. Step-by-step derivation
                                                    1. lower-*.f6438.7%

                                                      \[\leadsto -1 \cdot \left(-1 \cdot a\right) + y \cdot i \]
                                                  4. Applied rewrites38.7%

                                                    \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) + y \cdot i \]
                                                7. Recombined 2 regimes into one program.
                                                8. Add Preprocessing

                                                Alternative 13: 45.1% accurate, 1.1× speedup?

                                                \[y \cdot i + \left(-\mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\right) \cdot -1 \]
                                                (FPCore (x y z t a b c i)
                                                  :precision binary64
                                                  (+ (* y i) (* (- (fmin (fmin z t) a)) -1)))
                                                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                	return (y * i) + (-fmin(fmin(z, t), a) * -1.0);
                                                }
                                                
                                                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)
                                                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
                                                    code = (y * i) + (-fmin(fmin(z, t), a) * (-1.0d0))
                                                end function
                                                
                                                public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                	return (y * i) + (-fmin(fmin(z, t), a) * -1.0);
                                                }
                                                
                                                def code(x, y, z, t, a, b, c, i):
                                                	return (y * i) + (-fmin(fmin(z, t), a) * -1.0)
                                                
                                                function code(x, y, z, t, a, b, c, i)
                                                	return Float64(Float64(y * i) + Float64(Float64(-fmin(fmin(z, t), a)) * -1.0))
                                                end
                                                
                                                function tmp = code(x, y, z, t, a, b, c, i)
                                                	tmp = (y * i) + (-min(min(z, t), a) * -1.0);
                                                end
                                                
                                                code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[((-N[Min[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]) * -1), $MachinePrecision]), $MachinePrecision]
                                                
                                                y \cdot i + \left(-\mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\right) \cdot -1
                                                
                                                Derivation
                                                1. Initial program 99.8%

                                                  \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                                2. Taylor expanded in z around -inf

                                                  \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(-1 \cdot \frac{a + \left(t + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{z} - 1\right)\right)} + y \cdot i \]
                                                3. Step-by-step derivation
                                                  1. lower-*.f64N/A

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

                                                    \[\leadsto -1 \cdot \left(z \cdot \color{blue}{\left(-1 \cdot \frac{a + \left(t + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{z} - 1\right)}\right) + y \cdot i \]
                                                  3. lower--.f64N/A

                                                    \[\leadsto -1 \cdot \left(z \cdot \left(-1 \cdot \frac{a + \left(t + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{z} - \color{blue}{1}\right)\right) + y \cdot i \]
                                                4. Applied rewrites72.9%

                                                  \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(-1 \cdot \frac{a + \left(t + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{z} - 1\right)\right)} + y \cdot i \]
                                                5. Taylor expanded in z around inf

                                                  \[\leadsto -1 \cdot \left(z \cdot -1\right) + y \cdot i \]
                                                6. Step-by-step derivation
                                                  1. Applied rewrites37.9%

                                                    \[\leadsto -1 \cdot \left(z \cdot -1\right) + y \cdot i \]
                                                  2. Step-by-step derivation
                                                    1. lift-+.f64N/A

                                                      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot -1\right) + y \cdot i} \]
                                                    2. +-commutativeN/A

                                                      \[\leadsto \color{blue}{y \cdot i + -1 \cdot \left(z \cdot -1\right)} \]
                                                    3. lower-+.f6437.9%

                                                      \[\leadsto \color{blue}{y \cdot i + -1 \cdot \left(z \cdot -1\right)} \]
                                                    4. lift-*.f64N/A

                                                      \[\leadsto y \cdot i + -1 \cdot \color{blue}{\left(z \cdot -1\right)} \]
                                                    5. mul-1-negN/A

                                                      \[\leadsto y \cdot i + \left(\mathsf{neg}\left(z \cdot -1\right)\right) \]
                                                  3. Applied rewrites37.9%

                                                    \[\leadsto \color{blue}{y \cdot i + \left(-z\right) \cdot -1} \]
                                                  4. Add Preprocessing

                                                  Alternative 14: 24.0% accurate, 21.3× speedup?

                                                  \[1 \cdot \left(i \cdot y\right) \]
                                                  (FPCore (x y z t a b c i)
                                                    :precision binary64
                                                    (* 1 (* i y)))
                                                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                  	return 1.0 * (i * y);
                                                  }
                                                  
                                                  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)
                                                  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
                                                      code = 1.0d0 * (i * y)
                                                  end function
                                                  
                                                  public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                  	return 1.0 * (i * y);
                                                  }
                                                  
                                                  def code(x, y, z, t, a, b, c, i):
                                                  	return 1.0 * (i * y)
                                                  
                                                  function code(x, y, z, t, a, b, c, i)
                                                  	return Float64(1.0 * Float64(i * y))
                                                  end
                                                  
                                                  function tmp = code(x, y, z, t, a, b, c, i)
                                                  	tmp = 1.0 * (i * y);
                                                  end
                                                  
                                                  code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(1 * N[(i * y), $MachinePrecision]), $MachinePrecision]
                                                  
                                                  1 \cdot \left(i \cdot y\right)
                                                  
                                                  Derivation
                                                  1. Initial program 99.8%

                                                    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                                  2. Step-by-step derivation
                                                    1. lift-+.f64N/A

                                                      \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i} \]
                                                    2. +-commutativeN/A

                                                      \[\leadsto \color{blue}{y \cdot i + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
                                                    3. add-flipN/A

                                                      \[\leadsto \color{blue}{y \cdot i - \left(\mathsf{neg}\left(\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)\right)\right)} \]
                                                    4. sub-to-multN/A

                                                      \[\leadsto \color{blue}{\left(1 - \frac{\mathsf{neg}\left(\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)\right)}{y \cdot i}\right) \cdot \left(y \cdot i\right)} \]
                                                    5. lower-unsound-*.f64N/A

                                                      \[\leadsto \color{blue}{\left(1 - \frac{\mathsf{neg}\left(\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)\right)}{y \cdot i}\right) \cdot \left(y \cdot i\right)} \]
                                                  3. Applied rewrites66.0%

                                                    \[\leadsto \color{blue}{\left(1 - \frac{\left(\frac{1}{2} - b\right) \cdot \log c - \left(a + \left(t + \left(z + \log y \cdot x\right)\right)\right)}{i \cdot y}\right) \cdot \left(i \cdot y\right)} \]
                                                  4. Taylor expanded in y around inf

                                                    \[\leadsto \color{blue}{1} \cdot \left(i \cdot y\right) \]
                                                  5. Step-by-step derivation
                                                    1. Applied rewrites24.0%

                                                      \[\leadsto \color{blue}{1} \cdot \left(i \cdot y\right) \]
                                                    2. Add Preprocessing

                                                    Reproduce

                                                    ?
                                                    herbie shell --seed 2025271 -o generate:evaluate
                                                    (FPCore (x y z t a b c i)
                                                      :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, B"
                                                      :precision binary64
                                                      (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 1/2) (log c))) (* y i)))