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

Percentage Accurate: 99.9% → 99.9%
Time: 12.0s
Alternatives: 21
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \end{array} \]
(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]
\begin{array}{l}

\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 21 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.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \end{array} \]
(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]
\begin{array}{l}

\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}

Alternative 1: 99.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \end{array} \]
(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]
\begin{array}{l}

\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
Derivation
  1. Initial program 99.9%

    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
  2. Add Preprocessing

Alternative 2: 92.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(1 - \log t, z, \mathsf{fma}\left(b, a - 0.5, y\right)\right)\\ \mathbf{if}\;z \leq -1.8 \cdot 10^{+120}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+51}:\\ \;\;\;\;\mathsf{fma}\left(b, a - 0.5, y + x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (fma (- 1.0 (log t)) z (fma b (- a 0.5) y))))
   (if (<= z -1.8e+120)
     t_1
     (if (<= z 2.35e+51) (fma b (- a 0.5) (+ y x)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = fma((1.0 - log(t)), z, fma(b, (a - 0.5), y));
	double tmp;
	if (z <= -1.8e+120) {
		tmp = t_1;
	} else if (z <= 2.35e+51) {
		tmp = fma(b, (a - 0.5), (y + x));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = fma(Float64(1.0 - log(t)), z, fma(b, Float64(a - 0.5), y))
	tmp = 0.0
	if (z <= -1.8e+120)
		tmp = t_1;
	elseif (z <= 2.35e+51)
		tmp = fma(b, Float64(a - 0.5), Float64(y + x));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + N[(b * N[(a - 0.5), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+120], t$95$1, If[LessEqual[z, 2.35e+51], N[(b * N[(a - 0.5), $MachinePrecision] + N[(y + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - \log t, z, \mathsf{fma}\left(b, a - 0.5, y\right)\right)\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+120}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.35 \cdot 10^{+51}:\\
\;\;\;\;\mathsf{fma}\left(b, a - 0.5, y + x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.80000000000000008e120 or 2.3500000000000001e51 < z

    1. Initial program 99.7%

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

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

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

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

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

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

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

        \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log t \cdot z\right)\right)\right)\right)\right) \]
      7. distribute-rgt-neg-inN/A

        \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\log t \cdot \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right) \]
      8. distribute-lft-neg-outN/A

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

        \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(-1 \cdot \log t\right) \cdot \left(\mathsf{neg}\left(\color{blue}{z}\right)\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(-1 \cdot \log t\right) \cdot z\right)\right)\right) \]
      11. distribute-lft-neg-inN/A

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

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

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

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

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

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

    if -1.80000000000000008e120 < z < 2.3500000000000001e51

    1. Initial program 100.0%

      \[\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 0

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
      4. distribute-lft-neg-outN/A

        \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
      5. distribute-rgt-neg-outN/A

        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
      6. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
      7. distribute-lft-neg-outN/A

        \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
      8. distribute-rgt-neg-inN/A

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

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
      11. metadata-evalN/A

        \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
      12. *-rgt-identityN/A

        \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
      13. *-rgt-identityN/A

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

        \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
      15. *-rgt-identityN/A

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

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

        \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
      18. lower-+.f6494.8

        \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
    4. Applied rewrites94.8%

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

Alternative 3: 89.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 1 - \log t\\ \mathbf{if}\;z \leq -2.4 \cdot 10^{+120}:\\ \;\;\;\;\mathsf{fma}\left(t\_1, z, \mathsf{fma}\left(b, a, y\right)\right)\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{+99}:\\ \;\;\;\;\mathsf{fma}\left(b, a - 0.5, y + x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, t\_1 \cdot z\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- 1.0 (log t))))
   (if (<= z -2.4e+120)
     (fma t_1 z (fma b a y))
     (if (<= z 1.55e+99)
       (fma b (- a 0.5) (+ y x))
       (fma (- a 0.5) b (* t_1 z))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = 1.0 - log(t);
	double tmp;
	if (z <= -2.4e+120) {
		tmp = fma(t_1, z, fma(b, a, y));
	} else if (z <= 1.55e+99) {
		tmp = fma(b, (a - 0.5), (y + x));
	} else {
		tmp = fma((a - 0.5), b, (t_1 * z));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(1.0 - log(t))
	tmp = 0.0
	if (z <= -2.4e+120)
		tmp = fma(t_1, z, fma(b, a, y));
	elseif (z <= 1.55e+99)
		tmp = fma(b, Float64(a - 0.5), Float64(y + x));
	else
		tmp = fma(Float64(a - 0.5), b, Float64(t_1 * z));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.4e+120], N[(t$95$1 * z + N[(b * a + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e+99], N[(b * N[(a - 0.5), $MachinePrecision] + N[(y + x), $MachinePrecision]), $MachinePrecision], N[(N[(a - 0.5), $MachinePrecision] * b + N[(t$95$1 * z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := 1 - \log t\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+120}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, z, \mathsf{fma}\left(b, a, y\right)\right)\\

\mathbf{elif}\;z \leq 1.55 \cdot 10^{+99}:\\
\;\;\;\;\mathsf{fma}\left(b, a - 0.5, y + x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.40000000000000001e120

    1. Initial program 99.7%

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

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

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

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

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

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

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

        \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log t \cdot z\right)\right)\right)\right)\right) \]
      7. distribute-rgt-neg-inN/A

        \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\log t \cdot \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right) \]
      8. distribute-lft-neg-outN/A

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

        \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(-1 \cdot \log t\right) \cdot \left(\mathsf{neg}\left(\color{blue}{z}\right)\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(-1 \cdot \log t\right) \cdot z\right)\right)\right) \]
      11. distribute-lft-neg-inN/A

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(1 - \log t, z, \mathsf{fma}\left(b, a, y\right)\right) \]
    6. Step-by-step derivation
      1. Applied rewrites84.0%

        \[\leadsto \mathsf{fma}\left(1 - \log t, z, \mathsf{fma}\left(b, a, y\right)\right) \]

      if -2.40000000000000001e120 < z < 1.55e99

      1. Initial program 100.0%

        \[\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 0

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

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

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

          \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
        4. distribute-lft-neg-outN/A

          \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
        5. distribute-rgt-neg-outN/A

          \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
        6. mul-1-negN/A

          \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
        7. distribute-lft-neg-outN/A

          \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
        8. distribute-rgt-neg-inN/A

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

          \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
        10. distribute-rgt-neg-inN/A

          \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
        11. metadata-evalN/A

          \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
        12. *-rgt-identityN/A

          \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
        13. *-rgt-identityN/A

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

          \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
        15. *-rgt-identityN/A

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

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

          \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
        18. lower-+.f6494.1

          \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
      4. Applied rewrites94.1%

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

      if 1.55e99 < z

      1. Initial program 99.6%

        \[\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)} + \left(a - \frac{1}{2}\right) \cdot b \]
      3. Step-by-step derivation
        1. *-commutativeN/A

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

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

          \[\leadsto \left(1 - \log t\right) \cdot z + \left(a - \frac{1}{2}\right) \cdot b \]
        4. lift-log.f6477.1

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(a - \frac{1}{2}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)}\right) \cdot b + \left(1 - \log t\right) \cdot z \]
        9. distribute-rgt-neg-inN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right)} \cdot b + \left(1 - \log t\right) \cdot z \]
        10. distribute-lft-neg-outN/A

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) \cdot -1, b \cdot 1, \left(1 - \log t\right) \cdot z\right)} \]
        13. distribute-lft-neg-outN/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)}, b \cdot 1, \left(1 - \log t\right) \cdot z\right) \]
        14. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)}, b \cdot 1, \left(1 - \log t\right) \cdot z\right) \]
        15. metadata-evalN/A

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

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b \cdot 1, \left(1 - \log t\right) \cdot z\right) \]
        18. *-rgt-identity77.1

          \[\leadsto \mathsf{fma}\left(a - 0.5, \color{blue}{b}, \left(1 - \log t\right) \cdot z\right) \]
      6. Applied rewrites77.1%

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

    Alternative 4: 89.5% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(1 - \log t, z, \mathsf{fma}\left(b, a, y\right)\right)\\ \mathbf{if}\;z \leq -2.4 \cdot 10^{+120}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+52}:\\ \;\;\;\;\mathsf{fma}\left(b, a - 0.5, y + x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (fma (- 1.0 (log t)) z (fma b a y))))
       (if (<= z -2.4e+120)
         t_1
         (if (<= z 1.3e+52) (fma b (- a 0.5) (+ y x)) t_1))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = fma((1.0 - log(t)), z, fma(b, a, y));
    	double tmp;
    	if (z <= -2.4e+120) {
    		tmp = t_1;
    	} else if (z <= 1.3e+52) {
    		tmp = fma(b, (a - 0.5), (y + x));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	t_1 = fma(Float64(1.0 - log(t)), z, fma(b, a, y))
    	tmp = 0.0
    	if (z <= -2.4e+120)
    		tmp = t_1;
    	elseif (z <= 1.3e+52)
    		tmp = fma(b, Float64(a - 0.5), Float64(y + x));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + N[(b * a + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.4e+120], t$95$1, If[LessEqual[z, 1.3e+52], N[(b * N[(a - 0.5), $MachinePrecision] + N[(y + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \mathsf{fma}\left(1 - \log t, z, \mathsf{fma}\left(b, a, y\right)\right)\\
    \mathbf{if}\;z \leq -2.4 \cdot 10^{+120}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 1.3 \cdot 10^{+52}:\\
    \;\;\;\;\mathsf{fma}\left(b, a - 0.5, y + x\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -2.40000000000000001e120 or 1.3e52 < z

      1. Initial program 99.7%

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

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

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

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

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

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

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

          \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log t \cdot z\right)\right)\right)\right)\right) \]
        7. distribute-rgt-neg-inN/A

          \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\log t \cdot \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right) \]
        8. distribute-lft-neg-outN/A

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

          \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(-1 \cdot \log t\right) \cdot \left(\mathsf{neg}\left(\color{blue}{z}\right)\right)\right) \]
        10. distribute-rgt-neg-inN/A

          \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(-1 \cdot \log t\right) \cdot z\right)\right)\right) \]
        11. distribute-lft-neg-inN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(1 - \log t, z, \mathsf{fma}\left(b, a, y\right)\right) \]
      6. Step-by-step derivation
        1. Applied rewrites79.9%

          \[\leadsto \mathsf{fma}\left(1 - \log t, z, \mathsf{fma}\left(b, a, y\right)\right) \]

        if -2.40000000000000001e120 < z < 1.3e52

        1. Initial program 100.0%

          \[\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 0

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

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

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

            \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
          4. distribute-lft-neg-outN/A

            \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
          5. distribute-rgt-neg-outN/A

            \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
          6. mul-1-negN/A

            \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
          7. distribute-lft-neg-outN/A

            \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
          8. distribute-rgt-neg-inN/A

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

            \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
          10. distribute-rgt-neg-inN/A

            \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
          11. metadata-evalN/A

            \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
          12. *-rgt-identityN/A

            \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
          13. *-rgt-identityN/A

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

            \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
          15. *-rgt-identityN/A

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

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

            \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
          18. lower-+.f6494.8

            \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
        4. Applied rewrites94.8%

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

      Alternative 5: 87.3% accurate, 1.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(1 - \log t, z, y + x\right)\\ \mathbf{if}\;z \leq -1.6 \cdot 10^{+101}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+116}:\\ \;\;\;\;\mathsf{fma}\left(b, a - 0.5, y + x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (fma (- 1.0 (log t)) z (+ y x))))
         (if (<= z -1.6e+101)
           t_1
           (if (<= z 6.5e+116) (fma b (- a 0.5) (+ y x)) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = fma((1.0 - log(t)), z, (y + x));
      	double tmp;
      	if (z <= -1.6e+101) {
      		tmp = t_1;
      	} else if (z <= 6.5e+116) {
      		tmp = fma(b, (a - 0.5), (y + x));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	t_1 = fma(Float64(1.0 - log(t)), z, Float64(y + x))
      	tmp = 0.0
      	if (z <= -1.6e+101)
      		tmp = t_1;
      	elseif (z <= 6.5e+116)
      		tmp = fma(b, Float64(a - 0.5), Float64(y + x));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e+101], t$95$1, If[LessEqual[z, 6.5e+116], N[(b * N[(a - 0.5), $MachinePrecision] + N[(y + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \mathsf{fma}\left(1 - \log t, z, y + x\right)\\
      \mathbf{if}\;z \leq -1.6 \cdot 10^{+101}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 6.5 \cdot 10^{+116}:\\
      \;\;\;\;\mathsf{fma}\left(b, a - 0.5, y + x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -1.60000000000000003e101 or 6.4999999999999998e116 < z

        1. Initial program 99.7%

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

          \[\leadsto \color{blue}{\left(x + \left(y + z\right)\right) - z \cdot \log t} \]
        3. Step-by-step derivation
          1. associate-+l+N/A

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

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

            \[\leadsto \left(z - z \cdot \log t\right) + \color{blue}{\left(x + y\right)} \]
          4. *-rgt-identityN/A

            \[\leadsto \left(z \cdot 1 - z \cdot \log t\right) + \left(x + y\right) \]
          5. remove-double-negN/A

            \[\leadsto \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z \cdot \log t\right)\right)\right)\right)\right) + \left(x + y\right) \]
          6. *-commutativeN/A

            \[\leadsto \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log t \cdot z\right)\right)\right)\right)\right) + \left(x + y\right) \]
          7. distribute-rgt-neg-inN/A

            \[\leadsto \left(z \cdot 1 - \left(\mathsf{neg}\left(\log t \cdot \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right) + \left(x + y\right) \]
          8. distribute-lft-neg-outN/A

            \[\leadsto \left(z \cdot 1 - \left(\mathsf{neg}\left(\log t\right)\right) \cdot \left(\mathsf{neg}\left(z\right)\right)\right) + \left(x + y\right) \]
          9. mul-1-negN/A

            \[\leadsto \left(z \cdot 1 - \left(-1 \cdot \log t\right) \cdot \left(\mathsf{neg}\left(z\right)\right)\right) + \left(x + y\right) \]
          10. distribute-rgt-neg-inN/A

            \[\leadsto \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(-1 \cdot \log t\right) \cdot z\right)\right)\right) + \left(x + y\right) \]
          11. distribute-lft-neg-inN/A

            \[\leadsto \left(z \cdot 1 - \left(\mathsf{neg}\left(-1 \cdot \log t\right)\right) \cdot z\right) + \left(x + y\right) \]
          12. fp-cancel-sign-sub-invN/A

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

            \[\leadsto \left(z \cdot 1 + z \cdot \left(-1 \cdot \log t\right)\right) + \left(x + y\right) \]
          14. distribute-lft-inN/A

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

            \[\leadsto \left(1 + -1 \cdot \log t\right) \cdot z + \left(\color{blue}{x} + y\right) \]
          16. fp-cancel-sign-sub-invN/A

            \[\leadsto \left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \log t\right) \cdot z + \left(x + y\right) \]
          17. metadata-evalN/A

            \[\leadsto \left(1 - 1 \cdot \log t\right) \cdot z + \left(x + y\right) \]
          18. *-lft-identityN/A

            \[\leadsto \left(1 - \log t\right) \cdot z + \left(x + y\right) \]
        4. Applied rewrites73.5%

          \[\leadsto \color{blue}{\mathsf{fma}\left(1 - \log t, z, y + x\right)} \]

        if -1.60000000000000003e101 < z < 6.4999999999999998e116

        1. Initial program 100.0%

          \[\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 0

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

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

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

            \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
          4. distribute-lft-neg-outN/A

            \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
          5. distribute-rgt-neg-outN/A

            \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
          6. mul-1-negN/A

            \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
          7. distribute-lft-neg-outN/A

            \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
          8. distribute-rgt-neg-inN/A

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

            \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
          10. distribute-rgt-neg-inN/A

            \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
          11. metadata-evalN/A

            \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
          12. *-rgt-identityN/A

            \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
          13. *-rgt-identityN/A

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

            \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
          15. *-rgt-identityN/A

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

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

            \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
          18. lower-+.f6494.1

            \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
        4. Applied rewrites94.1%

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

      Alternative 6: 85.8% accurate, 1.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+120}:\\ \;\;\;\;z - \left(\log t \cdot z - y\right)\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+117}:\\ \;\;\;\;\mathsf{fma}\left(b, a - 0.5, y + x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(1 - \log t, z, y\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= z -4.8e+120)
         (- z (- (* (log t) z) y))
         (if (<= z 2.8e+117) (fma b (- a 0.5) (+ y x)) (fma (- 1.0 (log t)) z y))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (z <= -4.8e+120) {
      		tmp = z - ((log(t) * z) - y);
      	} else if (z <= 2.8e+117) {
      		tmp = fma(b, (a - 0.5), (y + x));
      	} else {
      		tmp = fma((1.0 - log(t)), z, y);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (z <= -4.8e+120)
      		tmp = Float64(z - Float64(Float64(log(t) * z) - y));
      	elseif (z <= 2.8e+117)
      		tmp = fma(b, Float64(a - 0.5), Float64(y + x));
      	else
      		tmp = fma(Float64(1.0 - log(t)), z, y);
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.8e+120], N[(z - N[(N[(N[Log[t], $MachinePrecision] * z), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e+117], N[(b * N[(a - 0.5), $MachinePrecision] + N[(y + x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + y), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;z \leq -4.8 \cdot 10^{+120}:\\
      \;\;\;\;z - \left(\log t \cdot z - y\right)\\
      
      \mathbf{elif}\;z \leq 2.8 \cdot 10^{+117}:\\
      \;\;\;\;\mathsf{fma}\left(b, a - 0.5, y + x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(1 - \log t, z, y\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if z < -4.80000000000000002e120

        1. Initial program 99.7%

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

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

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

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

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

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

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

            \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log t \cdot z\right)\right)\right)\right)\right) \]
          7. distribute-rgt-neg-inN/A

            \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\log t \cdot \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right) \]
          8. distribute-lft-neg-outN/A

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

            \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(-1 \cdot \log t\right) \cdot \left(\mathsf{neg}\left(\color{blue}{z}\right)\right)\right) \]
          10. distribute-rgt-neg-inN/A

            \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(-1 \cdot \log t\right) \cdot z\right)\right)\right) \]
          11. distribute-lft-neg-inN/A

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(1 - \log t, z, y\right) \]
        6. Step-by-step derivation
          1. Applied rewrites66.0%

            \[\leadsto \mathsf{fma}\left(1 - \log t, z, y\right) \]
          2. Step-by-step derivation
            1. lift-fma.f64N/A

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

              \[\leadsto \left(1 - \log t\right) \cdot z + y \]
            3. lift-log.f64N/A

              \[\leadsto \left(1 - \log t\right) \cdot z + y \]
            4. *-lft-identityN/A

              \[\leadsto \left(1 - 1 \cdot \log t\right) \cdot z + y \]
            5. metadata-evalN/A

              \[\leadsto \left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \log t\right) \cdot z + y \]
            6. fp-cancel-sign-sub-invN/A

              \[\leadsto \left(1 + -1 \cdot \log t\right) \cdot z + y \]
            7. *-commutativeN/A

              \[\leadsto z \cdot \left(1 + -1 \cdot \log t\right) + y \]
            8. distribute-rgt-inN/A

              \[\leadsto \left(1 \cdot z + \left(-1 \cdot \log t\right) \cdot z\right) + y \]
            9. mul-1-negN/A

              \[\leadsto \left(1 \cdot z + \left(\mathsf{neg}\left(\log t\right)\right) \cdot z\right) + y \]
            10. fp-cancel-sub-signN/A

              \[\leadsto \left(1 \cdot z - \log t \cdot z\right) + y \]
            11. *-lft-identityN/A

              \[\leadsto \left(z - \log t \cdot z\right) + y \]
            12. *-commutativeN/A

              \[\leadsto \left(z - z \cdot \log t\right) + y \]
            13. associate-+l-N/A

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

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

              \[\leadsto z - \left(z \cdot \log t - \color{blue}{y}\right) \]
            16. *-commutativeN/A

              \[\leadsto z - \left(\log t \cdot z - y\right) \]
            17. lower-*.f64N/A

              \[\leadsto z - \left(\log t \cdot z - y\right) \]
            18. lift-log.f6465.9

              \[\leadsto z - \left(\log t \cdot z - y\right) \]
          3. Applied rewrites65.9%

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

          if -4.80000000000000002e120 < z < 2.79999999999999997e117

          1. Initial program 100.0%

            \[\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 0

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

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

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

              \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
            4. distribute-lft-neg-outN/A

              \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
            5. distribute-rgt-neg-outN/A

              \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
            6. mul-1-negN/A

              \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
            7. distribute-lft-neg-outN/A

              \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
            8. distribute-rgt-neg-inN/A

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

              \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
            10. distribute-rgt-neg-inN/A

              \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
            11. metadata-evalN/A

              \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
            12. *-rgt-identityN/A

              \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
            13. *-rgt-identityN/A

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

              \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
            15. *-rgt-identityN/A

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

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

              \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
            18. lower-+.f6493.6

              \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
          4. Applied rewrites93.6%

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

          if 2.79999999999999997e117 < z

          1. Initial program 99.6%

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

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

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

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

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

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

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

              \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log t \cdot z\right)\right)\right)\right)\right) \]
            7. distribute-rgt-neg-inN/A

              \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\log t \cdot \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right) \]
            8. distribute-lft-neg-outN/A

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

              \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(-1 \cdot \log t\right) \cdot \left(\mathsf{neg}\left(\color{blue}{z}\right)\right)\right) \]
            10. distribute-rgt-neg-inN/A

              \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(-1 \cdot \log t\right) \cdot z\right)\right)\right) \]
            11. distribute-lft-neg-inN/A

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(1 - \log t, z, y\right) \]
          6. Step-by-step derivation
            1. Applied rewrites61.0%

              \[\leadsto \mathsf{fma}\left(1 - \log t, z, y\right) \]
          7. Recombined 3 regimes into one program.
          8. Add Preprocessing

          Alternative 7: 84.3% accurate, 1.2× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(1 - \log t, z, y\right)\\ \mathbf{if}\;z \leq -4.8 \cdot 10^{+120}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+117}:\\ \;\;\;\;\mathsf{fma}\left(b, a - 0.5, y + x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (let* ((t_1 (fma (- 1.0 (log t)) z y)))
             (if (<= z -4.8e+120)
               t_1
               (if (<= z 2.8e+117) (fma b (- a 0.5) (+ y x)) t_1))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = fma((1.0 - log(t)), z, y);
          	double tmp;
          	if (z <= -4.8e+120) {
          		tmp = t_1;
          	} else if (z <= 2.8e+117) {
          		tmp = fma(b, (a - 0.5), (y + x));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b)
          	t_1 = fma(Float64(1.0 - log(t)), z, y)
          	tmp = 0.0
          	if (z <= -4.8e+120)
          		tmp = t_1;
          	elseif (z <= 2.8e+117)
          		tmp = fma(b, Float64(a - 0.5), Float64(y + x));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + y), $MachinePrecision]}, If[LessEqual[z, -4.8e+120], t$95$1, If[LessEqual[z, 2.8e+117], N[(b * N[(a - 0.5), $MachinePrecision] + N[(y + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \mathsf{fma}\left(1 - \log t, z, y\right)\\
          \mathbf{if}\;z \leq -4.8 \cdot 10^{+120}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;z \leq 2.8 \cdot 10^{+117}:\\
          \;\;\;\;\mathsf{fma}\left(b, a - 0.5, y + x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -4.80000000000000002e120 or 2.79999999999999997e117 < z

            1. Initial program 99.7%

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

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

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

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

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

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

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

                \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log t \cdot z\right)\right)\right)\right)\right) \]
              7. distribute-rgt-neg-inN/A

                \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\log t \cdot \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right) \]
              8. distribute-lft-neg-outN/A

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

                \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(-1 \cdot \log t\right) \cdot \left(\mathsf{neg}\left(\color{blue}{z}\right)\right)\right) \]
              10. distribute-rgt-neg-inN/A

                \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(-1 \cdot \log t\right) \cdot z\right)\right)\right) \]
              11. distribute-lft-neg-inN/A

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(1 - \log t, z, y\right) \]
            6. Step-by-step derivation
              1. Applied rewrites63.4%

                \[\leadsto \mathsf{fma}\left(1 - \log t, z, y\right) \]

              if -4.80000000000000002e120 < z < 2.79999999999999997e117

              1. Initial program 100.0%

                \[\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 0

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

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

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

                  \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                4. distribute-lft-neg-outN/A

                  \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
                5. distribute-rgt-neg-outN/A

                  \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                6. mul-1-negN/A

                  \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
                7. distribute-lft-neg-outN/A

                  \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                8. distribute-rgt-neg-inN/A

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

                  \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
                10. distribute-rgt-neg-inN/A

                  \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
                11. metadata-evalN/A

                  \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                12. *-rgt-identityN/A

                  \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                13. *-rgt-identityN/A

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

                  \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
                15. *-rgt-identityN/A

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

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

                  \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
                18. lower-+.f6493.6

                  \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
              4. Applied rewrites93.6%

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

            Alternative 8: 84.3% accurate, 1.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(1 - \log t, z, x\right)\\ \mathbf{if}\;z \leq -1.5 \cdot 10^{+198}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+136}:\\ \;\;\;\;\mathsf{fma}\left(b, a - 0.5, y + x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (let* ((t_1 (fma (- 1.0 (log t)) z x)))
               (if (<= z -1.5e+198)
                 t_1
                 (if (<= z 9.5e+136) (fma b (- a 0.5) (+ y x)) t_1))))
            double code(double x, double y, double z, double t, double a, double b) {
            	double t_1 = fma((1.0 - log(t)), z, x);
            	double tmp;
            	if (z <= -1.5e+198) {
            		tmp = t_1;
            	} else if (z <= 9.5e+136) {
            		tmp = fma(b, (a - 0.5), (y + x));
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a, b)
            	t_1 = fma(Float64(1.0 - log(t)), z, x)
            	tmp = 0.0
            	if (z <= -1.5e+198)
            		tmp = t_1;
            	elseif (z <= 9.5e+136)
            		tmp = fma(b, Float64(a - 0.5), Float64(y + x));
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + x), $MachinePrecision]}, If[LessEqual[z, -1.5e+198], t$95$1, If[LessEqual[z, 9.5e+136], N[(b * N[(a - 0.5), $MachinePrecision] + N[(y + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \mathsf{fma}\left(1 - \log t, z, x\right)\\
            \mathbf{if}\;z \leq -1.5 \cdot 10^{+198}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq 9.5 \cdot 10^{+136}:\\
            \;\;\;\;\mathsf{fma}\left(b, a - 0.5, y + x\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -1.50000000000000009e198 or 9.49999999999999907e136 < z

              1. Initial program 99.6%

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

                \[\leadsto \color{blue}{\left(x + \left(y + z\right)\right) - z \cdot \log t} \]
              3. Step-by-step derivation
                1. associate-+l+N/A

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

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

                  \[\leadsto \left(z - z \cdot \log t\right) + \color{blue}{\left(x + y\right)} \]
                4. *-rgt-identityN/A

                  \[\leadsto \left(z \cdot 1 - z \cdot \log t\right) + \left(x + y\right) \]
                5. remove-double-negN/A

                  \[\leadsto \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z \cdot \log t\right)\right)\right)\right)\right) + \left(x + y\right) \]
                6. *-commutativeN/A

                  \[\leadsto \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log t \cdot z\right)\right)\right)\right)\right) + \left(x + y\right) \]
                7. distribute-rgt-neg-inN/A

                  \[\leadsto \left(z \cdot 1 - \left(\mathsf{neg}\left(\log t \cdot \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right) + \left(x + y\right) \]
                8. distribute-lft-neg-outN/A

                  \[\leadsto \left(z \cdot 1 - \left(\mathsf{neg}\left(\log t\right)\right) \cdot \left(\mathsf{neg}\left(z\right)\right)\right) + \left(x + y\right) \]
                9. mul-1-negN/A

                  \[\leadsto \left(z \cdot 1 - \left(-1 \cdot \log t\right) \cdot \left(\mathsf{neg}\left(z\right)\right)\right) + \left(x + y\right) \]
                10. distribute-rgt-neg-inN/A

                  \[\leadsto \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(-1 \cdot \log t\right) \cdot z\right)\right)\right) + \left(x + y\right) \]
                11. distribute-lft-neg-inN/A

                  \[\leadsto \left(z \cdot 1 - \left(\mathsf{neg}\left(-1 \cdot \log t\right)\right) \cdot z\right) + \left(x + y\right) \]
                12. fp-cancel-sign-sub-invN/A

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

                  \[\leadsto \left(z \cdot 1 + z \cdot \left(-1 \cdot \log t\right)\right) + \left(x + y\right) \]
                14. distribute-lft-inN/A

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

                  \[\leadsto \left(1 + -1 \cdot \log t\right) \cdot z + \left(\color{blue}{x} + y\right) \]
                16. fp-cancel-sign-sub-invN/A

                  \[\leadsto \left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \log t\right) \cdot z + \left(x + y\right) \]
                17. metadata-evalN/A

                  \[\leadsto \left(1 - 1 \cdot \log t\right) \cdot z + \left(x + y\right) \]
                18. *-lft-identityN/A

                  \[\leadsto \left(1 - \log t\right) \cdot z + \left(x + y\right) \]
              4. Applied rewrites76.4%

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

                \[\leadsto \mathsf{fma}\left(1 - \log t, z, x\right) \]
              6. Step-by-step derivation
                1. Applied rewrites69.3%

                  \[\leadsto \mathsf{fma}\left(1 - \log t, z, x\right) \]

                if -1.50000000000000009e198 < z < 9.49999999999999907e136

                1. Initial program 99.9%

                  \[\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 0

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

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

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

                    \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                  4. distribute-lft-neg-outN/A

                    \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
                  5. distribute-rgt-neg-outN/A

                    \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                  6. mul-1-negN/A

                    \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
                  7. distribute-lft-neg-outN/A

                    \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                  8. distribute-rgt-neg-inN/A

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

                    \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
                  10. distribute-rgt-neg-inN/A

                    \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
                  11. metadata-evalN/A

                    \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                  12. *-rgt-identityN/A

                    \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                  13. *-rgt-identityN/A

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

                    \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
                  15. *-rgt-identityN/A

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

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

                    \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
                  18. lower-+.f6490.6

                    \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
                4. Applied rewrites90.6%

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

              Alternative 9: 83.8% accurate, 1.3× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.62 \cdot 10^{+198}:\\ \;\;\;\;z - \log t \cdot z\\ \mathbf{elif}\;z \leq 1.32 \cdot 10^{+137}:\\ \;\;\;\;\mathsf{fma}\left(b, a - 0.5, y + x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 - \log t\right) \cdot z\\ \end{array} \end{array} \]
              (FPCore (x y z t a b)
               :precision binary64
               (if (<= z -1.62e+198)
                 (- z (* (log t) z))
                 (if (<= z 1.32e+137) (fma b (- a 0.5) (+ y x)) (* (- 1.0 (log t)) z))))
              double code(double x, double y, double z, double t, double a, double b) {
              	double tmp;
              	if (z <= -1.62e+198) {
              		tmp = z - (log(t) * z);
              	} else if (z <= 1.32e+137) {
              		tmp = fma(b, (a - 0.5), (y + x));
              	} else {
              		tmp = (1.0 - log(t)) * z;
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a, b)
              	tmp = 0.0
              	if (z <= -1.62e+198)
              		tmp = Float64(z - Float64(log(t) * z));
              	elseif (z <= 1.32e+137)
              		tmp = fma(b, Float64(a - 0.5), Float64(y + x));
              	else
              		tmp = Float64(Float64(1.0 - log(t)) * z);
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.62e+198], N[(z - N[(N[Log[t], $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.32e+137], N[(b * N[(a - 0.5), $MachinePrecision] + N[(y + x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;z \leq -1.62 \cdot 10^{+198}:\\
              \;\;\;\;z - \log t \cdot z\\
              
              \mathbf{elif}\;z \leq 1.32 \cdot 10^{+137}:\\
              \;\;\;\;\mathsf{fma}\left(b, a - 0.5, y + x\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;\left(1 - \log t\right) \cdot z\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if z < -1.61999999999999989e198

                1. Initial program 99.7%

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

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

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

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

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

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

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

                    \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log t \cdot z\right)\right)\right)\right)\right) \]
                  7. distribute-rgt-neg-inN/A

                    \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\log t \cdot \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right) \]
                  8. distribute-lft-neg-outN/A

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

                    \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(-1 \cdot \log t\right) \cdot \left(\mathsf{neg}\left(\color{blue}{z}\right)\right)\right) \]
                  10. distribute-rgt-neg-inN/A

                    \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(-1 \cdot \log t\right) \cdot z\right)\right)\right) \]
                  11. distribute-lft-neg-inN/A

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(1 - \log t, z, y\right) \]
                6. Step-by-step derivation
                  1. Applied rewrites74.5%

                    \[\leadsto \mathsf{fma}\left(1 - \log t, z, y\right) \]
                  2. Step-by-step derivation
                    1. lift-fma.f64N/A

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

                      \[\leadsto \left(1 - \log t\right) \cdot z + y \]
                    3. lift-log.f64N/A

                      \[\leadsto \left(1 - \log t\right) \cdot z + y \]
                    4. *-lft-identityN/A

                      \[\leadsto \left(1 - 1 \cdot \log t\right) \cdot z + y \]
                    5. metadata-evalN/A

                      \[\leadsto \left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \log t\right) \cdot z + y \]
                    6. fp-cancel-sign-sub-invN/A

                      \[\leadsto \left(1 + -1 \cdot \log t\right) \cdot z + y \]
                    7. *-commutativeN/A

                      \[\leadsto z \cdot \left(1 + -1 \cdot \log t\right) + y \]
                    8. distribute-rgt-inN/A

                      \[\leadsto \left(1 \cdot z + \left(-1 \cdot \log t\right) \cdot z\right) + y \]
                    9. mul-1-negN/A

                      \[\leadsto \left(1 \cdot z + \left(\mathsf{neg}\left(\log t\right)\right) \cdot z\right) + y \]
                    10. fp-cancel-sub-signN/A

                      \[\leadsto \left(1 \cdot z - \log t \cdot z\right) + y \]
                    11. *-lft-identityN/A

                      \[\leadsto \left(z - \log t \cdot z\right) + y \]
                    12. *-commutativeN/A

                      \[\leadsto \left(z - z \cdot \log t\right) + y \]
                    13. associate-+l-N/A

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

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

                      \[\leadsto z - \left(z \cdot \log t - \color{blue}{y}\right) \]
                    16. *-commutativeN/A

                      \[\leadsto z - \left(\log t \cdot z - y\right) \]
                    17. lower-*.f64N/A

                      \[\leadsto z - \left(\log t \cdot z - y\right) \]
                    18. lift-log.f6474.4

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

                    \[\leadsto z - \color{blue}{\left(\log t \cdot z - y\right)} \]
                  4. Taylor expanded in z around inf

                    \[\leadsto z - z \cdot \color{blue}{\log t} \]
                  5. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto z - \log t \cdot z \]
                    2. lift-log.f64N/A

                      \[\leadsto z - \log t \cdot z \]
                    3. lift-*.f6467.7

                      \[\leadsto z - \log t \cdot z \]
                  6. Applied rewrites67.7%

                    \[\leadsto z - \log t \cdot \color{blue}{z} \]

                  if -1.61999999999999989e198 < z < 1.31999999999999997e137

                  1. Initial program 99.9%

                    \[\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 0

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

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

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

                      \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                    4. distribute-lft-neg-outN/A

                      \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
                    5. distribute-rgt-neg-outN/A

                      \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                    6. mul-1-negN/A

                      \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
                    7. distribute-lft-neg-outN/A

                      \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                    8. distribute-rgt-neg-inN/A

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

                      \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
                    10. distribute-rgt-neg-inN/A

                      \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
                    11. metadata-evalN/A

                      \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                    12. *-rgt-identityN/A

                      \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                    13. *-rgt-identityN/A

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

                      \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
                    15. *-rgt-identityN/A

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

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

                      \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
                    18. lower-+.f6490.6

                      \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
                  4. Applied rewrites90.6%

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

                  if 1.31999999999999997e137 < z

                  1. Initial program 99.6%

                    \[\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. *-commutativeN/A

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

                      \[\leadsto \left(1 - 1 \cdot \log t\right) \cdot z \]
                    3. metadata-evalN/A

                      \[\leadsto \left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \log t\right) \cdot z \]
                    4. fp-cancel-sign-sub-invN/A

                      \[\leadsto \left(1 + -1 \cdot \log t\right) \cdot z \]
                    5. *-commutativeN/A

                      \[\leadsto z \cdot \color{blue}{\left(1 + -1 \cdot \log t\right)} \]
                    6. *-commutativeN/A

                      \[\leadsto \left(1 + -1 \cdot \log t\right) \cdot \color{blue}{z} \]
                    7. fp-cancel-sign-sub-invN/A

                      \[\leadsto \left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \log t\right) \cdot z \]
                    8. metadata-evalN/A

                      \[\leadsto \left(1 - 1 \cdot \log t\right) \cdot z \]
                    9. *-lft-identityN/A

                      \[\leadsto \left(1 - \log t\right) \cdot z \]
                    10. lower-*.f64N/A

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

                      \[\leadsto \left(1 - \log t\right) \cdot z \]
                    12. lift-log.f6456.5

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

                    \[\leadsto \color{blue}{\left(1 - \log t\right) \cdot z} \]
                7. Recombined 3 regimes into one program.
                8. Add Preprocessing

                Alternative 10: 83.8% accurate, 1.3× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - \log t\right) \cdot z\\ \mathbf{if}\;z \leq -1.62 \cdot 10^{+198}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.32 \cdot 10^{+137}:\\ \;\;\;\;\mathsf{fma}\left(b, a - 0.5, y + x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                (FPCore (x y z t a b)
                 :precision binary64
                 (let* ((t_1 (* (- 1.0 (log t)) z)))
                   (if (<= z -1.62e+198)
                     t_1
                     (if (<= z 1.32e+137) (fma b (- a 0.5) (+ y x)) t_1))))
                double code(double x, double y, double z, double t, double a, double b) {
                	double t_1 = (1.0 - log(t)) * z;
                	double tmp;
                	if (z <= -1.62e+198) {
                		tmp = t_1;
                	} else if (z <= 1.32e+137) {
                		tmp = fma(b, (a - 0.5), (y + x));
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                function code(x, y, z, t, a, b)
                	t_1 = Float64(Float64(1.0 - log(t)) * z)
                	tmp = 0.0
                	if (z <= -1.62e+198)
                		tmp = t_1;
                	elseif (z <= 1.32e+137)
                		tmp = fma(b, Float64(a - 0.5), Float64(y + x));
                	else
                		tmp = t_1;
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -1.62e+198], t$95$1, If[LessEqual[z, 1.32e+137], N[(b * N[(a - 0.5), $MachinePrecision] + N[(y + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \left(1 - \log t\right) \cdot z\\
                \mathbf{if}\;z \leq -1.62 \cdot 10^{+198}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;z \leq 1.32 \cdot 10^{+137}:\\
                \;\;\;\;\mathsf{fma}\left(b, a - 0.5, y + x\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if z < -1.61999999999999989e198 or 1.31999999999999997e137 < z

                  1. Initial program 99.6%

                    \[\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. *-commutativeN/A

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

                      \[\leadsto \left(1 - 1 \cdot \log t\right) \cdot z \]
                    3. metadata-evalN/A

                      \[\leadsto \left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \log t\right) \cdot z \]
                    4. fp-cancel-sign-sub-invN/A

                      \[\leadsto \left(1 + -1 \cdot \log t\right) \cdot z \]
                    5. *-commutativeN/A

                      \[\leadsto z \cdot \color{blue}{\left(1 + -1 \cdot \log t\right)} \]
                    6. *-commutativeN/A

                      \[\leadsto \left(1 + -1 \cdot \log t\right) \cdot \color{blue}{z} \]
                    7. fp-cancel-sign-sub-invN/A

                      \[\leadsto \left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \log t\right) \cdot z \]
                    8. metadata-evalN/A

                      \[\leadsto \left(1 - 1 \cdot \log t\right) \cdot z \]
                    9. *-lft-identityN/A

                      \[\leadsto \left(1 - \log t\right) \cdot z \]
                    10. lower-*.f64N/A

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

                      \[\leadsto \left(1 - \log t\right) \cdot z \]
                    12. lift-log.f6460.8

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

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

                  if -1.61999999999999989e198 < z < 1.31999999999999997e137

                  1. Initial program 99.9%

                    \[\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 0

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

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

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

                      \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                    4. distribute-lft-neg-outN/A

                      \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
                    5. distribute-rgt-neg-outN/A

                      \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                    6. mul-1-negN/A

                      \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
                    7. distribute-lft-neg-outN/A

                      \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                    8. distribute-rgt-neg-inN/A

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

                      \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
                    10. distribute-rgt-neg-inN/A

                      \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
                    11. metadata-evalN/A

                      \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                    12. *-rgt-identityN/A

                      \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                    13. *-rgt-identityN/A

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

                      \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
                    15. *-rgt-identityN/A

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

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

                      \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
                    18. lower-+.f6490.6

                      \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
                  4. Applied rewrites90.6%

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

                Alternative 11: 78.7% accurate, 2.3× speedup?

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

                  \[\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 0

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

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

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

                    \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                  4. distribute-lft-neg-outN/A

                    \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
                  5. distribute-rgt-neg-outN/A

                    \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                  6. mul-1-negN/A

                    \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
                  7. distribute-lft-neg-outN/A

                    \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                  8. distribute-rgt-neg-inN/A

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

                    \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
                  10. distribute-rgt-neg-inN/A

                    \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
                  11. metadata-evalN/A

                    \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                  12. *-rgt-identityN/A

                    \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                  13. *-rgt-identityN/A

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

                    \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
                  15. *-rgt-identityN/A

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

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

                    \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
                  18. lower-+.f6478.7

                    \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
                4. Applied rewrites78.7%

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

                Alternative 12: 63.6% accurate, 0.9× speedup?

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

                  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 0

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

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

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

                      \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                    4. distribute-lft-neg-outN/A

                      \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
                    5. distribute-rgt-neg-outN/A

                      \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                    6. mul-1-negN/A

                      \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
                    7. distribute-lft-neg-outN/A

                      \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                    8. distribute-rgt-neg-inN/A

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

                      \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
                    10. distribute-rgt-neg-inN/A

                      \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
                    11. metadata-evalN/A

                      \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                    12. *-rgt-identityN/A

                      \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                    13. *-rgt-identityN/A

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

                      \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
                    15. *-rgt-identityN/A

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

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

                      \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
                    18. lower-+.f6478.4

                      \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
                  4. Applied rewrites78.4%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(b, a - 0.5, y + x\right)} \]
                  5. Taylor expanded in x around inf

                    \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, x\right) \]
                  6. Step-by-step derivation
                    1. Applied rewrites57.8%

                      \[\leadsto \mathsf{fma}\left(b, a - 0.5, x\right) \]

                    if -4.9999999999999997e-152 < (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t)))

                    1. Initial program 99.9%

                      \[\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 0

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

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

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

                        \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                      4. distribute-lft-neg-outN/A

                        \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
                      5. distribute-rgt-neg-outN/A

                        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                      6. mul-1-negN/A

                        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
                      7. distribute-lft-neg-outN/A

                        \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                      8. distribute-rgt-neg-inN/A

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

                        \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
                      10. distribute-rgt-neg-inN/A

                        \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
                      11. metadata-evalN/A

                        \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                      12. *-rgt-identityN/A

                        \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                      13. *-rgt-identityN/A

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

                        \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
                      15. *-rgt-identityN/A

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

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

                        \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
                      18. lower-+.f6479.0

                        \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
                    4. Applied rewrites79.0%

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

                      \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y\right) \]
                    6. Step-by-step derivation
                      1. Applied rewrites58.6%

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

                    Alternative 13: 58.5% accurate, 0.4× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq 10^{-146}:\\ \;\;\;\;\mathsf{fma}\left(b, a - 0.5, x\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+307}:\\ \;\;\;\;\mathsf{fma}\left(b, -0.5, y\right)\\ \mathbf{else}:\\ \;\;\;\;z - \left(-a\right) \cdot b\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b)
                     :precision binary64
                     (let* ((t_1 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b))))
                       (if (<= t_1 1e-146)
                         (fma b (- a 0.5) x)
                         (if (<= t_1 2e+307) (fma b -0.5 y) (- z (* (- a) b))))))
                    double code(double x, double y, double z, double t, double a, double b) {
                    	double t_1 = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
                    	double tmp;
                    	if (t_1 <= 1e-146) {
                    		tmp = fma(b, (a - 0.5), x);
                    	} else if (t_1 <= 2e+307) {
                    		tmp = fma(b, -0.5, y);
                    	} else {
                    		tmp = z - (-a * b);
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a, b)
                    	t_1 = Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b))
                    	tmp = 0.0
                    	if (t_1 <= 1e-146)
                    		tmp = fma(b, Float64(a - 0.5), x);
                    	elseif (t_1 <= 2e+307)
                    		tmp = fma(b, -0.5, y);
                    	else
                    		tmp = Float64(z - Float64(Float64(-a) * b));
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, 1e-146], N[(b * N[(a - 0.5), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 2e+307], N[(b * -0.5 + y), $MachinePrecision], N[(z - N[((-a) * b), $MachinePrecision]), $MachinePrecision]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\\
                    \mathbf{if}\;t\_1 \leq 10^{-146}:\\
                    \;\;\;\;\mathsf{fma}\left(b, a - 0.5, x\right)\\
                    
                    \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+307}:\\
                    \;\;\;\;\mathsf{fma}\left(b, -0.5, y\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;z - \left(-a\right) \cdot b\\
                    
                    
                    \end{array}
                    \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)) < 1.00000000000000003e-146

                      1. Initial program 99.9%

                        \[\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 0

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

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

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

                          \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                        4. distribute-lft-neg-outN/A

                          \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
                        5. distribute-rgt-neg-outN/A

                          \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                        6. mul-1-negN/A

                          \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
                        7. distribute-lft-neg-outN/A

                          \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                        8. distribute-rgt-neg-inN/A

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

                          \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
                        10. distribute-rgt-neg-inN/A

                          \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
                        11. metadata-evalN/A

                          \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                        12. *-rgt-identityN/A

                          \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                        13. *-rgt-identityN/A

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

                          \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
                        15. *-rgt-identityN/A

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

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

                          \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
                        18. lower-+.f6478.4

                          \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
                      4. Applied rewrites78.4%

                        \[\leadsto \color{blue}{\mathsf{fma}\left(b, a - 0.5, y + x\right)} \]
                      5. Taylor expanded in x around inf

                        \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, x\right) \]
                      6. Step-by-step derivation
                        1. Applied rewrites57.9%

                          \[\leadsto \mathsf{fma}\left(b, a - 0.5, x\right) \]

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

                        1. Initial program 99.9%

                          \[\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 0

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

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

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

                            \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                          4. distribute-lft-neg-outN/A

                            \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
                          5. distribute-rgt-neg-outN/A

                            \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                          6. mul-1-negN/A

                            \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
                          7. distribute-lft-neg-outN/A

                            \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                          8. distribute-rgt-neg-inN/A

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

                            \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
                          10. distribute-rgt-neg-inN/A

                            \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
                          11. metadata-evalN/A

                            \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                          12. *-rgt-identityN/A

                            \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                          13. *-rgt-identityN/A

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

                            \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
                          15. *-rgt-identityN/A

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

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

                            \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
                          18. lower-+.f6476.1

                            \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
                        4. Applied rewrites76.1%

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

                          \[\leadsto \mathsf{fma}\left(b, \frac{-1}{2}, y + x\right) \]
                        6. Step-by-step derivation
                          1. Applied rewrites61.6%

                            \[\leadsto \mathsf{fma}\left(b, -0.5, y + x\right) \]
                          2. Taylor expanded in x around 0

                            \[\leadsto \mathsf{fma}\left(b, \frac{-1}{2}, y\right) \]
                          3. Step-by-step derivation
                            1. Applied rewrites38.3%

                              \[\leadsto \mathsf{fma}\left(b, -0.5, y\right) \]

                            if 1.99999999999999997e307 < (+.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. Taylor expanded in x around 0

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

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

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

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

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

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

                                \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log t \cdot z\right)\right)\right)\right)\right) \]
                              7. distribute-rgt-neg-inN/A

                                \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\log t \cdot \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right) \]
                              8. distribute-lft-neg-outN/A

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

                                \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(-1 \cdot \log t\right) \cdot \left(\mathsf{neg}\left(\color{blue}{z}\right)\right)\right) \]
                              10. distribute-rgt-neg-inN/A

                                \[\leadsto \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \left(z \cdot 1 - \left(\mathsf{neg}\left(\left(-1 \cdot \log t\right) \cdot z\right)\right)\right) \]
                              11. distribute-lft-neg-inN/A

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(1 - \log t, z, y\right) \]
                            6. Step-by-step derivation
                              1. Applied rewrites5.6%

                                \[\leadsto \mathsf{fma}\left(1 - \log t, z, y\right) \]
                              2. Step-by-step derivation
                                1. lift-fma.f64N/A

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

                                  \[\leadsto \left(1 - \log t\right) \cdot z + y \]
                                3. lift-log.f64N/A

                                  \[\leadsto \left(1 - \log t\right) \cdot z + y \]
                                4. *-lft-identityN/A

                                  \[\leadsto \left(1 - 1 \cdot \log t\right) \cdot z + y \]
                                5. metadata-evalN/A

                                  \[\leadsto \left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \log t\right) \cdot z + y \]
                                6. fp-cancel-sign-sub-invN/A

                                  \[\leadsto \left(1 + -1 \cdot \log t\right) \cdot z + y \]
                                7. *-commutativeN/A

                                  \[\leadsto z \cdot \left(1 + -1 \cdot \log t\right) + y \]
                                8. distribute-rgt-inN/A

                                  \[\leadsto \left(1 \cdot z + \left(-1 \cdot \log t\right) \cdot z\right) + y \]
                                9. mul-1-negN/A

                                  \[\leadsto \left(1 \cdot z + \left(\mathsf{neg}\left(\log t\right)\right) \cdot z\right) + y \]
                                10. fp-cancel-sub-signN/A

                                  \[\leadsto \left(1 \cdot z - \log t \cdot z\right) + y \]
                                11. *-lft-identityN/A

                                  \[\leadsto \left(z - \log t \cdot z\right) + y \]
                                12. *-commutativeN/A

                                  \[\leadsto \left(z - z \cdot \log t\right) + y \]
                                13. associate-+l-N/A

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

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

                                  \[\leadsto z - \left(z \cdot \log t - \color{blue}{y}\right) \]
                                16. *-commutativeN/A

                                  \[\leadsto z - \left(\log t \cdot z - y\right) \]
                                17. lower-*.f64N/A

                                  \[\leadsto z - \left(\log t \cdot z - y\right) \]
                                18. lift-log.f645.6

                                  \[\leadsto z - \left(\log t \cdot z - y\right) \]
                              3. Applied rewrites5.6%

                                \[\leadsto z - \color{blue}{\left(\log t \cdot z - y\right)} \]
                              4. Taylor expanded in a around inf

                                \[\leadsto z - -1 \cdot \color{blue}{\left(a \cdot b\right)} \]
                              5. Step-by-step derivation
                                1. mul-1-negN/A

                                  \[\leadsto z - \left(\mathsf{neg}\left(a \cdot b\right)\right) \]
                                2. distribute-lft-neg-outN/A

                                  \[\leadsto z - \left(\mathsf{neg}\left(a\right)\right) \cdot b \]
                                3. lower-*.f64N/A

                                  \[\leadsto z - \left(\mathsf{neg}\left(a\right)\right) \cdot b \]
                                4. lower-neg.f6496.0

                                  \[\leadsto z - \left(-a\right) \cdot b \]
                              6. Applied rewrites96.0%

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

                            Alternative 14: 58.2% accurate, 0.3× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-152}:\\ \;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+307}:\\ \;\;\;\;\mathsf{fma}\left(b, -0.5, y\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot a\\ \end{array} \end{array} \]
                            (FPCore (x y z t a b)
                             :precision binary64
                             (let* ((t_1 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b))))
                               (if (<= t_1 (- INFINITY))
                                 (* b a)
                                 (if (<= t_1 -5e-152)
                                   (fma b -0.5 x)
                                   (if (<= t_1 2e+307) (fma b -0.5 y) (* b a))))))
                            double code(double x, double y, double z, double t, double a, double b) {
                            	double t_1 = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
                            	double tmp;
                            	if (t_1 <= -((double) INFINITY)) {
                            		tmp = b * a;
                            	} else if (t_1 <= -5e-152) {
                            		tmp = fma(b, -0.5, x);
                            	} else if (t_1 <= 2e+307) {
                            		tmp = fma(b, -0.5, y);
                            	} else {
                            		tmp = b * a;
                            	}
                            	return tmp;
                            }
                            
                            function code(x, y, z, t, a, b)
                            	t_1 = Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b))
                            	tmp = 0.0
                            	if (t_1 <= Float64(-Inf))
                            		tmp = Float64(b * a);
                            	elseif (t_1 <= -5e-152)
                            		tmp = fma(b, -0.5, x);
                            	elseif (t_1 <= 2e+307)
                            		tmp = fma(b, -0.5, y);
                            	else
                            		tmp = Float64(b * a);
                            	end
                            	return tmp
                            end
                            
                            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, (-Infinity)], N[(b * a), $MachinePrecision], If[LessEqual[t$95$1, -5e-152], N[(b * -0.5 + x), $MachinePrecision], If[LessEqual[t$95$1, 2e+307], N[(b * -0.5 + y), $MachinePrecision], N[(b * a), $MachinePrecision]]]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            t_1 := \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\\
                            \mathbf{if}\;t\_1 \leq -\infty:\\
                            \;\;\;\;b \cdot a\\
                            
                            \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-152}:\\
                            \;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\
                            
                            \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+307}:\\
                            \;\;\;\;\mathsf{fma}\left(b, -0.5, y\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;b \cdot a\\
                            
                            
                            \end{array}
                            \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 or 1.99999999999999997e307 < (+.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.9%

                                \[\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. remove-double-negN/A

                                  \[\leadsto \mathsf{neg}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right) \]
                                2. *-commutativeN/A

                                  \[\leadsto \mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot a\right)\right)\right) \]
                                3. distribute-lft-neg-outN/A

                                  \[\leadsto \mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot a\right) \]
                                4. mul-1-negN/A

                                  \[\leadsto \mathsf{neg}\left(\left(-1 \cdot b\right) \cdot a\right) \]
                                5. mul-1-negN/A

                                  \[\leadsto \mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot a\right) \]
                                6. distribute-lft-neg-inN/A

                                  \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right)\right)\right) \cdot \color{blue}{a} \]
                                7. mul-1-negN/A

                                  \[\leadsto \left(\mathsf{neg}\left(-1 \cdot b\right)\right) \cdot a \]
                                8. *-commutativeN/A

                                  \[\leadsto \left(\mathsf{neg}\left(b \cdot -1\right)\right) \cdot a \]
                                9. distribute-rgt-neg-inN/A

                                  \[\leadsto \left(b \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) \cdot a \]
                                10. metadata-evalN/A

                                  \[\leadsto \left(b \cdot 1\right) \cdot a \]
                                11. lower-*.f64N/A

                                  \[\leadsto \left(b \cdot 1\right) \cdot \color{blue}{a} \]
                                12. *-rgt-identity96.2

                                  \[\leadsto b \cdot a \]
                              4. Applied rewrites96.2%

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

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

                              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 0

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

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

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

                                  \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                4. distribute-lft-neg-outN/A

                                  \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
                                5. distribute-rgt-neg-outN/A

                                  \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                6. mul-1-negN/A

                                  \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
                                7. distribute-lft-neg-outN/A

                                  \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                8. distribute-rgt-neg-inN/A

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

                                  \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
                                10. distribute-rgt-neg-inN/A

                                  \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
                                11. metadata-evalN/A

                                  \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                                12. *-rgt-identityN/A

                                  \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                                13. *-rgt-identityN/A

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

                                  \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
                                15. *-rgt-identityN/A

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

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

                                  \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
                                18. lower-+.f6476.0

                                  \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
                              4. Applied rewrites76.0%

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

                                \[\leadsto \mathsf{fma}\left(b, \frac{-1}{2}, y + x\right) \]
                              6. Step-by-step derivation
                                1. Applied rewrites61.9%

                                  \[\leadsto \mathsf{fma}\left(b, -0.5, y + x\right) \]
                                2. Taylor expanded in x around inf

                                  \[\leadsto \mathsf{fma}\left(b, \frac{-1}{2}, x\right) \]
                                3. Step-by-step derivation
                                  1. Applied rewrites38.9%

                                    \[\leadsto \mathsf{fma}\left(b, -0.5, x\right) \]

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

                                  1. Initial program 99.9%

                                    \[\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 0

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

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

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

                                      \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                    4. distribute-lft-neg-outN/A

                                      \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
                                    5. distribute-rgt-neg-outN/A

                                      \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                    6. mul-1-negN/A

                                      \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
                                    7. distribute-lft-neg-outN/A

                                      \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                    8. distribute-rgt-neg-inN/A

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

                                      \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
                                    10. distribute-rgt-neg-inN/A

                                      \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
                                    11. metadata-evalN/A

                                      \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                                    12. *-rgt-identityN/A

                                      \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                                    13. *-rgt-identityN/A

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

                                      \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
                                    15. *-rgt-identityN/A

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

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

                                      \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
                                    18. lower-+.f6476.0

                                      \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
                                  4. Applied rewrites76.0%

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

                                    \[\leadsto \mathsf{fma}\left(b, \frac{-1}{2}, y + x\right) \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites61.5%

                                      \[\leadsto \mathsf{fma}\left(b, -0.5, y + x\right) \]
                                    2. Taylor expanded in x around 0

                                      \[\leadsto \mathsf{fma}\left(b, \frac{-1}{2}, y\right) \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites38.3%

                                        \[\leadsto \mathsf{fma}\left(b, -0.5, y\right) \]
                                    4. Recombined 3 regimes into one program.
                                    5. Add Preprocessing

                                    Alternative 15: 57.2% accurate, 1.0× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ t_2 := b \cdot \left(a - 0.5\right)\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+215}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+67}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                                    (FPCore (x y z t a b)
                                     :precision binary64
                                     (let* ((t_1 (* (- a 0.5) b)) (t_2 (* b (- a 0.5))))
                                       (if (<= t_1 -1e+215) t_2 (if (<= t_1 2e+67) (+ y x) t_2))))
                                    double code(double x, double y, double z, double t, double a, double b) {
                                    	double t_1 = (a - 0.5) * b;
                                    	double t_2 = b * (a - 0.5);
                                    	double tmp;
                                    	if (t_1 <= -1e+215) {
                                    		tmp = t_2;
                                    	} else if (t_1 <= 2e+67) {
                                    		tmp = y + x;
                                    	} else {
                                    		tmp = t_2;
                                    	}
                                    	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) :: t_2
                                        real(8) :: tmp
                                        t_1 = (a - 0.5d0) * b
                                        t_2 = b * (a - 0.5d0)
                                        if (t_1 <= (-1d+215)) then
                                            tmp = t_2
                                        else if (t_1 <= 2d+67) then
                                            tmp = y + x
                                        else
                                            tmp = t_2
                                        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 t_2 = b * (a - 0.5);
                                    	double tmp;
                                    	if (t_1 <= -1e+215) {
                                    		tmp = t_2;
                                    	} else if (t_1 <= 2e+67) {
                                    		tmp = y + x;
                                    	} else {
                                    		tmp = t_2;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(x, y, z, t, a, b):
                                    	t_1 = (a - 0.5) * b
                                    	t_2 = b * (a - 0.5)
                                    	tmp = 0
                                    	if t_1 <= -1e+215:
                                    		tmp = t_2
                                    	elif t_1 <= 2e+67:
                                    		tmp = y + x
                                    	else:
                                    		tmp = t_2
                                    	return tmp
                                    
                                    function code(x, y, z, t, a, b)
                                    	t_1 = Float64(Float64(a - 0.5) * b)
                                    	t_2 = Float64(b * Float64(a - 0.5))
                                    	tmp = 0.0
                                    	if (t_1 <= -1e+215)
                                    		tmp = t_2;
                                    	elseif (t_1 <= 2e+67)
                                    		tmp = Float64(y + x);
                                    	else
                                    		tmp = t_2;
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(x, y, z, t, a, b)
                                    	t_1 = (a - 0.5) * b;
                                    	t_2 = b * (a - 0.5);
                                    	tmp = 0.0;
                                    	if (t_1 <= -1e+215)
                                    		tmp = t_2;
                                    	elseif (t_1 <= 2e+67)
                                    		tmp = y + x;
                                    	else
                                    		tmp = t_2;
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+215], t$95$2, If[LessEqual[t$95$1, 2e+67], N[(y + x), $MachinePrecision], t$95$2]]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    t_1 := \left(a - 0.5\right) \cdot b\\
                                    t_2 := b \cdot \left(a - 0.5\right)\\
                                    \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+215}:\\
                                    \;\;\;\;t\_2\\
                                    
                                    \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+67}:\\
                                    \;\;\;\;y + x\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;t\_2\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -9.99999999999999907e214 or 1.99999999999999997e67 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

                                      1. Initial program 99.9%

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

                                        \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
                                      3. Step-by-step derivation
                                        1. remove-double-negN/A

                                          \[\leadsto \mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) \]
                                        2. distribute-lft-neg-outN/A

                                          \[\leadsto \mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right) \]
                                        3. distribute-rgt-neg-outN/A

                                          \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)} \]
                                        4. mul-1-negN/A

                                          \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \color{blue}{\left(a - \frac{1}{2}\right)}\right) \]
                                        5. distribute-lft-neg-outN/A

                                          \[\leadsto \mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right) \]
                                        6. distribute-rgt-neg-inN/A

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

                                          \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) \]
                                        8. distribute-rgt-neg-inN/A

                                          \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)}\right) \]
                                        9. metadata-evalN/A

                                          \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) \]
                                        10. *-rgt-identityN/A

                                          \[\leadsto \left(b \cdot 1\right) \cdot \left(\color{blue}{\left(a - \frac{1}{2}\right)} \cdot 1\right) \]
                                        11. *-rgt-identityN/A

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

                                          \[\leadsto \left(b \cdot 1\right) \cdot \color{blue}{\left(a - \frac{1}{2}\right)} \]
                                        13. *-rgt-identityN/A

                                          \[\leadsto b \cdot \left(\color{blue}{a} - \frac{1}{2}\right) \]
                                        14. lift--.f6473.1

                                          \[\leadsto b \cdot \left(a - \color{blue}{0.5}\right) \]
                                      4. Applied rewrites73.1%

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

                                      if -9.99999999999999907e214 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.99999999999999997e67

                                      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 0

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

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

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

                                          \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                        4. distribute-lft-neg-outN/A

                                          \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
                                        5. distribute-rgt-neg-outN/A

                                          \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                        6. mul-1-negN/A

                                          \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
                                        7. distribute-lft-neg-outN/A

                                          \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                        8. distribute-rgt-neg-inN/A

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

                                          \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
                                        10. distribute-rgt-neg-inN/A

                                          \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
                                        11. metadata-evalN/A

                                          \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                                        12. *-rgt-identityN/A

                                          \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                                        13. *-rgt-identityN/A

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

                                          \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
                                        15. *-rgt-identityN/A

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

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

                                          \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
                                        18. lower-+.f6470.6

                                          \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
                                      4. Applied rewrites70.6%

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

                                        \[\leadsto x + \color{blue}{y} \]
                                      6. Step-by-step derivation
                                        1. +-commutativeN/A

                                          \[\leadsto y + x \]
                                        2. lift-+.f6457.4

                                          \[\leadsto y + x \]
                                      7. Applied rewrites57.4%

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

                                    Alternative 16: 55.6% accurate, 0.6× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+292}:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+215}:\\ \;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\ \mathbf{elif}\;t\_1 \leq 10^{+43}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t\_1 \leq 10^{+306}:\\ \;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot a\\ \end{array} \end{array} \]
                                    (FPCore (x y z t a b)
                                     :precision binary64
                                     (let* ((t_1 (* (- a 0.5) b)))
                                       (if (<= t_1 -5e+292)
                                         (* b a)
                                         (if (<= t_1 -1e+215)
                                           (fma b -0.5 x)
                                           (if (<= t_1 1e+43)
                                             (+ y x)
                                             (if (<= t_1 1e+306) (fma b -0.5 x) (* b a)))))))
                                    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 <= -5e+292) {
                                    		tmp = b * a;
                                    	} else if (t_1 <= -1e+215) {
                                    		tmp = fma(b, -0.5, x);
                                    	} else if (t_1 <= 1e+43) {
                                    		tmp = y + x;
                                    	} else if (t_1 <= 1e+306) {
                                    		tmp = fma(b, -0.5, x);
                                    	} else {
                                    		tmp = b * a;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(x, y, z, t, a, b)
                                    	t_1 = Float64(Float64(a - 0.5) * b)
                                    	tmp = 0.0
                                    	if (t_1 <= -5e+292)
                                    		tmp = Float64(b * a);
                                    	elseif (t_1 <= -1e+215)
                                    		tmp = fma(b, -0.5, x);
                                    	elseif (t_1 <= 1e+43)
                                    		tmp = Float64(y + x);
                                    	elseif (t_1 <= 1e+306)
                                    		tmp = fma(b, -0.5, x);
                                    	else
                                    		tmp = Float64(b * a);
                                    	end
                                    	return 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, -5e+292], N[(b * a), $MachinePrecision], If[LessEqual[t$95$1, -1e+215], N[(b * -0.5 + x), $MachinePrecision], If[LessEqual[t$95$1, 1e+43], N[(y + x), $MachinePrecision], If[LessEqual[t$95$1, 1e+306], N[(b * -0.5 + x), $MachinePrecision], N[(b * a), $MachinePrecision]]]]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    t_1 := \left(a - 0.5\right) \cdot b\\
                                    \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+292}:\\
                                    \;\;\;\;b \cdot a\\
                                    
                                    \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+215}:\\
                                    \;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\
                                    
                                    \mathbf{elif}\;t\_1 \leq 10^{+43}:\\
                                    \;\;\;\;y + x\\
                                    
                                    \mathbf{elif}\;t\_1 \leq 10^{+306}:\\
                                    \;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;b \cdot a\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 3 regimes
                                    2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -4.9999999999999996e292 or 1.00000000000000002e306 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

                                      1. Initial program 99.9%

                                        \[\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. remove-double-negN/A

                                          \[\leadsto \mathsf{neg}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right) \]
                                        2. *-commutativeN/A

                                          \[\leadsto \mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot a\right)\right)\right) \]
                                        3. distribute-lft-neg-outN/A

                                          \[\leadsto \mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot a\right) \]
                                        4. mul-1-negN/A

                                          \[\leadsto \mathsf{neg}\left(\left(-1 \cdot b\right) \cdot a\right) \]
                                        5. mul-1-negN/A

                                          \[\leadsto \mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot a\right) \]
                                        6. distribute-lft-neg-inN/A

                                          \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right)\right)\right) \cdot \color{blue}{a} \]
                                        7. mul-1-negN/A

                                          \[\leadsto \left(\mathsf{neg}\left(-1 \cdot b\right)\right) \cdot a \]
                                        8. *-commutativeN/A

                                          \[\leadsto \left(\mathsf{neg}\left(b \cdot -1\right)\right) \cdot a \]
                                        9. distribute-rgt-neg-inN/A

                                          \[\leadsto \left(b \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) \cdot a \]
                                        10. metadata-evalN/A

                                          \[\leadsto \left(b \cdot 1\right) \cdot a \]
                                        11. lower-*.f64N/A

                                          \[\leadsto \left(b \cdot 1\right) \cdot \color{blue}{a} \]
                                        12. *-rgt-identity95.3

                                          \[\leadsto b \cdot a \]
                                      4. Applied rewrites95.3%

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

                                      if -4.9999999999999996e292 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -9.99999999999999907e214 or 1.00000000000000001e43 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.00000000000000002e306

                                      1. Initial program 99.9%

                                        \[\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 0

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

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

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

                                          \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                        4. distribute-lft-neg-outN/A

                                          \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
                                        5. distribute-rgt-neg-outN/A

                                          \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                        6. mul-1-negN/A

                                          \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
                                        7. distribute-lft-neg-outN/A

                                          \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                        8. distribute-rgt-neg-inN/A

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

                                          \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
                                        10. distribute-rgt-neg-inN/A

                                          \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
                                        11. metadata-evalN/A

                                          \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                                        12. *-rgt-identityN/A

                                          \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                                        13. *-rgt-identityN/A

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

                                          \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
                                        15. *-rgt-identityN/A

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

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

                                          \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
                                        18. lower-+.f6485.4

                                          \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
                                      4. Applied rewrites85.4%

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

                                        \[\leadsto \mathsf{fma}\left(b, \frac{-1}{2}, y + x\right) \]
                                      6. Step-by-step derivation
                                        1. Applied rewrites57.0%

                                          \[\leadsto \mathsf{fma}\left(b, -0.5, y + x\right) \]
                                        2. Taylor expanded in x around inf

                                          \[\leadsto \mathsf{fma}\left(b, \frac{-1}{2}, x\right) \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites42.4%

                                            \[\leadsto \mathsf{fma}\left(b, -0.5, x\right) \]

                                          if -9.99999999999999907e214 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.00000000000000001e43

                                          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 0

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

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

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

                                              \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                            4. distribute-lft-neg-outN/A

                                              \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
                                            5. distribute-rgt-neg-outN/A

                                              \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                            6. mul-1-negN/A

                                              \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
                                            7. distribute-lft-neg-outN/A

                                              \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                            8. distribute-rgt-neg-inN/A

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

                                              \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
                                            10. distribute-rgt-neg-inN/A

                                              \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
                                            11. metadata-evalN/A

                                              \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                                            12. *-rgt-identityN/A

                                              \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                                            13. *-rgt-identityN/A

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

                                              \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
                                            15. *-rgt-identityN/A

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

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

                                              \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
                                            18. lower-+.f6470.5

                                              \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
                                          4. Applied rewrites70.5%

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

                                            \[\leadsto x + \color{blue}{y} \]
                                          6. Step-by-step derivation
                                            1. +-commutativeN/A

                                              \[\leadsto y + x \]
                                            2. lift-+.f6457.6

                                              \[\leadsto y + x \]
                                          7. Applied rewrites57.6%

                                            \[\leadsto y + \color{blue}{x} \]
                                        4. Recombined 3 regimes into one program.
                                        5. Add Preprocessing

                                        Alternative 17: 52.1% accurate, 0.8× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+216}:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+67}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t\_1 \leq 10^{+306}:\\ \;\;\;\;b \cdot -0.5\\ \mathbf{else}:\\ \;\;\;\;b \cdot a\\ \end{array} \end{array} \]
                                        (FPCore (x y z t a b)
                                         :precision binary64
                                         (let* ((t_1 (* (- a 0.5) b)))
                                           (if (<= t_1 -1e+216)
                                             (* b a)
                                             (if (<= t_1 2e+67) (+ y x) (if (<= t_1 1e+306) (* b -0.5) (* b a))))))
                                        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 <= -1e+216) {
                                        		tmp = b * a;
                                        	} else if (t_1 <= 2e+67) {
                                        		tmp = y + x;
                                        	} else if (t_1 <= 1e+306) {
                                        		tmp = b * -0.5;
                                        	} else {
                                        		tmp = b * a;
                                        	}
                                        	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 <= (-1d+216)) then
                                                tmp = b * a
                                            else if (t_1 <= 2d+67) then
                                                tmp = y + x
                                            else if (t_1 <= 1d+306) then
                                                tmp = b * (-0.5d0)
                                            else
                                                tmp = b * a
                                            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 <= -1e+216) {
                                        		tmp = b * a;
                                        	} else if (t_1 <= 2e+67) {
                                        		tmp = y + x;
                                        	} else if (t_1 <= 1e+306) {
                                        		tmp = b * -0.5;
                                        	} else {
                                        		tmp = b * a;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        def code(x, y, z, t, a, b):
                                        	t_1 = (a - 0.5) * b
                                        	tmp = 0
                                        	if t_1 <= -1e+216:
                                        		tmp = b * a
                                        	elif t_1 <= 2e+67:
                                        		tmp = y + x
                                        	elif t_1 <= 1e+306:
                                        		tmp = b * -0.5
                                        	else:
                                        		tmp = b * a
                                        	return tmp
                                        
                                        function code(x, y, z, t, a, b)
                                        	t_1 = Float64(Float64(a - 0.5) * b)
                                        	tmp = 0.0
                                        	if (t_1 <= -1e+216)
                                        		tmp = Float64(b * a);
                                        	elseif (t_1 <= 2e+67)
                                        		tmp = Float64(y + x);
                                        	elseif (t_1 <= 1e+306)
                                        		tmp = Float64(b * -0.5);
                                        	else
                                        		tmp = Float64(b * a);
                                        	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 <= -1e+216)
                                        		tmp = b * a;
                                        	elseif (t_1 <= 2e+67)
                                        		tmp = y + x;
                                        	elseif (t_1 <= 1e+306)
                                        		tmp = b * -0.5;
                                        	else
                                        		tmp = b * a;
                                        	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, -1e+216], N[(b * a), $MachinePrecision], If[LessEqual[t$95$1, 2e+67], N[(y + x), $MachinePrecision], If[LessEqual[t$95$1, 1e+306], N[(b * -0.5), $MachinePrecision], N[(b * a), $MachinePrecision]]]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        t_1 := \left(a - 0.5\right) \cdot b\\
                                        \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+216}:\\
                                        \;\;\;\;b \cdot a\\
                                        
                                        \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+67}:\\
                                        \;\;\;\;y + x\\
                                        
                                        \mathbf{elif}\;t\_1 \leq 10^{+306}:\\
                                        \;\;\;\;b \cdot -0.5\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;b \cdot a\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 3 regimes
                                        2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -1e216 or 1.00000000000000002e306 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

                                          1. Initial program 99.9%

                                            \[\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. remove-double-negN/A

                                              \[\leadsto \mathsf{neg}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right) \]
                                            2. *-commutativeN/A

                                              \[\leadsto \mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot a\right)\right)\right) \]
                                            3. distribute-lft-neg-outN/A

                                              \[\leadsto \mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot a\right) \]
                                            4. mul-1-negN/A

                                              \[\leadsto \mathsf{neg}\left(\left(-1 \cdot b\right) \cdot a\right) \]
                                            5. mul-1-negN/A

                                              \[\leadsto \mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot a\right) \]
                                            6. distribute-lft-neg-inN/A

                                              \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right)\right)\right) \cdot \color{blue}{a} \]
                                            7. mul-1-negN/A

                                              \[\leadsto \left(\mathsf{neg}\left(-1 \cdot b\right)\right) \cdot a \]
                                            8. *-commutativeN/A

                                              \[\leadsto \left(\mathsf{neg}\left(b \cdot -1\right)\right) \cdot a \]
                                            9. distribute-rgt-neg-inN/A

                                              \[\leadsto \left(b \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) \cdot a \]
                                            10. metadata-evalN/A

                                              \[\leadsto \left(b \cdot 1\right) \cdot a \]
                                            11. lower-*.f64N/A

                                              \[\leadsto \left(b \cdot 1\right) \cdot \color{blue}{a} \]
                                            12. *-rgt-identity77.4

                                              \[\leadsto b \cdot a \]
                                          4. Applied rewrites77.4%

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

                                          if -1e216 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.99999999999999997e67

                                          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 0

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

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

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

                                              \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                            4. distribute-lft-neg-outN/A

                                              \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
                                            5. distribute-rgt-neg-outN/A

                                              \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                            6. mul-1-negN/A

                                              \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
                                            7. distribute-lft-neg-outN/A

                                              \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                            8. distribute-rgt-neg-inN/A

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

                                              \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
                                            10. distribute-rgt-neg-inN/A

                                              \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
                                            11. metadata-evalN/A

                                              \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                                            12. *-rgt-identityN/A

                                              \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                                            13. *-rgt-identityN/A

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

                                              \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
                                            15. *-rgt-identityN/A

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

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

                                              \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
                                            18. lower-+.f6470.7

                                              \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
                                          4. Applied rewrites70.7%

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

                                            \[\leadsto x + \color{blue}{y} \]
                                          6. Step-by-step derivation
                                            1. +-commutativeN/A

                                              \[\leadsto y + x \]
                                            2. lift-+.f6457.4

                                              \[\leadsto y + x \]
                                          7. Applied rewrites57.4%

                                            \[\leadsto y + \color{blue}{x} \]

                                          if 1.99999999999999997e67 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.00000000000000002e306

                                          1. Initial program 99.9%

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

                                            \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
                                          3. Step-by-step derivation
                                            1. remove-double-negN/A

                                              \[\leadsto \mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) \]
                                            2. distribute-lft-neg-outN/A

                                              \[\leadsto \mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right) \]
                                            3. distribute-rgt-neg-outN/A

                                              \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)} \]
                                            4. mul-1-negN/A

                                              \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \color{blue}{\left(a - \frac{1}{2}\right)}\right) \]
                                            5. distribute-lft-neg-outN/A

                                              \[\leadsto \mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right) \]
                                            6. distribute-rgt-neg-inN/A

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

                                              \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) \]
                                            8. distribute-rgt-neg-inN/A

                                              \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)}\right) \]
                                            9. metadata-evalN/A

                                              \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) \]
                                            10. *-rgt-identityN/A

                                              \[\leadsto \left(b \cdot 1\right) \cdot \left(\color{blue}{\left(a - \frac{1}{2}\right)} \cdot 1\right) \]
                                            11. *-rgt-identityN/A

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

                                              \[\leadsto \left(b \cdot 1\right) \cdot \color{blue}{\left(a - \frac{1}{2}\right)} \]
                                            13. *-rgt-identityN/A

                                              \[\leadsto b \cdot \left(\color{blue}{a} - \frac{1}{2}\right) \]
                                            14. lift--.f6454.7

                                              \[\leadsto b \cdot \left(a - \color{blue}{0.5}\right) \]
                                          4. Applied rewrites54.7%

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

                                            \[\leadsto b \cdot \frac{-1}{2} \]
                                          6. Step-by-step derivation
                                            1. Applied rewrites28.1%

                                              \[\leadsto b \cdot -0.5 \]
                                          7. Recombined 3 regimes into one program.
                                          8. Add Preprocessing

                                          Alternative 18: 46.1% accurate, 1.1× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+216}:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+128}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;b \cdot a\\ \end{array} \end{array} \]
                                          (FPCore (x y z t a b)
                                           :precision binary64
                                           (let* ((t_1 (* (- a 0.5) b)))
                                             (if (<= t_1 -1e+216) (* b a) (if (<= t_1 2e+128) (+ y x) (* b a)))))
                                          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 <= -1e+216) {
                                          		tmp = b * a;
                                          	} else if (t_1 <= 2e+128) {
                                          		tmp = y + x;
                                          	} else {
                                          		tmp = b * a;
                                          	}
                                          	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 <= (-1d+216)) then
                                                  tmp = b * a
                                              else if (t_1 <= 2d+128) then
                                                  tmp = y + x
                                              else
                                                  tmp = b * a
                                              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 <= -1e+216) {
                                          		tmp = b * a;
                                          	} else if (t_1 <= 2e+128) {
                                          		tmp = y + x;
                                          	} else {
                                          		tmp = b * a;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          def code(x, y, z, t, a, b):
                                          	t_1 = (a - 0.5) * b
                                          	tmp = 0
                                          	if t_1 <= -1e+216:
                                          		tmp = b * a
                                          	elif t_1 <= 2e+128:
                                          		tmp = y + x
                                          	else:
                                          		tmp = b * a
                                          	return tmp
                                          
                                          function code(x, y, z, t, a, b)
                                          	t_1 = Float64(Float64(a - 0.5) * b)
                                          	tmp = 0.0
                                          	if (t_1 <= -1e+216)
                                          		tmp = Float64(b * a);
                                          	elseif (t_1 <= 2e+128)
                                          		tmp = Float64(y + x);
                                          	else
                                          		tmp = Float64(b * a);
                                          	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 <= -1e+216)
                                          		tmp = b * a;
                                          	elseif (t_1 <= 2e+128)
                                          		tmp = y + x;
                                          	else
                                          		tmp = b * a;
                                          	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, -1e+216], N[(b * a), $MachinePrecision], If[LessEqual[t$95$1, 2e+128], N[(y + x), $MachinePrecision], N[(b * a), $MachinePrecision]]]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          t_1 := \left(a - 0.5\right) \cdot b\\
                                          \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+216}:\\
                                          \;\;\;\;b \cdot a\\
                                          
                                          \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+128}:\\
                                          \;\;\;\;y + x\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;b \cdot a\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -1e216 or 2.0000000000000002e128 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

                                            1. Initial program 99.9%

                                              \[\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. remove-double-negN/A

                                                \[\leadsto \mathsf{neg}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right) \]
                                              2. *-commutativeN/A

                                                \[\leadsto \mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot a\right)\right)\right) \]
                                              3. distribute-lft-neg-outN/A

                                                \[\leadsto \mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot a\right) \]
                                              4. mul-1-negN/A

                                                \[\leadsto \mathsf{neg}\left(\left(-1 \cdot b\right) \cdot a\right) \]
                                              5. mul-1-negN/A

                                                \[\leadsto \mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot a\right) \]
                                              6. distribute-lft-neg-inN/A

                                                \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right)\right)\right) \cdot \color{blue}{a} \]
                                              7. mul-1-negN/A

                                                \[\leadsto \left(\mathsf{neg}\left(-1 \cdot b\right)\right) \cdot a \]
                                              8. *-commutativeN/A

                                                \[\leadsto \left(\mathsf{neg}\left(b \cdot -1\right)\right) \cdot a \]
                                              9. distribute-rgt-neg-inN/A

                                                \[\leadsto \left(b \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) \cdot a \]
                                              10. metadata-evalN/A

                                                \[\leadsto \left(b \cdot 1\right) \cdot a \]
                                              11. lower-*.f64N/A

                                                \[\leadsto \left(b \cdot 1\right) \cdot \color{blue}{a} \]
                                              12. *-rgt-identity58.0

                                                \[\leadsto b \cdot a \]
                                            4. Applied rewrites58.0%

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

                                            if -1e216 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 2.0000000000000002e128

                                            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 0

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

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

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

                                                \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                              4. distribute-lft-neg-outN/A

                                                \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
                                              5. distribute-rgt-neg-outN/A

                                                \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                              6. mul-1-negN/A

                                                \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
                                              7. distribute-lft-neg-outN/A

                                                \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                              8. distribute-rgt-neg-inN/A

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

                                                \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
                                              10. distribute-rgt-neg-inN/A

                                                \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
                                              11. metadata-evalN/A

                                                \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                                              12. *-rgt-identityN/A

                                                \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                                              13. *-rgt-identityN/A

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

                                                \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
                                              15. *-rgt-identityN/A

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

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

                                                \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
                                              18. lower-+.f6471.3

                                                \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
                                            4. Applied rewrites71.3%

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

                                              \[\leadsto x + \color{blue}{y} \]
                                            6. Step-by-step derivation
                                              1. +-commutativeN/A

                                                \[\leadsto y + x \]
                                              2. lift-+.f6456.7

                                                \[\leadsto y + x \]
                                            7. Applied rewrites56.7%

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

                                          Alternative 19: 42.2% accurate, 7.0× speedup?

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

                                            \[\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 0

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

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

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

                                              \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                            4. distribute-lft-neg-outN/A

                                              \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(x + y\right) \]
                                            5. distribute-rgt-neg-outN/A

                                              \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                            6. mul-1-negN/A

                                              \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right) + \left(x + y\right) \]
                                            7. distribute-lft-neg-outN/A

                                              \[\leadsto \left(\mathsf{neg}\left(b \cdot \left(-1 \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) + \left(\color{blue}{x} + y\right) \]
                                            8. distribute-rgt-neg-inN/A

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

                                              \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot -1\right)\right) + \left(x + y\right) \]
                                            10. distribute-rgt-neg-inN/A

                                              \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)\right) + \left(x + y\right) \]
                                            11. metadata-evalN/A

                                              \[\leadsto b \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                                            12. *-rgt-identityN/A

                                              \[\leadsto \left(b \cdot 1\right) \cdot \left(\left(a - \frac{1}{2}\right) \cdot 1\right) + \left(x + y\right) \]
                                            13. *-rgt-identityN/A

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

                                              \[\leadsto \mathsf{fma}\left(b \cdot 1, \color{blue}{a - \frac{1}{2}}, x + y\right) \]
                                            15. *-rgt-identityN/A

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

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

                                              \[\leadsto \mathsf{fma}\left(b, a - \frac{1}{2}, y + x\right) \]
                                            18. lower-+.f6478.7

                                              \[\leadsto \mathsf{fma}\left(b, a - 0.5, y + x\right) \]
                                          4. Applied rewrites78.7%

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

                                            \[\leadsto x + \color{blue}{y} \]
                                          6. Step-by-step derivation
                                            1. +-commutativeN/A

                                              \[\leadsto y + x \]
                                            2. lift-+.f6442.2

                                              \[\leadsto y + x \]
                                          7. Applied rewrites42.2%

                                            \[\leadsto y + \color{blue}{x} \]
                                          8. Add Preprocessing

                                          Alternative 20: 22.5% accurate, 0.9× speedup?

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

                                            1. Initial program 99.9%

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

                                              \[\leadsto \color{blue}{x} \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites22.9%

                                                \[\leadsto \color{blue}{x} \]

                                              if -3.99999999999999997e-220 < (+.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.9%

                                                \[\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} \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites21.2%

                                                  \[\leadsto \color{blue}{y} \]
                                              4. Recombined 2 regimes into one program.
                                              5. Add Preprocessing

                                              Alternative 21: 22.0% accurate, 26.1× speedup?

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

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

                                                \[\leadsto \color{blue}{x} \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites22.5%

                                                  \[\leadsto \color{blue}{x} \]
                                                2. Add Preprocessing

                                                Reproduce

                                                ?
                                                herbie shell --seed 2025130 
                                                (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)))