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

Percentage Accurate: 99.8% → 99.9%
Time: 12.4s
Alternatives: 15
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 15 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.9% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.1% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a 1/2) b) < -9.99999999999999981e149 or 4.99999999999999972e118 < (*.f64 (-.f64 a 1/2) b)

    1. Initial program 99.9%

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

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

    if -9.99999999999999981e149 < (*.f64 (-.f64 a 1/2) b) < 4.99999999999999972e118

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 83.6% accurate, 1.0× speedup?

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

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

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


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

    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. Taylor expanded in z around 0 91.4%

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

    if -4.99999999999999974e123 < (+.f64 x y)

    1. Initial program 99.8%

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

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

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

Alternative 4: 78.8% accurate, 1.0× speedup?

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

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

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


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

    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. Taylor expanded in y around 0 79.3%

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

    if -4.99999999999999966e-103 < (+.f64 x y)

    1. Initial program 99.8%

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

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

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

Alternative 5: 99.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 6: 85.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+233} \lor \neg \left(z \leq 1.55 \cdot 10^{+156}\right):\\
\;\;\;\;x + z \cdot \left(1 - \log t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.6500000000000001e233 or 1.5500000000000001e156 < z

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.6500000000000001e233 < z < 1.5500000000000001e156

    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. Taylor expanded in z around 0 86.9%

      \[\leadsto \color{blue}{\left(y + x\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}\;z \leq -1.65 \cdot 10^{+233} \lor \neg \left(z \leq 1.55 \cdot 10^{+156}\right):\\ \;\;\;\;x + z \cdot \left(1 - \log t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\ \end{array} \]

Alternative 7: 84.4% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+232} \lor \neg \left(z \leq 7.5 \cdot 10^{+199}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.7999999999999996e232 or 7.49999999999999977e199 < z

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.7999999999999996e232 < z < 7.49999999999999977e199

    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. Taylor expanded in z around 0 84.6%

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

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

Alternative 8: 68.3% accurate, 6.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a 1/2) b) < -4.0000000000000001e137 or 2.00000000000000011e32 < (*.f64 (-.f64 a 1/2) b)

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.0000000000000001e137 < (*.f64 (-.f64 a 1/2) b) < 2.00000000000000011e32

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 65.3% accurate, 6.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a 1/2) b) < -4.0000000000000001e137 or 4.00000000000000013e139 < (*.f64 (-.f64 a 1/2) b)

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.0000000000000001e137 < (*.f64 (-.f64 a 1/2) b) < 4.00000000000000013e139

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 35.7% accurate, 10.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.8 \cdot 10^{+114}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{-144}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-87}:\\ \;\;\;\;-0.5 \cdot b\\ \mathbf{elif}\;a \leq 6.1 \cdot 10^{+75}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= a -2.8e+114)
   (* a b)
   (if (<= a -9.2e-144)
     y
     (if (<= a 3e-87) (* -0.5 b) (if (<= a 6.1e+75) y (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -2.8e+114) {
		tmp = a * b;
	} else if (a <= -9.2e-144) {
		tmp = y;
	} else if (a <= 3e-87) {
		tmp = -0.5 * b;
	} else if (a <= 6.1e+75) {
		tmp = y;
	} else {
		tmp = a * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (a <= (-2.8d+114)) then
        tmp = a * b
    else if (a <= (-9.2d-144)) then
        tmp = y
    else if (a <= 3d-87) then
        tmp = (-0.5d0) * b
    else if (a <= 6.1d+75) then
        tmp = y
    else
        tmp = a * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -2.8e+114) {
		tmp = a * b;
	} else if (a <= -9.2e-144) {
		tmp = y;
	} else if (a <= 3e-87) {
		tmp = -0.5 * b;
	} else if (a <= 6.1e+75) {
		tmp = y;
	} else {
		tmp = a * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if a <= -2.8e+114:
		tmp = a * b
	elif a <= -9.2e-144:
		tmp = y
	elif a <= 3e-87:
		tmp = -0.5 * b
	elif a <= 6.1e+75:
		tmp = y
	else:
		tmp = a * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= -2.8e+114)
		tmp = Float64(a * b);
	elseif (a <= -9.2e-144)
		tmp = y;
	elseif (a <= 3e-87)
		tmp = Float64(-0.5 * b);
	elseif (a <= 6.1e+75)
		tmp = y;
	else
		tmp = Float64(a * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (a <= -2.8e+114)
		tmp = a * b;
	elseif (a <= -9.2e-144)
		tmp = y;
	elseif (a <= 3e-87)
		tmp = -0.5 * b;
	elseif (a <= 6.1e+75)
		tmp = y;
	else
		tmp = a * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -2.8e+114], N[(a * b), $MachinePrecision], If[LessEqual[a, -9.2e-144], y, If[LessEqual[a, 3e-87], N[(-0.5 * b), $MachinePrecision], If[LessEqual[a, 6.1e+75], y, N[(a * b), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -9.2 \cdot 10^{-144}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq 3 \cdot 10^{-87}:\\
\;\;\;\;-0.5 \cdot b\\

\mathbf{elif}\;a \leq 6.1 \cdot 10^{+75}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.8e114 or 6.10000000000000009e75 < a

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.8e114 < a < -9.2e-144 or 3.00000000000000016e-87 < a < 6.10000000000000009e75

    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. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.2e-144 < a < 3.00000000000000016e-87

    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. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(\mathsf{fma}\left(-1, \log t, 1\right), z, x\right)}\right)}^{3}} + \mathsf{fma}\left(a + -0.5, b, y\right) \]
    5. Applied egg-rr98.9%

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

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

      \[\leadsto \color{blue}{-0.5 \cdot b} \]
    8. Step-by-step derivation
      1. *-commutative34.6%

        \[\leadsto \color{blue}{b \cdot -0.5} \]
    9. Simplified34.6%

      \[\leadsto \color{blue}{b \cdot -0.5} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification41.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.8 \cdot 10^{+114}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{-144}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-87}:\\ \;\;\;\;-0.5 \cdot b\\ \mathbf{elif}\;a \leq 6.1 \cdot 10^{+75}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]

Alternative 11: 49.7% accurate, 10.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -4.7 \cdot 10^{+114}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-212}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-283}:\\ \;\;\;\;-0.5 \cdot b\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{+76}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= a -4.7e+114)
   (* a b)
   (if (<= a -2.6e-212)
     (+ x y)
     (if (<= a -2.7e-283) (* -0.5 b) (if (<= a 1.05e+76) (+ x y) (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -4.7e+114) {
		tmp = a * b;
	} else if (a <= -2.6e-212) {
		tmp = x + y;
	} else if (a <= -2.7e-283) {
		tmp = -0.5 * b;
	} else if (a <= 1.05e+76) {
		tmp = x + y;
	} else {
		tmp = a * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (a <= (-4.7d+114)) then
        tmp = a * b
    else if (a <= (-2.6d-212)) then
        tmp = x + y
    else if (a <= (-2.7d-283)) then
        tmp = (-0.5d0) * b
    else if (a <= 1.05d+76) then
        tmp = x + y
    else
        tmp = a * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -4.7e+114) {
		tmp = a * b;
	} else if (a <= -2.6e-212) {
		tmp = x + y;
	} else if (a <= -2.7e-283) {
		tmp = -0.5 * b;
	} else if (a <= 1.05e+76) {
		tmp = x + y;
	} else {
		tmp = a * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if a <= -4.7e+114:
		tmp = a * b
	elif a <= -2.6e-212:
		tmp = x + y
	elif a <= -2.7e-283:
		tmp = -0.5 * b
	elif a <= 1.05e+76:
		tmp = x + y
	else:
		tmp = a * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= -4.7e+114)
		tmp = Float64(a * b);
	elseif (a <= -2.6e-212)
		tmp = Float64(x + y);
	elseif (a <= -2.7e-283)
		tmp = Float64(-0.5 * b);
	elseif (a <= 1.05e+76)
		tmp = Float64(x + y);
	else
		tmp = Float64(a * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (a <= -4.7e+114)
		tmp = a * b;
	elseif (a <= -2.6e-212)
		tmp = x + y;
	elseif (a <= -2.7e-283)
		tmp = -0.5 * b;
	elseif (a <= 1.05e+76)
		tmp = x + y;
	else
		tmp = a * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -4.7e+114], N[(a * b), $MachinePrecision], If[LessEqual[a, -2.6e-212], N[(x + y), $MachinePrecision], If[LessEqual[a, -2.7e-283], N[(-0.5 * b), $MachinePrecision], If[LessEqual[a, 1.05e+76], N[(x + y), $MachinePrecision], N[(a * b), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2.6 \cdot 10^{-212}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;a \leq -2.7 \cdot 10^{-283}:\\
\;\;\;\;-0.5 \cdot b\\

\mathbf{elif}\;a \leq 1.05 \cdot 10^{+76}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.7000000000000001e114 or 1.05000000000000003e76 < a

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.7000000000000001e114 < a < -2.6e-212 or -2.7e-283 < a < 1.05000000000000003e76

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6e-212 < a < -2.7e-283

    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. +-commutative99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(\mathsf{fma}\left(-1, \log t, 1\right), z, x\right)}\right)}^{3}} + \mathsf{fma}\left(a + -0.5, b, y\right) \]
    5. Applied egg-rr98.8%

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

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

      \[\leadsto \color{blue}{-0.5 \cdot b} \]
    8. Step-by-step derivation
      1. *-commutative55.3%

        \[\leadsto \color{blue}{b \cdot -0.5} \]
    9. Simplified55.3%

      \[\leadsto \color{blue}{b \cdot -0.5} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification54.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.7 \cdot 10^{+114}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-212}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-283}:\\ \;\;\;\;-0.5 \cdot b\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{+76}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]

Alternative 12: 57.2% accurate, 10.4× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000002e-85 < (+.f64 x y)

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 77.9% accurate, 12.8× speedup?

\[\begin{array}{l} \\ \left(x + y\right) + b \cdot \left(a - 0.5\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(Float64(x + 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[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

Alternative 14: 36.3% accurate, 16.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.9 \cdot 10^{+114}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{+75}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= a -2.9e+114) (* a b) (if (<= a 3.9e+75) y (* a b))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -2.9e+114) {
		tmp = a * b;
	} else if (a <= 3.9e+75) {
		tmp = y;
	} else {
		tmp = a * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (a <= (-2.9d+114)) then
        tmp = a * b
    else if (a <= 3.9d+75) then
        tmp = y
    else
        tmp = a * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -2.9e+114) {
		tmp = a * b;
	} else if (a <= 3.9e+75) {
		tmp = y;
	} else {
		tmp = a * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if a <= -2.9e+114:
		tmp = a * b
	elif a <= 3.9e+75:
		tmp = y
	else:
		tmp = a * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= -2.9e+114)
		tmp = Float64(a * b);
	elseif (a <= 3.9e+75)
		tmp = y;
	else
		tmp = Float64(a * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (a <= -2.9e+114)
		tmp = a * b;
	elseif (a <= 3.9e+75)
		tmp = y;
	else
		tmp = a * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -2.9e+114], N[(a * b), $MachinePrecision], If[LessEqual[a, 3.9e+75], y, N[(a * b), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq 3.9 \cdot 10^{+75}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.9e114 or 3.90000000000000038e75 < a

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.9e114 < a < 3.90000000000000038e75

    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. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(\mathsf{fma}\left(-1, \log t, 1\right), z, x\right)}\right)}^{3}} + \mathsf{fma}\left(a + -0.5, b, y\right) \]
    5. Applied egg-rr98.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.9 \cdot 10^{+114}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{+75}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]

Alternative 15: 22.3% accurate, 115.0× speedup?

\[\begin{array}{l} \\ y \end{array} \]
(FPCore (x y z t a b) :precision binary64 y)
double code(double x, double y, double z, double t, double a, double b) {
	return y;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return y;
}
def code(x, y, z, t, a, b):
	return y
function code(x, y, z, t, a, b)
	return y
end
function tmp = code(x, y, z, t, a, b)
	tmp = y;
end
code[x_, y_, z_, t_, a_, b_] := y
\begin{array}{l}

\\
y
\end{array}
Derivation
  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{y} \]
  7. Final simplification19.2%

    \[\leadsto y \]

Developer target: 99.4% 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 2023185 
(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)))