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

Percentage Accurate: 99.8% → 99.8%
Time: 9.6s
Alternatives: 14
Speedup: N/A×

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 92.4% 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^{+91} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+86}\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+91) (not (<= t_1 2e+86)))
     (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+91) || !(t_1 <= 2e+86)) {
		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+91) || !(t_1 <= 2e+86))
		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+91], N[Not[LessEqual[t$95$1, 2e+86]], $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^{+91} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+86}\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.0000000000000002e91 or 2e86 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) 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 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-+.f6494.1

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

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

    if -5.0000000000000002e91 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 2e86

    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 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.1%

      \[\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.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(a - 0.5\right) \cdot b \leq -5 \cdot 10^{+91} \lor \neg \left(\left(a - 0.5\right) \cdot b \leq 2 \cdot 10^{+86}\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: 92.3% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+86}:\\
\;\;\;\;\mathsf{fma}\left(t\_2, z, y\right) + \mathsf{fma}\left(-0.5, b, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -4e80

    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 x around 0

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

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

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

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

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

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

        \[\leadsto \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\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(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)} \]
      8. +-commutativeN/A

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

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

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

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

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

    if -4e80 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 2e86

    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 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 rewrites98.5%

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

    if 2e86 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) 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 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-+.f6495.6

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

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

Alternative 4: 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 -4 \cdot 10^{+80} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+86}\right):\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(1 - \log t, z, y\right) + x\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (- a 0.5) b)))
   (if (or (<= t_1 -4e+80) (not (<= t_1 2e+86)))
     (fma (- a 0.5) b (+ y x))
     (+ (fma (- 1.0 (log t)) z y) 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 <= -4e+80) || !(t_1 <= 2e+86)) {
		tmp = fma((a - 0.5), b, (y + x));
	} else {
		tmp = fma((1.0 - log(t)), z, y) + 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 <= -4e+80) || !(t_1 <= 2e+86))
		tmp = fma(Float64(a - 0.5), b, Float64(y + x));
	else
		tmp = Float64(fma(Float64(1.0 - log(t)), z, y) + 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, -4e+80], N[Not[LessEqual[t$95$1, 2e+86]], $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] + x), $MachinePrecision]]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -4e80 or 2e86 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) 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 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-+.f6492.2

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

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

    if -4e80 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 2e86

    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 y around inf

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

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

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

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

        \[\leadsto x + \color{blue}{\left(y + z \cdot \left(1 - \log t\right)\right)} \]
      3. Step-by-step derivation
        1. Applied rewrites93.6%

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

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

      Alternative 5: 57.8% 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^{-204}:\\ \;\;\;\;\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-204)
         (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-204) {
      		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-204)
      		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-204], 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^{-204}:\\
      \;\;\;\;\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))) < -1e-204

        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-+.f6478.3

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

          \[\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 rewrites56.7%

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

          if -1e-204 < (-.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-+.f6475.9

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

            \[\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 rewrites59.9%

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

          Alternative 6: 85.6% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+163} \lor \neg \left(z \leq 8.8 \cdot 10^{+166}\right):\\ \;\;\;\;\mathsf{fma}\left(1 - \log t, z, x\right)\\ \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 -8e+163) (not (<= z 8.8e+166)))
             (fma (- 1.0 (log t)) z x)
             (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 <= -8e+163) || !(z <= 8.8e+166)) {
          		tmp = fma((1.0 - log(t)), z, x);
          	} else {
          		tmp = fma((a - 0.5), b, (y + x));
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b)
          	tmp = 0.0
          	if ((z <= -8e+163) || !(z <= 8.8e+166))
          		tmp = fma(Float64(1.0 - log(t)), z, x);
          	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, -8e+163], N[Not[LessEqual[z, 8.8e+166]], $MachinePrecision]], N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + x), $MachinePrecision], N[(N[(a - 0.5), $MachinePrecision] * b + N[(y + x), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -8 \cdot 10^{+163} \lor \neg \left(z \leq 8.8 \cdot 10^{+166}\right):\\
          \;\;\;\;\mathsf{fma}\left(1 - \log t, z, x\right)\\
          
          \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.9999999999999995e163 or 8.7999999999999996e166 < z

            1. Initial program 99.6%

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

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

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

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

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

                \[\leadsto x + \color{blue}{\left(y + z \cdot \left(1 - \log t\right)\right)} \]
              3. Step-by-step derivation
                1. Applied rewrites80.7%

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

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

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

                  if -7.9999999999999995e163 < z < 8.7999999999999996e166

                  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-+.f6491.5

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

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

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

                Alternative 7: 85.5% accurate, 1.0× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{+163} \lor \neg \left(z \leq 2.4 \cdot 10^{+164}\right):\\ \;\;\;\;\mathsf{fma}\left(1 - \log t, z, y\right)\\ \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.8e+163) (not (<= z 2.4e+164)))
                   (fma (- 1.0 (log t)) z y)
                   (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.8e+163) || !(z <= 2.4e+164)) {
                		tmp = fma((1.0 - log(t)), z, y);
                	} 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.8e+163) || !(z <= 2.4e+164))
                		tmp = fma(Float64(1.0 - log(t)), z, y);
                	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.8e+163], N[Not[LessEqual[z, 2.4e+164]], $MachinePrecision]], N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + y), $MachinePrecision], N[(N[(a - 0.5), $MachinePrecision] * b + N[(y + x), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;z \leq -7.8 \cdot 10^{+163} \lor \neg \left(z \leq 2.4 \cdot 10^{+164}\right):\\
                \;\;\;\;\mathsf{fma}\left(1 - \log t, z, y\right)\\
                
                \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.80000000000000047e163 or 2.40000000000000011e164 < z

                  1. Initial program 99.6%

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

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

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

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

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

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

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

                      \[\leadsto \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\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(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)} \]
                    8. +-commutativeN/A

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

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

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

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

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

                    \[\leadsto y + \color{blue}{z \cdot \left(1 - \log t\right)} \]
                  7. Step-by-step derivation
                    1. Applied rewrites72.4%

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

                    if -7.80000000000000047e163 < z < 2.40000000000000011e164

                    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-+.f6491.5

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

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

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

                  Alternative 8: 82.4% accurate, 1.0× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.18 \cdot 10^{+285} \lor \neg \left(z \leq 1.08 \cdot 10^{+167}\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 -1.18e+285) (not (<= z 1.08e+167)))
                     (* (- 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 <= -1.18e+285) || !(z <= 1.08e+167)) {
                  		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 <= -1.18e+285) || !(z <= 1.08e+167))
                  		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, -1.18e+285], N[Not[LessEqual[z, 1.08e+167]], $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 -1.18 \cdot 10^{+285} \lor \neg \left(z \leq 1.08 \cdot 10^{+167}\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 < -1.18000000000000005e285 or 1.08000000000000005e167 < z

                    1. Initial program 99.5%

                      \[\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.f6471.1

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

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

                    if -1.18000000000000005e285 < z < 1.08000000000000005e167

                    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-+.f6486.1

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.18 \cdot 10^{+285} \lor \neg \left(z \leq 1.08 \cdot 10^{+167}\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 9: 57.3% accurate, 2.6× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -1.5 \cdot 10^{+213}:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;t\_1 \leq 10^{+47}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t\_1 \leq 10^{+196}:\\ \;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot a\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b)
                   :precision binary64
                   (let* ((t_1 (* (- a 0.5) b)))
                     (if (<= t_1 -1.5e+213)
                       (* b a)
                       (if (<= t_1 1e+47) (+ x y) (if (<= t_1 1e+196) (fma b -0.5 x) (* b a))))))
                  double code(double x, double y, double z, double t, double a, double b) {
                  	double t_1 = (a - 0.5) * b;
                  	double tmp;
                  	if (t_1 <= -1.5e+213) {
                  		tmp = b * a;
                  	} else if (t_1 <= 1e+47) {
                  		tmp = x + y;
                  	} else if (t_1 <= 1e+196) {
                  		tmp = fma(b, -0.5, x);
                  	} else {
                  		tmp = b * a;
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t, a, b)
                  	t_1 = Float64(Float64(a - 0.5) * b)
                  	tmp = 0.0
                  	if (t_1 <= -1.5e+213)
                  		tmp = Float64(b * a);
                  	elseif (t_1 <= 1e+47)
                  		tmp = Float64(x + y);
                  	elseif (t_1 <= 1e+196)
                  		tmp = fma(b, -0.5, x);
                  	else
                  		tmp = Float64(b * a);
                  	end
                  	return tmp
                  end
                  
                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$1, -1.5e+213], N[(b * a), $MachinePrecision], If[LessEqual[t$95$1, 1e+47], N[(x + y), $MachinePrecision], If[LessEqual[t$95$1, 1e+196], N[(b * -0.5 + x), $MachinePrecision], N[(b * a), $MachinePrecision]]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := \left(a - 0.5\right) \cdot b\\
                  \mathbf{if}\;t\_1 \leq -1.5 \cdot 10^{+213}:\\
                  \;\;\;\;b \cdot a\\
                  
                  \mathbf{elif}\;t\_1 \leq 10^{+47}:\\
                  \;\;\;\;x + y\\
                  
                  \mathbf{elif}\;t\_1 \leq 10^{+196}:\\
                  \;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;b \cdot a\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -1.5000000000000001e213 or 9.9999999999999995e195 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) 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 inf

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

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

                        \[\leadsto \color{blue}{b \cdot a} \]
                    5. Applied rewrites72.7%

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

                    if -1.5000000000000001e213 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1e47

                    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 y around inf

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

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

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

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

                        \[\leadsto x + \color{blue}{\left(y + z \cdot \left(1 - \log t\right)\right)} \]
                      3. Step-by-step derivation
                        1. Applied rewrites88.1%

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

                          \[\leadsto x + y \]
                        3. Step-by-step derivation
                          1. Applied rewrites53.8%

                            \[\leadsto x + y \]

                          if 1e47 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 9.9999999999999995e195

                          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 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.6

                              \[\leadsto \mathsf{fma}\left(a - 0.5, b, \color{blue}{y + x}\right) \]
                          5. Applied rewrites81.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 rewrites54.6%

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

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

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

                            Alternative 10: 64.9% accurate, 3.4× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+111} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+131}\right):\\ \;\;\;\;t\_1\\ \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 -1e+111) (not (<= t_1 5e+131))) t_1 (+ 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 <= -1e+111) || !(t_1 <= 5e+131)) {
                            		tmp = t_1;
                            	} 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 <= (-1d+111)) .or. (.not. (t_1 <= 5d+131))) then
                                    tmp = t_1
                                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 <= -1e+111) || !(t_1 <= 5e+131)) {
                            		tmp = t_1;
                            	} 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 <= -1e+111) or not (t_1 <= 5e+131):
                            		tmp = t_1
                            	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 <= -1e+111) || !(t_1 <= 5e+131))
                            		tmp = t_1;
                            	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 <= -1e+111) || ~((t_1 <= 5e+131)))
                            		tmp = t_1;
                            	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, -1e+111], N[Not[LessEqual[t$95$1, 5e+131]], $MachinePrecision]], t$95$1, N[(x + y), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            t_1 := \left(a - 0.5\right) \cdot b\\
                            \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+111} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+131}\right):\\
                            \;\;\;\;t\_1\\
                            
                            \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) < -9.99999999999999957e110 or 4.99999999999999995e131 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) 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 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-+.f6494.1

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

                                \[\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 rewrites87.0%

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

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

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

                                  if -9.99999999999999957e110 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 4.99999999999999995e131

                                  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 y around inf

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

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

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

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

                                      \[\leadsto x + \color{blue}{\left(y + z \cdot \left(1 - \log t\right)\right)} \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites90.0%

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

                                        \[\leadsto x + y \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites55.6%

                                          \[\leadsto x + y \]
                                      4. Recombined 2 regimes into one program.
                                      5. Final simplification66.2%

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

                                      Alternative 11: 58.0% accurate, 3.7× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -1.5 \cdot 10^{+213} \lor \neg \left(t\_1 \leq 10^{+196}\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 -1.5e+213) (not (<= t_1 1e+196))) (* 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 <= -1.5e+213) || !(t_1 <= 1e+196)) {
                                      		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 <= (-1.5d+213)) .or. (.not. (t_1 <= 1d+196))) 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 <= -1.5e+213) || !(t_1 <= 1e+196)) {
                                      		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 <= -1.5e+213) or not (t_1 <= 1e+196):
                                      		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 <= -1.5e+213) || !(t_1 <= 1e+196))
                                      		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 <= -1.5e+213) || ~((t_1 <= 1e+196)))
                                      		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, -1.5e+213], N[Not[LessEqual[t$95$1, 1e+196]], $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 -1.5 \cdot 10^{+213} \lor \neg \left(t\_1 \leq 10^{+196}\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) < -1.5000000000000001e213 or 9.9999999999999995e195 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) 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 inf

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

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

                                            \[\leadsto \color{blue}{b \cdot a} \]
                                        5. Applied rewrites72.7%

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

                                        if -1.5000000000000001e213 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 9.9999999999999995e195

                                        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 y around inf

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

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

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

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

                                            \[\leadsto x + \color{blue}{\left(y + z \cdot \left(1 - \log t\right)\right)} \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites83.0%

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

                                              \[\leadsto x + y \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites52.1%

                                                \[\leadsto x + y \]
                                            4. Recombined 2 regimes into one program.
                                            5. Final simplification58.4%

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

                                            Alternative 12: 62.1% accurate, 7.9× speedup?

                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 1.2 \cdot 10^{+184}:\\ \;\;\;\;\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
                                             (if (<= y 1.2e+184) (fma b (- a 0.5) x) (+ x y)))
                                            double code(double x, double y, double z, double t, double a, double b) {
                                            	double tmp;
                                            	if (y <= 1.2e+184) {
                                            		tmp = fma(b, (a - 0.5), x);
                                            	} else {
                                            		tmp = x + y;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            function code(x, y, z, t, a, b)
                                            	tmp = 0.0
                                            	if (y <= 1.2e+184)
                                            		tmp = fma(b, Float64(a - 0.5), x);
                                            	else
                                            		tmp = Float64(x + y);
                                            	end
                                            	return tmp
                                            end
                                            
                                            code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 1.2e+184], N[(b * N[(a - 0.5), $MachinePrecision] + x), $MachinePrecision], N[(x + y), $MachinePrecision]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            \mathbf{if}\;y \leq 1.2 \cdot 10^{+184}:\\
                                            \;\;\;\;\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 y < 1.19999999999999998e184

                                              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-+.f6477.4

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

                                                \[\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 rewrites63.1%

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

                                                if 1.19999999999999998e184 < y

                                                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 y around inf

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

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

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

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

                                                    \[\leadsto x + \color{blue}{\left(y + z \cdot \left(1 - \log t\right)\right)} \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites89.7%

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

                                                      \[\leadsto x + y \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites64.8%

                                                        \[\leadsto x + y \]
                                                    4. Recombined 2 regimes into one program.
                                                    5. Add Preprocessing

                                                    Alternative 13: 78.2% 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.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-+.f6477.2

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

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

                                                    Alternative 14: 42.5% 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.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 y around inf

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

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

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

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

                                                        \[\leadsto x + \color{blue}{\left(y + z \cdot \left(1 - \log t\right)\right)} \]
                                                      3. Step-by-step derivation
                                                        1. Applied rewrites60.9%

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

                                                          \[\leadsto x + y \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites38.7%

                                                            \[\leadsto x + y \]
                                                          2. Add Preprocessing

                                                          Developer Target 1: 99.6% 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 2024352 
                                                          (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)))