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

Percentage Accurate: 99.8% → 99.8%
Time: 8.5s
Alternatives: 11
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}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 11 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

\[\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.8% 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
  3. Add Preprocessing

Alternative 2: 92.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+115} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+84}\right):\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(1 - \log t, z, y\right) + \mathsf{fma}\left(-0.5, b, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (- a 0.5) b)))
   (if (or (<= t_1 -5e+115) (not (<= t_1 5e+84)))
     (fma (- a 0.5) b (+ y x))
     (+ (fma (- 1.0 (log t)) z y) (fma -0.5 b x)))))
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+115) || !(t_1 <= 5e+84)) {
		tmp = fma((a - 0.5), b, (y + x));
	} else {
		tmp = fma((1.0 - log(t)), z, y) + fma(-0.5, b, x);
	}
	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+115) || !(t_1 <= 5e+84))
		tmp = fma(Float64(a - 0.5), b, Float64(y + x));
	else
		tmp = Float64(fma(Float64(1.0 - log(t)), z, y) + fma(-0.5, b, x));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+115], N[Not[LessEqual[t$95$1, 5e+84]], $MachinePrecision]], N[(N[(a - 0.5), $MachinePrecision] * b + N[(y + x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + y), $MachinePrecision] + N[(-0.5 * b + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+115} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+84}\right):\\
\;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -5.00000000000000008e115 or 5.0000000000000001e84 < (*.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. Add Preprocessing
    3. Taylor expanded in z around 0

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

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

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

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

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

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

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

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

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

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

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

    if -5.00000000000000008e115 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 5.0000000000000001e84

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(1 - \log t, z, y\right) + \mathsf{fma}\left(-0.5, b, x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification95.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(a - 0.5\right) \cdot b \leq -5 \cdot 10^{+115} \lor \neg \left(\left(a - 0.5\right) \cdot b \leq 5 \cdot 10^{+84}\right):\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(1 - \log t, z, y\right) + \mathsf{fma}\left(-0.5, b, x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 90.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+96} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+84}\right):\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(1 - \log t, z, x + y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (- a 0.5) b)))
   (if (or (<= t_1 -2e+96) (not (<= t_1 5e+84)))
     (fma (- a 0.5) b (+ y x))
     (fma (- 1.0 (log t)) z (+ x y)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (a - 0.5) * b;
	double tmp;
	if ((t_1 <= -2e+96) || !(t_1 <= 5e+84)) {
		tmp = fma((a - 0.5), b, (y + x));
	} else {
		tmp = fma((1.0 - log(t)), z, (x + y));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(a - 0.5) * b)
	tmp = 0.0
	if ((t_1 <= -2e+96) || !(t_1 <= 5e+84))
		tmp = fma(Float64(a - 0.5), b, Float64(y + x));
	else
		tmp = fma(Float64(1.0 - log(t)), z, Float64(x + y));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+96], N[Not[LessEqual[t$95$1, 5e+84]], $MachinePrecision]], N[(N[(a - 0.5), $MachinePrecision] * b + N[(y + x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + N[(x + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+96} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+84}\right):\\
\;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - \log t, z, x + y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -2.0000000000000001e96 or 5.0000000000000001e84 < (*.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. Add Preprocessing
    3. Taylor expanded in z around 0

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

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

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

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

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

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

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

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

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

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

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

    if -2.0000000000000001e96 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 5.0000000000000001e84

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{1 - \log t}{b}, \frac{y + x}{b} - \left(0.5 - a\right)\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. *-commutativeN/A

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

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

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

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

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

          \[\leadsto \left(\left(x + y\right) + z\right) + z \cdot \color{blue}{\left(\mathsf{neg}\left(\log t\right)\right)} \]
        7. log-recN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(1 - \log t, z, x + y\right)} \]
      4. Applied rewrites95.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(1 - \log t, z, x + y\right)} \]
    6. Recombined 2 regimes into one program.
    7. Final simplification94.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\left(a - 0.5\right) \cdot b \leq -2 \cdot 10^{+96} \lor \neg \left(\left(a - 0.5\right) \cdot b \leq 5 \cdot 10^{+84}\right):\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(1 - \log t, z, x + y\right)\\ \end{array} \]
    8. Add Preprocessing

    Alternative 4: 57.9% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(\left(x + y\right) + z\right) - z \cdot \log t \leq -1 \cdot 10^{-67}:\\ \;\;\;\;\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))) -1e-67)
       (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))) <= -1e-67) {
    		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))) <= -1e-67)
    		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], -1e-67], 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 -1 \cdot 10^{-67}:\\
    \;\;\;\;\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))) < -9.99999999999999943e-68

      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
      3. Taylor expanded in z around 0

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
      7. Step-by-step derivation
        1. Applied rewrites61.1%

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

        if -9.99999999999999943e-68 < (-.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. Add Preprocessing
        3. Taylor expanded in z around 0

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto y + \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
        7. Step-by-step derivation
          1. Applied rewrites55.4%

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

        Alternative 5: 84.2% accurate, 1.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{+230} \lor \neg \left(z \leq 1.6 \cdot 10^{+223}\right):\\ \;\;\;\;\left(1 - \log t\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (if (or (<= z -7.5e+230) (not (<= z 1.6e+223)))
           (* (- 1.0 (log t)) z)
           (fma (- a 0.5) b (+ y x))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double tmp;
        	if ((z <= -7.5e+230) || !(z <= 1.6e+223)) {
        		tmp = (1.0 - log(t)) * z;
        	} else {
        		tmp = fma((a - 0.5), b, (y + x));
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	tmp = 0.0
        	if ((z <= -7.5e+230) || !(z <= 1.6e+223))
        		tmp = Float64(Float64(1.0 - log(t)) * z);
        	else
        		tmp = fma(Float64(a - 0.5), b, Float64(y + x));
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -7.5e+230], N[Not[LessEqual[z, 1.6e+223]], $MachinePrecision]], N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(N[(a - 0.5), $MachinePrecision] * b + N[(y + x), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z \leq -7.5 \cdot 10^{+230} \lor \neg \left(z \leq 1.6 \cdot 10^{+223}\right):\\
        \;\;\;\;\left(1 - \log t\right) \cdot z\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -7.5000000000000004e230 or 1.6000000000000001e223 < 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. Add Preprocessing
          3. Taylor expanded in z around inf

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

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

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

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

              \[\leadsto \left(1 - \color{blue}{\log t}\right) \cdot z \]
          5. Applied rewrites82.1%

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

          if -7.5000000000000004e230 < z < 1.6000000000000001e223

          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
          3. Taylor expanded in z around 0

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{+230} \lor \neg \left(z \leq 1.6 \cdot 10^{+223}\right):\\ \;\;\;\;\left(1 - \log t\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\ \end{array} \]
        5. Add Preprocessing

        Alternative 6: 69.2% accurate, 3.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+115} \lor \neg \left(t\_1 \leq 10^{+90}\right):\\ \;\;\;\;\mathsf{fma}\left(b, a - 0.5, x\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (let* ((t_1 (* (- a 0.5) b)))
           (if (or (<= t_1 -5e+115) (not (<= t_1 1e+90)))
             (fma b (- a 0.5) x)
             (+ x y))))
        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+115) || !(t_1 <= 1e+90)) {
        		tmp = fma(b, (a - 0.5), x);
        	} else {
        		tmp = x + y;
        	}
        	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+115) || !(t_1 <= 1e+90))
        		tmp = fma(b, Float64(a - 0.5), x);
        	else
        		tmp = Float64(x + y);
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+115], N[Not[LessEqual[t$95$1, 1e+90]], $MachinePrecision]], N[(b * N[(a - 0.5), $MachinePrecision] + x), $MachinePrecision], N[(x + y), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \left(a - 0.5\right) \cdot b\\
        \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+115} \lor \neg \left(t\_1 \leq 10^{+90}\right):\\
        \;\;\;\;\mathsf{fma}\left(b, a - 0.5, x\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;x + y\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -5.00000000000000008e115 or 9.99999999999999966e89 < (*.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. Add Preprocessing
          3. Taylor expanded in z around 0

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x + \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
          7. Step-by-step derivation
            1. Applied rewrites83.7%

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

            if -5.00000000000000008e115 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 9.99999999999999966e89

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto y \cdot \color{blue}{\left(1 + \left(\frac{x}{y} + \frac{b \cdot \left(a - \frac{1}{2}\right)}{y}\right)\right)} \]
            7. Step-by-step derivation
              1. Applied rewrites63.7%

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

                \[\leadsto 1 \cdot y \]
              3. Step-by-step derivation
                1. Applied rewrites27.9%

                  \[\leadsto 1 \cdot y \]
                2. Taylor expanded in b around 0

                  \[\leadsto x + \color{blue}{y} \]
                3. Step-by-step derivation
                  1. Applied rewrites66.8%

                    \[\leadsto x + \color{blue}{y} \]
                4. Recombined 2 regimes into one program.
                5. Final simplification74.0%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;\left(a - 0.5\right) \cdot b \leq -5 \cdot 10^{+115} \lor \neg \left(\left(a - 0.5\right) \cdot b \leq 10^{+90}\right):\\ \;\;\;\;\mathsf{fma}\left(b, a - 0.5, x\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
                6. Add Preprocessing

                Alternative 7: 65.2% accurate, 3.4× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+115} \lor \neg \left(t\_1 \leq 10^{+90}\right):\\ \;\;\;\;b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
                (FPCore (x y z t a b)
                 :precision binary64
                 (let* ((t_1 (* (- a 0.5) b)))
                   (if (or (<= t_1 -5e+115) (not (<= t_1 1e+90))) (* b (- a 0.5)) (+ x y))))
                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+115) || !(t_1 <= 1e+90)) {
                		tmp = b * (a - 0.5);
                	} else {
                		tmp = x + 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) :: t_1
                    real(8) :: tmp
                    t_1 = (a - 0.5d0) * b
                    if ((t_1 <= (-5d+115)) .or. (.not. (t_1 <= 1d+90))) then
                        tmp = b * (a - 0.5d0)
                    else
                        tmp = x + y
                    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 <= -5e+115) || !(t_1 <= 1e+90)) {
                		tmp = b * (a - 0.5);
                	} else {
                		tmp = x + y;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t, a, b):
                	t_1 = (a - 0.5) * b
                	tmp = 0
                	if (t_1 <= -5e+115) or not (t_1 <= 1e+90):
                		tmp = b * (a - 0.5)
                	else:
                		tmp = x + y
                	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+115) || !(t_1 <= 1e+90))
                		tmp = Float64(b * Float64(a - 0.5));
                	else
                		tmp = Float64(x + y);
                	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 <= -5e+115) || ~((t_1 <= 1e+90)))
                		tmp = b * (a - 0.5);
                	else
                		tmp = x + y;
                	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[Or[LessEqual[t$95$1, -5e+115], N[Not[LessEqual[t$95$1, 1e+90]], $MachinePrecision]], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \left(a - 0.5\right) \cdot b\\
                \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+115} \lor \neg \left(t\_1 \leq 10^{+90}\right):\\
                \;\;\;\;b \cdot \left(a - 0.5\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;x + y\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -5.00000000000000008e115 or 9.99999999999999966e89 < (*.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. Add Preprocessing
                  3. Taylor expanded in z around 0

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
                    2. lower--.f6475.7

                      \[\leadsto b \cdot \color{blue}{\left(a - 0.5\right)} \]
                  8. Applied rewrites75.7%

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

                  if -5.00000000000000008e115 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 9.99999999999999966e89

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto y \cdot \color{blue}{\left(1 + \left(\frac{x}{y} + \frac{b \cdot \left(a - \frac{1}{2}\right)}{y}\right)\right)} \]
                  7. Step-by-step derivation
                    1. Applied rewrites63.7%

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

                      \[\leadsto 1 \cdot y \]
                    3. Step-by-step derivation
                      1. Applied rewrites27.9%

                        \[\leadsto 1 \cdot y \]
                      2. Taylor expanded in b around 0

                        \[\leadsto x + \color{blue}{y} \]
                      3. Step-by-step derivation
                        1. Applied rewrites66.8%

                          \[\leadsto x + \color{blue}{y} \]
                      4. Recombined 2 regimes into one program.
                      5. Final simplification70.6%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;\left(a - 0.5\right) \cdot b \leq -5 \cdot 10^{+115} \lor \neg \left(\left(a - 0.5\right) \cdot b \leq 10^{+90}\right):\\ \;\;\;\;b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
                      6. Add Preprocessing

                      Alternative 8: 57.5% accurate, 3.7× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+115} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+220}\right):\\ \;\;\;\;b \cdot a\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b)
                       :precision binary64
                       (let* ((t_1 (* (- a 0.5) b)))
                         (if (or (<= t_1 -5e+115) (not (<= t_1 2e+220))) (* b a) (+ x y))))
                      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+115) || !(t_1 <= 2e+220)) {
                      		tmp = b * a;
                      	} else {
                      		tmp = x + 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) :: t_1
                          real(8) :: tmp
                          t_1 = (a - 0.5d0) * b
                          if ((t_1 <= (-5d+115)) .or. (.not. (t_1 <= 2d+220))) then
                              tmp = b * a
                          else
                              tmp = x + y
                          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 <= -5e+115) || !(t_1 <= 2e+220)) {
                      		tmp = b * a;
                      	} else {
                      		tmp = x + y;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t, a, b):
                      	t_1 = (a - 0.5) * b
                      	tmp = 0
                      	if (t_1 <= -5e+115) or not (t_1 <= 2e+220):
                      		tmp = b * a
                      	else:
                      		tmp = x + y
                      	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+115) || !(t_1 <= 2e+220))
                      		tmp = Float64(b * a);
                      	else
                      		tmp = Float64(x + y);
                      	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 <= -5e+115) || ~((t_1 <= 2e+220)))
                      		tmp = b * a;
                      	else
                      		tmp = x + y;
                      	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[Or[LessEqual[t$95$1, -5e+115], N[Not[LessEqual[t$95$1, 2e+220]], $MachinePrecision]], N[(b * a), $MachinePrecision], N[(x + y), $MachinePrecision]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := \left(a - 0.5\right) \cdot b\\
                      \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+115} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+220}\right):\\
                      \;\;\;\;b \cdot a\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;x + y\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -5.00000000000000008e115 or 2e220 < (*.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. Add Preprocessing
                        3. Taylor expanded in a around inf

                          \[\leadsto \color{blue}{a \cdot b} \]
                        4. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \color{blue}{b \cdot a} \]
                          2. lower-*.f6469.2

                            \[\leadsto \color{blue}{b \cdot a} \]
                        5. Applied rewrites69.2%

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

                        if -5.00000000000000008e115 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 2e220

                        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
                        3. Taylor expanded in z around 0

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto y \cdot \color{blue}{\left(1 + \left(\frac{x}{y} + \frac{b \cdot \left(a - \frac{1}{2}\right)}{y}\right)\right)} \]
                        7. Step-by-step derivation
                          1. Applied rewrites63.0%

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

                            \[\leadsto 1 \cdot y \]
                          3. Step-by-step derivation
                            1. Applied rewrites26.6%

                              \[\leadsto 1 \cdot y \]
                            2. Taylor expanded in b around 0

                              \[\leadsto x + \color{blue}{y} \]
                            3. Step-by-step derivation
                              1. Applied rewrites62.6%

                                \[\leadsto x + \color{blue}{y} \]
                            4. Recombined 2 regimes into one program.
                            5. Final simplification64.7%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\left(a - 0.5\right) \cdot b \leq -5 \cdot 10^{+115} \lor \neg \left(\left(a - 0.5\right) \cdot b \leq 2 \cdot 10^{+220}\right):\\ \;\;\;\;b \cdot a\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
                            6. Add Preprocessing

                            Alternative 9: 47.0% accurate, 7.0× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -9.6 \cdot 10^{+227} \lor \neg \left(b \leq 6.1 \cdot 10^{+218}\right):\\ \;\;\;\;-0.5 \cdot b\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
                            (FPCore (x y z t a b)
                             :precision binary64
                             (if (or (<= b -9.6e+227) (not (<= b 6.1e+218))) (* -0.5 b) (+ x y)))
                            double code(double x, double y, double z, double t, double a, double b) {
                            	double tmp;
                            	if ((b <= -9.6e+227) || !(b <= 6.1e+218)) {
                            		tmp = -0.5 * b;
                            	} else {
                            		tmp = x + 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 ((b <= (-9.6d+227)) .or. (.not. (b <= 6.1d+218))) then
                                    tmp = (-0.5d0) * b
                                else
                                    tmp = x + 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 ((b <= -9.6e+227) || !(b <= 6.1e+218)) {
                            		tmp = -0.5 * b;
                            	} else {
                            		tmp = x + y;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a, b):
                            	tmp = 0
                            	if (b <= -9.6e+227) or not (b <= 6.1e+218):
                            		tmp = -0.5 * b
                            	else:
                            		tmp = x + y
                            	return tmp
                            
                            function code(x, y, z, t, a, b)
                            	tmp = 0.0
                            	if ((b <= -9.6e+227) || !(b <= 6.1e+218))
                            		tmp = Float64(-0.5 * b);
                            	else
                            		tmp = Float64(x + y);
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t, a, b)
                            	tmp = 0.0;
                            	if ((b <= -9.6e+227) || ~((b <= 6.1e+218)))
                            		tmp = -0.5 * b;
                            	else
                            		tmp = x + y;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -9.6e+227], N[Not[LessEqual[b, 6.1e+218]], $MachinePrecision]], N[(-0.5 * b), $MachinePrecision], N[(x + y), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;b \leq -9.6 \cdot 10^{+227} \lor \neg \left(b \leq 6.1 \cdot 10^{+218}\right):\\
                            \;\;\;\;-0.5 \cdot b\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;x + y\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if b < -9.59999999999999921e227 or 6.10000000000000021e218 < b

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{-1}{2} \cdot \color{blue}{b} \]
                              7. Step-by-step derivation
                                1. Applied rewrites39.4%

                                  \[\leadsto -0.5 \cdot \color{blue}{b} \]

                                if -9.59999999999999921e227 < b < 6.10000000000000021e218

                                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
                                3. Taylor expanded in z around 0

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto y \cdot \color{blue}{\left(1 + \left(\frac{x}{y} + \frac{b \cdot \left(a - \frac{1}{2}\right)}{y}\right)\right)} \]
                                7. Step-by-step derivation
                                  1. Applied rewrites66.9%

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

                                    \[\leadsto 1 \cdot y \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites22.8%

                                      \[\leadsto 1 \cdot y \]
                                    2. Taylor expanded in b around 0

                                      \[\leadsto x + \color{blue}{y} \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites51.2%

                                        \[\leadsto x + \color{blue}{y} \]
                                    4. Recombined 2 regimes into one program.
                                    5. Final simplification50.0%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -9.6 \cdot 10^{+227} \lor \neg \left(b \leq 6.1 \cdot 10^{+218}\right):\\ \;\;\;\;-0.5 \cdot b\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
                                    6. Add Preprocessing

                                    Alternative 10: 78.3% accurate, 9.7× speedup?

                                    \[\begin{array}{l} \\ \mathsf{fma}\left(a - 0.5, b, y + x\right) \end{array} \]
                                    (FPCore (x y z t a b) :precision binary64 (fma (- a 0.5) b (+ y x)))
                                    double code(double x, double y, double z, double t, double a, double b) {
                                    	return fma((a - 0.5), b, (y + x));
                                    }
                                    
                                    function code(x, y, z, t, a, b)
                                    	return fma(Float64(a - 0.5), b, Float64(y + x))
                                    end
                                    
                                    code[x_, y_, z_, t_, a_, b_] := N[(N[(a - 0.5), $MachinePrecision] * b + N[(y + x), $MachinePrecision]), $MachinePrecision]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \mathsf{fma}\left(a - 0.5, b, 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. Add Preprocessing
                                    3. Taylor expanded in z around 0

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 11: 42.7% accurate, 31.5× speedup?

                                    \[\begin{array}{l} \\ x + y \end{array} \]
                                    (FPCore (x y z t a b) :precision binary64 (+ x y))
                                    double code(double x, double y, double z, double t, double a, double b) {
                                    	return x + y;
                                    }
                                    
                                    module fmin_fmax_functions
                                        implicit none
                                        private
                                        public fmax
                                        public fmin
                                    
                                        interface fmax
                                            module procedure fmax88
                                            module procedure fmax44
                                            module procedure fmax84
                                            module procedure fmax48
                                        end interface
                                        interface fmin
                                            module procedure fmin88
                                            module procedure fmin44
                                            module procedure fmin84
                                            module procedure fmin48
                                        end interface
                                    contains
                                        real(8) function fmax88(x, y) result (res)
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                        end function
                                        real(4) function fmax44(x, y) result (res)
                                            real(4), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                        end function
                                        real(8) function fmax84(x, y) result(res)
                                            real(8), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                        end function
                                        real(8) function fmax48(x, y) result(res)
                                            real(4), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                        end function
                                        real(8) function fmin88(x, y) result (res)
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                        end function
                                        real(4) function fmin44(x, y) result (res)
                                            real(4), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                        end function
                                        real(8) function fmin84(x, y) result(res)
                                            real(8), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                        end function
                                        real(8) function fmin48(x, y) result(res)
                                            real(4), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                        end function
                                    end module
                                    
                                    real(8) function code(x, y, z, t, a, b)
                                    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
                                    end function
                                    
                                    public static double code(double x, double y, double z, double t, double a, double b) {
                                    	return x + y;
                                    }
                                    
                                    def code(x, y, z, t, a, b):
                                    	return x + y
                                    
                                    function code(x, y, z, t, a, b)
                                    	return Float64(x + y)
                                    end
                                    
                                    function tmp = code(x, y, z, t, a, b)
                                    	tmp = x + y;
                                    end
                                    
                                    code[x_, y_, z_, t_, a_, b_] := N[(x + y), $MachinePrecision]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    x + y
                                    \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
                                    3. Taylor expanded in z around 0

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto y \cdot \color{blue}{\left(1 + \left(\frac{x}{y} + \frac{b \cdot \left(a - \frac{1}{2}\right)}{y}\right)\right)} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites68.9%

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

                                        \[\leadsto 1 \cdot y \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites20.8%

                                          \[\leadsto 1 \cdot y \]
                                        2. Taylor expanded in b around 0

                                          \[\leadsto x + \color{blue}{y} \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites46.3%

                                            \[\leadsto x + \color{blue}{y} \]
                                          2. Add Preprocessing

                                          Developer Target 1: 99.4% accurate, 0.4× speedup?

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

                                          Reproduce

                                          ?
                                          herbie shell --seed 2024359 
                                          (FPCore (x y z t a b)
                                            :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
                                            :precision binary64
                                          
                                            :alt
                                            (! :herbie-platform default (+ (+ (+ x y) (/ (* (- 1 (pow (log t) 2)) z) (+ 1 (log t)))) (* (- a 1/2) b)))
                                          
                                            (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))