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

Percentage Accurate: 99.8% → 99.8%
Time: 18.2s
Alternatives: 21
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 21 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, 0.5× speedup?

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

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

    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
  2. Step-by-step derivation
    1. +-commutative99.8%

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

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

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

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

      \[\leadsto \mathsf{fma}\left(a + -0.5, b, \color{blue}{\left(x + y\right) + \left(z - z \cdot \log t\right)}\right) \]
    6. associate-+l+99.8%

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

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

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

Alternative 2: 89.2% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t_1 \leq -2 \cdot 10^{+88}:\\
\;\;\;\;\left(z + t_1\right) - t_3\\

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+50}:\\
\;\;\;\;\left(y + \left(x + z\right)\right) - t_3\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (-.f64 a 1/2) b) < -4.9999999999999999e155 or 5e50 < (*.f64 (-.f64 a 1/2) 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. Step-by-step derivation
      1. associate-+l-100.0%

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

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
      3. associate-+l+100.0%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in100.0%

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, \color{blue}{\left(-\left(a - 0.5\right)\right) \cdot b}\right)\right) \]
      7. *-commutative100.0%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \left(-\color{blue}{\left(\left(-0.5\right) + a\right)}\right)\right)\right) \]
      10. distribute-neg-in100.0%

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \color{blue}{\left(\left(-\left(-0.5\right)\right) + \left(-a\right)\right)}\right)\right) \]
      11. metadata-eval100.0%

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \left(\left(-\color{blue}{-0.5}\right) + \left(-a\right)\right)\right)\right) \]
      12. metadata-eval100.0%

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \left(\color{blue}{0.5} + \left(-a\right)\right)\right)\right) \]
      13. unsub-neg100.0%

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

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

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

    if -4.9999999999999999e155 < (*.f64 (-.f64 a 1/2) b) < -1.99999999999999992e88

    1. Initial program 99.6%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative99.6%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a + -0.5, b, \color{blue}{\left(x + y\right) + \left(z - z \cdot \log t\right)}\right) \]
      6. associate-+l+99.6%

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

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

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

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

    if -1.99999999999999992e88 < (*.f64 (-.f64 a 1/2) b) < 5e50

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-99.8%

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

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
      3. associate-+l+99.8%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in99.8%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot \left(a - 0.5\right) \leq -5 \cdot 10^{+155}:\\ \;\;\;\;b \cdot \left(a - 0.5\right) + \left(x + y\right)\\ \mathbf{elif}\;b \cdot \left(a - 0.5\right) \leq -2 \cdot 10^{+88}:\\ \;\;\;\;\left(z + b \cdot \left(a - 0.5\right)\right) - z \cdot \log t\\ \mathbf{elif}\;b \cdot \left(a - 0.5\right) \leq 5 \cdot 10^{+50}:\\ \;\;\;\;\left(y + \left(x + z\right)\right) - z \cdot \log t\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a - 0.5\right) + \left(x + y\right)\\ \end{array} \]

Alternative 3: 92.3% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+50}:\\
\;\;\;\;\left(-0.5 \cdot b + \left(y + \left(x + z\right)\right)\right) - z \cdot \log t\\

\mathbf{else}:\\
\;\;\;\;t_1 + \left(x + y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (-.f64 a 1/2) b) < -5e102

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a + -0.5, b, \color{blue}{\left(x + y\right) + \left(z - z \cdot \log t\right)}\right) \]
      6. associate-+l+99.9%

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

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

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

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

        \[\leadsto \left(a + -0.5\right) \cdot b + \color{blue}{\left(\left(z - z \cdot \log t\right) + x\right)} \]
      3. associate-+r+93.0%

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

        \[\leadsto \left(\color{blue}{\left(-0.5 + a\right)} \cdot b + \left(z - z \cdot \log t\right)\right) + x \]
      5. *-commutative93.0%

        \[\leadsto \left(\left(-0.5 + a\right) \cdot b + \left(z - \color{blue}{\log t \cdot z}\right)\right) + x \]
      6. *-un-lft-identity93.0%

        \[\leadsto \left(\left(-0.5 + a\right) \cdot b + \left(\color{blue}{1 \cdot z} - \log t \cdot z\right)\right) + x \]
      7. distribute-rgt-out--93.0%

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

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

    if -5e102 < (*.f64 (-.f64 a 1/2) b) < 5e50

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. remove-double-neg99.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \color{blue}{\left(-\left(-\left(a - 0.5\right) \cdot b\right)\right)} \]
      2. distribute-rgt-neg-out99.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(-\color{blue}{\left(a - 0.5\right) \cdot \left(-b\right)}\right) \]
      3. associate--l+99.8%

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

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.8%

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

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

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

    if 5e50 < (*.f64 (-.f64 a 1/2) 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. Step-by-step derivation
      1. associate-+l-100.0%

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

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
      3. associate-+l+100.0%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in100.0%

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, \color{blue}{\left(-\left(a - 0.5\right)\right) \cdot b}\right)\right) \]
      7. *-commutative100.0%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \left(-\color{blue}{\left(\left(-0.5\right) + a\right)}\right)\right)\right) \]
      10. distribute-neg-in100.0%

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \color{blue}{\left(\left(-\left(-0.5\right)\right) + \left(-a\right)\right)}\right)\right) \]
      11. metadata-eval100.0%

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \left(\left(-\color{blue}{-0.5}\right) + \left(-a\right)\right)\right)\right) \]
      12. metadata-eval100.0%

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \left(\color{blue}{0.5} + \left(-a\right)\right)\right)\right) \]
      13. unsub-neg100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot \left(a - 0.5\right) \leq -5 \cdot 10^{+102}:\\ \;\;\;\;x + \left(\left(a + -0.5\right) \cdot b + z \cdot \left(1 - \log t\right)\right)\\ \mathbf{elif}\;b \cdot \left(a - 0.5\right) \leq 5 \cdot 10^{+50}:\\ \;\;\;\;\left(-0.5 \cdot b + \left(y + \left(x + z\right)\right)\right) - z \cdot \log t\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a - 0.5\right) + \left(x + y\right)\\ \end{array} \]

Alternative 4: 90.1% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+50}:\\
\;\;\;\;\left(y + \left(x + z\right)\right) - z \cdot \log t\\

\mathbf{else}:\\
\;\;\;\;t_1 + \left(x + y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (-.f64 a 1/2) b) < -4.99999999999999983e117

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-99.9%

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

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
      3. associate-+l+99.9%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in99.9%

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999983e117 < (*.f64 (-.f64 a 1/2) b) < 5e50

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-99.7%

        \[\leadsto \color{blue}{\left(\left(x + y\right) + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right)} \]
      2. +-commutative99.7%

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
      3. associate-+l+99.7%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in99.8%

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

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

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

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

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

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

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

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

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

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

    if 5e50 < (*.f64 (-.f64 a 1/2) 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. Step-by-step derivation
      1. associate-+l-100.0%

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

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
      3. associate-+l+100.0%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in100.0%

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, \color{blue}{\left(-\left(a - 0.5\right)\right) \cdot b}\right)\right) \]
      7. *-commutative100.0%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \left(-\color{blue}{\left(\left(-0.5\right) + a\right)}\right)\right)\right) \]
      10. distribute-neg-in100.0%

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \color{blue}{\left(\left(-\left(-0.5\right)\right) + \left(-a\right)\right)}\right)\right) \]
      11. metadata-eval100.0%

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \left(\left(-\color{blue}{-0.5}\right) + \left(-a\right)\right)\right)\right) \]
      12. metadata-eval100.0%

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \left(\color{blue}{0.5} + \left(-a\right)\right)\right)\right) \]
      13. unsub-neg100.0%

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

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

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

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

Alternative 5: 90.4% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+50}:\\
\;\;\;\;\left(y + \left(x + z\right)\right) - z \cdot \log t\\

\mathbf{else}:\\
\;\;\;\;t_1 + \left(x + y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (-.f64 a 1/2) b) < -1.99999999999999992e88

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a + -0.5, b, \color{blue}{\left(x + y\right) + \left(z - z \cdot \log t\right)}\right) \]
      6. associate-+l+99.9%

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

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

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

        \[\leadsto \color{blue}{\left(a + -0.5\right) \cdot b + \left(x + \left(z - z \cdot \log t\right)\right)} \]
      2. +-commutative93.3%

        \[\leadsto \left(a + -0.5\right) \cdot b + \color{blue}{\left(\left(z - z \cdot \log t\right) + x\right)} \]
      3. associate-+r+93.3%

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

        \[\leadsto \left(\color{blue}{\left(-0.5 + a\right)} \cdot b + \left(z - z \cdot \log t\right)\right) + x \]
      5. *-commutative93.3%

        \[\leadsto \left(\left(-0.5 + a\right) \cdot b + \left(z - \color{blue}{\log t \cdot z}\right)\right) + x \]
      6. *-un-lft-identity93.3%

        \[\leadsto \left(\left(-0.5 + a\right) \cdot b + \left(\color{blue}{1 \cdot z} - \log t \cdot z\right)\right) + x \]
      7. distribute-rgt-out--93.2%

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

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

    if -1.99999999999999992e88 < (*.f64 (-.f64 a 1/2) b) < 5e50

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-99.8%

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

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
      3. associate-+l+99.8%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in99.8%

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

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

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

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

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

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

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

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

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

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

    if 5e50 < (*.f64 (-.f64 a 1/2) 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. Step-by-step derivation
      1. associate-+l-100.0%

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

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
      3. associate-+l+100.0%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in100.0%

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, \color{blue}{\left(-\left(a - 0.5\right)\right) \cdot b}\right)\right) \]
      7. *-commutative100.0%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \left(-\color{blue}{\left(\left(-0.5\right) + a\right)}\right)\right)\right) \]
      10. distribute-neg-in100.0%

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \color{blue}{\left(\left(-\left(-0.5\right)\right) + \left(-a\right)\right)}\right)\right) \]
      11. metadata-eval100.0%

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \left(\left(-\color{blue}{-0.5}\right) + \left(-a\right)\right)\right)\right) \]
      12. metadata-eval100.0%

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \left(\color{blue}{0.5} + \left(-a\right)\right)\right)\right) \]
      13. unsub-neg100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot \left(a - 0.5\right) \leq -2 \cdot 10^{+88}:\\ \;\;\;\;x + \left(\left(a + -0.5\right) \cdot b + z \cdot \left(1 - \log t\right)\right)\\ \mathbf{elif}\;b \cdot \left(a - 0.5\right) \leq 5 \cdot 10^{+50}:\\ \;\;\;\;\left(y + \left(x + z\right)\right) - z \cdot \log t\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a - 0.5\right) + \left(x + y\right)\\ \end{array} \]

Alternative 6: 78.1% accurate, 1.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\left(b \cdot \left(a - 0.5\right) + \left(y + z\right)\right) - z \cdot \log t\\


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

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a + -0.5, b, \color{blue}{\left(x + y\right) + \left(z - z \cdot \log t\right)}\right) \]
      6. associate-+l+99.9%

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

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

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

        \[\leadsto \color{blue}{\left(a + -0.5\right) \cdot b + \left(x + \left(z - z \cdot \log t\right)\right)} \]
      2. +-commutative82.3%

        \[\leadsto \left(a + -0.5\right) \cdot b + \color{blue}{\left(\left(z - z \cdot \log t\right) + x\right)} \]
      3. associate-+r+82.3%

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

        \[\leadsto \left(\color{blue}{\left(-0.5 + a\right)} \cdot b + \left(z - z \cdot \log t\right)\right) + x \]
      5. *-commutative82.3%

        \[\leadsto \left(\left(-0.5 + a\right) \cdot b + \left(z - \color{blue}{\log t \cdot z}\right)\right) + x \]
      6. *-un-lft-identity82.3%

        \[\leadsto \left(\left(-0.5 + a\right) \cdot b + \left(\color{blue}{1 \cdot z} - \log t \cdot z\right)\right) + x \]
      7. distribute-rgt-out--82.3%

        \[\leadsto \left(\left(-0.5 + a\right) \cdot b + \color{blue}{z \cdot \left(1 - \log t\right)}\right) + x \]
    6. Applied egg-rr82.3%

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

    if 4.99999999999999972e-158 < (+.f64 x y)

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. remove-double-neg99.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \color{blue}{\left(-\left(-\left(a - 0.5\right) \cdot b\right)\right)} \]
      2. distribute-rgt-neg-out99.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(-\color{blue}{\left(a - 0.5\right) \cdot \left(-b\right)}\right) \]
      3. associate--l+99.8%

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

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.8%

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

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

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

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

Alternative 7: 99.8% accurate, 1.0× speedup?

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

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

    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
  2. Step-by-step derivation
    1. remove-double-neg99.8%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \color{blue}{\left(-\left(-\left(a - 0.5\right) \cdot b\right)\right)} \]
    2. distribute-rgt-neg-out99.8%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(-\color{blue}{\left(a - 0.5\right) \cdot \left(-b\right)}\right) \]
    3. associate--l+99.8%

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

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

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

      \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
    7. remove-double-neg99.8%

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

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

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

Alternative 8: 85.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+182} \lor \neg \left(z \leq 6.2 \cdot 10^{+153}\right):\\ \;\;\;\;y + z \cdot \left(1 - \log t\right)\\ \mathbf{else}:\\ \;\;\;\;y + \left(b \cdot \left(a - 0.5\right) + \left(x + z\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= z -9e+182) (not (<= z 6.2e+153)))
   (+ y (* z (- 1.0 (log t))))
   (+ y (+ (* b (- a 0.5)) (+ x z)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((z <= -9e+182) || !(z <= 6.2e+153)) {
		tmp = y + (z * (1.0 - log(t)));
	} else {
		tmp = y + ((b * (a - 0.5)) + (x + z));
	}
	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 <= (-9d+182)) .or. (.not. (z <= 6.2d+153))) then
        tmp = y + (z * (1.0d0 - log(t)))
    else
        tmp = y + ((b * (a - 0.5d0)) + (x + z))
    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 <= -9e+182) || !(z <= 6.2e+153)) {
		tmp = y + (z * (1.0 - Math.log(t)));
	} else {
		tmp = y + ((b * (a - 0.5)) + (x + z));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (z <= -9e+182) or not (z <= 6.2e+153):
		tmp = y + (z * (1.0 - math.log(t)))
	else:
		tmp = y + ((b * (a - 0.5)) + (x + z))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((z <= -9e+182) || !(z <= 6.2e+153))
		tmp = Float64(y + Float64(z * Float64(1.0 - log(t))));
	else
		tmp = Float64(y + Float64(Float64(b * Float64(a - 0.5)) + Float64(x + z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((z <= -9e+182) || ~((z <= 6.2e+153)))
		tmp = y + (z * (1.0 - log(t)));
	else
		tmp = y + ((b * (a - 0.5)) + (x + z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -9e+182], N[Not[LessEqual[z, 6.2e+153]], $MachinePrecision]], N[(y + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+182} \lor \neg \left(z \leq 6.2 \cdot 10^{+153}\right):\\
\;\;\;\;y + z \cdot \left(1 - \log t\right)\\

\mathbf{else}:\\
\;\;\;\;y + \left(b \cdot \left(a - 0.5\right) + \left(x + z\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.00000000000000058e182 or 6.2e153 < z

    1. Initial program 99.6%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-99.6%

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

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
      3. associate-+l+99.6%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in99.6%

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, \color{blue}{\left(-\left(a - 0.5\right)\right) \cdot b}\right)\right) \]
      7. *-commutative99.6%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \left(-\color{blue}{\left(\left(-0.5\right) + a\right)}\right)\right)\right) \]
      10. distribute-neg-in99.6%

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \color{blue}{\left(\left(-\left(-0.5\right)\right) + \left(-a\right)\right)}\right)\right) \]
      11. metadata-eval99.6%

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \left(\left(-\color{blue}{-0.5}\right) + \left(-a\right)\right)\right)\right) \]
      12. metadata-eval99.6%

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \left(\color{blue}{0.5} + \left(-a\right)\right)\right)\right) \]
      13. unsub-neg99.6%

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

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

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

    if -9.00000000000000058e182 < z < 6.2e153

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-99.9%

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

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
      3. associate-+l+99.9%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in99.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+182} \lor \neg \left(z \leq 6.2 \cdot 10^{+153}\right):\\ \;\;\;\;y + z \cdot \left(1 - \log t\right)\\ \mathbf{else}:\\ \;\;\;\;y + \left(b \cdot \left(a - 0.5\right) + \left(x + z\right)\right)\\ \end{array} \]

Alternative 9: 84.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+184}:\\
\;\;\;\;y + t_1\\

\mathbf{elif}\;z \leq 4.1 \cdot 10^{+151}:\\
\;\;\;\;y + \left(b \cdot \left(a - 0.5\right) + \left(x + z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x + t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.59999999999999993e184

    1. Initial program 99.5%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-99.5%

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

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
      3. associate-+l+99.5%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in99.5%

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

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

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

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \left(-\color{blue}{\left(\left(-0.5\right) + a\right)}\right)\right)\right) \]
      10. distribute-neg-in99.5%

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

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

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

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

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

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

    if -2.59999999999999993e184 < z < 4.0999999999999998e151

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-99.9%

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

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
      3. associate-+l+99.9%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in99.9%

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

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

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

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

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

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

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

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

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

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

    if 4.0999999999999998e151 < 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. Step-by-step derivation
      1. +-commutative99.7%

        \[\leadsto \color{blue}{\left(a - 0.5\right) \cdot b + \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right)} \]
      2. fma-def99.7%

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

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

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

        \[\leadsto \mathsf{fma}\left(a + -0.5, b, \color{blue}{\left(x + y\right) + \left(z - z \cdot \log t\right)}\right) \]
      6. associate-+l+99.7%

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

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

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

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

        \[\leadsto \left(a + -0.5\right) \cdot b + \color{blue}{\left(\left(z - z \cdot \log t\right) + x\right)} \]
      3. associate-+r+99.0%

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

        \[\leadsto \left(\color{blue}{\left(-0.5 + a\right)} \cdot b + \left(z - z \cdot \log t\right)\right) + x \]
      5. *-commutative99.0%

        \[\leadsto \left(\left(-0.5 + a\right) \cdot b + \left(z - \color{blue}{\log t \cdot z}\right)\right) + x \]
      6. *-un-lft-identity99.0%

        \[\leadsto \left(\left(-0.5 + a\right) \cdot b + \left(\color{blue}{1 \cdot z} - \log t \cdot z\right)\right) + x \]
      7. distribute-rgt-out--99.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{+184}:\\ \;\;\;\;y + z \cdot \left(1 - \log t\right)\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+151}:\\ \;\;\;\;y + \left(b \cdot \left(a - 0.5\right) + \left(x + z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \left(1 - \log t\right)\\ \end{array} \]

Alternative 10: 84.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+176}:\\
\;\;\;\;-0.5 \cdot b - z \cdot \left(\log t + -1\right)\\

\mathbf{elif}\;z \leq 1.92 \cdot 10^{+151}:\\
\;\;\;\;y + \left(b \cdot \left(a - 0.5\right) + \left(x + z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(1 - \log t\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.20000000000000007e176

    1. Initial program 99.6%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative99.6%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a + -0.5, b, \color{blue}{\left(x + y\right) + \left(z - z \cdot \log t\right)}\right) \]
      6. associate-+l+99.6%

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

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

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

        \[\leadsto \color{blue}{\left(a + -0.5\right) \cdot b + \left(x + \left(z - z \cdot \log t\right)\right)} \]
      2. +-commutative96.5%

        \[\leadsto \left(a + -0.5\right) \cdot b + \color{blue}{\left(\left(z - z \cdot \log t\right) + x\right)} \]
      3. associate-+r+96.5%

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

        \[\leadsto \left(\color{blue}{\left(-0.5 + a\right)} \cdot b + \left(z - z \cdot \log t\right)\right) + x \]
      5. *-commutative96.5%

        \[\leadsto \left(\left(-0.5 + a\right) \cdot b + \left(z - \color{blue}{\log t \cdot z}\right)\right) + x \]
      6. *-un-lft-identity96.5%

        \[\leadsto \left(\left(-0.5 + a\right) \cdot b + \left(\color{blue}{1 \cdot z} - \log t \cdot z\right)\right) + x \]
      7. distribute-rgt-out--96.4%

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

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

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

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

    if -2.20000000000000007e176 < z < 1.92000000000000002e151

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-99.9%

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

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
      3. associate-+l+99.9%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in99.9%

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

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

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

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

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

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

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

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

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

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

    if 1.92000000000000002e151 < 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. Step-by-step derivation
      1. +-commutative99.7%

        \[\leadsto \color{blue}{\left(a - 0.5\right) \cdot b + \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right)} \]
      2. fma-def99.7%

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

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

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

        \[\leadsto \mathsf{fma}\left(a + -0.5, b, \color{blue}{\left(x + y\right) + \left(z - z \cdot \log t\right)}\right) \]
      6. associate-+l+99.7%

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

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

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

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

        \[\leadsto \left(a + -0.5\right) \cdot b + \color{blue}{\left(\left(z - z \cdot \log t\right) + x\right)} \]
      3. associate-+r+99.0%

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

        \[\leadsto \left(\color{blue}{\left(-0.5 + a\right)} \cdot b + \left(z - z \cdot \log t\right)\right) + x \]
      5. *-commutative99.0%

        \[\leadsto \left(\left(-0.5 + a\right) \cdot b + \left(z - \color{blue}{\log t \cdot z}\right)\right) + x \]
      6. *-un-lft-identity99.0%

        \[\leadsto \left(\left(-0.5 + a\right) \cdot b + \left(\color{blue}{1 \cdot z} - \log t \cdot z\right)\right) + x \]
      7. distribute-rgt-out--99.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+176}:\\ \;\;\;\;-0.5 \cdot b - z \cdot \left(\log t + -1\right)\\ \mathbf{elif}\;z \leq 1.92 \cdot 10^{+151}:\\ \;\;\;\;y + \left(b \cdot \left(a - 0.5\right) + \left(x + z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \left(1 - \log t\right)\\ \end{array} \]

Alternative 11: 83.1% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{+180} \lor \neg \left(z \leq 8.2 \cdot 10^{+154}\right):\\ \;\;\;\;z \cdot \left(1 - \log t\right)\\ \mathbf{else}:\\ \;\;\;\;y + \left(b \cdot \left(a - 0.5\right) + \left(x + z\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= z -2.05e+180) (not (<= z 8.2e+154)))
   (* z (- 1.0 (log t)))
   (+ y (+ (* b (- a 0.5)) (+ x z)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((z <= -2.05e+180) || !(z <= 8.2e+154)) {
		tmp = z * (1.0 - log(t));
	} else {
		tmp = y + ((b * (a - 0.5)) + (x + z));
	}
	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 <= (-2.05d+180)) .or. (.not. (z <= 8.2d+154))) then
        tmp = z * (1.0d0 - log(t))
    else
        tmp = y + ((b * (a - 0.5d0)) + (x + z))
    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 <= -2.05e+180) || !(z <= 8.2e+154)) {
		tmp = z * (1.0 - Math.log(t));
	} else {
		tmp = y + ((b * (a - 0.5)) + (x + z));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (z <= -2.05e+180) or not (z <= 8.2e+154):
		tmp = z * (1.0 - math.log(t))
	else:
		tmp = y + ((b * (a - 0.5)) + (x + z))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((z <= -2.05e+180) || !(z <= 8.2e+154))
		tmp = Float64(z * Float64(1.0 - log(t)));
	else
		tmp = Float64(y + Float64(Float64(b * Float64(a - 0.5)) + Float64(x + z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((z <= -2.05e+180) || ~((z <= 8.2e+154)))
		tmp = z * (1.0 - log(t));
	else
		tmp = y + ((b * (a - 0.5)) + (x + z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.05e+180], N[Not[LessEqual[z, 8.2e+154]], $MachinePrecision]], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.05 \cdot 10^{+180} \lor \neg \left(z \leq 8.2 \cdot 10^{+154}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\

\mathbf{else}:\\
\;\;\;\;y + \left(b \cdot \left(a - 0.5\right) + \left(x + z\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.05e180 or 8.2e154 < z

    1. Initial program 99.6%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. remove-double-neg99.6%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \color{blue}{\left(-\left(-\left(a - 0.5\right) \cdot b\right)\right)} \]
      2. distribute-rgt-neg-out99.6%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(-\color{blue}{\left(a - 0.5\right) \cdot \left(-b\right)}\right) \]
      3. associate--l+99.6%

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

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.6%

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

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

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

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

    if -2.05e180 < z < 8.2e154

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-99.9%

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

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
      3. associate-+l+99.9%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in99.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{+180} \lor \neg \left(z \leq 8.2 \cdot 10^{+154}\right):\\ \;\;\;\;z \cdot \left(1 - \log t\right)\\ \mathbf{else}:\\ \;\;\;\;y + \left(b \cdot \left(a - 0.5\right) + \left(x + z\right)\right)\\ \end{array} \]

Alternative 12: 70.0% accurate, 6.0× speedup?

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

\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{+87} \lor \neg \left(t_1 \leq 5 \cdot 10^{+50}\right):\\
\;\;\;\;y + t_1\\

\mathbf{else}:\\
\;\;\;\;z + \left(x + y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a 1/2) b) < -3.9999999999999998e87 or 5e50 < (*.f64 (-.f64 a 1/2) 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. Step-by-step derivation
      1. associate-+l-99.9%

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

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
      3. associate-+l+99.9%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in99.9%

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

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

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

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

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

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

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

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

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

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

    if -3.9999999999999998e87 < (*.f64 (-.f64 a 1/2) b) < 5e50

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. remove-double-neg99.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \color{blue}{\left(-\left(-\left(a - 0.5\right) \cdot b\right)\right)} \]
      2. distribute-rgt-neg-out99.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(-\color{blue}{\left(a - 0.5\right) \cdot \left(-b\right)}\right) \]
      3. associate--l+99.8%

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

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.8%

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

      \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + -0.5\right) \cdot b} \]
    4. Step-by-step derivation
      1. add-cube-cbrt99.4%

        \[\leadsto \left(\left(x + y\right) + \left(z - \color{blue}{\left(\sqrt[3]{z \cdot \log t} \cdot \sqrt[3]{z \cdot \log t}\right) \cdot \sqrt[3]{z \cdot \log t}}\right)\right) + \left(a + -0.5\right) \cdot b \]
      2. pow399.3%

        \[\leadsto \left(\left(x + y\right) + \left(z - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right)\right) + \left(a + -0.5\right) \cdot b \]
    5. Applied egg-rr99.3%

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

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

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

      \[\leadsto \color{blue}{y + \left(z + x\right)} \]
    9. Step-by-step derivation
      1. +-commutative65.3%

        \[\leadsto \color{blue}{\left(z + x\right) + y} \]
      2. associate-+r+65.3%

        \[\leadsto \color{blue}{z + \left(x + y\right)} \]
      3. +-commutative65.3%

        \[\leadsto z + \color{blue}{\left(y + x\right)} \]
    10. Simplified65.3%

      \[\leadsto \color{blue}{z + \left(y + x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot \left(a - 0.5\right) \leq -4 \cdot 10^{+87} \lor \neg \left(b \cdot \left(a - 0.5\right) \leq 5 \cdot 10^{+50}\right):\\ \;\;\;\;y + b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;z + \left(x + y\right)\\ \end{array} \]

Alternative 13: 65.3% accurate, 6.7× speedup?

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

\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+88} \lor \neg \left(t_1 \leq 5 \cdot 10^{+132}\right):\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;x + y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a 1/2) b) < -1.99999999999999992e88 or 5.0000000000000001e132 < (*.f64 (-.f64 a 1/2) 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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a + -0.5, b, \color{blue}{\left(x + y\right) + \left(z - z \cdot \log t\right)}\right) \]
      6. associate-+l+99.9%

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

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

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

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

    if -1.99999999999999992e88 < (*.f64 (-.f64 a 1/2) b) < 5.0000000000000001e132

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-99.8%

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

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
      3. associate-+l+99.8%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in99.8%

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

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

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

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

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

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

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

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

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

      \[\leadsto y + \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot \left(a - 0.5\right) \leq -2 \cdot 10^{+88} \lor \neg \left(b \cdot \left(a - 0.5\right) \leq 5 \cdot 10^{+132}\right):\\ \;\;\;\;b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 14: 66.0% accurate, 6.7× speedup?

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

\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{+87} \lor \neg \left(t_1 \leq 5 \cdot 10^{+132}\right):\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;z + \left(x + y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a 1/2) b) < -3.9999999999999998e87 or 5.0000000000000001e132 < (*.f64 (-.f64 a 1/2) 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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a + -0.5, b, \color{blue}{\left(x + y\right) + \left(z - z \cdot \log t\right)}\right) \]
      6. associate-+l+99.9%

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

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

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

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

    if -3.9999999999999998e87 < (*.f64 (-.f64 a 1/2) b) < 5.0000000000000001e132

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. remove-double-neg99.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \color{blue}{\left(-\left(-\left(a - 0.5\right) \cdot b\right)\right)} \]
      2. distribute-rgt-neg-out99.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(-\color{blue}{\left(a - 0.5\right) \cdot \left(-b\right)}\right) \]
      3. associate--l+99.8%

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

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.8%

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

      \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + -0.5\right) \cdot b} \]
    4. Step-by-step derivation
      1. add-cube-cbrt99.4%

        \[\leadsto \left(\left(x + y\right) + \left(z - \color{blue}{\left(\sqrt[3]{z \cdot \log t} \cdot \sqrt[3]{z \cdot \log t}\right) \cdot \sqrt[3]{z \cdot \log t}}\right)\right) + \left(a + -0.5\right) \cdot b \]
      2. pow399.4%

        \[\leadsto \left(\left(x + y\right) + \left(z - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right)\right) + \left(a + -0.5\right) \cdot b \]
    5. Applied egg-rr99.4%

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

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

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

      \[\leadsto \color{blue}{y + \left(z + x\right)} \]
    9. Step-by-step derivation
      1. +-commutative65.8%

        \[\leadsto \color{blue}{\left(z + x\right) + y} \]
      2. associate-+r+65.8%

        \[\leadsto \color{blue}{z + \left(x + y\right)} \]
      3. +-commutative65.8%

        \[\leadsto z + \color{blue}{\left(y + x\right)} \]
    10. Simplified65.8%

      \[\leadsto \color{blue}{z + \left(y + x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot \left(a - 0.5\right) \leq -4 \cdot 10^{+87} \lor \neg \left(b \cdot \left(a - 0.5\right) \leq 5 \cdot 10^{+132}\right):\\ \;\;\;\;b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;z + \left(x + y\right)\\ \end{array} \]

Alternative 15: 30.4% accurate, 10.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.75 \cdot 10^{-102}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-135}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;y \leq -7.9 \cdot 10^{-215}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+93}:\\ \;\;\;\;a \cdot b\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -1.75e-102)
   x
   (if (<= y -4.2e-135)
     (* a b)
     (if (<= y -7.9e-215) x (if (<= y 8e+93) (* a b) y)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -1.75e-102) {
		tmp = x;
	} else if (y <= -4.2e-135) {
		tmp = a * b;
	} else if (y <= -7.9e-215) {
		tmp = x;
	} else if (y <= 8e+93) {
		tmp = a * b;
	} 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 (y <= (-1.75d-102)) then
        tmp = x
    else if (y <= (-4.2d-135)) then
        tmp = a * b
    else if (y <= (-7.9d-215)) then
        tmp = x
    else if (y <= 8d+93) then
        tmp = a * b
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -1.75e-102) {
		tmp = x;
	} else if (y <= -4.2e-135) {
		tmp = a * b;
	} else if (y <= -7.9e-215) {
		tmp = x;
	} else if (y <= 8e+93) {
		tmp = a * b;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -1.75e-102:
		tmp = x
	elif y <= -4.2e-135:
		tmp = a * b
	elif y <= -7.9e-215:
		tmp = x
	elif y <= 8e+93:
		tmp = a * b
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -1.75e-102)
		tmp = x;
	elseif (y <= -4.2e-135)
		tmp = Float64(a * b);
	elseif (y <= -7.9e-215)
		tmp = x;
	elseif (y <= 8e+93)
		tmp = Float64(a * b);
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y <= -1.75e-102)
		tmp = x;
	elseif (y <= -4.2e-135)
		tmp = a * b;
	elseif (y <= -7.9e-215)
		tmp = x;
	elseif (y <= 8e+93)
		tmp = a * b;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.75e-102], x, If[LessEqual[y, -4.2e-135], N[(a * b), $MachinePrecision], If[LessEqual[y, -7.9e-215], x, If[LessEqual[y, 8e+93], N[(a * b), $MachinePrecision], y]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{-102}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq -4.2 \cdot 10^{-135}:\\
\;\;\;\;a \cdot b\\

\mathbf{elif}\;y \leq -7.9 \cdot 10^{-215}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 8 \cdot 10^{+93}:\\
\;\;\;\;a \cdot b\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.74999999999999993e-102 or -4.2e-135 < y < -7.8999999999999996e-215

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. remove-double-neg99.9%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \color{blue}{\left(-\left(-\left(a - 0.5\right) \cdot b\right)\right)} \]
      2. distribute-rgt-neg-out99.9%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(-\color{blue}{\left(a - 0.5\right) \cdot \left(-b\right)}\right) \]
      3. associate--l+99.9%

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

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.9%

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

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

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

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

    if -1.74999999999999993e-102 < y < -4.2e-135 or -7.8999999999999996e-215 < y < 8.00000000000000035e93

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative99.8%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a + -0.5, b, \color{blue}{\left(x + y\right) + \left(z - z \cdot \log t\right)}\right) \]
      6. associate-+l+99.8%

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

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

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

      \[\leadsto \color{blue}{a \cdot b} \]
    6. Step-by-step derivation
      1. *-commutative32.9%

        \[\leadsto \color{blue}{b \cdot a} \]
    7. Simplified32.9%

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

    if 8.00000000000000035e93 < 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. Step-by-step derivation
      1. associate-+l-99.9%

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

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
      3. associate-+l+99.9%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in99.9%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification32.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.75 \cdot 10^{-102}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-135}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;y \leq -7.9 \cdot 10^{-215}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+93}:\\ \;\;\;\;a \cdot b\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 16: 57.2% accurate, 10.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(a - 0.5\right)\\ \mathbf{if}\;x + y \leq -5 \cdot 10^{-64}:\\ \;\;\;\;x + t_1\\ \mathbf{else}:\\ \;\;\;\;y + t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (- a 0.5)))) (if (<= (+ x y) -5e-64) (+ x t_1) (+ y t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a - 0.5);
	double tmp;
	if ((x + y) <= -5e-64) {
		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 = b * (a - 0.5d0)
    if ((x + y) <= (-5d-64)) 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 = b * (a - 0.5);
	double tmp;
	if ((x + y) <= -5e-64) {
		tmp = x + t_1;
	} else {
		tmp = y + t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = b * (a - 0.5)
	tmp = 0
	if (x + y) <= -5e-64:
		tmp = x + t_1
	else:
		tmp = y + t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(a - 0.5))
	tmp = 0.0
	if (Float64(x + y) <= -5e-64)
		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 = b * (a - 0.5);
	tmp = 0.0;
	if ((x + y) <= -5e-64)
		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[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x + y), $MachinePrecision], -5e-64], N[(x + t$95$1), $MachinePrecision], N[(y + t$95$1), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;y + t_1\\


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

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a + -0.5, b, \color{blue}{\left(x + y\right) + \left(z - z \cdot \log t\right)}\right) \]
      6. associate-+l+99.9%

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

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

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

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

    if -5.00000000000000033e-64 < (+.f64 x y)

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-99.8%

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

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
      3. associate-+l+99.8%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in99.8%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + y \leq -5 \cdot 10^{-64}:\\ \;\;\;\;x + b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;y + b \cdot \left(a - 0.5\right)\\ \end{array} \]

Alternative 17: 79.3% accurate, 10.5× speedup?

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

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

    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
  2. Step-by-step derivation
    1. associate-+l-99.8%

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

      \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
    3. associate-+l+99.8%

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

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

      \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
    6. distribute-lft-neg-in99.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 78.6% accurate, 12.8× speedup?

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

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

    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
  2. Step-by-step derivation
    1. associate-+l-99.8%

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

      \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
    3. associate-+l+99.8%

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

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

      \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
    6. distribute-lft-neg-in99.8%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto b \cdot \left(a - 0.5\right) + \left(x + y\right) \]

Alternative 19: 51.3% accurate, 16.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -6.6 \cdot 10^{+63}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \leq 320:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= a -6.6e+63) (* a b) (if (<= a 320.0) (+ x y) (* a b))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -6.6e+63) {
		tmp = a * b;
	} else if (a <= 320.0) {
		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) :: tmp
    if (a <= (-6.6d+63)) then
        tmp = a * b
    else if (a <= 320.0d0) 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 tmp;
	if (a <= -6.6e+63) {
		tmp = a * b;
	} else if (a <= 320.0) {
		tmp = x + y;
	} else {
		tmp = a * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if a <= -6.6e+63:
		tmp = a * b
	elif a <= 320.0:
		tmp = x + y
	else:
		tmp = a * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= -6.6e+63)
		tmp = Float64(a * b);
	elseif (a <= 320.0)
		tmp = Float64(x + y);
	else
		tmp = Float64(a * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (a <= -6.6e+63)
		tmp = a * b;
	elseif (a <= 320.0)
		tmp = x + y;
	else
		tmp = a * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -6.6e+63], N[(a * b), $MachinePrecision], If[LessEqual[a, 320.0], N[(x + y), $MachinePrecision], N[(a * b), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.6 \cdot 10^{+63}:\\
\;\;\;\;a \cdot b\\

\mathbf{elif}\;a \leq 320:\\
\;\;\;\;x + y\\

\mathbf{else}:\\
\;\;\;\;a \cdot b\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.6000000000000003e63 or 320 < a

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative99.8%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a + -0.5, b, \color{blue}{\left(x + y\right) + \left(z - z \cdot \log t\right)}\right) \]
      6. associate-+l+99.8%

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

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

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

      \[\leadsto \color{blue}{a \cdot b} \]
    6. Step-by-step derivation
      1. *-commutative55.5%

        \[\leadsto \color{blue}{b \cdot a} \]
    7. Simplified55.5%

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

    if -6.6000000000000003e63 < a < 320

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-99.8%

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

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
      3. associate-+l+99.8%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in99.8%

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

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

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

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

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

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

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

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

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

      \[\leadsto y + \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification57.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.6 \cdot 10^{+63}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \leq 320:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]

Alternative 20: 27.3% accurate, 37.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.15 \cdot 10^{-69}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a b) :precision binary64 (if (<= x -1.15e-69) x y))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -1.15e-69) {
		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 (x <= (-1.15d-69)) then
        tmp = x
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -1.15e-69) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if x <= -1.15e-69:
		tmp = x
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (x <= -1.15e-69)
		tmp = x;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (x <= -1.15e-69)
		tmp = x;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.15e-69], x, y]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{-69}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.15e-69

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. remove-double-neg99.9%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \color{blue}{\left(-\left(-\left(a - 0.5\right) \cdot b\right)\right)} \]
      2. distribute-rgt-neg-out99.9%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(-\color{blue}{\left(a - 0.5\right) \cdot \left(-b\right)}\right) \]
      3. associate--l+99.9%

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

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.9%

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

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

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

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

    if -1.15e-69 < x

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-99.8%

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

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + z\right) - \left(z \cdot \log t - \left(a - 0.5\right) \cdot b\right) \]
      3. associate-+l+99.8%

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in99.8%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification27.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.15 \cdot 10^{-69}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 21: 22.3% accurate, 115.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.8%

    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
  2. Step-by-step derivation
    1. remove-double-neg99.8%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \color{blue}{\left(-\left(-\left(a - 0.5\right) \cdot b\right)\right)} \]
    2. distribute-rgt-neg-out99.8%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(-\color{blue}{\left(a - 0.5\right) \cdot \left(-b\right)}\right) \]
    3. associate--l+99.8%

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

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

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

      \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
    7. remove-double-neg99.8%

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification23.6%

    \[\leadsto x \]

Developer target: 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 2023279 
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
  :precision binary64

  :herbie-target
  (+ (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b))

  (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))