Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2

Percentage Accurate: 99.6% → 99.6%
Time: 23.9s
Alternatives: 16
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 99.6% accurate, 1.0× speedup?

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

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

Alternative 1: 99.6% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \log z + \left(\log \left(x + y\right) - \mathsf{fma}\left(\log t, 0.5 - a, t\right)\right) \]
  6. Add Preprocessing

Alternative 2: 67.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a - 0.5 \leq -0.6 \lor \neg \left(a - 0.5 \leq -0.48\right):\\
\;\;\;\;\left(\log y + \log t \cdot a\right) - t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 a 1/2) < -0.599999999999999978 or -0.47999999999999998 < (-.f64 a 1/2)

    1. Initial program 99.7%

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

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

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

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

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

    if -0.599999999999999978 < (-.f64 a 1/2) < -0.47999999999999998

    1. Initial program 99.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a - 0.5 \leq -0.6 \lor \neg \left(a - 0.5 \leq -0.48\right):\\ \;\;\;\;\left(\log y + \log t \cdot a\right) - t\\ \mathbf{else}:\\ \;\;\;\;\left(\log y + \left(\log z + \log t \cdot -0.5\right)\right) - t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 64.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.065 \lor \neg \left(a \leq 0.00095\right):\\
\;\;\;\;\left(\log y + \log t \cdot a\right) - t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -0.065000000000000002 or 9.49999999999999998e-4 < a

    1. Initial program 99.7%

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

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

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

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

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

    if -0.065000000000000002 < a < 9.49999999999999998e-4

    1. Initial program 99.5%

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

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

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

        \[\leadsto \left(\log y + \left(\log z + \color{blue}{{\left(\sqrt[3]{\log t \cdot \left(a - 0.5\right)}\right)}^{3}}\right)\right) - t \]
      3. sub-neg63.6%

        \[\leadsto \left(\log y + \left(\log z + {\left(\sqrt[3]{\log t \cdot \color{blue}{\left(a + \left(-0.5\right)\right)}}\right)}^{3}\right)\right) - t \]
      4. metadata-eval63.6%

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

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

      \[\leadsto \left(\log y + \color{blue}{\left(\log z + -0.5 \cdot \left({1}^{0.3333333333333333} \cdot \log t\right)\right)}\right) - t \]
    7. Step-by-step derivation
      1. pow-base-163.4%

        \[\leadsto \left(\log y + \left(\log z + -0.5 \cdot \left(\color{blue}{1} \cdot \log t\right)\right)\right) - t \]
      2. *-lft-identity63.4%

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

        \[\leadsto \left(\log y + \left(\log z + \color{blue}{\log \left({t}^{-0.5}\right)}\right)\right) - t \]
      4. log-prod56.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.065 \lor \neg \left(a \leq 0.00095\right):\\ \;\;\;\;\left(\log y + \log t \cdot a\right) - t\\ \mathbf{else}:\\ \;\;\;\;\left(\log y + \log \left(z \cdot {t}^{-0.5}\right)\right) - t\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 64.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.038 \lor \neg \left(a \leq 0.0051\right):\\
\;\;\;\;\left(\log y + \log t \cdot a\right) - t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -0.0379999999999999991 or 0.0051000000000000004 < a

    1. Initial program 99.7%

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

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

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

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

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

    if -0.0379999999999999991 < a < 0.0051000000000000004

    1. Initial program 99.5%

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

      \[\leadsto \color{blue}{\left(\log z + \left(\log \left(x + y\right) + -0.5 \cdot \log t\right)\right) - t} \]
    4. Step-by-step derivation
      1. associate-+r+98.3%

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

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

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

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

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

        \[\leadsto \left(\log z + \color{blue}{\left(-0.5 \cdot \log t + -1 \cdot \log \left(\frac{1}{y}\right)\right)}\right) - t \]
      2. mul-1-neg63.5%

        \[\leadsto \left(\log z + \left(-0.5 \cdot \log t + \color{blue}{\left(-\log \left(\frac{1}{y}\right)\right)}\right)\right) - t \]
      3. unsub-neg63.5%

        \[\leadsto \left(\log z + \color{blue}{\left(-0.5 \cdot \log t - \log \left(\frac{1}{y}\right)\right)}\right) - t \]
      4. *-commutative63.5%

        \[\leadsto \left(\log z + \left(\color{blue}{\log t \cdot -0.5} - \log \left(\frac{1}{y}\right)\right)\right) - t \]
      5. log-rec63.5%

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

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

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

        \[\leadsto \left(\log z + \left(\log t \cdot -0.5 - \color{blue}{\sqrt{\left(-\log y\right) \cdot \left(-\log y\right)}}\right)\right) - t \]
      3. sqr-neg48.3%

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

        \[\leadsto \left(\log z + \left(\log t \cdot -0.5 - \color{blue}{\sqrt{\log y} \cdot \sqrt{\log y}}\right)\right) - t \]
      5. add-sqr-sqrt44.0%

        \[\leadsto \left(\log z + \left(\log t \cdot -0.5 - \color{blue}{\log y}\right)\right) - t \]
      6. unsub-neg44.0%

        \[\leadsto \left(\log z + \color{blue}{\left(\log t \cdot -0.5 + \left(-\log y\right)\right)}\right) - t \]
      7. add-log-exp44.0%

        \[\leadsto \left(\log z + \left(\color{blue}{\log \left(e^{\log t \cdot -0.5}\right)} + \left(-\log y\right)\right)\right) - t \]
      8. neg-log44.0%

        \[\leadsto \left(\log z + \left(\log \left(e^{\log t \cdot -0.5}\right) + \color{blue}{\log \left(\frac{1}{y}\right)}\right)\right) - t \]
      9. sum-log40.9%

        \[\leadsto \left(\log z + \color{blue}{\log \left(e^{\log t \cdot -0.5} \cdot \frac{1}{y}\right)}\right) - t \]
      10. pow-to-exp40.9%

        \[\leadsto \left(\log z + \log \left(\color{blue}{{t}^{-0.5}} \cdot \frac{1}{y}\right)\right) - t \]
      11. add-exp-log40.9%

        \[\leadsto \left(\log z + \log \left({t}^{-0.5} \cdot \color{blue}{e^{\log \left(\frac{1}{y}\right)}}\right)\right) - t \]
      12. neg-log40.9%

        \[\leadsto \left(\log z + \log \left({t}^{-0.5} \cdot e^{\color{blue}{-\log y}}\right)\right) - t \]
      13. add-sqr-sqrt15.5%

        \[\leadsto \left(\log z + \log \left({t}^{-0.5} \cdot e^{\color{blue}{\sqrt{-\log y} \cdot \sqrt{-\log y}}}\right)\right) - t \]
      14. sqrt-unprod54.4%

        \[\leadsto \left(\log z + \log \left({t}^{-0.5} \cdot e^{\color{blue}{\sqrt{\left(-\log y\right) \cdot \left(-\log y\right)}}}\right)\right) - t \]
      15. sqr-neg54.4%

        \[\leadsto \left(\log z + \log \left({t}^{-0.5} \cdot e^{\sqrt{\color{blue}{\log y \cdot \log y}}}\right)\right) - t \]
      16. sqrt-unprod38.9%

        \[\leadsto \left(\log z + \log \left({t}^{-0.5} \cdot e^{\color{blue}{\sqrt{\log y} \cdot \sqrt{\log y}}}\right)\right) - t \]
      17. add-sqr-sqrt55.3%

        \[\leadsto \left(\log z + \log \left({t}^{-0.5} \cdot e^{\color{blue}{\log y}}\right)\right) - t \]
      18. add-exp-log55.5%

        \[\leadsto \left(\log z + \log \left({t}^{-0.5} \cdot \color{blue}{y}\right)\right) - t \]
    10. Applied egg-rr55.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.038 \lor \neg \left(a \leq 0.0051\right):\\ \;\;\;\;\left(\log y + \log t \cdot a\right) - t\\ \mathbf{else}:\\ \;\;\;\;\left(\log z + \log \left(y \cdot {t}^{-0.5}\right)\right) - t\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 99.6% accurate, 1.0× speedup?

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

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

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

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

Alternative 6: 68.3% accurate, 1.0× speedup?

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

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

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

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

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

Alternative 7: 58.4% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{-7} \lor \neg \left(a \leq 2.3 \cdot 10^{-177} \lor \neg \left(a \leq 1.16 \cdot 10^{-108}\right) \land a \leq 9.5 \cdot 10^{-41}\right):\\ \;\;\;\;\left(\log y + \log t \cdot a\right) - t\\ \mathbf{else}:\\ \;\;\;\;\log \left(z \cdot \left(y \cdot {t}^{-0.5}\right)\right) - t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= a -3.5e-7)
         (not
          (or (<= a 2.3e-177) (and (not (<= a 1.16e-108)) (<= a 9.5e-41)))))
   (- (+ (log y) (* (log t) a)) t)
   (- (log (* z (* y (pow t -0.5)))) t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -3.5e-7) || !((a <= 2.3e-177) || (!(a <= 1.16e-108) && (a <= 9.5e-41)))) {
		tmp = (log(y) + (log(t) * a)) - t;
	} else {
		tmp = log((z * (y * pow(t, -0.5)))) - t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    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) :: tmp
    if ((a <= (-3.5d-7)) .or. (.not. (a <= 2.3d-177) .or. (.not. (a <= 1.16d-108)) .and. (a <= 9.5d-41))) then
        tmp = (log(y) + (log(t) * a)) - t
    else
        tmp = log((z * (y * (t ** (-0.5d0))))) - t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -3.5e-7) || !((a <= 2.3e-177) || (!(a <= 1.16e-108) && (a <= 9.5e-41)))) {
		tmp = (Math.log(y) + (Math.log(t) * a)) - t;
	} else {
		tmp = Math.log((z * (y * Math.pow(t, -0.5)))) - t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -3.5e-7) or not ((a <= 2.3e-177) or (not (a <= 1.16e-108) and (a <= 9.5e-41))):
		tmp = (math.log(y) + (math.log(t) * a)) - t
	else:
		tmp = math.log((z * (y * math.pow(t, -0.5)))) - t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -3.5e-7) || !((a <= 2.3e-177) || (!(a <= 1.16e-108) && (a <= 9.5e-41))))
		tmp = Float64(Float64(log(y) + Float64(log(t) * a)) - t);
	else
		tmp = Float64(log(Float64(z * Float64(y * (t ^ -0.5)))) - t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((a <= -3.5e-7) || ~(((a <= 2.3e-177) || (~((a <= 1.16e-108)) && (a <= 9.5e-41)))))
		tmp = (log(y) + (log(t) * a)) - t;
	else
		tmp = log((z * (y * (t ^ -0.5)))) - t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.5e-7], N[Not[Or[LessEqual[a, 2.3e-177], And[N[Not[LessEqual[a, 1.16e-108]], $MachinePrecision], LessEqual[a, 9.5e-41]]]], $MachinePrecision]], N[(N[(N[Log[y], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[Log[N[(z * N[(y * N[Power[t, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.5 \cdot 10^{-7} \lor \neg \left(a \leq 2.3 \cdot 10^{-177} \lor \neg \left(a \leq 1.16 \cdot 10^{-108}\right) \land a \leq 9.5 \cdot 10^{-41}\right):\\
\;\;\;\;\left(\log y + \log t \cdot a\right) - t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.49999999999999984e-7 or 2.30000000000000022e-177 < a < 1.16e-108 or 9.4999999999999997e-41 < a

    1. Initial program 99.7%

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

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

      \[\leadsto \left(\log y + \color{blue}{a \cdot \log t}\right) - t \]
    5. Step-by-step derivation
      1. *-commutative68.5%

        \[\leadsto \left(\log y + \color{blue}{\log t \cdot a}\right) - t \]
    6. Simplified68.5%

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

    if -3.49999999999999984e-7 < a < 2.30000000000000022e-177 or 1.16e-108 < a < 9.4999999999999997e-41

    1. Initial program 99.5%

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

      \[\leadsto \color{blue}{\left(\log z + \left(\log \left(x + y\right) + -0.5 \cdot \log t\right)\right) - t} \]
    4. Step-by-step derivation
      1. associate-+r+99.5%

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

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

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

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

      \[\leadsto \color{blue}{\left(\log z + \left(-1 \cdot \log \left(\frac{1}{y}\right) + -0.5 \cdot \log t\right)\right)} - t \]
    7. Step-by-step derivation
      1. +-commutative64.3%

        \[\leadsto \left(\log z + \color{blue}{\left(-0.5 \cdot \log t + -1 \cdot \log \left(\frac{1}{y}\right)\right)}\right) - t \]
      2. mul-1-neg64.3%

        \[\leadsto \left(\log z + \left(-0.5 \cdot \log t + \color{blue}{\left(-\log \left(\frac{1}{y}\right)\right)}\right)\right) - t \]
      3. unsub-neg64.3%

        \[\leadsto \left(\log z + \color{blue}{\left(-0.5 \cdot \log t - \log \left(\frac{1}{y}\right)\right)}\right) - t \]
      4. *-commutative64.3%

        \[\leadsto \left(\log z + \left(\color{blue}{\log t \cdot -0.5} - \log \left(\frac{1}{y}\right)\right)\right) - t \]
      5. log-rec64.3%

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

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

        \[\leadsto \left(\log z + \color{blue}{\log \left(e^{\log t \cdot -0.5 - \left(-\log y\right)}\right)}\right) - t \]
      2. sum-log49.3%

        \[\leadsto \color{blue}{\log \left(z \cdot e^{\log t \cdot -0.5 - \left(-\log y\right)}\right)} - t \]
      3. sub-neg49.3%

        \[\leadsto \log \left(z \cdot e^{\color{blue}{\log t \cdot -0.5 + \left(-\left(-\log y\right)\right)}}\right) - t \]
      4. exp-sum49.3%

        \[\leadsto \log \left(z \cdot \color{blue}{\left(e^{\log t \cdot -0.5} \cdot e^{-\left(-\log y\right)}\right)}\right) - t \]
      5. pow-to-exp49.4%

        \[\leadsto \log \left(z \cdot \left(\color{blue}{{t}^{-0.5}} \cdot e^{-\left(-\log y\right)}\right)\right) - t \]
      6. remove-double-neg49.4%

        \[\leadsto \log \left(z \cdot \left({t}^{-0.5} \cdot e^{\color{blue}{\log y}}\right)\right) - t \]
      7. add-exp-log49.7%

        \[\leadsto \log \left(z \cdot \left({t}^{-0.5} \cdot \color{blue}{y}\right)\right) - t \]
    10. Applied egg-rr49.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{-7} \lor \neg \left(a \leq 2.3 \cdot 10^{-177} \lor \neg \left(a \leq 1.16 \cdot 10^{-108}\right) \land a \leq 9.5 \cdot 10^{-41}\right):\\ \;\;\;\;\left(\log y + \log t \cdot a\right) - t\\ \mathbf{else}:\\ \;\;\;\;\log \left(z \cdot \left(y \cdot {t}^{-0.5}\right)\right) - t\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 58.8% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.02 \cdot 10^{-17} \lor \neg \left(a \leq 1.55 \cdot 10^{-40}\right):\\
\;\;\;\;\left(\log y + \log t \cdot a\right) - t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.01999999999999997e-17 or 1.55000000000000005e-40 < a

    1. Initial program 99.7%

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

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

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

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

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

    if -1.01999999999999997e-17 < a < 1.55000000000000005e-40

    1. Initial program 99.5%

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

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

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

        \[\leadsto \left(\log y + \left(\log z + \color{blue}{{\left(\sqrt[3]{\log t \cdot \left(a - 0.5\right)}\right)}^{3}}\right)\right) - t \]
      3. sub-neg64.0%

        \[\leadsto \left(\log y + \left(\log z + {\left(\sqrt[3]{\log t \cdot \color{blue}{\left(a + \left(-0.5\right)\right)}}\right)}^{3}\right)\right) - t \]
      4. metadata-eval64.0%

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

      \[\leadsto \left(\log y + \left(\log z + \color{blue}{{\left(\sqrt[3]{\log t \cdot \left(a + -0.5\right)}\right)}^{3}}\right)\right) - t \]
    6. Step-by-step derivation
      1. rem-cube-cbrt64.2%

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

        \[\leadsto \left(\log y + \left(\log z + \color{blue}{\left(a + -0.5\right) \cdot \log t}\right)\right) - t \]
      3. add-cube-cbrt64.1%

        \[\leadsto \left(\log y + \left(\log z + \left(a + -0.5\right) \cdot \color{blue}{\left(\left(\sqrt[3]{\log t} \cdot \sqrt[3]{\log t}\right) \cdot \sqrt[3]{\log t}\right)}\right)\right) - t \]
      4. associate-*r*64.1%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\log \left(\left(y \cdot z\right) \cdot {t}^{-0.5}\right)} - t \]
    10. Simplified46.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.02 \cdot 10^{-17} \lor \neg \left(a \leq 1.55 \cdot 10^{-40}\right):\\ \;\;\;\;\left(\log y + \log t \cdot a\right) - t\\ \mathbf{else}:\\ \;\;\;\;\log \left({t}^{-0.5} \cdot \left(z \cdot y\right)\right) - t\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 59.0% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.02 \cdot 10^{-45} \lor \neg \left(a \leq 1.32 \cdot 10^{-40}\right):\\
\;\;\;\;\left(\log y + \log t \cdot a\right) - t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.0199999999999999e-45 or 1.32000000000000009e-40 < a

    1. Initial program 99.7%

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

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

      \[\leadsto \left(\log y + \color{blue}{a \cdot \log t}\right) - t \]
    5. Step-by-step derivation
      1. *-commutative68.3%

        \[\leadsto \left(\log y + \color{blue}{\log t \cdot a}\right) - t \]
    6. Simplified68.3%

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

    if -1.0199999999999999e-45 < a < 1.32000000000000009e-40

    1. Initial program 99.5%

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

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

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

        \[\leadsto \left(\log y + \left(\log z + \color{blue}{{\left(\sqrt[3]{\log t \cdot \left(a - 0.5\right)}\right)}^{3}}\right)\right) - t \]
      3. sub-neg66.0%

        \[\leadsto \left(\log y + \left(\log z + {\left(\sqrt[3]{\log t \cdot \color{blue}{\left(a + \left(-0.5\right)\right)}}\right)}^{3}\right)\right) - t \]
      4. metadata-eval66.0%

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

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

      \[\leadsto \color{blue}{\left(\log y + \left(\log z + -0.5 \cdot \left({1}^{0.3333333333333333} \cdot \log t\right)\right)\right)} - t \]
    7. Step-by-step derivation
      1. associate-+r+66.1%

        \[\leadsto \color{blue}{\left(\left(\log y + \log z\right) + -0.5 \cdot \left({1}^{0.3333333333333333} \cdot \log t\right)\right)} - t \]
      2. pow-base-166.1%

        \[\leadsto \left(\left(\log y + \log z\right) + -0.5 \cdot \left(\color{blue}{1} \cdot \log t\right)\right) - t \]
      3. *-lft-identity66.1%

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

        \[\leadsto \left(\color{blue}{\left(\log z + \log y\right)} + -0.5 \cdot \log t\right) - t \]
      5. remove-double-neg66.1%

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

        \[\leadsto \left(\left(\log z + \left(-\color{blue}{\log \left(\frac{1}{y}\right)}\right)\right) + -0.5 \cdot \log t\right) - t \]
      7. mul-1-neg66.1%

        \[\leadsto \left(\left(\log z + \color{blue}{-1 \cdot \log \left(\frac{1}{y}\right)}\right) + -0.5 \cdot \log t\right) - t \]
      8. associate-+r+66.2%

        \[\leadsto \color{blue}{\left(\log z + \left(-1 \cdot \log \left(\frac{1}{y}\right) + -0.5 \cdot \log t\right)\right)} - t \]
      9. mul-1-neg66.2%

        \[\leadsto \left(\log z + \left(\color{blue}{\left(-\log \left(\frac{1}{y}\right)\right)} + -0.5 \cdot \log t\right)\right) - t \]
      10. log-rec66.2%

        \[\leadsto \left(\log z + \left(\left(-\color{blue}{\left(-\log y\right)}\right) + -0.5 \cdot \log t\right)\right) - t \]
      11. remove-double-neg66.2%

        \[\leadsto \left(\log z + \left(\color{blue}{\log y} + -0.5 \cdot \log t\right)\right) - t \]
      12. log-pow66.2%

        \[\leadsto \left(\log z + \left(\log y + \color{blue}{\log \left({t}^{-0.5}\right)}\right)\right) - t \]
      13. log-prod57.5%

        \[\leadsto \left(\log z + \color{blue}{\log \left(y \cdot {t}^{-0.5}\right)}\right) - t \]
      14. *-commutative57.5%

        \[\leadsto \left(\log z + \log \color{blue}{\left({t}^{-0.5} \cdot y\right)}\right) - t \]
      15. log-prod49.9%

        \[\leadsto \color{blue}{\log \left(z \cdot \left({t}^{-0.5} \cdot y\right)\right)} - t \]
      16. associate-*r*52.6%

        \[\leadsto \log \color{blue}{\left(\left(z \cdot {t}^{-0.5}\right) \cdot y\right)} - t \]
    8. Simplified52.6%

      \[\leadsto \color{blue}{\log \left(\left(z \cdot {t}^{-0.5}\right) \cdot y\right)} - t \]
  3. Recombined 2 regimes into one program.
  4. Final simplification61.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.02 \cdot 10^{-45} \lor \neg \left(a \leq 1.32 \cdot 10^{-40}\right):\\ \;\;\;\;\left(\log y + \log t \cdot a\right) - t\\ \mathbf{else}:\\ \;\;\;\;\log \left(y \cdot \left(z \cdot {t}^{-0.5}\right)\right) - t\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 75.2% accurate, 1.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 3.7e18

    1. Initial program 99.3%

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

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

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

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

    if 3.7e18 < t

    1. Initial program 99.9%

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

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

      \[\leadsto \left(\log y + \color{blue}{a \cdot \log t}\right) - t \]
    5. Step-by-step derivation
      1. *-commutative80.4%

        \[\leadsto \left(\log y + \color{blue}{\log t \cdot a}\right) - t \]
    6. Simplified80.4%

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

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

Alternative 11: 74.1% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 7.5:\\
\;\;\;\;\log t \cdot \left(a - 0.5\right) + \log \left(z \cdot \left(x + y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 7.5

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.5 < t

    1. Initial program 99.9%

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

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

      \[\leadsto \left(\log y + \color{blue}{a \cdot \log t}\right) - t \]
    5. Step-by-step derivation
      1. *-commutative80.0%

        \[\leadsto \left(\log y + \color{blue}{\log t \cdot a}\right) - t \]
    6. Simplified80.0%

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

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

Alternative 12: 60.8% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.7 \cdot 10^{+18}:\\
\;\;\;\;\left(\log t \cdot \left(a - 0.5\right) + \log \left(z \cdot y\right)\right) - t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 3.7e18

    1. Initial program 99.3%

      \[\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt63.2%

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

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

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

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

        \[\leadsto {\left(\sqrt{\color{blue}{\mathsf{fma}\left(\log t, a - 0.5, \left(\log \left(x + y\right) + \log z\right) - t\right)}}\right)}^{2} \]
      6. sub-neg63.2%

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(\log t, \color{blue}{a + \left(-0.5\right)}, \left(\log \left(x + y\right) + \log z\right) - t\right)}\right)}^{2} \]
      7. metadata-eval63.2%

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

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(\log t, a + -0.5, \color{blue}{\left(\log z + \log \left(x + y\right)\right)} - t\right)}\right)}^{2} \]
      9. sum-log45.2%

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

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

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

    if 3.7e18 < t

    1. Initial program 99.9%

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

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

      \[\leadsto \left(\log y + \color{blue}{a \cdot \log t}\right) - t \]
    5. Step-by-step derivation
      1. *-commutative80.4%

        \[\leadsto \left(\log y + \color{blue}{\log t \cdot a}\right) - t \]
    6. Simplified80.4%

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

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

Alternative 13: 57.9% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.5 \cdot 10^{+52} \lor \neg \left(a \leq 1.45 \cdot 10^{+20}\right):\\
\;\;\;\;\log t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.49999999999999996e52 or 1.45e20 < a

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\log t \cdot a} \]
    7. Simplified76.9%

      \[\leadsto \color{blue}{\log t \cdot a} \]

    if -6.49999999999999996e52 < a < 1.45e20

    1. Initial program 99.6%

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

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

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

        \[\leadsto \left(\log y + \left(\log z + \color{blue}{{\left(\sqrt[3]{\log t \cdot \left(a - 0.5\right)}\right)}^{3}}\right)\right) - t \]
      3. sub-neg67.0%

        \[\leadsto \left(\log y + \left(\log z + {\left(\sqrt[3]{\log t \cdot \color{blue}{\left(a + \left(-0.5\right)\right)}}\right)}^{3}\right)\right) - t \]
      4. metadata-eval67.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.5 \cdot 10^{+52} \lor \neg \left(a \leq 1.45 \cdot 10^{+20}\right):\\ \;\;\;\;\log t \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(\log z + \log y\right) - t\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 57.4% accurate, 1.5× speedup?

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

\\
\left(\log y + \log t \cdot a\right) - t
\end{array}
Derivation
  1. Initial program 99.6%

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

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

    \[\leadsto \left(\log y + \color{blue}{a \cdot \log t}\right) - t \]
  5. Step-by-step derivation
    1. *-commutative58.5%

      \[\leadsto \left(\log y + \color{blue}{\log t \cdot a}\right) - t \]
  6. Simplified58.5%

    \[\leadsto \left(\log y + \color{blue}{\log t \cdot a}\right) - t \]
  7. Final simplification58.5%

    \[\leadsto \left(\log y + \log t \cdot a\right) - t \]
  8. Add Preprocessing

Alternative 15: 62.5% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 5.5 \cdot 10^{+16}:\\
\;\;\;\;\log t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 5.5e16

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\log t \cdot a} \]
    7. Simplified50.9%

      \[\leadsto \color{blue}{\log t \cdot a} \]

    if 5.5e16 < t

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot t} \]
    6. Step-by-step derivation
      1. mul-1-neg80.1%

        \[\leadsto \color{blue}{-t} \]
    7. Simplified80.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 5.5 \cdot 10^{+16}:\\ \;\;\;\;\log t \cdot a\\ \mathbf{else}:\\ \;\;\;\;-t\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 37.8% accurate, 156.5× speedup?

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

\\
-t
\end{array}
Derivation
  1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{-1 \cdot t} \]
  6. Step-by-step derivation
    1. mul-1-neg40.6%

      \[\leadsto \color{blue}{-t} \]
  7. Simplified40.6%

    \[\leadsto \color{blue}{-t} \]
  8. Final simplification40.6%

    \[\leadsto -t \]
  9. Add Preprocessing

Developer target: 99.6% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2024034 
(FPCore (x y z t a)
  :name "Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2"
  :precision binary64

  :herbie-target
  (+ (log (+ x y)) (+ (- (log z) t) (* (- a 0.5) (log t))))

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