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

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

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

Initial Program: 99.9% accurate, 1.0× speedup?

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

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

Alternative 1: 99.9% accurate, 0.5× speedup?

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

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

    \[\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.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 84.1% accurate, 1.0× speedup?

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

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

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


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

    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(\left(\left(y + x\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b} \]
      4. associate-+l+99.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(x + \left(y + z\right)\right)} + \left(a + -0.5\right) \cdot b \]
    7. Step-by-step derivation
      1. +-commutative88.1%

        \[\leadsto \color{blue}{\left(\left(y + z\right) + x\right)} + \left(a + -0.5\right) \cdot b \]
      2. associate-+r+88.1%

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

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

    if -4.99999999999999978e110 < (+.f64 x y)

    1. Initial program 99.3%

      \[\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.3%

        \[\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.3%

        \[\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.3%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(y + z\right) - z \cdot \log t\right)} + \left(a + -0.5\right) \cdot b \]
    5. Step-by-step derivation
      1. +-commutative81.9%

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

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

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

Alternative 3: 99.9% accurate, 1.0× speedup?

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

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

    \[\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.4%

      \[\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.4%

      \[\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.4%

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

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

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

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

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

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

Alternative 4: 84.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(1 - \log t\right)\\ \mathbf{if}\;z \leq -2.25 \cdot 10^{+249}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{+193}:\\ \;\;\;\;x + \left(y + b \cdot \left(a - 0.5\right)\right)\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{+180} \lor \neg \left(z \leq 9 \cdot 10^{+187}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(y + \left(z + x\right)\right) + \left(a + -0.5\right) \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* z (- 1.0 (log t)))))
   (if (<= z -2.25e+249)
     t_1
     (if (<= z -6.5e+193)
       (+ x (+ y (* b (- a 0.5))))
       (if (or (<= z -3.7e+180) (not (<= z 9e+187)))
         t_1
         (+ (+ y (+ z x)) (* (+ a -0.5) b)))))))
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.25e+249) {
		tmp = t_1;
	} else if (z <= -6.5e+193) {
		tmp = x + (y + (b * (a - 0.5)));
	} else if ((z <= -3.7e+180) || !(z <= 9e+187)) {
		tmp = t_1;
	} else {
		tmp = (y + (z + x)) + ((a + -0.5) * b);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = z * (1.0d0 - log(t))
    if (z <= (-2.25d+249)) then
        tmp = t_1
    else if (z <= (-6.5d+193)) then
        tmp = x + (y + (b * (a - 0.5d0)))
    else if ((z <= (-3.7d+180)) .or. (.not. (z <= 9d+187))) then
        tmp = t_1
    else
        tmp = (y + (z + x)) + ((a + (-0.5d0)) * b)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (1.0 - Math.log(t));
	double tmp;
	if (z <= -2.25e+249) {
		tmp = t_1;
	} else if (z <= -6.5e+193) {
		tmp = x + (y + (b * (a - 0.5)));
	} else if ((z <= -3.7e+180) || !(z <= 9e+187)) {
		tmp = t_1;
	} else {
		tmp = (y + (z + x)) + ((a + -0.5) * b);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z * (1.0 - math.log(t))
	tmp = 0
	if z <= -2.25e+249:
		tmp = t_1
	elif z <= -6.5e+193:
		tmp = x + (y + (b * (a - 0.5)))
	elif (z <= -3.7e+180) or not (z <= 9e+187):
		tmp = t_1
	else:
		tmp = (y + (z + x)) + ((a + -0.5) * b)
	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.25e+249)
		tmp = t_1;
	elseif (z <= -6.5e+193)
		tmp = Float64(x + Float64(y + Float64(b * Float64(a - 0.5))));
	elseif ((z <= -3.7e+180) || !(z <= 9e+187))
		tmp = t_1;
	else
		tmp = Float64(Float64(y + Float64(z + x)) + Float64(Float64(a + -0.5) * b));
	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.25e+249)
		tmp = t_1;
	elseif (z <= -6.5e+193)
		tmp = x + (y + (b * (a - 0.5)));
	elseif ((z <= -3.7e+180) || ~((z <= 9e+187)))
		tmp = t_1;
	else
		tmp = (y + (z + x)) + ((a + -0.5) * b);
	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.25e+249], t$95$1, If[LessEqual[z, -6.5e+193], N[(x + N[(y + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -3.7e+180], N[Not[LessEqual[z, 9e+187]], $MachinePrecision]], t$95$1, N[(N[(y + N[(z + x), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -3.7 \cdot 10^{+180} \lor \neg \left(z \leq 9 \cdot 10^{+187}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.2499999999999998e249 or -6.4999999999999997e193 < z < -3.7000000000000002e180 or 9.00000000000000052e187 < z

    1. Initial program 97.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-97.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. +-commutative97.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-97.5%

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

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

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

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

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

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

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

    if -2.2499999999999998e249 < z < -6.4999999999999997e193

    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. associate--l+99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.7000000000000002e180 < z < 9.00000000000000052e187

    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(\left(\left(y + x\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b} \]
      4. associate-+l+99.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(y + z\right) + x\right)} + \left(a + -0.5\right) \cdot b \]
      2. associate-+r+92.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{+249}:\\ \;\;\;\;z \cdot \left(1 - \log t\right)\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{+193}:\\ \;\;\;\;x + \left(y + b \cdot \left(a - 0.5\right)\right)\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{+180} \lor \neg \left(z \leq 9 \cdot 10^{+187}\right):\\ \;\;\;\;z \cdot \left(1 - \log t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y + \left(z + x\right)\right) + \left(a + -0.5\right) \cdot b\\ \end{array} \]

Alternative 5: 84.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+248}:\\
\;\;\;\;z - z \cdot \log t\\

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

\mathbf{elif}\;z \leq -3.7 \cdot 10^{+180} \lor \neg \left(z \leq 6.5 \cdot 10^{+186}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.80000000000000001e248

    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(\left(\left(y + x\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b} \]
      4. associate-+l+99.6%

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

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

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

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

      \[\leadsto \color{blue}{z \cdot \left(1 + -1 \cdot \log t\right)} \]
    5. Step-by-step derivation
      1. distribute-rgt-in74.8%

        \[\leadsto \color{blue}{1 \cdot z + \left(-1 \cdot \log t\right) \cdot z} \]
      2. *-un-lft-identity74.8%

        \[\leadsto \color{blue}{z} + \left(-1 \cdot \log t\right) \cdot z \]
      3. mul-1-neg74.8%

        \[\leadsto z + \color{blue}{\left(-\log t\right)} \cdot z \]
    6. Applied egg-rr74.8%

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

    if -1.80000000000000001e248 < z < -8.30000000000000005e201

    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. associate--l+99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.30000000000000005e201 < z < -3.7000000000000002e180 or 6.4999999999999997e186 < z

    1. Initial program 96.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-96.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. +-commutative96.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-96.5%

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

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

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

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

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

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

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

    if -3.7000000000000002e180 < z < 6.4999999999999997e186

    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(\left(\left(y + x\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b} \]
      4. associate-+l+99.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(y + z\right) + x\right)} + \left(a + -0.5\right) \cdot b \]
      2. associate-+r+92.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+248}:\\ \;\;\;\;z - z \cdot \log t\\ \mathbf{elif}\;z \leq -8.3 \cdot 10^{+201}:\\ \;\;\;\;x + \left(y + b \cdot \left(a - 0.5\right)\right)\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{+180} \lor \neg \left(z \leq 6.5 \cdot 10^{+186}\right):\\ \;\;\;\;z \cdot \left(1 - \log t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y + \left(z + x\right)\right) + \left(a + -0.5\right) \cdot b\\ \end{array} \]

Alternative 6: 88.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{+117} \lor \neg \left(z \leq 3.6 \cdot 10^{+186}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right) + \left(x + y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.40000000000000028e117 or 3.6000000000000002e186 < z

    1. Initial program 98.2%

      \[\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. +-commutative98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.40000000000000028e117 < z < 3.6000000000000002e186

    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(\left(\left(y + x\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b} \]
      4. associate-+l+100.0%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(y + z\right) + x\right)} + \left(a + -0.5\right) \cdot b \]
      2. associate-+r+94.9%

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

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

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

Alternative 7: 88.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.35 \cdot 10^{+117}:\\
\;\;\;\;\left(x + \left(z + y\right)\right) - z \cdot \log t\\

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

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


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

    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(\left(\left(y + x\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b} \]
      4. associate-+l+99.6%

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

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

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

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

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

    if -2.35000000000000003e117 < z < 3.30000000000000023e186

    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(\left(\left(y + x\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b} \]
      4. associate-+l+100.0%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(y + z\right) + x\right)} + \left(a + -0.5\right) \cdot b \]
      2. associate-+r+94.9%

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

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

    if 3.30000000000000023e186 < z

    1. Initial program 95.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. +-commutative95.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. associate--l+95.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 88.7% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq 4.5 \cdot 10^{+186}:\\
\;\;\;\;\left(y + \left(z + x\right)\right) + t_1\\

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


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

    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. 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(\left(\left(y + x\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b} \]
      4. associate-+l+99.7%

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(y + z\right) - z \cdot \log t\right)} + \left(a + -0.5\right) \cdot b \]
    5. Step-by-step derivation
      1. +-commutative93.6%

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

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

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

    if -1.44999999999999992e171 < z < 4.50000000000000045e186

    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(\left(\left(y + x\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b} \]
      4. associate-+l+99.9%

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

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

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

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

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

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

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

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

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

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

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

    if 4.50000000000000045e186 < z

    1. Initial program 95.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. +-commutative95.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. associate--l+95.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 86.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{+145} \lor \neg \left(z \leq 5.6 \cdot 10^{+187}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right) + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.8999999999999998e145 or 5.59999999999999979e187 < z

    1. Initial program 98.1%

      \[\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. +-commutative98.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.8999999999999998e145 < z < 5.59999999999999979e187

    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(\left(\left(y + x\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b} \]
      4. associate-+l+99.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(x + \left(y + z\right)\right)} + \left(a + -0.5\right) \cdot b \]
    7. Step-by-step derivation
      1. +-commutative94.1%

        \[\leadsto \color{blue}{\left(\left(y + z\right) + x\right)} + \left(a + -0.5\right) \cdot b \]
      2. associate-+r+94.1%

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

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

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

Alternative 10: 86.4% accurate, 1.0× speedup?

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

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

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

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


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

    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. associate--l+99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.8999999999999998e145 < z < 1.55000000000000006e187

    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(\left(\left(y + x\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b} \]
      4. associate-+l+99.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(x + \left(y + z\right)\right)} + \left(a + -0.5\right) \cdot b \]
    7. Step-by-step derivation
      1. +-commutative94.1%

        \[\leadsto \color{blue}{\left(\left(y + z\right) + x\right)} + \left(a + -0.5\right) \cdot b \]
      2. associate-+r+94.1%

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

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

    if 1.55000000000000006e187 < z

    1. Initial program 95.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-95.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. +-commutative95.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-95.9%

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

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

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

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

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

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

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

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

      \[\leadsto \left(x + \left(y + z\right)\right) - \color{blue}{{\left(\sqrt{z \cdot \log t}\right)}^{2}} \]
    7. Taylor expanded in y around 0 66.8%

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

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

Alternative 11: 86.3% accurate, 1.0× speedup?

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

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

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

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


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

    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. 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(\left(\left(y + x\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b} \]
      4. associate-+l+99.7%

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

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

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

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

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

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

    if -5.00000000000000012e143 < z < 2.49999999999999977e186

    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(\left(\left(y + x\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b} \]
      4. associate-+l+99.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(x + \left(y + z\right)\right)} + \left(a + -0.5\right) \cdot b \]
    7. Step-by-step derivation
      1. +-commutative94.1%

        \[\leadsto \color{blue}{\left(\left(y + z\right) + x\right)} + \left(a + -0.5\right) \cdot b \]
      2. associate-+r+94.1%

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

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

    if 2.49999999999999977e186 < z

    1. Initial program 95.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-95.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. +-commutative95.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-95.9%

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

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

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

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

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

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

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

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

      \[\leadsto \left(x + \left(y + z\right)\right) - \color{blue}{{\left(\sqrt{z \cdot \log t}\right)}^{2}} \]
    7. Taylor expanded in y around 0 66.8%

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

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

Alternative 12: 61.5% accurate, 8.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -2.8 \cdot 10^{+190} \lor \neg \left(b \leq -9.8 \cdot 10^{+148} \lor \neg \left(b \leq -5.7 \cdot 10^{+79}\right) \land b \leq 1.4 \cdot 10^{+111}\right):\\ \;\;\;\;b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;y + \left(z + x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= b -2.8e+190)
         (not
          (or (<= b -9.8e+148) (and (not (<= b -5.7e+79)) (<= b 1.4e+111)))))
   (* b (- a 0.5))
   (+ y (+ z x))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((b <= -2.8e+190) || !((b <= -9.8e+148) || (!(b <= -5.7e+79) && (b <= 1.4e+111)))) {
		tmp = b * (a - 0.5);
	} else {
		tmp = y + (z + x);
	}
	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 ((b <= (-2.8d+190)) .or. (.not. (b <= (-9.8d+148)) .or. (.not. (b <= (-5.7d+79))) .and. (b <= 1.4d+111))) then
        tmp = b * (a - 0.5d0)
    else
        tmp = y + (z + x)
    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 ((b <= -2.8e+190) || !((b <= -9.8e+148) || (!(b <= -5.7e+79) && (b <= 1.4e+111)))) {
		tmp = b * (a - 0.5);
	} else {
		tmp = y + (z + x);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (b <= -2.8e+190) or not ((b <= -9.8e+148) or (not (b <= -5.7e+79) and (b <= 1.4e+111))):
		tmp = b * (a - 0.5)
	else:
		tmp = y + (z + x)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((b <= -2.8e+190) || !((b <= -9.8e+148) || (!(b <= -5.7e+79) && (b <= 1.4e+111))))
		tmp = Float64(b * Float64(a - 0.5));
	else
		tmp = Float64(y + Float64(z + x));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((b <= -2.8e+190) || ~(((b <= -9.8e+148) || (~((b <= -5.7e+79)) && (b <= 1.4e+111)))))
		tmp = b * (a - 0.5);
	else
		tmp = y + (z + x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.8e+190], N[Not[Or[LessEqual[b, -9.8e+148], And[N[Not[LessEqual[b, -5.7e+79]], $MachinePrecision], LessEqual[b, 1.4e+111]]]], $MachinePrecision]], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(y + N[(z + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.8 \cdot 10^{+190} \lor \neg \left(b \leq -9.8 \cdot 10^{+148} \lor \neg \left(b \leq -5.7 \cdot 10^{+79}\right) \land b \leq 1.4 \cdot 10^{+111}\right):\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.79999999999999997e190 or -9.8e148 < b < -5.6999999999999997e79 or 1.4e111 < b

    1. Initial program 98.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. +-commutative98.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. associate--l+98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.79999999999999997e190 < b < -9.8e148 or -5.6999999999999997e79 < b < 1.4e111

    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(\left(\left(y + x\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b} \]
      4. associate-+l+99.8%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(y + z\right) + x\right)} + \left(a + -0.5\right) \cdot b \]
      2. associate-+r+74.2%

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

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

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

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

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

        \[\leadsto y + \color{blue}{\left(x + z\right)} \]
    11. Simplified59.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.8 \cdot 10^{+190} \lor \neg \left(b \leq -9.8 \cdot 10^{+148} \lor \neg \left(b \leq -5.7 \cdot 10^{+79}\right) \land b \leq 1.4 \cdot 10^{+111}\right):\\ \;\;\;\;b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;y + \left(z + x\right)\\ \end{array} \]

Alternative 13: 29.0% accurate, 10.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{+88}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq -2050000:\\
\;\;\;\;a \cdot b\\

\mathbf{elif}\;x \leq -5.8 \cdot 10^{-28}:\\
\;\;\;\;-0.5 \cdot b\\

\mathbf{elif}\;x \leq 1.95 \cdot 10^{-181}:\\
\;\;\;\;a \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.49999999999999999e88

    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. associate--l+99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.49999999999999999e88 < x < -2.05e6 or -5.80000000000000026e-28 < x < 1.95e-181

    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. associate--l+99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{b \cdot a} \]
    6. Simplified30.8%

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

    if -2.05e6 < x < -5.80000000000000026e-28

    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. +-commutative100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.5 \cdot b} \]

    if 1.95e-181 < x

    1. Initial program 99.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. +-commutative99.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.5 \cdot 10^{+88}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -2050000:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;x \leq -5.8 \cdot 10^{-28}:\\ \;\;\;\;-0.5 \cdot b\\ \mathbf{elif}\;x \leq 1.95 \cdot 10^{-181}:\\ \;\;\;\;a \cdot b\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 14: 29.1% accurate, 10.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.12 \cdot 10^{+89}:\\
\;\;\;\;z + x\\

\mathbf{elif}\;x \leq -80000:\\
\;\;\;\;a \cdot b\\

\mathbf{elif}\;x \leq -2.2 \cdot 10^{-27}:\\
\;\;\;\;-0.5 \cdot b\\

\mathbf{elif}\;x \leq 2.4 \cdot 10^{-182}:\\
\;\;\;\;a \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.11999999999999995e89

    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(\left(\left(y + x\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b} \]
      4. associate-+l+99.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(x + \left(y + z\right)\right)} + \left(a + -0.5\right) \cdot b \]
    7. Step-by-step derivation
      1. +-commutative79.7%

        \[\leadsto \color{blue}{\left(\left(y + z\right) + x\right)} + \left(a + -0.5\right) \cdot b \]
      2. associate-+r+79.7%

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

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

      \[\leadsto \color{blue}{x + \left(z + b \cdot \left(a - 0.5\right)\right)} \]
    10. Step-by-step derivation
      1. associate-+r+69.3%

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

        \[\leadsto \left(x + z\right) + b \cdot \color{blue}{\left(a + \left(-0.5\right)\right)} \]
      3. metadata-eval69.3%

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

        \[\leadsto \left(x + z\right) + b \cdot \color{blue}{\left(-0.5 + a\right)} \]
    11. Simplified69.3%

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

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

    if -1.11999999999999995e89 < x < -8e4 or -2.19999999999999987e-27 < x < 2.3999999999999998e-182

    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. associate--l+99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{b \cdot a} \]
    6. Simplified30.8%

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

    if -8e4 < x < -2.19999999999999987e-27

    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. +-commutative100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.5 \cdot b} \]

    if 2.3999999999999998e-182 < x

    1. Initial program 99.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. +-commutative99.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.12 \cdot 10^{+89}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;x \leq -80000:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;x \leq -2.2 \cdot 10^{-27}:\\ \;\;\;\;-0.5 \cdot b\\ \mathbf{elif}\;x \leq 2.4 \cdot 10^{-182}:\\ \;\;\;\;a \cdot b\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 15: 79.3% accurate, 10.5× speedup?

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

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

    \[\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.4%

      \[\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.4%

      \[\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.4%

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

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

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

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

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

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

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

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

Alternative 16: 80.1% accurate, 10.5× speedup?

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

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

    \[\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.4%

      \[\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.4%

      \[\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.4%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(y + z\right) + x\right)} + \left(a + -0.5\right) \cdot b \]
    2. associate-+r+78.9%

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

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

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

Alternative 17: 39.6% accurate, 12.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{+136}:\\
\;\;\;\;z + x\\

\mathbf{elif}\;x \leq 3.5 \cdot 10^{+77}:\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.49999999999999989e136

    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(\left(\left(y + x\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b} \]
      4. associate-+l+99.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(y + z\right) + x\right)} + \left(a + -0.5\right) \cdot b \]
      2. associate-+r+79.3%

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

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

      \[\leadsto \color{blue}{x + \left(z + b \cdot \left(a - 0.5\right)\right)} \]
    10. Step-by-step derivation
      1. associate-+r+73.2%

        \[\leadsto \color{blue}{\left(x + z\right) + b \cdot \left(a - 0.5\right)} \]
      2. sub-neg73.2%

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

        \[\leadsto \left(x + z\right) + b \cdot \left(a + \color{blue}{-0.5}\right) \]
      4. +-commutative73.2%

        \[\leadsto \left(x + z\right) + b \cdot \color{blue}{\left(-0.5 + a\right)} \]
    11. Simplified73.2%

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

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

    if -1.49999999999999989e136 < x < 3.5000000000000001e77

    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. associate--l+99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.5000000000000001e77 < x

    1. Initial program 98.1%

      \[\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. +-commutative98.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.5 \cdot 10^{+136}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{+77}:\\ \;\;\;\;b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 18: 63.2% accurate, 12.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 1.14999999999999997e162

    1. Initial program 99.4%

      \[\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.4%

        \[\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.4%

        \[\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.4%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(x + \left(y + z\right)\right)} + \left(a + -0.5\right) \cdot b \]
    7. Step-by-step derivation
      1. +-commutative77.7%

        \[\leadsto \color{blue}{\left(\left(y + z\right) + x\right)} + \left(a + -0.5\right) \cdot b \]
      2. associate-+r+77.7%

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

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

      \[\leadsto \color{blue}{x + \left(z + b \cdot \left(a - 0.5\right)\right)} \]
    10. Step-by-step derivation
      1. associate-+r+63.4%

        \[\leadsto \color{blue}{\left(x + z\right) + b \cdot \left(a - 0.5\right)} \]
      2. sub-neg63.4%

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

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

        \[\leadsto \left(x + z\right) + b \cdot \color{blue}{\left(-0.5 + a\right)} \]
    11. Simplified63.4%

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

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

    if 1.14999999999999997e162 < 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(\left(\left(y + x\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b} \]
      4. associate-+l+99.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(y + z\right) + x\right)} + \left(a + -0.5\right) \cdot b \]
      2. associate-+r+86.6%

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

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

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

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

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

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

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

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

Alternative 19: 64.5% accurate, 12.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(a - 0.5\right)\\ \mathbf{if}\;x \leq -29000000:\\ \;\;\;\;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 -29000000.0) (+ 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 <= -29000000.0) {
		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 <= (-29000000.0d0)) 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 <= -29000000.0) {
		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 <= -29000000.0:
		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 (x <= -29000000.0)
		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 <= -29000000.0)
		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[x, -29000000.0], 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 \leq -29000000:\\
\;\;\;\;x + t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.9e7

    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(\left(\left(y + x\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b} \]
      4. associate-+l+99.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(y + z\right) + x\right)} + \left(a + -0.5\right) \cdot b \]
      2. associate-+r+78.9%

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

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

      \[\leadsto \color{blue}{x + \left(z + b \cdot \left(a - 0.5\right)\right)} \]
    10. Step-by-step derivation
      1. associate-+r+64.0%

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

        \[\leadsto \left(x + z\right) + b \cdot \color{blue}{\left(a + \left(-0.5\right)\right)} \]
      3. metadata-eval64.0%

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

        \[\leadsto \left(x + z\right) + b \cdot \color{blue}{\left(-0.5 + a\right)} \]
    11. Simplified64.0%

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

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

    if -2.9e7 < x

    1. Initial program 99.3%

      \[\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.3%

        \[\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.3%

        \[\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.3%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(y + z\right) - z \cdot \log t\right)} + \left(a + -0.5\right) \cdot b \]
    5. Step-by-step derivation
      1. +-commutative85.2%

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

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

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

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

Alternative 20: 79.3% accurate, 12.8× speedup?

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

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

    \[\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.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 21: 27.1% accurate, 16.1× speedup?

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

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

\mathbf{elif}\;y \leq 4.8 \cdot 10^{+155}:\\
\;\;\;\;-0.5 \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 2.8499999999999998e-27

    1. Initial program 99.3%

      \[\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.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.8499999999999998e-27 < y < 4.80000000000000042e155

    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. associate--l+99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.5 \cdot b} \]

    if 4.80000000000000042e155 < 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. +-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. associate--l+99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 2.85 \cdot 10^{-27}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{+155}:\\ \;\;\;\;-0.5 \cdot b\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 22: 28.3% accurate, 37.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.4 \cdot 10^{+17}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 3.4e17

    1. Initial program 99.3%

      \[\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.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.4e17 < 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. +-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. associate--l+99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 3.4 \cdot 10^{+17}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 23: 22.1% 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.4%

    \[\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.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification21.3%

    \[\leadsto x \]

Developer target: 99.6% accurate, 0.4× speedup?

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

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

Reproduce

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