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

Percentage Accurate: 99.9% → 99.9%
Time: 5.5s
Alternatives: 15
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b):
	return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 99.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b):
	return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 99.9% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.9% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 99.9% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 90.4% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < -5.0000000000000001e-60

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 83.8% accurate, 0.9× speedup?

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

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -9.99999999999999983e76 < (+.f64 x 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. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 6: 81.8% accurate, 0.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ t_2 := \mathsf{fma}\left(a - 0.5, b, y + x\right)\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+78}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+92}:\\ \;\;\;\;\mathsf{fma}\left(1 - \log t, z, y\right) + x\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* (- a 0.5) b)) (t_2 (fma (- a 0.5) b (+ y x))))
         (if (<= t_1 -2e+78)
           t_2
           (if (<= t_1 2e+92) (+ (fma (- 1.0 (log t)) z y) x) t_2))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = (a - 0.5) * b;
      	double t_2 = fma((a - 0.5), b, (y + x));
      	double tmp;
      	if (t_1 <= -2e+78) {
      		tmp = t_2;
      	} else if (t_1 <= 2e+92) {
      		tmp = fma((1.0 - log(t)), z, y) + x;
      	} else {
      		tmp = t_2;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(Float64(a - 0.5) * b)
      	t_2 = fma(Float64(a - 0.5), b, Float64(y + x))
      	tmp = 0.0
      	if (t_1 <= -2e+78)
      		tmp = t_2;
      	elseif (t_1 <= 2e+92)
      		tmp = Float64(fma(Float64(1.0 - log(t)), z, y) + x);
      	else
      		tmp = t_2;
      	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[(N[(a - 0.5), $MachinePrecision] * b + N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+78], t$95$2, If[LessEqual[t$95$1, 2e+92], N[(N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + y), $MachinePrecision] + x), $MachinePrecision], t$95$2]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \left(a - 0.5\right) \cdot b\\
      t_2 := \mathsf{fma}\left(a - 0.5, b, y + x\right)\\
      \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+78}:\\
      \;\;\;\;t\_2\\
      
      \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+92}:\\
      \;\;\;\;\mathsf{fma}\left(1 - \log t, z, y\right) + x\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_2\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -2.00000000000000002e78 or 2.0000000000000001e92 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -2.00000000000000002e78 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 2.0000000000000001e92

        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x + \left(y + z \cdot \left(1 - \log t\right)\right) \]
          4. lower-log.f6463.8

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

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

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

            \[\leadsto \left(y + z \cdot \left(1 - \log t\right)\right) + \color{blue}{x} \]
          3. lower-+.f6463.8

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

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

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

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

            \[\leadsto \left(\left(1 - \log t\right) \cdot z + y\right) + x \]
          8. lower-fma.f6463.8

            \[\leadsto \mathsf{fma}\left(1 - \log t, z, y\right) + x \]
        9. Applied rewrites63.8%

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

      Alternative 7: 80.7% accurate, 1.4× speedup?

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

        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 7.99999999999999947e169 < z

        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x + \left(y + z \cdot \left(1 - \log t\right)\right) \]
          4. lower-log.f6463.8

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

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

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

            \[\leadsto x + z \cdot \left(1 - \log t\right) \]
          2. lower--.f64N/A

            \[\leadsto x + z \cdot \left(1 - \log t\right) \]
          3. lower-log.f6443.2

            \[\leadsto x + z \cdot \left(1 - \log t\right) \]
        10. Applied rewrites43.2%

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

      Alternative 8: 78.9% accurate, 1.6× speedup?

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

        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 9.4999999999999995e169 < z

        1. Initial program 99.9%

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

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

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

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

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

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

      Alternative 9: 78.2% accurate, 2.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 10: 71.7% accurate, 0.7× speedup?

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

        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 11: 57.8% accurate, 1.0× speedup?

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

          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 12: 57.6% accurate, 3.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(a - 0.5, b, y\right) \]
              2. Add Preprocessing

              Alternative 13: 49.0% accurate, 1.0× speedup?

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

                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto b \cdot \left(a - \color{blue}{0.5}\right) \]
                9. Applied rewrites37.2%

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

                if -9.9999999999999999e64 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.00000000000000005e96

                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{1} \cdot y \]
                  5. Step-by-step derivation
                    1. Applied rewrites22.4%

                      \[\leadsto \color{blue}{1} \cdot y \]
                  6. Recombined 2 regimes into one program.
                  7. Add Preprocessing

                  Alternative 14: 39.3% accurate, 1.1× speedup?

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

                    1. Initial program 99.9%

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

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

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

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

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

                    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{1} \cdot y \]
                      5. Step-by-step derivation
                        1. Applied rewrites22.4%

                          \[\leadsto \color{blue}{1} \cdot y \]
                      6. Recombined 2 regimes into one program.
                      7. Add Preprocessing

                      Alternative 15: 25.4% accurate, 6.6× speedup?

                      \[\begin{array}{l} \\ a \cdot b \end{array} \]
                      (FPCore (x y z t a b) :precision binary64 (* a b))
                      double code(double x, double y, double z, double t, double a, double b) {
                      	return a * b;
                      }
                      
                      module fmin_fmax_functions
                          implicit none
                          private
                          public fmax
                          public fmin
                      
                          interface fmax
                              module procedure fmax88
                              module procedure fmax44
                              module procedure fmax84
                              module procedure fmax48
                          end interface
                          interface fmin
                              module procedure fmin88
                              module procedure fmin44
                              module procedure fmin84
                              module procedure fmin48
                          end interface
                      contains
                          real(8) function fmax88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmax44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmax84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmax48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                          end function
                          real(8) function fmin88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmin44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmin84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmin48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                          end function
                      end module
                      
                      real(8) function code(x, y, z, t, a, b)
                      use fmin_fmax_functions
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          real(8), intent (in) :: z
                          real(8), intent (in) :: t
                          real(8), intent (in) :: a
                          real(8), intent (in) :: b
                          code = a * b
                      end function
                      
                      public static double code(double x, double y, double z, double t, double a, double b) {
                      	return a * b;
                      }
                      
                      def code(x, y, z, t, a, b):
                      	return a * b
                      
                      function code(x, y, z, t, a, b)
                      	return Float64(a * b)
                      end
                      
                      function tmp = code(x, y, z, t, a, b)
                      	tmp = a * b;
                      end
                      
                      code[x_, y_, z_, t_, a_, b_] := N[(a * b), $MachinePrecision]
                      
                      \begin{array}{l}
                      
                      \\
                      a \cdot b
                      \end{array}
                      
                      Derivation
                      1. Initial program 99.9%

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

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

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

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

                      Reproduce

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