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

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

Specification

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

\[\mathsf{fma}\left(b, a - 0.5, y + x\right) - \left(\log t \cdot z - z\right) \]
(FPCore (x y z t a b)
 :precision binary64
 (- (fma b (- a 0.5) (+ y x)) (- (* (log t) z) z)))
double code(double x, double y, double z, double t, double a, double b) {
	return fma(b, (a - 0.5), (y + x)) - ((log(t) * z) - z);
}
function code(x, y, z, t, a, b)
	return Float64(fma(b, Float64(a - 0.5), Float64(y + x)) - Float64(Float64(log(t) * z) - z))
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(b * N[(a - 0.5), $MachinePrecision] + N[(y + x), $MachinePrecision]), $MachinePrecision] - N[(N[(N[Log[t], $MachinePrecision] * z), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]
\mathsf{fma}\left(b, a - 0.5, y + x\right) - \left(\log t \cdot z - z\right)
Derivation
  1. Initial program 99.8%

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

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

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

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

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

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

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

      \[\leadsto \left(\left(a - \frac{1}{2}\right) \cdot b + \left(x + y\right)\right) + \color{blue}{\left(\mathsf{neg}\left(\left(z \cdot \log t - z\right)\right)\right)} \]
    8. sub-flip-reverseN/A

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x + y\right)} - \left(z \cdot \log t - z\right) \]
    13. lift-+.f64N/A

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

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

      \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, \color{blue}{y + x}\right) - \left(z \cdot \log t - z\right) \]
    16. lower--.f6499.8%

      \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) - \color{blue}{\left(z \cdot \log t - z\right)} \]
    17. lift-*.f64N/A

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

      \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) - \left(\color{blue}{\log t \cdot z} - z\right) \]
    19. lower-*.f6499.8%

      \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) - \left(\color{blue}{\log t \cdot z} - z\right) \]
  3. Applied rewrites99.8%

    \[\leadsto \color{blue}{\mathsf{fma}\left(b, a - 0.5, y + x\right) - \left(\log t \cdot z - z\right)} \]
  4. Add Preprocessing

Alternative 2: 99.8% accurate, 1.0× speedup?

\[\mathsf{fma}\left(a - 0.5, b, z - \left(\left(\log t \cdot z - y\right) - x\right)\right) \]
(FPCore (x y z t a b)
 :precision binary64
 (fma (- a 0.5) b (- z (- (- (* (log t) z) y) x))))
double code(double x, double y, double z, double t, double a, double b) {
	return fma((a - 0.5), b, (z - (((log(t) * z) - y) - x)));
}
function code(x, y, z, t, a, b)
	return fma(Float64(a - 0.5), b, Float64(z - Float64(Float64(Float64(log(t) * z) - y) - x)))
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(a - 0.5), $MachinePrecision] * b + N[(z - N[(N[(N[(N[Log[t], $MachinePrecision] * z), $MachinePrecision] - y), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\mathsf{fma}\left(a - 0.5, b, z - \left(\left(\log t \cdot z - y\right) - x\right)\right)
Derivation
  1. Initial program 99.8%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, b, \left(\left(x + y\right) + z\right) - z \cdot \log t\right)} \]
    5. lift--.f64N/A

      \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{\left(\left(x + y\right) + z\right) - z \cdot \log t}\right) \]
    6. sub-negate-revN/A

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

      \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \mathsf{neg}\left(\left(z \cdot \log t - \color{blue}{\left(\left(x + y\right) + z\right)}\right)\right)\right) \]
    8. associate--r+N/A

      \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \mathsf{neg}\left(\color{blue}{\left(\left(z \cdot \log t - \left(x + y\right)\right) - z\right)}\right)\right) \]
    9. sub-negateN/A

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

      \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{z - \left(z \cdot \log t - \left(x + y\right)\right)}\right) \]
    11. lift-+.f64N/A

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

      \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, z - \left(z \cdot \log t - \color{blue}{\left(y + x\right)}\right)\right) \]
    13. associate--r+N/A

      \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, z - \color{blue}{\left(\left(z \cdot \log t - y\right) - x\right)}\right) \]
    14. lower--.f64N/A

      \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, z - \color{blue}{\left(\left(z \cdot \log t - y\right) - x\right)}\right) \]
    15. lower--.f6499.8%

      \[\leadsto \mathsf{fma}\left(a - 0.5, b, z - \left(\color{blue}{\left(z \cdot \log t - y\right)} - x\right)\right) \]
    16. lift-*.f64N/A

      \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, z - \left(\left(\color{blue}{z \cdot \log t} - y\right) - x\right)\right) \]
    17. *-commutativeN/A

      \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, z - \left(\left(\color{blue}{\log t \cdot z} - y\right) - x\right)\right) \]
    18. lower-*.f6499.8%

      \[\leadsto \mathsf{fma}\left(a - 0.5, b, z - \left(\left(\color{blue}{\log t \cdot z} - y\right) - x\right)\right) \]
  3. Applied rewrites99.8%

    \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, b, z - \left(\left(\log t \cdot z - y\right) - x\right)\right)} \]
  4. Add Preprocessing

Alternative 3: 99.2% accurate, 0.7× speedup?

\[\begin{array}{l} \mathbf{if}\;\mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right) \leq -2 \cdot 10^{-221}:\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, z - z \cdot \log t\right) + \mathsf{min}\left(x, y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, a - 0.5, \mathsf{max}\left(x, y\right)\right) - \left(\log t \cdot z - z\right)\\ \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= (+ (fmin x y) (fmax x y)) -2e-221)
   (+ (fma (- a 0.5) b (- z (* z (log t)))) (fmin x y))
   (- (fma b (- a 0.5) (fmax x y)) (- (* (log t) z) z))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((fmin(x, y) + fmax(x, y)) <= -2e-221) {
		tmp = fma((a - 0.5), b, (z - (z * log(t)))) + fmin(x, y);
	} else {
		tmp = fma(b, (a - 0.5), fmax(x, y)) - ((log(t) * z) - z);
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (Float64(fmin(x, y) + fmax(x, y)) <= -2e-221)
		tmp = Float64(fma(Float64(a - 0.5), b, Float64(z - Float64(z * log(t)))) + fmin(x, y));
	else
		tmp = Float64(fma(b, Float64(a - 0.5), fmax(x, y)) - Float64(Float64(log(t) * z) - z));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[Min[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision], -2e-221], N[(N[(N[(a - 0.5), $MachinePrecision] * b + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision], N[(N[(b * N[(a - 0.5), $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision] - N[(N[(N[Log[t], $MachinePrecision] * z), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right) \leq -2 \cdot 10^{-221}:\\
\;\;\;\;\mathsf{fma}\left(a - 0.5, b, z - z \cdot \log t\right) + \mathsf{min}\left(x, y\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, a - 0.5, \mathsf{max}\left(x, y\right)\right) - \left(\log t \cdot z - z\right)\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x y) < -2.00000000000000003e-221

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in y around 0

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

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

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

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

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

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

        \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - z \cdot \color{blue}{\log t} \]
      7. lower-log.f6478.6%

        \[\leadsto \left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t \]
    4. Applied rewrites78.6%

      \[\leadsto \color{blue}{\left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t} \]
    5. Step-by-step derivation
      1. lift--.f64N/A

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

        \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{z} \cdot \log t \]
      3. associate--l+N/A

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

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

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

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

        \[\leadsto \left(\left(b \cdot \left(a - \frac{1}{2}\right) + z\right) - z \cdot \log t\right) + x \]
      8. associate--l+N/A

        \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + \left(z - z \cdot \log t\right)\right) + x \]
      9. lift-*.f64N/A

        \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + \left(z - z \cdot \log t\right)\right) + x \]
      10. *-commutativeN/A

        \[\leadsto \left(\left(a - \frac{1}{2}\right) \cdot b + \left(z - z \cdot \log t\right)\right) + x \]
      11. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, z - z \cdot \log t\right) + x \]
      12. lower--.f6478.6%

        \[\leadsto \mathsf{fma}\left(a - 0.5, b, z - z \cdot \log t\right) + x \]
    6. Applied rewrites78.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, b, z - z \cdot \log t\right) + x} \]

    if -2.00000000000000003e-221 < (+.f64 x y)

    1. Initial program 99.8%

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

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

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

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

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

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

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

        \[\leadsto \left(\left(a - \frac{1}{2}\right) \cdot b + \left(x + y\right)\right) + \color{blue}{\left(\mathsf{neg}\left(\left(z \cdot \log t - z\right)\right)\right)} \]
      8. sub-flip-reverseN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x + y\right)} - \left(z \cdot \log t - z\right) \]
      13. lift-+.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, \color{blue}{y + x}\right) - \left(z \cdot \log t - z\right) \]
      16. lower--.f6499.8%

        \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) - \color{blue}{\left(z \cdot \log t - z\right)} \]
      17. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) - \left(\color{blue}{\log t \cdot z} - z\right) \]
      19. lower-*.f6499.8%

        \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) - \left(\color{blue}{\log t \cdot z} - z\right) \]
    3. Applied rewrites99.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(b, a - 0.5, y + x\right) - \left(\log t \cdot z - z\right)} \]
    4. Taylor expanded in x around 0

      \[\leadsto \mathsf{fma}\left(b, a - 0.5, \color{blue}{y}\right) - \left(\log t \cdot z - z\right) \]
    5. Step-by-step derivation
      1. Applied rewrites78.7%

        \[\leadsto \mathsf{fma}\left(b, a - 0.5, \color{blue}{y}\right) - \left(\log t \cdot z - z\right) \]
    6. Recombined 2 regimes into one program.
    7. Add Preprocessing

    Alternative 4: 92.7% accurate, 0.3× speedup?

    \[\begin{array}{l} t_1 := z \cdot \log t\\ t_2 := \left(\left(\left(\mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\right) + z\right) - t\_1\right) + \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;\left(z + b \cdot \left(a - 0.5\right)\right) - t\_1\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-221}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, b, z - t\_1\right) + \mathsf{min}\left(x, y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, a - 0.5, \mathsf{max}\left(x, y\right)\right) - \left(\log t \cdot z - z\right)\\ \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (* z (log t)))
            (t_2 (+ (- (+ (+ (fmin x y) (fmax x y)) z) t_1) (* (- a 0.5) b))))
       (if (<= t_2 (- INFINITY))
         (- (+ z (* b (- a 0.5))) t_1)
         (if (<= t_2 -2e-221)
           (+ (fma -0.5 b (- z t_1)) (fmin x y))
           (- (fma b (- a 0.5) (fmax x y)) (- (* (log t) z) z))))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = z * log(t);
    	double t_2 = (((fmin(x, y) + fmax(x, y)) + z) - t_1) + ((a - 0.5) * b);
    	double tmp;
    	if (t_2 <= -((double) INFINITY)) {
    		tmp = (z + (b * (a - 0.5))) - t_1;
    	} else if (t_2 <= -2e-221) {
    		tmp = fma(-0.5, b, (z - t_1)) + fmin(x, y);
    	} else {
    		tmp = fma(b, (a - 0.5), fmax(x, y)) - ((log(t) * z) - z);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(z * log(t))
    	t_2 = Float64(Float64(Float64(Float64(fmin(x, y) + fmax(x, y)) + z) - t_1) + Float64(Float64(a - 0.5) * b))
    	tmp = 0.0
    	if (t_2 <= Float64(-Inf))
    		tmp = Float64(Float64(z + Float64(b * Float64(a - 0.5))) - t_1);
    	elseif (t_2 <= -2e-221)
    		tmp = Float64(fma(-0.5, b, Float64(z - t_1)) + fmin(x, y));
    	else
    		tmp = Float64(fma(b, Float64(a - 0.5), fmax(x, y)) - Float64(Float64(log(t) * z) - z));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[Min[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(z + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$2, -2e-221], N[(N[(-0.5 * b + N[(z - t$95$1), $MachinePrecision]), $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision], N[(N[(b * N[(a - 0.5), $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision] - N[(N[(N[Log[t], $MachinePrecision] * z), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]]]]]
    
    \begin{array}{l}
    t_1 := z \cdot \log t\\
    t_2 := \left(\left(\left(\mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\right) + z\right) - t\_1\right) + \left(a - 0.5\right) \cdot b\\
    \mathbf{if}\;t\_2 \leq -\infty:\\
    \;\;\;\;\left(z + b \cdot \left(a - 0.5\right)\right) - t\_1\\
    
    \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-221}:\\
    \;\;\;\;\mathsf{fma}\left(-0.5, b, z - t\_1\right) + \mathsf{min}\left(x, y\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(b, a - 0.5, \mathsf{max}\left(x, y\right)\right) - \left(\log t \cdot z - z\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < -inf.0

      1. Initial program 99.8%

        \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
      2. Taylor expanded in y around 0

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

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

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

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

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

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

          \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - z \cdot \color{blue}{\log t} \]
        7. lower-log.f6478.6%

          \[\leadsto \left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t \]
      4. Applied rewrites78.6%

        \[\leadsto \color{blue}{\left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t} \]
      5. Taylor expanded in x around 0

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

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

          \[\leadsto \left(z + b \cdot \left(a - \frac{1}{2}\right)\right) - z \cdot \log t \]
        3. lower--.f6457.9%

          \[\leadsto \left(z + b \cdot \left(a - 0.5\right)\right) - z \cdot \log t \]
      7. Applied rewrites57.9%

        \[\leadsto \left(z + b \cdot \left(a - 0.5\right)\right) - \color{blue}{z} \cdot \log t \]

      if -inf.0 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < -2.00000000000000003e-221

      1. Initial program 99.8%

        \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
      2. Taylor expanded in y around 0

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

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

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

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

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

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

          \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - z \cdot \color{blue}{\log t} \]
        7. lower-log.f6478.6%

          \[\leadsto \left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t \]
      4. Applied rewrites78.6%

        \[\leadsto \color{blue}{\left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t} \]
      5. Step-by-step derivation
        1. lift--.f64N/A

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

          \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{z} \cdot \log t \]
        3. associate--l+N/A

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

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

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

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

          \[\leadsto \left(\left(b \cdot \left(a - \frac{1}{2}\right) + z\right) - z \cdot \log t\right) + x \]
        8. associate--l+N/A

          \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + \left(z - z \cdot \log t\right)\right) + x \]
        9. lift-*.f64N/A

          \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + \left(z - z \cdot \log t\right)\right) + x \]
        10. *-commutativeN/A

          \[\leadsto \left(\left(a - \frac{1}{2}\right) \cdot b + \left(z - z \cdot \log t\right)\right) + x \]
        11. lower-fma.f64N/A

          \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, z - z \cdot \log t\right) + x \]
        12. lower--.f6478.6%

          \[\leadsto \mathsf{fma}\left(a - 0.5, b, z - z \cdot \log t\right) + x \]
      6. Applied rewrites78.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, b, z - z \cdot \log t\right) + x} \]
      7. Taylor expanded in a around 0

        \[\leadsto \mathsf{fma}\left(\frac{-1}{2}, b, z - z \cdot \log t\right) + x \]
      8. Step-by-step derivation
        1. Applied rewrites54.1%

          \[\leadsto \mathsf{fma}\left(-0.5, b, z - z \cdot \log t\right) + x \]

        if -2.00000000000000003e-221 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b))

        1. Initial program 99.8%

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

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

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

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

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

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

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

            \[\leadsto \left(\left(a - \frac{1}{2}\right) \cdot b + \left(x + y\right)\right) + \color{blue}{\left(\mathsf{neg}\left(\left(z \cdot \log t - z\right)\right)\right)} \]
          8. sub-flip-reverseN/A

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

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

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

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x + y\right)} - \left(z \cdot \log t - z\right) \]
          13. lift-+.f64N/A

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

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

            \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, \color{blue}{y + x}\right) - \left(z \cdot \log t - z\right) \]
          16. lower--.f6499.8%

            \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) - \color{blue}{\left(z \cdot \log t - z\right)} \]
          17. lift-*.f64N/A

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

            \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) - \left(\color{blue}{\log t \cdot z} - z\right) \]
          19. lower-*.f6499.8%

            \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) - \left(\color{blue}{\log t \cdot z} - z\right) \]
        3. Applied rewrites99.8%

          \[\leadsto \color{blue}{\mathsf{fma}\left(b, a - 0.5, y + x\right) - \left(\log t \cdot z - z\right)} \]
        4. Taylor expanded in x around 0

          \[\leadsto \mathsf{fma}\left(b, a - 0.5, \color{blue}{y}\right) - \left(\log t \cdot z - z\right) \]
        5. Step-by-step derivation
          1. Applied rewrites78.7%

            \[\leadsto \mathsf{fma}\left(b, a - 0.5, \color{blue}{y}\right) - \left(\log t \cdot z - z\right) \]
        6. Recombined 3 regimes into one program.
        7. Add Preprocessing

        Alternative 5: 86.7% accurate, 0.8× speedup?

        \[\begin{array}{l} t_1 := z \cdot \log t\\ \mathbf{if}\;z \leq -1.9 \cdot 10^{+80}:\\ \;\;\;\;\left(z + b \cdot \left(a - 0.5\right)\right) - t\_1\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+164}:\\ \;\;\;\;\left(\mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\right) - b \cdot \left(0.5 - a\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, b, z - t\_1\right) + \mathsf{min}\left(x, y\right)\\ \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (let* ((t_1 (* z (log t))))
           (if (<= z -1.9e+80)
             (- (+ z (* b (- a 0.5))) t_1)
             (if (<= z 2e+164)
               (- (+ (fmin x y) (fmax x y)) (* b (- 0.5 a)))
               (+ (fma -0.5 b (- z t_1)) (fmin x y))))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = z * log(t);
        	double tmp;
        	if (z <= -1.9e+80) {
        		tmp = (z + (b * (a - 0.5))) - t_1;
        	} else if (z <= 2e+164) {
        		tmp = (fmin(x, y) + fmax(x, y)) - (b * (0.5 - a));
        	} else {
        		tmp = fma(-0.5, b, (z - t_1)) + fmin(x, y);
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	t_1 = Float64(z * log(t))
        	tmp = 0.0
        	if (z <= -1.9e+80)
        		tmp = Float64(Float64(z + Float64(b * Float64(a - 0.5))) - t_1);
        	elseif (z <= 2e+164)
        		tmp = Float64(Float64(fmin(x, y) + fmax(x, y)) - Float64(b * Float64(0.5 - a)));
        	else
        		tmp = Float64(fma(-0.5, b, Float64(z - t_1)) + fmin(x, y));
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.9e+80], N[(N[(z + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[z, 2e+164], N[(N[(N[Min[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision] - N[(b * N[(0.5 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-0.5 * b + N[(z - t$95$1), $MachinePrecision]), $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision]]]]
        
        \begin{array}{l}
        t_1 := z \cdot \log t\\
        \mathbf{if}\;z \leq -1.9 \cdot 10^{+80}:\\
        \;\;\;\;\left(z + b \cdot \left(a - 0.5\right)\right) - t\_1\\
        
        \mathbf{elif}\;z \leq 2 \cdot 10^{+164}:\\
        \;\;\;\;\left(\mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\right) - b \cdot \left(0.5 - a\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(-0.5, b, z - t\_1\right) + \mathsf{min}\left(x, y\right)\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if z < -1.89999999999999999e80

          1. Initial program 99.8%

            \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
          2. Taylor expanded in y around 0

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

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

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

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

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

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

              \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - z \cdot \color{blue}{\log t} \]
            7. lower-log.f6478.6%

              \[\leadsto \left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t \]
          4. Applied rewrites78.6%

            \[\leadsto \color{blue}{\left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t} \]
          5. Taylor expanded in x around 0

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

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

              \[\leadsto \left(z + b \cdot \left(a - \frac{1}{2}\right)\right) - z \cdot \log t \]
            3. lower--.f6457.9%

              \[\leadsto \left(z + b \cdot \left(a - 0.5\right)\right) - z \cdot \log t \]
          7. Applied rewrites57.9%

            \[\leadsto \left(z + b \cdot \left(a - 0.5\right)\right) - \color{blue}{z} \cdot \log t \]

          if -1.89999999999999999e80 < z < 2e164

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\left(1 + \frac{\left(y + x\right) - \mathsf{fma}\left(0.5 - a, b, \log t \cdot z\right)}{z}\right) \cdot z} \]
          4. Taylor expanded in z around 0

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

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

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

              \[\leadsto \left(x + y\right) - b \cdot \color{blue}{\left(\frac{1}{2} - a\right)} \]
            4. lower--.f6478.7%

              \[\leadsto \left(x + y\right) - b \cdot \left(0.5 - \color{blue}{a}\right) \]
          6. Applied rewrites78.7%

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

          if 2e164 < z

          1. Initial program 99.8%

            \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
          2. Taylor expanded in y around 0

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

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

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

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

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

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

              \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - z \cdot \color{blue}{\log t} \]
            7. lower-log.f6478.6%

              \[\leadsto \left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t \]
          4. Applied rewrites78.6%

            \[\leadsto \color{blue}{\left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t} \]
          5. Step-by-step derivation
            1. lift--.f64N/A

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

              \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{z} \cdot \log t \]
            3. associate--l+N/A

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

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

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

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

              \[\leadsto \left(\left(b \cdot \left(a - \frac{1}{2}\right) + z\right) - z \cdot \log t\right) + x \]
            8. associate--l+N/A

              \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + \left(z - z \cdot \log t\right)\right) + x \]
            9. lift-*.f64N/A

              \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + \left(z - z \cdot \log t\right)\right) + x \]
            10. *-commutativeN/A

              \[\leadsto \left(\left(a - \frac{1}{2}\right) \cdot b + \left(z - z \cdot \log t\right)\right) + x \]
            11. lower-fma.f64N/A

              \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, z - z \cdot \log t\right) + x \]
            12. lower--.f6478.6%

              \[\leadsto \mathsf{fma}\left(a - 0.5, b, z - z \cdot \log t\right) + x \]
          6. Applied rewrites78.6%

            \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, b, z - z \cdot \log t\right) + x} \]
          7. Taylor expanded in a around 0

            \[\leadsto \mathsf{fma}\left(\frac{-1}{2}, b, z - z \cdot \log t\right) + x \]
          8. Step-by-step derivation
            1. Applied rewrites54.1%

              \[\leadsto \mathsf{fma}\left(-0.5, b, z - z \cdot \log t\right) + x \]
          9. Recombined 3 regimes into one program.
          10. Add Preprocessing

          Alternative 6: 86.0% accurate, 1.0× speedup?

          \[\begin{array}{l} t_1 := \left(\mathsf{min}\left(x, y\right) + z\right) - z \cdot \log t\\ \mathbf{if}\;z \leq -4.5 \cdot 10^{+218}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+164}:\\ \;\;\;\;\left(\mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\right) - b \cdot \left(0.5 - a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (let* ((t_1 (- (+ (fmin x y) z) (* z (log t)))))
             (if (<= z -4.5e+218)
               t_1
               (if (<= z 2e+164) (- (+ (fmin x y) (fmax x y)) (* b (- 0.5 a))) t_1))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = (fmin(x, y) + z) - (z * log(t));
          	double tmp;
          	if (z <= -4.5e+218) {
          		tmp = t_1;
          	} else if (z <= 2e+164) {
          		tmp = (fmin(x, y) + fmax(x, y)) - (b * (0.5 - a));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(x, y, z, t, a, b)
          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) :: t_1
              real(8) :: tmp
              t_1 = (fmin(x, y) + z) - (z * log(t))
              if (z <= (-4.5d+218)) then
                  tmp = t_1
              else if (z <= 2d+164) then
                  tmp = (fmin(x, y) + fmax(x, y)) - (b * (0.5d0 - a))
              else
                  tmp = t_1
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = (fmin(x, y) + z) - (z * Math.log(t));
          	double tmp;
          	if (z <= -4.5e+218) {
          		tmp = t_1;
          	} else if (z <= 2e+164) {
          		tmp = (fmin(x, y) + fmax(x, y)) - (b * (0.5 - a));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	t_1 = (fmin(x, y) + z) - (z * math.log(t))
          	tmp = 0
          	if z <= -4.5e+218:
          		tmp = t_1
          	elif z <= 2e+164:
          		tmp = (fmin(x, y) + fmax(x, y)) - (b * (0.5 - a))
          	else:
          		tmp = t_1
          	return tmp
          
          function code(x, y, z, t, a, b)
          	t_1 = Float64(Float64(fmin(x, y) + z) - Float64(z * log(t)))
          	tmp = 0.0
          	if (z <= -4.5e+218)
          		tmp = t_1;
          	elseif (z <= 2e+164)
          		tmp = Float64(Float64(fmin(x, y) + fmax(x, y)) - Float64(b * Float64(0.5 - a)));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b)
          	t_1 = (min(x, y) + z) - (z * log(t));
          	tmp = 0.0;
          	if (z <= -4.5e+218)
          		tmp = t_1;
          	elseif (z <= 2e+164)
          		tmp = (min(x, y) + max(x, y)) - (b * (0.5 - a));
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[Min[x, y], $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+218], t$95$1, If[LessEqual[z, 2e+164], N[(N[(N[Min[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision] - N[(b * N[(0.5 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          t_1 := \left(\mathsf{min}\left(x, y\right) + z\right) - z \cdot \log t\\
          \mathbf{if}\;z \leq -4.5 \cdot 10^{+218}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;z \leq 2 \cdot 10^{+164}:\\
          \;\;\;\;\left(\mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\right) - b \cdot \left(0.5 - a\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -4.50000000000000008e218 or 2e164 < z

            1. Initial program 99.8%

              \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
            2. Taylor expanded in y around 0

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

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

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

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

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

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

                \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - z \cdot \color{blue}{\log t} \]
              7. lower-log.f6478.6%

                \[\leadsto \left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t \]
            4. Applied rewrites78.6%

              \[\leadsto \color{blue}{\left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t} \]
            5. Taylor expanded in b around 0

              \[\leadsto \left(x + z\right) - \color{blue}{z} \cdot \log t \]
            6. Step-by-step derivation
              1. lower-+.f6442.4%

                \[\leadsto \left(x + z\right) - z \cdot \log t \]
            7. Applied rewrites42.4%

              \[\leadsto \left(x + z\right) - \color{blue}{z} \cdot \log t \]

            if -4.50000000000000008e218 < z < 2e164

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\left(1 + \frac{\left(y + x\right) - \mathsf{fma}\left(0.5 - a, b, \log t \cdot z\right)}{z}\right) \cdot z} \]
            4. Taylor expanded in z around 0

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

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

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

                \[\leadsto \left(x + y\right) - b \cdot \color{blue}{\left(\frac{1}{2} - a\right)} \]
              4. lower--.f6478.7%

                \[\leadsto \left(x + y\right) - b \cdot \left(0.5 - \color{blue}{a}\right) \]
            6. Applied rewrites78.7%

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

          Alternative 7: 85.3% accurate, 0.8× speedup?

          \[\begin{array}{l} t_1 := z \cdot \log t\\ \mathbf{if}\;z \leq -4.5 \cdot 10^{+218}:\\ \;\;\;\;\left(\mathsf{min}\left(x, y\right) + z\right) - t\_1\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+164}:\\ \;\;\;\;\left(\mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\right) - b \cdot \left(0.5 - a\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, b, z - t\_1\right) + \mathsf{min}\left(x, y\right)\\ \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (let* ((t_1 (* z (log t))))
             (if (<= z -4.5e+218)
               (- (+ (fmin x y) z) t_1)
               (if (<= z 2e+164)
                 (- (+ (fmin x y) (fmax x y)) (* b (- 0.5 a)))
                 (+ (fma -0.5 b (- z t_1)) (fmin x y))))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = z * log(t);
          	double tmp;
          	if (z <= -4.5e+218) {
          		tmp = (fmin(x, y) + z) - t_1;
          	} else if (z <= 2e+164) {
          		tmp = (fmin(x, y) + fmax(x, y)) - (b * (0.5 - a));
          	} else {
          		tmp = fma(-0.5, b, (z - t_1)) + fmin(x, y);
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b)
          	t_1 = Float64(z * log(t))
          	tmp = 0.0
          	if (z <= -4.5e+218)
          		tmp = Float64(Float64(fmin(x, y) + z) - t_1);
          	elseif (z <= 2e+164)
          		tmp = Float64(Float64(fmin(x, y) + fmax(x, y)) - Float64(b * Float64(0.5 - a)));
          	else
          		tmp = Float64(fma(-0.5, b, Float64(z - t_1)) + fmin(x, y));
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+218], N[(N[(N[Min[x, y], $MachinePrecision] + z), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[z, 2e+164], N[(N[(N[Min[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision] - N[(b * N[(0.5 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-0.5 * b + N[(z - t$95$1), $MachinePrecision]), $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision]]]]
          
          \begin{array}{l}
          t_1 := z \cdot \log t\\
          \mathbf{if}\;z \leq -4.5 \cdot 10^{+218}:\\
          \;\;\;\;\left(\mathsf{min}\left(x, y\right) + z\right) - t\_1\\
          
          \mathbf{elif}\;z \leq 2 \cdot 10^{+164}:\\
          \;\;\;\;\left(\mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\right) - b \cdot \left(0.5 - a\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(-0.5, b, z - t\_1\right) + \mathsf{min}\left(x, y\right)\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if z < -4.50000000000000008e218

            1. Initial program 99.8%

              \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
            2. Taylor expanded in y around 0

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

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

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

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

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

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

                \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - z \cdot \color{blue}{\log t} \]
              7. lower-log.f6478.6%

                \[\leadsto \left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t \]
            4. Applied rewrites78.6%

              \[\leadsto \color{blue}{\left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t} \]
            5. Taylor expanded in b around 0

              \[\leadsto \left(x + z\right) - \color{blue}{z} \cdot \log t \]
            6. Step-by-step derivation
              1. lower-+.f6442.4%

                \[\leadsto \left(x + z\right) - z \cdot \log t \]
            7. Applied rewrites42.4%

              \[\leadsto \left(x + z\right) - \color{blue}{z} \cdot \log t \]

            if -4.50000000000000008e218 < z < 2e164

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\left(1 + \frac{\left(y + x\right) - \mathsf{fma}\left(0.5 - a, b, \log t \cdot z\right)}{z}\right) \cdot z} \]
            4. Taylor expanded in z around 0

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

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

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

                \[\leadsto \left(x + y\right) - b \cdot \color{blue}{\left(\frac{1}{2} - a\right)} \]
              4. lower--.f6478.7%

                \[\leadsto \left(x + y\right) - b \cdot \left(0.5 - \color{blue}{a}\right) \]
            6. Applied rewrites78.7%

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

            if 2e164 < z

            1. Initial program 99.8%

              \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
            2. Taylor expanded in y around 0

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

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

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

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

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

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

                \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - z \cdot \color{blue}{\log t} \]
              7. lower-log.f6478.6%

                \[\leadsto \left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t \]
            4. Applied rewrites78.6%

              \[\leadsto \color{blue}{\left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t} \]
            5. Step-by-step derivation
              1. lift--.f64N/A

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

                \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{z} \cdot \log t \]
              3. associate--l+N/A

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

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

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

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

                \[\leadsto \left(\left(b \cdot \left(a - \frac{1}{2}\right) + z\right) - z \cdot \log t\right) + x \]
              8. associate--l+N/A

                \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + \left(z - z \cdot \log t\right)\right) + x \]
              9. lift-*.f64N/A

                \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + \left(z - z \cdot \log t\right)\right) + x \]
              10. *-commutativeN/A

                \[\leadsto \left(\left(a - \frac{1}{2}\right) \cdot b + \left(z - z \cdot \log t\right)\right) + x \]
              11. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, z - z \cdot \log t\right) + x \]
              12. lower--.f6478.6%

                \[\leadsto \mathsf{fma}\left(a - 0.5, b, z - z \cdot \log t\right) + x \]
            6. Applied rewrites78.6%

              \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, b, z - z \cdot \log t\right) + x} \]
            7. Taylor expanded in a around 0

              \[\leadsto \mathsf{fma}\left(\frac{-1}{2}, b, z - z \cdot \log t\right) + x \]
            8. Step-by-step derivation
              1. Applied rewrites54.1%

                \[\leadsto \mathsf{fma}\left(-0.5, b, z - z \cdot \log t\right) + x \]
            9. Recombined 3 regimes into one program.
            10. Add Preprocessing

            Alternative 8: 84.0% accurate, 1.3× speedup?

            \[\begin{array}{l} t_1 := z \cdot \left(1 - \log t\right)\\ \mathbf{if}\;z \leq -4.5 \cdot 10^{+218}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+164}:\\ \;\;\;\;\left(x + y\right) - b \cdot \left(0.5 - a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (let* ((t_1 (* z (- 1.0 (log t)))))
               (if (<= z -4.5e+218)
                 t_1
                 (if (<= z 2e+164) (- (+ x y) (* b (- 0.5 a))) t_1))))
            double code(double x, double y, double z, double t, double a, double b) {
            	double t_1 = z * (1.0 - log(t));
            	double tmp;
            	if (z <= -4.5e+218) {
            		tmp = t_1;
            	} else if (z <= 2e+164) {
            		tmp = (x + y) - (b * (0.5 - a));
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(x, y, z, t, a, b)
            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) :: t_1
                real(8) :: tmp
                t_1 = z * (1.0d0 - log(t))
                if (z <= (-4.5d+218)) then
                    tmp = t_1
                else if (z <= 2d+164) then
                    tmp = (x + y) - (b * (0.5d0 - a))
                else
                    tmp = t_1
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t, double a, double b) {
            	double t_1 = z * (1.0 - Math.log(t));
            	double tmp;
            	if (z <= -4.5e+218) {
            		tmp = t_1;
            	} else if (z <= 2e+164) {
            		tmp = (x + y) - (b * (0.5 - a));
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b):
            	t_1 = z * (1.0 - math.log(t))
            	tmp = 0
            	if z <= -4.5e+218:
            		tmp = t_1
            	elif z <= 2e+164:
            		tmp = (x + y) - (b * (0.5 - a))
            	else:
            		tmp = t_1
            	return tmp
            
            function code(x, y, z, t, a, b)
            	t_1 = Float64(z * Float64(1.0 - log(t)))
            	tmp = 0.0
            	if (z <= -4.5e+218)
            		tmp = t_1;
            	elseif (z <= 2e+164)
            		tmp = Float64(Float64(x + y) - Float64(b * Float64(0.5 - a)));
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a, b)
            	t_1 = z * (1.0 - log(t));
            	tmp = 0.0;
            	if (z <= -4.5e+218)
            		tmp = t_1;
            	elseif (z <= 2e+164)
            		tmp = (x + y) - (b * (0.5 - a));
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+218], t$95$1, If[LessEqual[z, 2e+164], N[(N[(x + y), $MachinePrecision] - N[(b * N[(0.5 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            t_1 := z \cdot \left(1 - \log t\right)\\
            \mathbf{if}\;z \leq -4.5 \cdot 10^{+218}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq 2 \cdot 10^{+164}:\\
            \;\;\;\;\left(x + y\right) - b \cdot \left(0.5 - a\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -4.50000000000000008e218 or 2e164 < z

              1. Initial program 99.8%

                \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
              2. Taylor expanded in z around inf

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

                  \[\leadsto z \cdot \color{blue}{\left(1 - \log t\right)} \]
                2. lower--.f64N/A

                  \[\leadsto z \cdot \left(1 - \color{blue}{\log t}\right) \]
                3. lower-log.f6422.3%

                  \[\leadsto z \cdot \left(1 - \log t\right) \]
              4. Applied rewrites22.3%

                \[\leadsto \color{blue}{z \cdot \left(1 - \log t\right)} \]

              if -4.50000000000000008e218 < z < 2e164

              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\left(1 + \frac{\left(y + x\right) - \mathsf{fma}\left(0.5 - a, b, \log t \cdot z\right)}{z}\right) \cdot z} \]
              4. Taylor expanded in z around 0

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

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

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

                  \[\leadsto \left(x + y\right) - b \cdot \color{blue}{\left(\frac{1}{2} - a\right)} \]
                4. lower--.f6478.7%

                  \[\leadsto \left(x + y\right) - b \cdot \left(0.5 - \color{blue}{a}\right) \]
              6. Applied rewrites78.7%

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

            Alternative 9: 78.7% accurate, 2.2× speedup?

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\left(1 + \frac{\left(y + x\right) - \mathsf{fma}\left(0.5 - a, b, \log t \cdot z\right)}{z}\right) \cdot z} \]
            4. Taylor expanded in z around 0

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

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

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

                \[\leadsto \left(x + y\right) - b \cdot \color{blue}{\left(\frac{1}{2} - a\right)} \]
              4. lower--.f6478.7%

                \[\leadsto \left(x + y\right) - b \cdot \left(0.5 - \color{blue}{a}\right) \]
            6. Applied rewrites78.7%

              \[\leadsto \color{blue}{\left(x + y\right) - b \cdot \left(0.5 - a\right)} \]
            7. Add Preprocessing

            Alternative 10: 78.3% accurate, 0.6× speedup?

            \[\begin{array}{l} \mathbf{if}\;\left(\left(\mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\right) + z\right) - z \cdot \log t \leq -2 \cdot 10^{-221}:\\ \;\;\;\;b \cdot \left(a - 0.5\right) + \mathsf{min}\left(x, y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, 1 \cdot \mathsf{max}\left(x, y\right)\right)\\ \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (if (<= (- (+ (+ (fmin x y) (fmax x y)) z) (* z (log t))) -2e-221)
               (+ (* b (- a 0.5)) (fmin x y))
               (fma (- a 0.5) b (* 1.0 (fmax x y)))))
            double code(double x, double y, double z, double t, double a, double b) {
            	double tmp;
            	if ((((fmin(x, y) + fmax(x, y)) + z) - (z * log(t))) <= -2e-221) {
            		tmp = (b * (a - 0.5)) + fmin(x, y);
            	} else {
            		tmp = fma((a - 0.5), b, (1.0 * fmax(x, y)));
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a, b)
            	tmp = 0.0
            	if (Float64(Float64(Float64(fmin(x, y) + fmax(x, y)) + z) - Float64(z * log(t))) <= -2e-221)
            		tmp = Float64(Float64(b * Float64(a - 0.5)) + fmin(x, y));
            	else
            		tmp = fma(Float64(a - 0.5), b, Float64(1.0 * fmax(x, y)));
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(N[(N[Min[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e-221], N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision], N[(N[(a - 0.5), $MachinePrecision] * b + N[(1.0 * N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            \mathbf{if}\;\left(\left(\mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\right) + z\right) - z \cdot \log t \leq -2 \cdot 10^{-221}:\\
            \;\;\;\;b \cdot \left(a - 0.5\right) + \mathsf{min}\left(x, y\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(a - 0.5, b, 1 \cdot \mathsf{max}\left(x, y\right)\right)\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) < -2.00000000000000003e-221

              1. Initial program 99.8%

                \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
              2. Taylor expanded in y around 0

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

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

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

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

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

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

                  \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - z \cdot \color{blue}{\log t} \]
                7. lower-log.f6478.6%

                  \[\leadsto \left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t \]
              4. Applied rewrites78.6%

                \[\leadsto \color{blue}{\left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t} \]
              5. Step-by-step derivation
                1. lift--.f64N/A

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

                  \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{z} \cdot \log t \]
                3. associate--l+N/A

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

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

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

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

                  \[\leadsto \left(\left(b \cdot \left(a - \frac{1}{2}\right) + z\right) - z \cdot \log t\right) + x \]
                8. associate--l+N/A

                  \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + \left(z - z \cdot \log t\right)\right) + x \]
                9. lift-*.f64N/A

                  \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + \left(z - z \cdot \log t\right)\right) + x \]
                10. *-commutativeN/A

                  \[\leadsto \left(\left(a - \frac{1}{2}\right) \cdot b + \left(z - z \cdot \log t\right)\right) + x \]
                11. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, z - z \cdot \log t\right) + x \]
                12. lower--.f6478.6%

                  \[\leadsto \mathsf{fma}\left(a - 0.5, b, z - z \cdot \log t\right) + x \]
              6. Applied rewrites78.6%

                \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, b, z - z \cdot \log t\right) + x} \]
              7. Taylor expanded in z around 0

                \[\leadsto b \cdot \left(a - \frac{1}{2}\right) + x \]
              8. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto b \cdot \left(a - \frac{1}{2}\right) + x \]
                2. lower--.f6457.9%

                  \[\leadsto b \cdot \left(a - 0.5\right) + x \]
              9. Applied rewrites57.9%

                \[\leadsto b \cdot \left(a - 0.5\right) + x \]

              if -2.00000000000000003e-221 < (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t)))

              1. Initial program 99.8%

                \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
              2. Taylor expanded in y around inf

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

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

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

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

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

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

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

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

                  \[\leadsto y \cdot \left(\left(1 + \left(\frac{x}{y} + \frac{z}{y}\right)\right) - \frac{z \cdot \log t}{y}\right) + \left(a - \frac{1}{2}\right) \cdot b \]
                9. lower-log.f6479.1%

                  \[\leadsto y \cdot \left(\left(1 + \left(\frac{x}{y} + \frac{z}{y}\right)\right) - \frac{z \cdot \log t}{y}\right) + \left(a - 0.5\right) \cdot b \]
              4. Applied rewrites79.1%

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

                \[\leadsto y \cdot 1 + \left(a - 0.5\right) \cdot b \]
              6. Step-by-step derivation
                1. Applied rewrites58.0%

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

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

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

                    \[\leadsto \color{blue}{\left(a - \frac{1}{2}\right) \cdot b} + y \cdot 1 \]
                  4. lower-fma.f6458.0%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, b, y \cdot 1\right)} \]
                  5. lift-*.f64N/A

                    \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, y \cdot \color{blue}{1}\right) \]
                  6. *-commutativeN/A

                    \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, 1 \cdot \color{blue}{y}\right) \]
                  7. lower-*.f6458.0%

                    \[\leadsto \mathsf{fma}\left(a - 0.5, b, 1 \cdot \color{blue}{y}\right) \]
                3. Applied rewrites58.0%

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

              Alternative 11: 67.1% accurate, 0.7× speedup?

              \[\begin{array}{l} \mathbf{if}\;\left(\left(\mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\right) + z\right) - z \cdot \log t \leq 10^{-10}:\\ \;\;\;\;b \cdot \left(a - 0.5\right) + \mathsf{min}\left(x, y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(x, y\right) \cdot 1 + -0.5 \cdot b\\ \end{array} \]
              (FPCore (x y z t a b)
               :precision binary64
               (if (<= (- (+ (+ (fmin x y) (fmax x y)) z) (* z (log t))) 1e-10)
                 (+ (* b (- a 0.5)) (fmin x y))
                 (+ (* (fmax x y) 1.0) (* -0.5 b))))
              double code(double x, double y, double z, double t, double a, double b) {
              	double tmp;
              	if ((((fmin(x, y) + fmax(x, y)) + z) - (z * log(t))) <= 1e-10) {
              		tmp = (b * (a - 0.5)) + fmin(x, y);
              	} else {
              		tmp = (fmax(x, y) * 1.0) + (-0.5 * b);
              	}
              	return tmp;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(x, y, z, t, a, b)
              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) :: tmp
                  if ((((fmin(x, y) + fmax(x, y)) + z) - (z * log(t))) <= 1d-10) then
                      tmp = (b * (a - 0.5d0)) + fmin(x, y)
                  else
                      tmp = (fmax(x, y) * 1.0d0) + ((-0.5d0) * b)
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t, double a, double b) {
              	double tmp;
              	if ((((fmin(x, y) + fmax(x, y)) + z) - (z * Math.log(t))) <= 1e-10) {
              		tmp = (b * (a - 0.5)) + fmin(x, y);
              	} else {
              		tmp = (fmax(x, y) * 1.0) + (-0.5 * b);
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b):
              	tmp = 0
              	if (((fmin(x, y) + fmax(x, y)) + z) - (z * math.log(t))) <= 1e-10:
              		tmp = (b * (a - 0.5)) + fmin(x, y)
              	else:
              		tmp = (fmax(x, y) * 1.0) + (-0.5 * b)
              	return tmp
              
              function code(x, y, z, t, a, b)
              	tmp = 0.0
              	if (Float64(Float64(Float64(fmin(x, y) + fmax(x, y)) + z) - Float64(z * log(t))) <= 1e-10)
              		tmp = Float64(Float64(b * Float64(a - 0.5)) + fmin(x, y));
              	else
              		tmp = Float64(Float64(fmax(x, y) * 1.0) + Float64(-0.5 * b));
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b)
              	tmp = 0.0;
              	if ((((min(x, y) + max(x, y)) + z) - (z * log(t))) <= 1e-10)
              		tmp = (b * (a - 0.5)) + min(x, y);
              	else
              		tmp = (max(x, y) * 1.0) + (-0.5 * b);
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(N[(N[Min[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e-10], N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision], N[(N[(N[Max[x, y], $MachinePrecision] * 1.0), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]]
              
              \begin{array}{l}
              \mathbf{if}\;\left(\left(\mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\right) + z\right) - z \cdot \log t \leq 10^{-10}:\\
              \;\;\;\;b \cdot \left(a - 0.5\right) + \mathsf{min}\left(x, y\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;\mathsf{max}\left(x, y\right) \cdot 1 + -0.5 \cdot b\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) < 1.00000000000000004e-10

                1. Initial program 99.8%

                  \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                2. Taylor expanded in y around 0

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

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

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

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

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

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

                    \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - z \cdot \color{blue}{\log t} \]
                  7. lower-log.f6478.6%

                    \[\leadsto \left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t \]
                4. Applied rewrites78.6%

                  \[\leadsto \color{blue}{\left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t} \]
                5. Step-by-step derivation
                  1. lift--.f64N/A

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

                    \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{z} \cdot \log t \]
                  3. associate--l+N/A

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

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

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

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

                    \[\leadsto \left(\left(b \cdot \left(a - \frac{1}{2}\right) + z\right) - z \cdot \log t\right) + x \]
                  8. associate--l+N/A

                    \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + \left(z - z \cdot \log t\right)\right) + x \]
                  9. lift-*.f64N/A

                    \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + \left(z - z \cdot \log t\right)\right) + x \]
                  10. *-commutativeN/A

                    \[\leadsto \left(\left(a - \frac{1}{2}\right) \cdot b + \left(z - z \cdot \log t\right)\right) + x \]
                  11. lower-fma.f64N/A

                    \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, z - z \cdot \log t\right) + x \]
                  12. lower--.f6478.6%

                    \[\leadsto \mathsf{fma}\left(a - 0.5, b, z - z \cdot \log t\right) + x \]
                6. Applied rewrites78.6%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, b, z - z \cdot \log t\right) + x} \]
                7. Taylor expanded in z around 0

                  \[\leadsto b \cdot \left(a - \frac{1}{2}\right) + x \]
                8. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto b \cdot \left(a - \frac{1}{2}\right) + x \]
                  2. lower--.f6457.9%

                    \[\leadsto b \cdot \left(a - 0.5\right) + x \]
                9. Applied rewrites57.9%

                  \[\leadsto b \cdot \left(a - 0.5\right) + x \]

                if 1.00000000000000004e-10 < (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t)))

                1. Initial program 99.8%

                  \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                2. Taylor expanded in y around inf

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

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

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

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

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

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

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

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

                    \[\leadsto y \cdot \left(\left(1 + \left(\frac{x}{y} + \frac{z}{y}\right)\right) - \frac{z \cdot \log t}{y}\right) + \left(a - \frac{1}{2}\right) \cdot b \]
                  9. lower-log.f6479.1%

                    \[\leadsto y \cdot \left(\left(1 + \left(\frac{x}{y} + \frac{z}{y}\right)\right) - \frac{z \cdot \log t}{y}\right) + \left(a - 0.5\right) \cdot b \]
                4. Applied rewrites79.1%

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

                  \[\leadsto y \cdot 1 + \left(a - 0.5\right) \cdot b \]
                6. Step-by-step derivation
                  1. Applied rewrites58.0%

                    \[\leadsto y \cdot 1 + \left(a - 0.5\right) \cdot b \]
                  2. Taylor expanded in a around 0

                    \[\leadsto y \cdot 1 + \color{blue}{\frac{-1}{2}} \cdot b \]
                  3. Step-by-step derivation
                    1. Applied rewrites33.8%

                      \[\leadsto y \cdot 1 + \color{blue}{-0.5} \cdot b \]
                  4. Recombined 2 regimes into one program.
                  5. Add Preprocessing

                  Alternative 12: 61.1% accurate, 1.0× speedup?

                  \[\begin{array}{l} \mathbf{if}\;\mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right) \leq 2 \cdot 10^{+199}:\\ \;\;\;\;b \cdot \left(a - 0.5\right) + \mathsf{min}\left(x, y\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{z} \cdot z\\ \end{array} \]
                  (FPCore (x y z t a b)
                   :precision binary64
                   (if (<= (+ (fmin x y) (fmax x y)) 2e+199)
                     (+ (* b (- a 0.5)) (fmin x y))
                     (* (/ (fmax x y) z) z)))
                  double code(double x, double y, double z, double t, double a, double b) {
                  	double tmp;
                  	if ((fmin(x, y) + fmax(x, y)) <= 2e+199) {
                  		tmp = (b * (a - 0.5)) + fmin(x, y);
                  	} else {
                  		tmp = (fmax(x, y) / z) * z;
                  	}
                  	return tmp;
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z, t, a, b)
                  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) :: tmp
                      if ((fmin(x, y) + fmax(x, y)) <= 2d+199) then
                          tmp = (b * (a - 0.5d0)) + fmin(x, y)
                      else
                          tmp = (fmax(x, y) / z) * z
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b) {
                  	double tmp;
                  	if ((fmin(x, y) + fmax(x, y)) <= 2e+199) {
                  		tmp = (b * (a - 0.5)) + fmin(x, y);
                  	} else {
                  		tmp = (fmax(x, y) / z) * z;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a, b):
                  	tmp = 0
                  	if (fmin(x, y) + fmax(x, y)) <= 2e+199:
                  		tmp = (b * (a - 0.5)) + fmin(x, y)
                  	else:
                  		tmp = (fmax(x, y) / z) * z
                  	return tmp
                  
                  function code(x, y, z, t, a, b)
                  	tmp = 0.0
                  	if (Float64(fmin(x, y) + fmax(x, y)) <= 2e+199)
                  		tmp = Float64(Float64(b * Float64(a - 0.5)) + fmin(x, y));
                  	else
                  		tmp = Float64(Float64(fmax(x, y) / z) * z);
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t, a, b)
                  	tmp = 0.0;
                  	if ((min(x, y) + max(x, y)) <= 2e+199)
                  		tmp = (b * (a - 0.5)) + min(x, y);
                  	else
                  		tmp = (max(x, y) / z) * z;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[Min[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision], 2e+199], N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision], N[(N[(N[Max[x, y], $MachinePrecision] / z), $MachinePrecision] * z), $MachinePrecision]]
                  
                  \begin{array}{l}
                  \mathbf{if}\;\mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right) \leq 2 \cdot 10^{+199}:\\
                  \;\;\;\;b \cdot \left(a - 0.5\right) + \mathsf{min}\left(x, y\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{z} \cdot z\\
                  
                  
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (+.f64 x y) < 2.00000000000000019e199

                    1. Initial program 99.8%

                      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                    2. Taylor expanded in y around 0

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

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

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

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

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

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

                        \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - z \cdot \color{blue}{\log t} \]
                      7. lower-log.f6478.6%

                        \[\leadsto \left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t \]
                    4. Applied rewrites78.6%

                      \[\leadsto \color{blue}{\left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t} \]
                    5. Step-by-step derivation
                      1. lift--.f64N/A

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

                        \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{z} \cdot \log t \]
                      3. associate--l+N/A

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

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

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

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

                        \[\leadsto \left(\left(b \cdot \left(a - \frac{1}{2}\right) + z\right) - z \cdot \log t\right) + x \]
                      8. associate--l+N/A

                        \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + \left(z - z \cdot \log t\right)\right) + x \]
                      9. lift-*.f64N/A

                        \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + \left(z - z \cdot \log t\right)\right) + x \]
                      10. *-commutativeN/A

                        \[\leadsto \left(\left(a - \frac{1}{2}\right) \cdot b + \left(z - z \cdot \log t\right)\right) + x \]
                      11. lower-fma.f64N/A

                        \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, z - z \cdot \log t\right) + x \]
                      12. lower--.f6478.6%

                        \[\leadsto \mathsf{fma}\left(a - 0.5, b, z - z \cdot \log t\right) + x \]
                    6. Applied rewrites78.6%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, b, z - z \cdot \log t\right) + x} \]
                    7. Taylor expanded in z around 0

                      \[\leadsto b \cdot \left(a - \frac{1}{2}\right) + x \]
                    8. Step-by-step derivation
                      1. lower-*.f64N/A

                        \[\leadsto b \cdot \left(a - \frac{1}{2}\right) + x \]
                      2. lower--.f6457.9%

                        \[\leadsto b \cdot \left(a - 0.5\right) + x \]
                    9. Applied rewrites57.9%

                      \[\leadsto b \cdot \left(a - 0.5\right) + x \]

                    if 2.00000000000000019e199 < (+.f64 x y)

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{y}{z}} \cdot z \]
                    5. Step-by-step derivation
                      1. lower-/.f6416.1%

                        \[\leadsto \frac{y}{\color{blue}{z}} \cdot z \]
                    6. Applied rewrites16.1%

                      \[\leadsto \color{blue}{\frac{y}{z}} \cdot z \]
                  3. Recombined 2 regimes into one program.
                  4. Add Preprocessing

                  Alternative 13: 34.5% accurate, 0.7× speedup?

                  \[\begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+144}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-67}:\\ \;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{z} \cdot z\\ \mathbf{elif}\;t\_1 \leq 10^{+39}:\\ \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{z} \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
                  (FPCore (x y z t a b)
                   :precision binary64
                   (let* ((t_1 (* (- a 0.5) b)))
                     (if (<= t_1 -2e+144)
                       (* a b)
                       (if (<= t_1 2e-67)
                         (* (/ (fmin x y) z) z)
                         (if (<= t_1 1e+39) (* (/ (fmax x y) z) z) (* a b))))))
                  double code(double x, double y, double z, double t, double a, double b) {
                  	double t_1 = (a - 0.5) * b;
                  	double tmp;
                  	if (t_1 <= -2e+144) {
                  		tmp = a * b;
                  	} else if (t_1 <= 2e-67) {
                  		tmp = (fmin(x, y) / z) * z;
                  	} else if (t_1 <= 1e+39) {
                  		tmp = (fmax(x, y) / z) * z;
                  	} else {
                  		tmp = a * b;
                  	}
                  	return tmp;
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z, t, a, b)
                  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) :: t_1
                      real(8) :: tmp
                      t_1 = (a - 0.5d0) * b
                      if (t_1 <= (-2d+144)) then
                          tmp = a * b
                      else if (t_1 <= 2d-67) then
                          tmp = (fmin(x, y) / z) * z
                      else if (t_1 <= 1d+39) then
                          tmp = (fmax(x, y) / z) * z
                      else
                          tmp = a * b
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b) {
                  	double t_1 = (a - 0.5) * b;
                  	double tmp;
                  	if (t_1 <= -2e+144) {
                  		tmp = a * b;
                  	} else if (t_1 <= 2e-67) {
                  		tmp = (fmin(x, y) / z) * z;
                  	} else if (t_1 <= 1e+39) {
                  		tmp = (fmax(x, y) / z) * z;
                  	} else {
                  		tmp = a * b;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a, b):
                  	t_1 = (a - 0.5) * b
                  	tmp = 0
                  	if t_1 <= -2e+144:
                  		tmp = a * b
                  	elif t_1 <= 2e-67:
                  		tmp = (fmin(x, y) / z) * z
                  	elif t_1 <= 1e+39:
                  		tmp = (fmax(x, y) / z) * z
                  	else:
                  		tmp = a * b
                  	return tmp
                  
                  function code(x, y, z, t, a, b)
                  	t_1 = Float64(Float64(a - 0.5) * b)
                  	tmp = 0.0
                  	if (t_1 <= -2e+144)
                  		tmp = Float64(a * b);
                  	elseif (t_1 <= 2e-67)
                  		tmp = Float64(Float64(fmin(x, y) / z) * z);
                  	elseif (t_1 <= 1e+39)
                  		tmp = Float64(Float64(fmax(x, y) / z) * z);
                  	else
                  		tmp = Float64(a * b);
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t, a, b)
                  	t_1 = (a - 0.5) * b;
                  	tmp = 0.0;
                  	if (t_1 <= -2e+144)
                  		tmp = a * b;
                  	elseif (t_1 <= 2e-67)
                  		tmp = (min(x, y) / z) * z;
                  	elseif (t_1 <= 1e+39)
                  		tmp = (max(x, y) / z) * z;
                  	else
                  		tmp = a * b;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+144], N[(a * b), $MachinePrecision], If[LessEqual[t$95$1, 2e-67], N[(N[(N[Min[x, y], $MachinePrecision] / z), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t$95$1, 1e+39], N[(N[(N[Max[x, y], $MachinePrecision] / z), $MachinePrecision] * z), $MachinePrecision], N[(a * b), $MachinePrecision]]]]]
                  
                  \begin{array}{l}
                  t_1 := \left(a - 0.5\right) \cdot b\\
                  \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+144}:\\
                  \;\;\;\;a \cdot b\\
                  
                  \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-67}:\\
                  \;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{z} \cdot z\\
                  
                  \mathbf{elif}\;t\_1 \leq 10^{+39}:\\
                  \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{z} \cdot z\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;a \cdot b\\
                  
                  
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -2.00000000000000005e144 or 9.9999999999999994e38 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

                    1. Initial program 99.8%

                      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                    2. Taylor expanded in a around inf

                      \[\leadsto \color{blue}{a \cdot b} \]
                    3. Step-by-step derivation
                      1. lower-*.f6426.3%

                        \[\leadsto a \cdot \color{blue}{b} \]
                    4. Applied rewrites26.3%

                      \[\leadsto \color{blue}{a \cdot b} \]

                    if -2.00000000000000005e144 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.99999999999999989e-67

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{x}{z}} \cdot z \]
                    5. Step-by-step derivation
                      1. lower-/.f6416.4%

                        \[\leadsto \frac{x}{\color{blue}{z}} \cdot z \]
                    6. Applied rewrites16.4%

                      \[\leadsto \color{blue}{\frac{x}{z}} \cdot z \]

                    if 1.99999999999999989e-67 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 9.9999999999999994e38

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{y}{z}} \cdot z \]
                    5. Step-by-step derivation
                      1. lower-/.f6416.1%

                        \[\leadsto \frac{y}{\color{blue}{z}} \cdot z \]
                    6. Applied rewrites16.1%

                      \[\leadsto \color{blue}{\frac{y}{z}} \cdot z \]
                  3. Recombined 3 regimes into one program.
                  4. Add Preprocessing

                  Alternative 14: 34.2% accurate, 0.9× speedup?

                  \[\begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+144}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;t\_1 \leq 10^{+26}:\\ \;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{z} \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
                  (FPCore (x y z t a b)
                   :precision binary64
                   (let* ((t_1 (* (- a 0.5) b)))
                     (if (<= t_1 -2e+144)
                       (* a b)
                       (if (<= t_1 1e+26) (* (/ (fmin x y) z) z) (* a b)))))
                  double code(double x, double y, double z, double t, double a, double b) {
                  	double t_1 = (a - 0.5) * b;
                  	double tmp;
                  	if (t_1 <= -2e+144) {
                  		tmp = a * b;
                  	} else if (t_1 <= 1e+26) {
                  		tmp = (fmin(x, y) / z) * z;
                  	} else {
                  		tmp = a * b;
                  	}
                  	return tmp;
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z, t, a, b)
                  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) :: t_1
                      real(8) :: tmp
                      t_1 = (a - 0.5d0) * b
                      if (t_1 <= (-2d+144)) then
                          tmp = a * b
                      else if (t_1 <= 1d+26) then
                          tmp = (fmin(x, y) / z) * z
                      else
                          tmp = a * b
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b) {
                  	double t_1 = (a - 0.5) * b;
                  	double tmp;
                  	if (t_1 <= -2e+144) {
                  		tmp = a * b;
                  	} else if (t_1 <= 1e+26) {
                  		tmp = (fmin(x, y) / z) * z;
                  	} else {
                  		tmp = a * b;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a, b):
                  	t_1 = (a - 0.5) * b
                  	tmp = 0
                  	if t_1 <= -2e+144:
                  		tmp = a * b
                  	elif t_1 <= 1e+26:
                  		tmp = (fmin(x, y) / z) * z
                  	else:
                  		tmp = a * b
                  	return tmp
                  
                  function code(x, y, z, t, a, b)
                  	t_1 = Float64(Float64(a - 0.5) * b)
                  	tmp = 0.0
                  	if (t_1 <= -2e+144)
                  		tmp = Float64(a * b);
                  	elseif (t_1 <= 1e+26)
                  		tmp = Float64(Float64(fmin(x, y) / z) * z);
                  	else
                  		tmp = Float64(a * b);
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t, a, b)
                  	t_1 = (a - 0.5) * b;
                  	tmp = 0.0;
                  	if (t_1 <= -2e+144)
                  		tmp = a * b;
                  	elseif (t_1 <= 1e+26)
                  		tmp = (min(x, y) / z) * z;
                  	else
                  		tmp = a * b;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+144], N[(a * b), $MachinePrecision], If[LessEqual[t$95$1, 1e+26], N[(N[(N[Min[x, y], $MachinePrecision] / z), $MachinePrecision] * z), $MachinePrecision], N[(a * b), $MachinePrecision]]]]
                  
                  \begin{array}{l}
                  t_1 := \left(a - 0.5\right) \cdot b\\
                  \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+144}:\\
                  \;\;\;\;a \cdot b\\
                  
                  \mathbf{elif}\;t\_1 \leq 10^{+26}:\\
                  \;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{z} \cdot z\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;a \cdot b\\
                  
                  
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -2.00000000000000005e144 or 1.00000000000000005e26 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

                    1. Initial program 99.8%

                      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                    2. Taylor expanded in a around inf

                      \[\leadsto \color{blue}{a \cdot b} \]
                    3. Step-by-step derivation
                      1. lower-*.f6426.3%

                        \[\leadsto a \cdot \color{blue}{b} \]
                    4. Applied rewrites26.3%

                      \[\leadsto \color{blue}{a \cdot b} \]

                    if -2.00000000000000005e144 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.00000000000000005e26

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{x}{z}} \cdot z \]
                    5. Step-by-step derivation
                      1. lower-/.f6416.4%

                        \[\leadsto \frac{x}{\color{blue}{z}} \cdot z \]
                    6. Applied rewrites16.4%

                      \[\leadsto \color{blue}{\frac{x}{z}} \cdot z \]
                  3. Recombined 2 regimes into one program.
                  4. Add Preprocessing

                  Alternative 15: 26.3% accurate, 6.6× speedup?

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

                    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                  2. Taylor expanded in a around inf

                    \[\leadsto \color{blue}{a \cdot b} \]
                  3. Step-by-step derivation
                    1. lower-*.f6426.3%

                      \[\leadsto a \cdot \color{blue}{b} \]
                  4. Applied rewrites26.3%

                    \[\leadsto \color{blue}{a \cdot b} \]
                  5. Add Preprocessing

                  Reproduce

                  ?
                  herbie shell --seed 2025183 
                  (FPCore (x y z t a b)
                    :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
                    :precision binary64
                    (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))