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

Percentage Accurate: 99.9% → 99.9%
Time: 9.6s
Alternatives: 13
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);
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b):
	return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 99.9% accurate, 1.0× speedup?

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

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

Alternative 1: 99.9% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 93.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+61}:\\
\;\;\;\;\left(z + \left(y + x\right)\right) - \left(0.5 - a\right) \cdot b\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+100}:\\
\;\;\;\;\mathsf{fma}\left(1 - \log t, z, \mathsf{fma}\left(-0.5, b, x\right)\right) + y\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z + \left(y + x\right)\right) - \color{blue}{\left(0.5 - a\right)} \cdot b \]
    7. Applied rewrites88.0%

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

    if -1.9999999999999999e61 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 4.9999999999999999e100

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(1 - \log t, z, y\right) + \mathsf{fma}\left(-0.5, b, x\right)} \]
    6. Step-by-step derivation
      1. Applied rewrites97.8%

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

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

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 90.8% accurate, 0.9× speedup?

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

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(z + \left(y + x\right)\right) - \color{blue}{\left(0.5 - a\right)} \cdot b \]
      7. Applied rewrites85.6%

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

      if -5e20 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 4.9999999999999999e100

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 78.9% accurate, 1.0× speedup?

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

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -2.00000000000000003e-221 < (+.f64 x y)

      1. Initial program 99.9%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(z + y\right)} - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    3. Recombined 2 regimes into one program.
    4. Final simplification78.7%

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

    Alternative 5: 86.1% accurate, 1.0× speedup?

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

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 4.4999999999999997e84 < y

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(z + \left(y + x\right)\right) - \color{blue}{\left(0.5 - a\right)} \cdot b \]
      7. Applied rewrites96.6%

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

    Alternative 6: 83.7% accurate, 1.0× speedup?

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

      1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -5.79999999999999959e154 < z < 1.25e279

        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(z + \left(y + x\right)\right) - \color{blue}{\left(0.5 - a\right)} \cdot b \]
        7. Applied rewrites86.6%

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

        if 1.25e279 < 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. Add Preprocessing
        3. Taylor expanded in z around inf

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

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

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

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

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

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

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

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

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

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

      Alternative 7: 82.7% accurate, 1.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - \log t\right) \cdot z\\ \mathbf{if}\;z \leq -4.8 \cdot 10^{+156}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+279}:\\ \;\;\;\;\left(z + \left(y + x\right)\right) - \left(0.5 - a\right) \cdot b\\ \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+156)
           t_1
           (if (<= z 1.25e+279) (- (+ z (+ y x)) (* (- 0.5 a) b)) 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+156) {
      		tmp = t_1;
      	} else if (z <= 1.25e+279) {
      		tmp = (z + (y + x)) - ((0.5 - a) * b);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t, a, b)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: tmp
          t_1 = (1.0d0 - log(t)) * z
          if (z <= (-4.8d+156)) then
              tmp = t_1
          else if (z <= 1.25d+279) then
              tmp = (z + (y + x)) - ((0.5d0 - a) * b)
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = (1.0 - Math.log(t)) * z;
      	double tmp;
      	if (z <= -4.8e+156) {
      		tmp = t_1;
      	} else if (z <= 1.25e+279) {
      		tmp = (z + (y + x)) - ((0.5 - a) * b);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = (1.0 - math.log(t)) * z
      	tmp = 0
      	if z <= -4.8e+156:
      		tmp = t_1
      	elif z <= 1.25e+279:
      		tmp = (z + (y + x)) - ((0.5 - a) * b)
      	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+156)
      		tmp = t_1;
      	elseif (z <= 1.25e+279)
      		tmp = Float64(Float64(z + Float64(y + x)) - Float64(Float64(0.5 - a) * b));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = (1.0 - log(t)) * z;
      	tmp = 0.0;
      	if (z <= -4.8e+156)
      		tmp = t_1;
      	elseif (z <= 1.25e+279)
      		tmp = (z + (y + x)) - ((0.5 - a) * b);
      	else
      		tmp = t_1;
      	end
      	tmp_2 = 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+156], t$95$1, If[LessEqual[z, 1.25e+279], N[(N[(z + N[(y + x), $MachinePrecision]), $MachinePrecision] - N[(N[(0.5 - a), $MachinePrecision] * b), $MachinePrecision]), $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^{+156}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 1.25 \cdot 10^{+279}:\\
      \;\;\;\;\left(z + \left(y + x\right)\right) - \left(0.5 - a\right) \cdot b\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -4.8000000000000002e156 or 1.25e279 < z

        1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

        if -4.8000000000000002e156 < z < 1.25e279

        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(z + \left(y + x\right)\right) - \color{blue}{\left(0.5 - a\right)} \cdot b \]
        7. Applied rewrites86.6%

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

      Alternative 8: 70.2% accurate, 3.3× speedup?

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

        1. Initial program 100.0%

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

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

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

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

            \[\leadsto \color{blue}{\left(a - 0.5\right)} \cdot b \]
        5. Applied rewrites83.3%

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

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

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 9: 36.5% accurate, 7.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -126000:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;a \leq 2.85 \cdot 10^{-25}:\\ \;\;\;\;-0.5 \cdot b\\ \mathbf{else}:\\ \;\;\;\;b \cdot a\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (if (<= a -126000.0) (* b a) (if (<= a 2.85e-25) (* -0.5 b) (* b a))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double tmp;
        	if (a <= -126000.0) {
        		tmp = b * a;
        	} else if (a <= 2.85e-25) {
        		tmp = -0.5 * b;
        	} else {
        		tmp = b * a;
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z, t, a, b)
            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 (a <= (-126000.0d0)) then
                tmp = b * a
            else if (a <= 2.85d-25) then
                tmp = (-0.5d0) * b
            else
                tmp = b * a
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t, double a, double b) {
        	double tmp;
        	if (a <= -126000.0) {
        		tmp = b * a;
        	} else if (a <= 2.85e-25) {
        		tmp = -0.5 * b;
        	} else {
        		tmp = b * a;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a, b):
        	tmp = 0
        	if a <= -126000.0:
        		tmp = b * a
        	elif a <= 2.85e-25:
        		tmp = -0.5 * b
        	else:
        		tmp = b * a
        	return tmp
        
        function code(x, y, z, t, a, b)
        	tmp = 0.0
        	if (a <= -126000.0)
        		tmp = Float64(b * a);
        	elseif (a <= 2.85e-25)
        		tmp = Float64(-0.5 * b);
        	else
        		tmp = Float64(b * a);
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a, b)
        	tmp = 0.0;
        	if (a <= -126000.0)
        		tmp = b * a;
        	elseif (a <= 2.85e-25)
        		tmp = -0.5 * b;
        	else
        		tmp = b * a;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -126000.0], N[(b * a), $MachinePrecision], If[LessEqual[a, 2.85e-25], N[(-0.5 * b), $MachinePrecision], N[(b * a), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;a \leq -126000:\\
        \;\;\;\;b \cdot a\\
        
        \mathbf{elif}\;a \leq 2.85 \cdot 10^{-25}:\\
        \;\;\;\;-0.5 \cdot b\\
        
        \mathbf{else}:\\
        \;\;\;\;b \cdot a\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if a < -126000 or 2.8500000000000002e-25 < a

          1. Initial program 99.9%

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

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

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

              \[\leadsto \color{blue}{b \cdot a} \]
          5. Applied rewrites47.8%

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

          if -126000 < a < 2.8500000000000002e-25

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto -0.5 \cdot \color{blue}{b} \]
          8. Recombined 2 regimes into one program.
          9. Add Preprocessing

          Alternative 10: 79.3% accurate, 7.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(z + \left(y + x\right)\right) - \color{blue}{\left(0.5 - a\right)} \cdot b \]
          7. Applied rewrites77.3%

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

          Alternative 11: 78.5% accurate, 9.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

          Alternative 12: 37.3% accurate, 14.0× speedup?

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

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

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

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

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

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

            \[\leadsto \color{blue}{\left(a - 0.5\right) \cdot b} \]
          6. Final simplification35.7%

            \[\leadsto b \cdot \left(a - 0.5\right) \]
          7. Add Preprocessing

          Alternative 13: 14.1% accurate, 21.0× speedup?

          \[\begin{array}{l} \\ -0.5 \cdot b \end{array} \]
          (FPCore (x y z t a b) :precision binary64 (* -0.5 b))
          double code(double x, double y, double z, double t, double a, double b) {
          	return -0.5 * b;
          }
          
          real(8) function code(x, y, z, t, a, b)
              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 = (-0.5d0) * b
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b) {
          	return -0.5 * b;
          }
          
          def code(x, y, z, t, a, b):
          	return -0.5 * b
          
          function code(x, y, z, t, a, b)
          	return Float64(-0.5 * b)
          end
          
          function tmp = code(x, y, z, t, a, b)
          	tmp = -0.5 * b;
          end
          
          code[x_, y_, z_, t_, a_, b_] := N[(-0.5 * b), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          -0.5 \cdot b
          \end{array}
          
          Derivation
          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto -0.5 \cdot \color{blue}{b} \]
            2. Add Preprocessing

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

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

            Reproduce

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