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

Percentage Accurate: 99.9% → 99.9%
Time: 9.8s
Alternatives: 14
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 14 alternatives:

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

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

\\
b \cdot \left(a - 0.5\right) + \left(\left(\left(y + x\right) + z\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(\left(y + x\right) + z\right) - \log t \cdot z\right) \]
  4. Add Preprocessing

Alternative 2: 92.8% accurate, 0.9× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_2\\


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

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
    4. Step-by-step derivation
      1. 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.0

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

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

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

    1. Initial program 99.8%

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

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

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

Alternative 3: 90.0% accurate, 0.9× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_2\\


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

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
    4. Step-by-step derivation
      1. 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-+.f6490.5

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

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

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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \left(1 \cdot 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(1 \cdot z + \color{blue}{\left(\mathsf{neg}\left(\log t\right)\right) \cdot z}\right) \]
      8. log-recN/A

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot \left(a - 0.5\right) \leq -2 \cdot 10^{+125}:\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\ \mathbf{elif}\;b \cdot \left(a - 0.5\right) \leq 10^{+80}:\\ \;\;\;\;\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: 90.0% accurate, 0.9× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_2\\


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

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
    4. Step-by-step derivation
      1. 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-+.f6490.5

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

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

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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 58.6% accurate, 1.0× speedup?

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

      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. *-rgt-identityN/A

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(1 + \left(\mathsf{neg}\left(\log t\right)\right)\right)} \cdot z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
        16. 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) \]
        17. 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 rewrites81.1%

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

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

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

        if -4.99999999999999977e-58 < (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t)))

        1. Initial program 99.9%

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

          \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
        4. Step-by-step derivation
          1. 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-+.f6480.3

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

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

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

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

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

        Alternative 6: 83.6% accurate, 1.0× speedup?

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

          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. *-rgt-identityN/A

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

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

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

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

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

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

              \[\leadsto \color{blue}{\left(1 + \left(\mathsf{neg}\left(\log t\right)\right)\right)} \cdot z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
            16. 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) \]
            17. 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.7%

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

          if 5.0000000000000002e46 < (+.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 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-+.f6487.0

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

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

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

        Alternative 7: 84.7% accurate, 1.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(1 - \log t, z, x\right)\\ \mathbf{if}\;z \leq -7.2 \cdot 10^{+121}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 8.4 \cdot 10^{+211}:\\ \;\;\;\;\mathsf{fma}\left(a - 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 (fma (- 1.0 (log t)) z x)))
           (if (<= z -7.2e+121)
             t_1
             (if (<= z 8.4e+211) (fma (- a 0.5) b (+ y x)) t_1))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = fma((1.0 - log(t)), z, x);
        	double tmp;
        	if (z <= -7.2e+121) {
        		tmp = t_1;
        	} else if (z <= 8.4e+211) {
        		tmp = fma((a - 0.5), b, (y + x));
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	t_1 = fma(Float64(1.0 - log(t)), z, x)
        	tmp = 0.0
        	if (z <= -7.2e+121)
        		tmp = t_1;
        	elseif (z <= 8.4e+211)
        		tmp = fma(Float64(a - 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[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + x), $MachinePrecision]}, If[LessEqual[z, -7.2e+121], t$95$1, If[LessEqual[z, 8.4e+211], N[(N[(a - 0.5), $MachinePrecision] * b + N[(y + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \mathsf{fma}\left(1 - \log t, z, x\right)\\
        \mathbf{if}\;z \leq -7.2 \cdot 10^{+121}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;z \leq 8.4 \cdot 10^{+211}:\\
        \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -7.19999999999999963e121 or 8.3999999999999999e211 < 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 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. *-rgt-identityN/A

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

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

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

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

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

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

              \[\leadsto \color{blue}{\left(1 + \left(\mathsf{neg}\left(\log t\right)\right)\right)} \cdot z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
            16. 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) \]
            17. 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 rewrites88.0%

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

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

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

            if -7.19999999999999963e121 < z < 8.3999999999999999e211

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

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

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

          Alternative 8: 84.1% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - \log t\right) \cdot z\\ \mathbf{if}\;z \leq -8.5 \cdot 10^{+194}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+212}:\\ \;\;\;\;\mathsf{fma}\left(a - 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 (* (- 1.0 (log t)) z)))
             (if (<= z -8.5e+194)
               t_1
               (if (<= z 5.4e+212) (fma (- a 0.5) b (+ y x)) t_1))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = (1.0 - log(t)) * z;
          	double tmp;
          	if (z <= -8.5e+194) {
          		tmp = t_1;
          	} else if (z <= 5.4e+212) {
          		tmp = fma((a - 0.5), b, (y + x));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b)
          	t_1 = Float64(Float64(1.0 - log(t)) * z)
          	tmp = 0.0
          	if (z <= -8.5e+194)
          		tmp = t_1;
          	elseif (z <= 5.4e+212)
          		tmp = fma(Float64(a - 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[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -8.5e+194], t$95$1, If[LessEqual[z, 5.4e+212], N[(N[(a - 0.5), $MachinePrecision] * b + N[(y + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left(1 - \log t\right) \cdot z\\
          \mathbf{if}\;z \leq -8.5 \cdot 10^{+194}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;z \leq 5.4 \cdot 10^{+212}:\\
          \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -8.50000000000000026e194 or 5.4e212 < z

            1. Initial program 99.6%

              \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
            2. Add Preprocessing
            3. Taylor expanded in 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.f6474.1

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

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

            if -8.50000000000000026e194 < z < 5.4e212

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

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

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

          Alternative 9: 56.9% accurate, 2.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(a - 0.5\right)\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+289}:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+190}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, b, x\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+84}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;b \cdot a\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (let* ((t_1 (* b (- a 0.5))))
             (if (<= t_1 -2e+289)
               (* b a)
               (if (<= t_1 -1e+190)
                 (fma -0.5 b x)
                 (if (<= t_1 5e+84) (+ y x) (* b a))))))
          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+289) {
          		tmp = b * a;
          	} else if (t_1 <= -1e+190) {
          		tmp = fma(-0.5, b, x);
          	} else if (t_1 <= 5e+84) {
          		tmp = y + x;
          	} else {
          		tmp = b * a;
          	}
          	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+289)
          		tmp = Float64(b * a);
          	elseif (t_1 <= -1e+190)
          		tmp = fma(-0.5, b, x);
          	elseif (t_1 <= 5e+84)
          		tmp = Float64(y + x);
          	else
          		tmp = Float64(b * a);
          	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+289], N[(b * a), $MachinePrecision], If[LessEqual[t$95$1, -1e+190], N[(-0.5 * b + x), $MachinePrecision], If[LessEqual[t$95$1, 5e+84], N[(y + x), $MachinePrecision], N[(b * a), $MachinePrecision]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := b \cdot \left(a - 0.5\right)\\
          \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+289}:\\
          \;\;\;\;b \cdot a\\
          
          \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+190}:\\
          \;\;\;\;\mathsf{fma}\left(-0.5, b, x\right)\\
          
          \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+84}:\\
          \;\;\;\;y + x\\
          
          \mathbf{else}:\\
          \;\;\;\;b \cdot a\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -2.0000000000000001e289 or 5.0000000000000001e84 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

            1. Initial program 99.9%

              \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
            2. Add Preprocessing
            3. Taylor expanded in 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-*.f6471.9

                \[\leadsto \color{blue}{b \cdot a} \]
            5. Applied rewrites71.9%

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

            if -2.0000000000000001e289 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -1.0000000000000001e190

            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 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. *-rgt-identityN/A

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

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

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

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

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

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

                \[\leadsto \color{blue}{\left(1 + \left(\mathsf{neg}\left(\log t\right)\right)\right)} \cdot z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
              16. 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) \]
              17. 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 rewrites88.5%

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

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

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

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

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

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

                1. Initial program 99.8%

                  \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                2. Add Preprocessing
                3. Taylor expanded in 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-+.f6469.9

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

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

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

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

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

                      \[\leadsto y + x \]
                  4. Recombined 3 regimes into one program.
                  5. Final simplification63.9%

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

                  Alternative 10: 68.1% accurate, 3.3× speedup?

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

                    1. Initial program 99.9%

                      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                    2. Add Preprocessing
                    3. Taylor expanded in 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. *-rgt-identityN/A

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\left(1 + \left(\mathsf{neg}\left(\log t\right)\right)\right)} \cdot z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
                      16. 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) \]
                      17. 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.7%

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

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

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

                      if -1.0000000000000001e190 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 5.00000000000000003e40

                      1. Initial program 99.8%

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

                        \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
                      4. Step-by-step derivation
                        1. 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-+.f6470.5

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

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

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

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

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

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

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

                        Alternative 11: 64.9% accurate, 3.4× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(a - 0.5\right)\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+190}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+84}:\\ \;\;\;\;y + x\\ \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 -1e+190) t_1 (if (<= t_1 5e+84) (+ 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 <= -1e+190) {
                        		tmp = t_1;
                        	} else if (t_1 <= 5e+84) {
                        		tmp = y + x;
                        	} 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 = b * (a - 0.5d0)
                            if (t_1 <= (-1d+190)) then
                                tmp = t_1
                            else if (t_1 <= 5d+84) then
                                tmp = y + x
                            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 = b * (a - 0.5);
                        	double tmp;
                        	if (t_1 <= -1e+190) {
                        		tmp = t_1;
                        	} else if (t_1 <= 5e+84) {
                        		tmp = y + x;
                        	} else {
                        		tmp = t_1;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t, a, b):
                        	t_1 = b * (a - 0.5)
                        	tmp = 0
                        	if t_1 <= -1e+190:
                        		tmp = t_1
                        	elif t_1 <= 5e+84:
                        		tmp = 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 <= -1e+190)
                        		tmp = t_1;
                        	elseif (t_1 <= 5e+84)
                        		tmp = Float64(y + x);
                        	else
                        		tmp = t_1;
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t, a, b)
                        	t_1 = b * (a - 0.5);
                        	tmp = 0.0;
                        	if (t_1 <= -1e+190)
                        		tmp = t_1;
                        	elseif (t_1 <= 5e+84)
                        		tmp = y + x;
                        	else
                        		tmp = t_1;
                        	end
                        	tmp_2 = 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, -1e+190], t$95$1, If[LessEqual[t$95$1, 5e+84], N[(y + x), $MachinePrecision], t$95$1]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_1 := b \cdot \left(a - 0.5\right)\\
                        \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+190}:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+84}:\\
                        \;\;\;\;y + x\\
                        
                        \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) < -1.0000000000000001e190 or 5.0000000000000001e84 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

                          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
                          7. 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--.f6477.2

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

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

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

                          1. Initial program 99.8%

                            \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                          2. Add Preprocessing
                          3. Taylor expanded in 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-+.f6469.9

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

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

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

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

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

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

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

                            Alternative 12: 56.1% accurate, 3.7× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(a - 0.5\right)\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+203}:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+84}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;b \cdot a\\ \end{array} \end{array} \]
                            (FPCore (x y z t a b)
                             :precision binary64
                             (let* ((t_1 (* b (- a 0.5))))
                               (if (<= t_1 -5e+203) (* b a) (if (<= t_1 5e+84) (+ y x) (* b a)))))
                            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+203) {
                            		tmp = b * a;
                            	} else if (t_1 <= 5e+84) {
                            		tmp = y + x;
                            	} 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) :: t_1
                                real(8) :: tmp
                                t_1 = b * (a - 0.5d0)
                                if (t_1 <= (-5d+203)) then
                                    tmp = b * a
                                else if (t_1 <= 5d+84) then
                                    tmp = y + x
                                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 t_1 = b * (a - 0.5);
                            	double tmp;
                            	if (t_1 <= -5e+203) {
                            		tmp = b * a;
                            	} else if (t_1 <= 5e+84) {
                            		tmp = y + x;
                            	} else {
                            		tmp = b * a;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a, b):
                            	t_1 = b * (a - 0.5)
                            	tmp = 0
                            	if t_1 <= -5e+203:
                            		tmp = b * a
                            	elif t_1 <= 5e+84:
                            		tmp = y + x
                            	else:
                            		tmp = b * a
                            	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+203)
                            		tmp = Float64(b * a);
                            	elseif (t_1 <= 5e+84)
                            		tmp = Float64(y + x);
                            	else
                            		tmp = Float64(b * a);
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t, a, b)
                            	t_1 = b * (a - 0.5);
                            	tmp = 0.0;
                            	if (t_1 <= -5e+203)
                            		tmp = b * a;
                            	elseif (t_1 <= 5e+84)
                            		tmp = y + x;
                            	else
                            		tmp = b * a;
                            	end
                            	tmp_2 = 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+203], N[(b * a), $MachinePrecision], If[LessEqual[t$95$1, 5e+84], N[(y + x), $MachinePrecision], N[(b * a), $MachinePrecision]]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            t_1 := b \cdot \left(a - 0.5\right)\\
                            \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+203}:\\
                            \;\;\;\;b \cdot a\\
                            
                            \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+84}:\\
                            \;\;\;\;y + x\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;b \cdot a\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -4.99999999999999994e203 or 5.0000000000000001e84 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

                              1. Initial program 99.9%

                                \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                              2. Add Preprocessing
                              3. Taylor expanded in 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-*.f6465.9

                                  \[\leadsto \color{blue}{b \cdot a} \]
                              5. Applied rewrites65.9%

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

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

                              1. Initial program 99.8%

                                \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                              2. Add Preprocessing
                              3. Taylor expanded in 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-+.f6470.9

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

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

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

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

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

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

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

                                Alternative 13: 78.4% 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-+.f6478.2

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

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

                                Alternative 14: 41.7% accurate, 31.5× speedup?

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

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

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

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

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

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

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

                                    Developer Target 1: 99.5% 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 2024294 
                                    (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)))