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

Percentage Accurate: 99.8% → 99.8%
Time: 5.5s
Alternatives: 19
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 19 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right)} \]
    11. *-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) \]
    12. lower-fma.f64N/A

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

      \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, \left(\left(x + y\right) + z\right) - z \cdot \log t\right) \]
    14. lower--.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) \]
    15. 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) \]
    16. +-commutativeN/A

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

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

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

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

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

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

Alternative 2: 87.2% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right)} \]
      11. *-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) \]
      12. lower-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, \left(\left(x + y\right) + z\right) - z \cdot \log t\right) \]
      14. lower--.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) \]
      15. 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) \]
      16. +-commutativeN/A

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

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

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

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

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

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

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

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

      if -1.0000000000000001e-192 < (+.f64 x y)

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 85.1% accurate, 0.9× speedup?

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

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right)} \]
        11. *-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) \]
        12. lower-fma.f64N/A

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, \left(\left(x + y\right) + z\right) - z \cdot \log t\right) \]
        14. lower--.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) \]
        15. 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) \]
        16. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.0000000000000001e-192 < (+.f64 x y)

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 85.1% accurate, 0.9× speedup?

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

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right)} \]
        11. *-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) \]
        12. lower-fma.f64N/A

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, \left(\left(x + y\right) + z\right) - z \cdot \log t\right) \]
        14. lower--.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) \]
        15. 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) \]
        16. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.9999999999999998e105 < (+.f64 x y)

      1. Initial program 99.8%

        \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
      2. 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. +-commutativeN/A

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

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

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

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

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

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

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

    Alternative 5: 84.8% accurate, 1.0× speedup?

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

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(y + x\right) + z\right) - \log t \cdot \color{blue}{z} \]
        8. lift-log.f6462.8

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

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

      if -1.6000000000000001e139 < z < 1e80

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    Alternative 6: 84.1% accurate, 1.2× speedup?

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

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right)} \]
        11. *-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) \]
        12. lower-fma.f64N/A

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, \left(\left(x + y\right) + z\right) - z \cdot \log t\right) \]
        14. lower--.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) \]
        15. 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) \]
        16. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(z + y\right) - \log t \cdot z \]
        6. lift-*.f6442.2

          \[\leadsto \left(z + y\right) - \log t \cdot z \]
      9. Applied rewrites42.2%

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

      if -4.80000000000000016e139 < z < 1.9000000000000001e168

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

      if 1.9000000000000001e168 < z

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right)} \]
        11. *-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) \]
        12. lower-fma.f64N/A

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, \left(\left(x + y\right) + z\right) - z \cdot \log t\right) \]
        14. lower--.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) \]
        15. 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) \]
        16. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z - z \cdot \log t\right) + x \]
      8. Step-by-step derivation
        1. lower--.f64N/A

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

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

          \[\leadsto \left(z - \log t \cdot z\right) + x \]
        4. lift-*.f6442.5

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

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

    Alternative 7: 82.9% accurate, 1.2× speedup?

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

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right)} \]
        11. *-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) \]
        12. lower-fma.f64N/A

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, \left(\left(x + y\right) + z\right) - z \cdot \log t\right) \]
        14. lower--.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) \]
        15. 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) \]
        16. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(z + y\right) - \log t \cdot z \]
        6. lift-*.f6442.2

          \[\leadsto \left(z + y\right) - \log t \cdot z \]
      9. Applied rewrites42.2%

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

      if -4.80000000000000016e139 < z < 1.8999999999999999e177

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

      if 1.8999999999999999e177 < z

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right)} \]
        11. *-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) \]
        12. lower-fma.f64N/A

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, \left(\left(x + y\right) + z\right) - z \cdot \log t\right) \]
        14. lower--.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) \]
        15. 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) \]
        16. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto y + \left(z - \log t \cdot z\right) \]
        4. lift-*.f6442.2

          \[\leadsto y + \left(z - \log t \cdot z\right) \]
      9. Applied rewrites42.2%

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

    Alternative 8: 79.2% accurate, 1.2× speedup?

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

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right)} \]
        11. *-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) \]
        12. lower-fma.f64N/A

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, \left(\left(x + y\right) + z\right) - z \cdot \log t\right) \]
        14. lower--.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) \]
        15. 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) \]
        16. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(z + y\right) - \log t \cdot z \]
        6. lift-*.f6442.2

          \[\leadsto \left(z + y\right) - \log t \cdot z \]
      9. Applied rewrites42.2%

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

      if -4.80000000000000016e139 < z < 1.8999999999999999e177

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    Alternative 9: 79.2% accurate, 1.3× speedup?

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

      1. Initial program 99.8%

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

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

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

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

          \[\leadsto \left(1 - \log t\right) \cdot z \]
        4. lift-log.f6422.3

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

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

      if -4.80000000000000016e139 < z < 2.85000000000000008e177

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    Alternative 10: 78.7% accurate, 2.3× speedup?

    \[\begin{array}{l} \\ \mathsf{fma}\left(a - 0.5, b, y\right) + x \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 Float64(fma(Float64(a - 0.5), b, y) + x)
    end
    
    code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(a - 0.5), $MachinePrecision] * b + y), $MachinePrecision] + x), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \mathsf{fma}\left(a - 0.5, b, y\right) + x
    \end{array}
    
    Derivation
    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. 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. +-commutativeN/A

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

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

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

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

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

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

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

    Alternative 11: 58.6% accurate, 0.9× speedup?

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

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right)} \]
        11. *-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) \]
        12. lower-fma.f64N/A

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, \left(\left(x + y\right) + z\right) - z \cdot \log t\right) \]
        14. lower--.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) \]
        15. 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) \]
        16. +-commutativeN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{x}\right) \]
      5. Step-by-step derivation
        1. associate--l+58.4

          \[\leadsto \mathsf{fma}\left(a - 0.5, b, x\right) \]
        2. +-commutative58.4

          \[\leadsto \mathsf{fma}\left(a - 0.5, b, x\right) \]
        3. *-commutative58.4

          \[\leadsto \mathsf{fma}\left(a - 0.5, b, x\right) \]
        4. associate--l+58.4

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

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

      if -1.0000000000000001e-192 < (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t)))

      1. Initial program 99.8%

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

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

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

      Alternative 12: 56.2% accurate, 1.7× speedup?

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

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right)} \]
          11. *-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) \]
          12. lower-fma.f64N/A

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

            \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, \left(\left(x + y\right) + z\right) - z \cdot \log t\right) \]
          14. lower--.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) \]
          15. 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) \]
          16. +-commutativeN/A

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{x}\right) \]
        5. Step-by-step derivation
          1. associate--l+58.4

            \[\leadsto \mathsf{fma}\left(a - 0.5, b, x\right) \]
          2. +-commutative58.4

            \[\leadsto \mathsf{fma}\left(a - 0.5, b, x\right) \]
          3. *-commutative58.4

            \[\leadsto \mathsf{fma}\left(a - 0.5, b, x\right) \]
          4. associate--l+58.4

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

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

        if 5.0000000000000001e85 < (+.f64 x y)

        1. Initial program 99.8%

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

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

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

            \[\leadsto y + \color{blue}{a} \cdot b \]
          3. Step-by-step derivation
            1. Applied rewrites45.6%

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

          Alternative 13: 50.9% accurate, 1.3× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x + y \leq -4 \cdot 10^{+75}:\\ \;\;\;\;b \cdot a + x\\ \mathbf{elif}\;x + y \leq 5 \cdot 10^{+85}:\\ \;\;\;\;\left(a - 0.5\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;y + a \cdot b\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (if (<= (+ x y) -4e+75)
             (+ (* b a) x)
             (if (<= (+ x y) 5e+85) (* (- a 0.5) b) (+ y (* a b)))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if ((x + y) <= -4e+75) {
          		tmp = (b * a) + x;
          	} else if ((x + y) <= 5e+85) {
          		tmp = (a - 0.5) * b;
          	} else {
          		tmp = y + (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) :: tmp
              if ((x + y) <= (-4d+75)) then
                  tmp = (b * a) + x
              else if ((x + y) <= 5d+85) then
                  tmp = (a - 0.5d0) * b
              else
                  tmp = y + (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 tmp;
          	if ((x + y) <= -4e+75) {
          		tmp = (b * a) + x;
          	} else if ((x + y) <= 5e+85) {
          		tmp = (a - 0.5) * b;
          	} else {
          		tmp = y + (a * b);
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	tmp = 0
          	if (x + y) <= -4e+75:
          		tmp = (b * a) + x
          	elif (x + y) <= 5e+85:
          		tmp = (a - 0.5) * b
          	else:
          		tmp = y + (a * b)
          	return tmp
          
          function code(x, y, z, t, a, b)
          	tmp = 0.0
          	if (Float64(x + y) <= -4e+75)
          		tmp = Float64(Float64(b * a) + x);
          	elseif (Float64(x + y) <= 5e+85)
          		tmp = Float64(Float64(a - 0.5) * b);
          	else
          		tmp = Float64(y + Float64(a * b));
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b)
          	tmp = 0.0;
          	if ((x + y) <= -4e+75)
          		tmp = (b * a) + x;
          	elseif ((x + y) <= 5e+85)
          		tmp = (a - 0.5) * b;
          	else
          		tmp = y + (a * b);
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x + y), $MachinePrecision], -4e+75], N[(N[(b * a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[N[(x + y), $MachinePrecision], 5e+85], N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision], N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;x + y \leq -4 \cdot 10^{+75}:\\
          \;\;\;\;b \cdot a + x\\
          
          \mathbf{elif}\;x + y \leq 5 \cdot 10^{+85}:\\
          \;\;\;\;\left(a - 0.5\right) \cdot b\\
          
          \mathbf{else}:\\
          \;\;\;\;y + a \cdot b\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (+.f64 x y) < -3.99999999999999971e75

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right)} \]
              11. *-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) \]
              12. lower-fma.f64N/A

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

                \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, \left(\left(x + y\right) + z\right) - z \cdot \log t\right) \]
              14. lower--.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) \]
              15. 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) \]
              16. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto a \cdot b + x \]
            8. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto b \cdot a + x \]
              2. lift-*.f6445.9

                \[\leadsto b \cdot a + x \]
            9. Applied rewrites45.9%

              \[\leadsto b \cdot a + x \]

            if -3.99999999999999971e75 < (+.f64 x y) < 5.0000000000000001e85

            1. Initial program 99.8%

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

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

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

                \[\leadsto \left(a - \frac{1}{2}\right) \cdot b \]
              3. lift-*.f6438.2

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

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

            if 5.0000000000000001e85 < (+.f64 x y)

            1. Initial program 99.8%

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

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

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

                \[\leadsto y + \color{blue}{a} \cdot b \]
              3. Step-by-step derivation
                1. Applied rewrites45.6%

                  \[\leadsto y + \color{blue}{a} \cdot b \]
              4. Recombined 3 regimes into one program.
              5. Add Preprocessing

              Alternative 14: 47.4% accurate, 1.3× speedup?

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

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right)} \]
                  11. *-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) \]
                  12. lower-fma.f64N/A

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

                    \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, \left(\left(x + y\right) + z\right) - z \cdot \log t\right) \]
                  14. lower--.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) \]
                  15. 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) \]
                  16. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto a \cdot b + x \]
                8. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto b \cdot a + x \]
                  2. lift-*.f6445.9

                    \[\leadsto b \cdot a + x \]
                9. Applied rewrites45.9%

                  \[\leadsto b \cdot a + x \]

                if -3.99999999999999971e75 < (+.f64 x y) < 5.00000000000000015e82

                1. Initial program 99.8%

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

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

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

                    \[\leadsto \left(a - \frac{1}{2}\right) \cdot b \]
                  3. lift-*.f6438.2

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

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

                if 5.00000000000000015e82 < (+.f64 x y)

                1. Initial program 99.8%

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

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

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

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

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

                  Alternative 15: 45.1% accurate, 1.3× speedup?

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

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right)} \]
                      11. *-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) \]
                      12. lower-fma.f64N/A

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

                        \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, \left(\left(x + y\right) + z\right) - z \cdot \log t\right) \]
                      14. lower--.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) \]
                      15. 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) \]
                      16. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto a \cdot b + x \]
                    8. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto b \cdot a + x \]
                      2. lift-*.f6445.9

                        \[\leadsto b \cdot a + x \]
                    9. Applied rewrites45.9%

                      \[\leadsto b \cdot a + x \]

                    if -3.99999999999999971e75 < (+.f64 x y) < 5.0000000000000001e85

                    1. Initial program 99.8%

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

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

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

                        \[\leadsto \left(a - \frac{1}{2}\right) \cdot b \]
                      3. lift-*.f6438.2

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

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

                    if 5.0000000000000001e85 < (+.f64 x y)

                    1. Initial program 99.8%

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

                      \[\leadsto \color{blue}{y} \]
                    3. Step-by-step derivation
                      1. Applied rewrites21.9%

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

                    Alternative 16: 40.9% accurate, 1.3× speedup?

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

                      1. Initial program 99.8%

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

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

                          \[\leadsto \color{blue}{x} \]

                        if -4.9999999999999999e149 < (+.f64 x y) < 5.0000000000000001e85

                        1. Initial program 99.8%

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

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

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

                            \[\leadsto \left(a - \frac{1}{2}\right) \cdot b \]
                          3. lift-*.f6438.2

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

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

                        if 5.0000000000000001e85 < (+.f64 x y)

                        1. Initial program 99.8%

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

                          \[\leadsto \color{blue}{y} \]
                        3. Step-by-step derivation
                          1. Applied rewrites21.9%

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

                        Alternative 17: 34.4% accurate, 0.3× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-192}:\\ \;\;\;\;x\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+298}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;b \cdot a\\ \end{array} \end{array} \]
                        (FPCore (x y z t a b)
                         :precision binary64
                         (let* ((t_1 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b))))
                           (if (<= t_1 (- INFINITY))
                             (* b a)
                             (if (<= t_1 -1e-192) x (if (<= t_1 5e+298) y (* b a))))))
                        double code(double x, double y, double z, double t, double a, double b) {
                        	double t_1 = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
                        	double tmp;
                        	if (t_1 <= -((double) INFINITY)) {
                        		tmp = b * a;
                        	} else if (t_1 <= -1e-192) {
                        		tmp = x;
                        	} else if (t_1 <= 5e+298) {
                        		tmp = y;
                        	} else {
                        		tmp = b * a;
                        	}
                        	return tmp;
                        }
                        
                        public static double code(double x, double y, double z, double t, double a, double b) {
                        	double t_1 = (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
                        	double tmp;
                        	if (t_1 <= -Double.POSITIVE_INFINITY) {
                        		tmp = b * a;
                        	} else if (t_1 <= -1e-192) {
                        		tmp = x;
                        	} else if (t_1 <= 5e+298) {
                        		tmp = y;
                        	} else {
                        		tmp = b * a;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t, a, b):
                        	t_1 = (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
                        	tmp = 0
                        	if t_1 <= -math.inf:
                        		tmp = b * a
                        	elif t_1 <= -1e-192:
                        		tmp = x
                        	elif t_1 <= 5e+298:
                        		tmp = y
                        	else:
                        		tmp = b * a
                        	return tmp
                        
                        function code(x, y, z, t, a, b)
                        	t_1 = Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b))
                        	tmp = 0.0
                        	if (t_1 <= Float64(-Inf))
                        		tmp = Float64(b * a);
                        	elseif (t_1 <= -1e-192)
                        		tmp = x;
                        	elseif (t_1 <= 5e+298)
                        		tmp = y;
                        	else
                        		tmp = Float64(b * a);
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t, a, b)
                        	t_1 = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
                        	tmp = 0.0;
                        	if (t_1 <= -Inf)
                        		tmp = b * a;
                        	elseif (t_1 <= -1e-192)
                        		tmp = x;
                        	elseif (t_1 <= 5e+298)
                        		tmp = y;
                        	else
                        		tmp = b * a;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(b * a), $MachinePrecision], If[LessEqual[t$95$1, -1e-192], x, If[LessEqual[t$95$1, 5e+298], y, N[(b * a), $MachinePrecision]]]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_1 := \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\\
                        \mathbf{if}\;t\_1 \leq -\infty:\\
                        \;\;\;\;b \cdot a\\
                        
                        \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-192}:\\
                        \;\;\;\;x\\
                        
                        \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+298}:\\
                        \;\;\;\;y\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;b \cdot a\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < -inf.0 or 5.0000000000000003e298 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b))

                          1. Initial program 99.8%

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

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

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

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

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

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

                          1. Initial program 99.8%

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

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

                              \[\leadsto \color{blue}{x} \]

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

                            1. Initial program 99.8%

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

                              \[\leadsto \color{blue}{y} \]
                            3. Step-by-step derivation
                              1. Applied rewrites21.9%

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

                            Alternative 18: 22.4% accurate, 0.9× speedup?

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

                              1. Initial program 99.8%

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

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

                                  \[\leadsto \color{blue}{x} \]

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

                                1. Initial program 99.8%

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

                                  \[\leadsto \color{blue}{y} \]
                                3. Step-by-step derivation
                                  1. Applied rewrites21.9%

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

                                Alternative 19: 22.2% accurate, 26.1× speedup?

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

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

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

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

                                  Reproduce

                                  ?
                                  herbie shell --seed 2025123 
                                  (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)))