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

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

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

Initial Program: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
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.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 88.3% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+90}:\\
\;\;\;\;\mathsf{fma}\left(z, 1 - \log t, x + 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) < -2.0000000000000001e209 or 1.99999999999999993e90 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto y + \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
      9. +-lowering-+.f6496.3

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

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

    if -2.0000000000000001e209 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.99999999999999993e90

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{\left(x + \left(y + z\right)\right) - z \cdot \log t} \]
    4. 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. cancel-sign-sub-invN/A

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

        \[\leadsto \left(x + y\right) + \left(\color{blue}{z \cdot 1} - z \cdot \log t\right) \]
      6. distribute-lft-out--N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 58.1% accurate, 1.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;y + t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) < -5.0000000000000001e-100

    1. Initial program 99.9%

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

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

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

      if -5.0000000000000001e-100 < (-.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 y around inf

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

          \[\leadsto \color{blue}{y} + \left(a - 0.5\right) \cdot b \]
      5. Recombined 2 regimes into one program.
      6. Final simplification63.1%

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

      Alternative 4: 21.5% accurate, 1.0× speedup?

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

        1. Initial program 99.9%

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

          \[\leadsto \color{blue}{x} \]
        4. Step-by-step derivation
          1. Simplified20.6%

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

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

          1. Initial program 99.9%

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

            \[\leadsto \color{blue}{y} \]
          4. Step-by-step derivation
            1. Simplified26.9%

              \[\leadsto \color{blue}{y} \]
          5. Recombined 2 regimes into one program.
          6. Final simplification24.1%

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

          Alternative 5: 81.0% accurate, 1.0× speedup?

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

            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{z \cdot \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. mul-1-negN/A

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

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

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

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

            if 2e-99 < (+.f64 x y)

            1. Initial program 100.0%

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

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

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

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

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

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

                \[\leadsto y + \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
              9. +-lowering-+.f6488.0

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

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

          Alternative 6: 87.1% accurate, 1.0× speedup?

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

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{z \cdot \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. mul-1-negN/A

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

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

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

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

              \[\leadsto \mathsf{fma}\left(z, 1 - \log t, \color{blue}{a \cdot b}\right) \]
            7. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(z, 1 - \log t, \color{blue}{b \cdot a}\right) \]
              2. *-lowering-*.f6489.1

                \[\leadsto \mathsf{fma}\left(z, 1 - \log t, \color{blue}{b \cdot a}\right) \]
            8. Simplified89.1%

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

            if -2.2e235 < z < 1.55e173

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 7: 83.0% accurate, 1.1× speedup?

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

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

            if 2.9999999999999998e179 < 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. +-commutativeN/A

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

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

                \[\leadsto \color{blue}{z \cdot \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. mul-1-negN/A

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

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

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

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

              \[\leadsto \mathsf{fma}\left(z, 1 - \log t, \color{blue}{x}\right) \]
            7. Step-by-step derivation
              1. Simplified77.4%

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

            Alternative 8: 82.1% accurate, 1.1× speedup?

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

              1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

              if 1.37999999999999994e178 < z

              1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

            Alternative 9: 70.9% accurate, 3.3× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ t_2 := b \cdot \left(a + -0.5\right)\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+218}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+167}:\\ \;\;\;\;y + \mathsf{fma}\left(b, -0.5, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (let* ((t_1 (* (- a 0.5) b)) (t_2 (* b (+ a -0.5))))
               (if (<= t_1 -2e+218) t_2 (if (<= t_1 2e+167) (+ y (fma b -0.5 x)) t_2))))
            double code(double x, double y, double z, double t, double a, double b) {
            	double t_1 = (a - 0.5) * b;
            	double t_2 = b * (a + -0.5);
            	double tmp;
            	if (t_1 <= -2e+218) {
            		tmp = t_2;
            	} else if (t_1 <= 2e+167) {
            		tmp = y + fma(b, -0.5, x);
            	} else {
            		tmp = t_2;
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a, b)
            	t_1 = Float64(Float64(a - 0.5) * b)
            	t_2 = Float64(b * Float64(a + -0.5))
            	tmp = 0.0
            	if (t_1 <= -2e+218)
            		tmp = t_2;
            	elseif (t_1 <= 2e+167)
            		tmp = Float64(y + fma(b, -0.5, x));
            	else
            		tmp = t_2;
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+218], t$95$2, If[LessEqual[t$95$1, 2e+167], N[(y + N[(b * -0.5 + x), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \left(a - 0.5\right) \cdot b\\
            t_2 := b \cdot \left(a + -0.5\right)\\
            \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+218}:\\
            \;\;\;\;t\_2\\
            
            \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+167}:\\
            \;\;\;\;y + \mathsf{fma}\left(b, -0.5, 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) < -2.00000000000000017e218 or 2.0000000000000001e167 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

              1. Initial program 100.0%

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

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

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

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

                  \[\leadsto b \cdot \left(a + \color{blue}{\frac{-1}{2}}\right) \]
                4. +-lowering-+.f6490.4

                  \[\leadsto b \cdot \color{blue}{\left(a + -0.5\right)} \]
              5. Simplified90.4%

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

              if -2.00000000000000017e218 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 2.0000000000000001e167

              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}{\left(y + x\right)} + b \cdot \left(a - \frac{1}{2}\right) \]
                3. associate-+l+N/A

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

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

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

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

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

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

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

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

                \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{\frac{-1}{2}}, x\right) \]
              7. Step-by-step derivation
                1. Simplified69.0%

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

              Alternative 10: 65.5% accurate, 3.4× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ t_2 := b \cdot \left(a + -0.5\right)\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+212}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+167}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
              (FPCore (x y z t a b)
               :precision binary64
               (let* ((t_1 (* (- a 0.5) b)) (t_2 (* b (+ a -0.5))))
                 (if (<= t_1 -2e+212) t_2 (if (<= t_1 2e+167) (+ x y) t_2))))
              double code(double x, double y, double z, double t, double a, double b) {
              	double t_1 = (a - 0.5) * b;
              	double t_2 = b * (a + -0.5);
              	double tmp;
              	if (t_1 <= -2e+212) {
              		tmp = t_2;
              	} else if (t_1 <= 2e+167) {
              		tmp = x + y;
              	} else {
              		tmp = t_2;
              	}
              	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) :: t_2
                  real(8) :: tmp
                  t_1 = (a - 0.5d0) * b
                  t_2 = b * (a + (-0.5d0))
                  if (t_1 <= (-2d+212)) then
                      tmp = t_2
                  else if (t_1 <= 2d+167) then
                      tmp = x + y
                  else
                      tmp = t_2
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t, double a, double b) {
              	double t_1 = (a - 0.5) * b;
              	double t_2 = b * (a + -0.5);
              	double tmp;
              	if (t_1 <= -2e+212) {
              		tmp = t_2;
              	} else if (t_1 <= 2e+167) {
              		tmp = x + y;
              	} else {
              		tmp = t_2;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b):
              	t_1 = (a - 0.5) * b
              	t_2 = b * (a + -0.5)
              	tmp = 0
              	if t_1 <= -2e+212:
              		tmp = t_2
              	elif t_1 <= 2e+167:
              		tmp = x + y
              	else:
              		tmp = t_2
              	return tmp
              
              function code(x, y, z, t, a, b)
              	t_1 = Float64(Float64(a - 0.5) * b)
              	t_2 = Float64(b * Float64(a + -0.5))
              	tmp = 0.0
              	if (t_1 <= -2e+212)
              		tmp = t_2;
              	elseif (t_1 <= 2e+167)
              		tmp = Float64(x + y);
              	else
              		tmp = t_2;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b)
              	t_1 = (a - 0.5) * b;
              	t_2 = b * (a + -0.5);
              	tmp = 0.0;
              	if (t_1 <= -2e+212)
              		tmp = t_2;
              	elseif (t_1 <= 2e+167)
              		tmp = x + y;
              	else
              		tmp = t_2;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+212], t$95$2, If[LessEqual[t$95$1, 2e+167], N[(x + y), $MachinePrecision], t$95$2]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \left(a - 0.5\right) \cdot b\\
              t_2 := b \cdot \left(a + -0.5\right)\\
              \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+212}:\\
              \;\;\;\;t\_2\\
              
              \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+167}:\\
              \;\;\;\;x + y\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_2\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -1.9999999999999998e212 or 2.0000000000000001e167 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

                1. Initial program 100.0%

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

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

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

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

                    \[\leadsto b \cdot \left(a + \color{blue}{\frac{-1}{2}}\right) \]
                  4. +-lowering-+.f6489.5

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

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

                if -1.9999999999999998e212 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 2.0000000000000001e167

                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}{\left(y + x\right)} + b \cdot \left(a - \frac{1}{2}\right) \]
                  3. associate-+l+N/A

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

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

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

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

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

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

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

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

                  \[\leadsto y + \color{blue}{x} \]
                7. Step-by-step derivation
                  1. Simplified62.6%

                    \[\leadsto y + \color{blue}{x} \]
                8. Recombined 2 regimes into one program.
                9. Final simplification72.1%

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

                Alternative 11: 58.7% accurate, 3.7× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+218}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+167}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \end{array} \]
                (FPCore (x y z t a b)
                 :precision binary64
                 (let* ((t_1 (* (- a 0.5) b)))
                   (if (<= t_1 -2e+218) (* a b) (if (<= t_1 2e+167) (+ x y) (* a b)))))
                double code(double x, double y, double z, double t, double a, double b) {
                	double t_1 = (a - 0.5) * b;
                	double tmp;
                	if (t_1 <= -2e+218) {
                		tmp = a * b;
                	} else if (t_1 <= 2e+167) {
                		tmp = x + y;
                	} else {
                		tmp = a * b;
                	}
                	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 = (a - 0.5d0) * b
                    if (t_1 <= (-2d+218)) then
                        tmp = a * b
                    else if (t_1 <= 2d+167) then
                        tmp = x + y
                    else
                        tmp = a * b
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z, double t, double a, double b) {
                	double t_1 = (a - 0.5) * b;
                	double tmp;
                	if (t_1 <= -2e+218) {
                		tmp = a * b;
                	} else if (t_1 <= 2e+167) {
                		tmp = x + y;
                	} else {
                		tmp = a * b;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t, a, b):
                	t_1 = (a - 0.5) * b
                	tmp = 0
                	if t_1 <= -2e+218:
                		tmp = a * b
                	elif t_1 <= 2e+167:
                		tmp = x + y
                	else:
                		tmp = a * b
                	return tmp
                
                function code(x, y, z, t, a, b)
                	t_1 = Float64(Float64(a - 0.5) * b)
                	tmp = 0.0
                	if (t_1 <= -2e+218)
                		tmp = Float64(a * b);
                	elseif (t_1 <= 2e+167)
                		tmp = Float64(x + y);
                	else
                		tmp = Float64(a * b);
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t, a, b)
                	t_1 = (a - 0.5) * b;
                	tmp = 0.0;
                	if (t_1 <= -2e+218)
                		tmp = a * b;
                	elseif (t_1 <= 2e+167)
                		tmp = x + y;
                	else
                		tmp = a * b;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+218], N[(a * b), $MachinePrecision], If[LessEqual[t$95$1, 2e+167], N[(x + y), $MachinePrecision], N[(a * b), $MachinePrecision]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \left(a - 0.5\right) \cdot b\\
                \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+218}:\\
                \;\;\;\;a \cdot b\\
                
                \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+167}:\\
                \;\;\;\;x + y\\
                
                \mathbf{else}:\\
                \;\;\;\;a \cdot b\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -2.00000000000000017e218 or 2.0000000000000001e167 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

                  1. Initial program 100.0%

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

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

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

                      \[\leadsto \color{blue}{b \cdot a} \]
                  5. Simplified72.0%

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

                  if -2.00000000000000017e218 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 2.0000000000000001e167

                  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}{\left(y + x\right)} + b \cdot \left(a - \frac{1}{2}\right) \]
                    3. associate-+l+N/A

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

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

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

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

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

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

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

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

                    \[\leadsto y + \color{blue}{x} \]
                  7. Step-by-step derivation
                    1. Simplified62.5%

                      \[\leadsto y + \color{blue}{x} \]
                  8. Recombined 2 regimes into one program.
                  9. Final simplification65.8%

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

                  Alternative 12: 78.9% accurate, 4.5× speedup?

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

                    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}{\left(y + x\right)} + b \cdot \left(a - \frac{1}{2}\right) \]
                      3. associate-+l+N/A

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

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

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

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

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

                        \[\leadsto y + \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
                      9. +-lowering-+.f6486.3

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

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

                      \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a}, x\right) \]
                    7. Step-by-step derivation
                      1. Simplified85.2%

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

                      if -0.502 < (-.f64 a #s(literal 1/2 binary64)) < -0.5

                      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}{\left(y + x\right)} + b \cdot \left(a - \frac{1}{2}\right) \]
                        3. associate-+l+N/A

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

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

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

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

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

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

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

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

                        \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{\frac{-1}{2}}, x\right) \]
                      7. Step-by-step derivation
                        1. Simplified77.9%

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

                      Alternative 13: 45.8% accurate, 5.2× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x + y \leq -4 \cdot 10^{+49}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;x + y \leq 2 \cdot 10^{-44}:\\ \;\;\;\;b \cdot -0.5\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b)
                       :precision binary64
                       (if (<= (+ x y) -4e+49) (+ x y) (if (<= (+ x y) 2e-44) (* b -0.5) (+ x y))))
                      double code(double x, double y, double z, double t, double a, double b) {
                      	double tmp;
                      	if ((x + y) <= -4e+49) {
                      		tmp = x + y;
                      	} else if ((x + y) <= 2e-44) {
                      		tmp = b * -0.5;
                      	} else {
                      		tmp = x + y;
                      	}
                      	return tmp;
                      }
                      
                      real(8) function code(x, y, z, t, a, b)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          real(8), intent (in) :: z
                          real(8), intent (in) :: t
                          real(8), intent (in) :: a
                          real(8), intent (in) :: b
                          real(8) :: tmp
                          if ((x + y) <= (-4d+49)) then
                              tmp = x + y
                          else if ((x + y) <= 2d-44) then
                              tmp = b * (-0.5d0)
                          else
                              tmp = x + y
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double x, double y, double z, double t, double a, double b) {
                      	double tmp;
                      	if ((x + y) <= -4e+49) {
                      		tmp = x + y;
                      	} else if ((x + y) <= 2e-44) {
                      		tmp = b * -0.5;
                      	} else {
                      		tmp = x + y;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t, a, b):
                      	tmp = 0
                      	if (x + y) <= -4e+49:
                      		tmp = x + y
                      	elif (x + y) <= 2e-44:
                      		tmp = b * -0.5
                      	else:
                      		tmp = x + y
                      	return tmp
                      
                      function code(x, y, z, t, a, b)
                      	tmp = 0.0
                      	if (Float64(x + y) <= -4e+49)
                      		tmp = Float64(x + y);
                      	elseif (Float64(x + y) <= 2e-44)
                      		tmp = Float64(b * -0.5);
                      	else
                      		tmp = Float64(x + y);
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y, z, t, a, b)
                      	tmp = 0.0;
                      	if ((x + y) <= -4e+49)
                      		tmp = x + y;
                      	elseif ((x + y) <= 2e-44)
                      		tmp = b * -0.5;
                      	else
                      		tmp = x + y;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x + y), $MachinePrecision], -4e+49], N[(x + y), $MachinePrecision], If[LessEqual[N[(x + y), $MachinePrecision], 2e-44], N[(b * -0.5), $MachinePrecision], N[(x + y), $MachinePrecision]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;x + y \leq -4 \cdot 10^{+49}:\\
                      \;\;\;\;x + y\\
                      
                      \mathbf{elif}\;x + y \leq 2 \cdot 10^{-44}:\\
                      \;\;\;\;b \cdot -0.5\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;x + y\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if (+.f64 x y) < -3.99999999999999979e49 or 1.99999999999999991e-44 < (+.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}{\left(y + x\right)} + b \cdot \left(a - \frac{1}{2}\right) \]
                          3. associate-+l+N/A

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

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

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

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

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

                            \[\leadsto y + \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
                          9. +-lowering-+.f6486.4

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

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

                          \[\leadsto y + \color{blue}{x} \]
                        7. Step-by-step derivation
                          1. Simplified57.7%

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

                          if -3.99999999999999979e49 < (+.f64 x y) < 1.99999999999999991e-44

                          1. Initial program 99.9%

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

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

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

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

                              \[\leadsto b \cdot \left(a + \color{blue}{\frac{-1}{2}}\right) \]
                            4. +-lowering-+.f6469.4

                              \[\leadsto b \cdot \color{blue}{\left(a + -0.5\right)} \]
                          5. Simplified69.4%

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

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

                              \[\leadsto b \cdot \color{blue}{-0.5} \]
                          8. Recombined 2 regimes into one program.
                          9. Final simplification49.7%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;x + y \leq -4 \cdot 10^{+49}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;x + y \leq 2 \cdot 10^{-44}:\\ \;\;\;\;b \cdot -0.5\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
                          10. Add Preprocessing

                          Alternative 14: 79.6% accurate, 9.7× speedup?

                          \[\begin{array}{l} \\ y + \mathsf{fma}\left(b, a + -0.5, x\right) \end{array} \]
                          (FPCore (x y z t a b) :precision binary64 (+ y (fma b (+ a -0.5) x)))
                          double code(double x, double y, double z, double t, double a, double b) {
                          	return y + fma(b, (a + -0.5), x);
                          }
                          
                          function code(x, y, z, t, a, b)
                          	return Float64(y + fma(b, Float64(a + -0.5), x))
                          end
                          
                          code[x_, y_, z_, t_, a_, b_] := N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]
                          
                          \begin{array}{l}
                          
                          \\
                          y + \mathsf{fma}\left(b, a + -0.5, 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}{\left(y + x\right)} + b \cdot \left(a - \frac{1}{2}\right) \]
                            3. associate-+l+N/A

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

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

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

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

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

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

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

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

                          Alternative 15: 42.5% accurate, 31.5× speedup?

                          \[\begin{array}{l} \\ x + y \end{array} \]
                          (FPCore (x y z t a b) :precision binary64 (+ x y))
                          double code(double x, double y, double z, double t, double a, double b) {
                          	return x + y;
                          }
                          
                          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
                          end function
                          
                          public static double code(double x, double y, double z, double t, double a, double b) {
                          	return x + y;
                          }
                          
                          def code(x, y, z, t, a, b):
                          	return x + y
                          
                          function code(x, y, z, t, a, b)
                          	return Float64(x + y)
                          end
                          
                          function tmp = code(x, y, z, t, a, b)
                          	tmp = x + y;
                          end
                          
                          code[x_, y_, z_, t_, a_, b_] := N[(x + y), $MachinePrecision]
                          
                          \begin{array}{l}
                          
                          \\
                          x + y
                          \end{array}
                          
                          Derivation
                          1. Initial program 99.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}{\left(y + x\right)} + b \cdot \left(a - \frac{1}{2}\right) \]
                            3. associate-+l+N/A

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

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

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

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

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

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

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

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

                            \[\leadsto y + \color{blue}{x} \]
                          7. Step-by-step derivation
                            1. Simplified43.8%

                              \[\leadsto y + \color{blue}{x} \]
                            2. Final simplification43.8%

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

                            Alternative 16: 22.3% accurate, 126.0× speedup?

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

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

                              \[\leadsto \color{blue}{x} \]
                            4. Step-by-step derivation
                              1. Simplified20.7%

                                \[\leadsto \color{blue}{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 2024196 
                              (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)))