Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2

Percentage Accurate: 99.6% → 99.6%
Time: 16.9s
Alternatives: 19
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 19 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 \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, 0.5 - a, t\right)\right) \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (+ (log (+ x y)) (- (log z) (fma (log t) (- 0.5 a) t))))
double code(double x, double y, double z, double t, double a) {
	return log((x + y)) + (log(z) - fma(log(t), (0.5 - a), t));
}
function code(x, y, z, t, a)
	return Float64(log(Float64(x + y)) + Float64(log(z) - fma(log(t), Float64(0.5 - a), t)))
end
code[x_, y_, z_, t_, a_] := N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] - N[(N[Log[t], $MachinePrecision] * N[(0.5 - a), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\log \left(x + y\right) + \left(\log z - \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. associate--l+99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 63.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := \log \left(y \cdot z\right)\\
t_2 := \log z + \log y\\
t_3 := \log t \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t \leq 2.3 \cdot 10^{-6}:\\
\;\;\;\;t\_2 + t\_3\\

\mathbf{elif}\;t \leq 6.6 \cdot 10^{+98}:\\
\;\;\;\;\left(t\_1 + t\_3\right) - t\\

\mathbf{elif}\;t \leq 1.85 \cdot 10^{+167}:\\
\;\;\;\;-t\\

\mathbf{elif}\;t \leq 1.2 \cdot 10^{+229}:\\
\;\;\;\;t\_1 - \mathsf{fma}\left(\log t, 0.5 - a, t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < 2.3e-6

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.3e-6 < t < 6.60000000000000056e98

    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. Step-by-step derivation
      1. add-cube-cbrt97.8%

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

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

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

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

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

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

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

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

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

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

    if 6.60000000000000056e98 < t < 1.85e167

    1. Initial program 100.0%

      \[\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-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-t} \]
    7. Simplified85.3%

      \[\leadsto \color{blue}{-t} \]

    if 1.85e167 < t < 1.2e229

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \log \left(y \cdot z\right) + \left(-\color{blue}{\mathsf{fma}\left(\log t, 0.5 - a, t\right)}\right) \]
    7. Applied egg-rr73.7%

      \[\leadsto \color{blue}{\log \left(y \cdot z\right) + \left(-\mathsf{fma}\left(\log t, 0.5 - a, t\right)\right)} \]
    8. Step-by-step derivation
      1. sub-neg73.7%

        \[\leadsto \color{blue}{\log \left(y \cdot z\right) - \mathsf{fma}\left(\log t, 0.5 - a, t\right)} \]
      2. *-commutative73.7%

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

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

    if 1.2e229 < t

    1. Initial program 100.0%

      \[\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-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.3 \cdot 10^{-6}:\\ \;\;\;\;\left(\log z + \log y\right) + \log t \cdot \left(a - 0.5\right)\\ \mathbf{elif}\;t \leq 6.6 \cdot 10^{+98}:\\ \;\;\;\;\left(\log \left(y \cdot z\right) + \log t \cdot \left(a - 0.5\right)\right) - t\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{+167}:\\ \;\;\;\;-t\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+229}:\\ \;\;\;\;\log \left(y \cdot z\right) - \mathsf{fma}\left(\log t, 0.5 - a, t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\log z + \log y\right) - t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 60.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a - 0.5 \leq -0.505 \lor \neg \left(a - 0.5 \leq 5 \cdot 10^{+14}\right):\\ \;\;\;\;\log \left(y \cdot z\right) - \mathsf{fma}\left(\log t, 0.5 - a, t\right)\\ \mathbf{else}:\\ \;\;\;\;\log y + \left(\log z - \left(t + \log t \cdot 0.5\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= (- a 0.5) -0.505) (not (<= (- a 0.5) 5e+14)))
   (- (log (* y z)) (fma (log t) (- 0.5 a) t))
   (+ (log y) (- (log z) (+ t (* (log t) 0.5))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (((a - 0.5) <= -0.505) || !((a - 0.5) <= 5e+14)) {
		tmp = log((y * z)) - fma(log(t), (0.5 - a), t);
	} else {
		tmp = log(y) + (log(z) - (t + (log(t) * 0.5)));
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if ((Float64(a - 0.5) <= -0.505) || !(Float64(a - 0.5) <= 5e+14))
		tmp = Float64(log(Float64(y * z)) - fma(log(t), Float64(0.5 - a), t));
	else
		tmp = Float64(log(y) + Float64(log(z) - Float64(t + Float64(log(t) * 0.5))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a - 0.5), $MachinePrecision], -0.505], N[Not[LessEqual[N[(a - 0.5), $MachinePrecision], 5e+14]], $MachinePrecision]], N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] - N[(N[Log[t], $MachinePrecision] * N[(0.5 - a), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision], N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] - N[(t + N[(N[Log[t], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a - 0.5 \leq -0.505 \lor \neg \left(a - 0.5 \leq 5 \cdot 10^{+14}\right):\\
\;\;\;\;\log \left(y \cdot z\right) - \mathsf{fma}\left(\log t, 0.5 - a, t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 a #s(literal 1/2 binary64)) < -0.505000000000000004 or 5e14 < (-.f64 a #s(literal 1/2 binary64))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\log \left(y \cdot z\right) + \left(-\mathsf{fma}\left(\log t, 0.5 - a, t\right)\right)} \]
    8. Step-by-step derivation
      1. sub-neg61.8%

        \[\leadsto \color{blue}{\log \left(y \cdot z\right) - \mathsf{fma}\left(\log t, 0.5 - a, t\right)} \]
      2. *-commutative61.8%

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

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

    if -0.505000000000000004 < (-.f64 a #s(literal 1/2 binary64)) < 5e14

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 64.9% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;a - 0.5 \leq 5 \cdot 10^{+14}:\\
\;\;\;\;\log y + \left(\log z - \left(t + \log t \cdot 0.5\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 a #s(literal 1/2 binary64)) < -0.505000000000000004

    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. Step-by-step derivation
      1. add-cube-cbrt98.1%

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

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

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

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

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

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

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

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

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

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

    if -0.505000000000000004 < (-.f64 a #s(literal 1/2 binary64)) < 5e14

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5e14 < (-.f64 a #s(literal 1/2 binary64))

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, 0.5 - a, t\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r-99.7%

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

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

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

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

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

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

Alternative 5: 86.2% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.4%

      \[\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 t around 0 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 68.6% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 99.6% accurate, 1.0× speedup?

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

\\
\left(\left(\log \left(x + y\right) + \log z\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 \left(x + y\right) + \log z\right) - t\right) + \log t \cdot \left(a - 0.5\right) \]
  4. Add Preprocessing

Alternative 8: 69.1% 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 70.5%

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

Alternative 9: 69.1% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 48.7% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := {t}^{\left(0.5 - a\right)}\\ t_2 := \log t \cdot a\\ \mathbf{if}\;t \leq 7 \cdot 10^{-208}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-174}:\\ \;\;\;\;\log \left(\frac{y \cdot z}{t\_1}\right)\\ \mathbf{elif}\;t \leq 9.8 \cdot 10^{-102}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-43}:\\ \;\;\;\;\log \left(z \cdot \frac{y}{t\_1}\right)\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+26}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\left(\log z + \log y\right) - t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (pow t (- 0.5 a))) (t_2 (* (log t) a)))
   (if (<= t 7e-208)
     t_2
     (if (<= t 1.8e-174)
       (log (/ (* y z) t_1))
       (if (<= t 9.8e-102)
         t_2
         (if (<= t 6.8e-43)
           (log (* z (/ y t_1)))
           (if (<= t 1.35e+26) t_2 (- (+ (log z) (log y)) t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = pow(t, (0.5 - a));
	double t_2 = log(t) * a;
	double tmp;
	if (t <= 7e-208) {
		tmp = t_2;
	} else if (t <= 1.8e-174) {
		tmp = log(((y * z) / t_1));
	} else if (t <= 9.8e-102) {
		tmp = t_2;
	} else if (t <= 6.8e-43) {
		tmp = log((z * (y / t_1)));
	} else if (t <= 1.35e+26) {
		tmp = t_2;
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t ** (0.5d0 - a)
    t_2 = log(t) * a
    if (t <= 7d-208) then
        tmp = t_2
    else if (t <= 1.8d-174) then
        tmp = log(((y * z) / t_1))
    else if (t <= 9.8d-102) then
        tmp = t_2
    else if (t <= 6.8d-43) then
        tmp = log((z * (y / t_1)))
    else if (t <= 1.35d+26) then
        tmp = t_2
    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 t_1 = Math.pow(t, (0.5 - a));
	double t_2 = Math.log(t) * a;
	double tmp;
	if (t <= 7e-208) {
		tmp = t_2;
	} else if (t <= 1.8e-174) {
		tmp = Math.log(((y * z) / t_1));
	} else if (t <= 9.8e-102) {
		tmp = t_2;
	} else if (t <= 6.8e-43) {
		tmp = Math.log((z * (y / t_1)));
	} else if (t <= 1.35e+26) {
		tmp = t_2;
	} else {
		tmp = (Math.log(z) + Math.log(y)) - t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = math.pow(t, (0.5 - a))
	t_2 = math.log(t) * a
	tmp = 0
	if t <= 7e-208:
		tmp = t_2
	elif t <= 1.8e-174:
		tmp = math.log(((y * z) / t_1))
	elif t <= 9.8e-102:
		tmp = t_2
	elif t <= 6.8e-43:
		tmp = math.log((z * (y / t_1)))
	elif t <= 1.35e+26:
		tmp = t_2
	else:
		tmp = (math.log(z) + math.log(y)) - t
	return tmp
function code(x, y, z, t, a)
	t_1 = t ^ Float64(0.5 - a)
	t_2 = Float64(log(t) * a)
	tmp = 0.0
	if (t <= 7e-208)
		tmp = t_2;
	elseif (t <= 1.8e-174)
		tmp = log(Float64(Float64(y * z) / t_1));
	elseif (t <= 9.8e-102)
		tmp = t_2;
	elseif (t <= 6.8e-43)
		tmp = log(Float64(z * Float64(y / t_1)));
	elseif (t <= 1.35e+26)
		tmp = t_2;
	else
		tmp = Float64(Float64(log(z) + log(y)) - t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t ^ (0.5 - a);
	t_2 = log(t) * a;
	tmp = 0.0;
	if (t <= 7e-208)
		tmp = t_2;
	elseif (t <= 1.8e-174)
		tmp = log(((y * z) / t_1));
	elseif (t <= 9.8e-102)
		tmp = t_2;
	elseif (t <= 6.8e-43)
		tmp = log((z * (y / t_1)));
	elseif (t <= 1.35e+26)
		tmp = t_2;
	else
		tmp = (log(z) + log(y)) - t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[Power[t, N[(0.5 - a), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[t, 7e-208], t$95$2, If[LessEqual[t, 1.8e-174], N[Log[N[(N[(y * z), $MachinePrecision] / t$95$1), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 9.8e-102], t$95$2, If[LessEqual[t, 6.8e-43], N[Log[N[(z * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.35e+26], t$95$2, N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := {t}^{\left(0.5 - a\right)}\\
t_2 := \log t \cdot a\\
\mathbf{if}\;t \leq 7 \cdot 10^{-208}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 1.8 \cdot 10^{-174}:\\
\;\;\;\;\log \left(\frac{y \cdot z}{t\_1}\right)\\

\mathbf{elif}\;t \leq 9.8 \cdot 10^{-102}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 6.8 \cdot 10^{-43}:\\
\;\;\;\;\log \left(z \cdot \frac{y}{t\_1}\right)\\

\mathbf{elif}\;t \leq 1.35 \cdot 10^{+26}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < 6.99999999999999982e-208 or 1.79999999999999999e-174 < t < 9.7999999999999995e-102 or 6.8000000000000001e-43 < t < 1.35e26

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\log t \cdot a} \]
    7. Simplified55.6%

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

    if 6.99999999999999982e-208 < t < 1.79999999999999999e-174

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\log \left(\frac{z \cdot y}{e^{\log t \cdot \left(0.5 - a\right)}}\right)} \]
      5. exp-to-pow51.7%

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

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

    if 9.7999999999999995e-102 < t < 6.8000000000000001e-43

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 \cdot \left(\color{blue}{\log \left(z \cdot y\right)} - \log t \cdot \left(0.5 - a\right)\right) \]
      4. add-log-exp30.6%

        \[\leadsto 1 \cdot \left(\log \left(z \cdot y\right) - \color{blue}{\log \left(e^{\log t \cdot \left(0.5 - a\right)}\right)}\right) \]
      5. diff-log30.8%

        \[\leadsto 1 \cdot \color{blue}{\log \left(\frac{z \cdot y}{e^{\log t \cdot \left(0.5 - a\right)}}\right)} \]
      6. exp-to-pow30.8%

        \[\leadsto 1 \cdot \log \left(\frac{z \cdot y}{\color{blue}{{t}^{\left(0.5 - a\right)}}}\right) \]
    8. Applied egg-rr30.8%

      \[\leadsto \color{blue}{1 \cdot \log \left(\frac{z \cdot y}{{t}^{\left(0.5 - a\right)}}\right)} \]
    9. Step-by-step derivation
      1. *-lft-identity30.8%

        \[\leadsto \color{blue}{\log \left(\frac{z \cdot y}{{t}^{\left(0.5 - a\right)}}\right)} \]
      2. associate-/l*33.8%

        \[\leadsto \log \color{blue}{\left(z \cdot \frac{y}{{t}^{\left(0.5 - a\right)}}\right)} \]
    10. Simplified33.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 7 \cdot 10^{-208}:\\ \;\;\;\;\log t \cdot a\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-174}:\\ \;\;\;\;\log \left(\frac{y \cdot z}{{t}^{\left(0.5 - a\right)}}\right)\\ \mathbf{elif}\;t \leq 9.8 \cdot 10^{-102}:\\ \;\;\;\;\log t \cdot a\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-43}:\\ \;\;\;\;\log \left(z \cdot \frac{y}{{t}^{\left(0.5 - a\right)}}\right)\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+26}:\\ \;\;\;\;\log t \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(\log z + \log y\right) - t\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 48.6% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
t_1 := \log t \cdot a\\
t_2 := \log \left(z \cdot \frac{y}{{t}^{\left(0.5 - a\right)}}\right)\\
\mathbf{if}\;t \leq 8 \cdot 10^{-208}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 5.9 \cdot 10^{-173}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 5 \cdot 10^{-102}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.7 \cdot 10^{-43}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 1.9 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 8.0000000000000008e-208 or 5.89999999999999995e-173 < t < 5.00000000000000026e-102 or 2.69999999999999991e-43 < t < 1.89999999999999987e23

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\log t \cdot a} \]
    7. Simplified55.6%

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

    if 8.0000000000000008e-208 < t < 5.89999999999999995e-173 or 5.00000000000000026e-102 < t < 2.69999999999999991e-43

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 \cdot \left(\color{blue}{\log \left(z \cdot y\right)} - \log t \cdot \left(0.5 - a\right)\right) \]
      4. add-log-exp36.6%

        \[\leadsto 1 \cdot \left(\log \left(z \cdot y\right) - \color{blue}{\log \left(e^{\log t \cdot \left(0.5 - a\right)}\right)}\right) \]
      5. diff-log36.7%

        \[\leadsto 1 \cdot \color{blue}{\log \left(\frac{z \cdot y}{e^{\log t \cdot \left(0.5 - a\right)}}\right)} \]
      6. exp-to-pow36.8%

        \[\leadsto 1 \cdot \log \left(\frac{z \cdot y}{\color{blue}{{t}^{\left(0.5 - a\right)}}}\right) \]
    8. Applied egg-rr36.8%

      \[\leadsto \color{blue}{1 \cdot \log \left(\frac{z \cdot y}{{t}^{\left(0.5 - a\right)}}\right)} \]
    9. Step-by-step derivation
      1. *-lft-identity36.8%

        \[\leadsto \color{blue}{\log \left(\frac{z \cdot y}{{t}^{\left(0.5 - a\right)}}\right)} \]
      2. associate-/l*38.9%

        \[\leadsto \log \color{blue}{\left(z \cdot \frac{y}{{t}^{\left(0.5 - a\right)}}\right)} \]
    10. Simplified38.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 8 \cdot 10^{-208}:\\ \;\;\;\;\log t \cdot a\\ \mathbf{elif}\;t \leq 5.9 \cdot 10^{-173}:\\ \;\;\;\;\log \left(z \cdot \frac{y}{{t}^{\left(0.5 - a\right)}}\right)\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-102}:\\ \;\;\;\;\log t \cdot a\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-43}:\\ \;\;\;\;\log \left(z \cdot \frac{y}{{t}^{\left(0.5 - a\right)}}\right)\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+23}:\\ \;\;\;\;\log t \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(\log z + \log y\right) - t\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 53.7% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \log t \cdot a\\ t_2 := \log \left(y \cdot z\right) + \left(t\_1 - t\right)\\ \mathbf{if}\;a \leq -780000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{-70}:\\ \;\;\;\;\left(\log z + \log y\right) - t\\ \mathbf{elif}\;a \leq 0.32:\\ \;\;\;\;\log \left(z \cdot \frac{y}{{t}^{\left(0.5 - a\right)}}\right)\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{+53}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (log t) a)) (t_2 (+ (log (* y z)) (- t_1 t))))
   (if (<= a -780000.0)
     t_2
     (if (<= a 1.6e-70)
       (- (+ (log z) (log y)) t)
       (if (<= a 0.32)
         (log (* z (/ y (pow t (- 0.5 a)))))
         (if (<= a 9.2e+53) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = log(t) * a;
	double t_2 = log((y * z)) + (t_1 - t);
	double tmp;
	if (a <= -780000.0) {
		tmp = t_2;
	} else if (a <= 1.6e-70) {
		tmp = (log(z) + log(y)) - t;
	} else if (a <= 0.32) {
		tmp = log((z * (y / pow(t, (0.5 - a)))));
	} else if (a <= 9.2e+53) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = log(t) * a
    t_2 = log((y * z)) + (t_1 - t)
    if (a <= (-780000.0d0)) then
        tmp = t_2
    else if (a <= 1.6d-70) then
        tmp = (log(z) + log(y)) - t
    else if (a <= 0.32d0) then
        tmp = log((z * (y / (t ** (0.5d0 - a)))))
    else if (a <= 9.2d+53) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = Math.log(t) * a;
	double t_2 = Math.log((y * z)) + (t_1 - t);
	double tmp;
	if (a <= -780000.0) {
		tmp = t_2;
	} else if (a <= 1.6e-70) {
		tmp = (Math.log(z) + Math.log(y)) - t;
	} else if (a <= 0.32) {
		tmp = Math.log((z * (y / Math.pow(t, (0.5 - a)))));
	} else if (a <= 9.2e+53) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = math.log(t) * a
	t_2 = math.log((y * z)) + (t_1 - t)
	tmp = 0
	if a <= -780000.0:
		tmp = t_2
	elif a <= 1.6e-70:
		tmp = (math.log(z) + math.log(y)) - t
	elif a <= 0.32:
		tmp = math.log((z * (y / math.pow(t, (0.5 - a)))))
	elif a <= 9.2e+53:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(log(t) * a)
	t_2 = Float64(log(Float64(y * z)) + Float64(t_1 - t))
	tmp = 0.0
	if (a <= -780000.0)
		tmp = t_2;
	elseif (a <= 1.6e-70)
		tmp = Float64(Float64(log(z) + log(y)) - t);
	elseif (a <= 0.32)
		tmp = log(Float64(z * Float64(y / (t ^ Float64(0.5 - a)))));
	elseif (a <= 9.2e+53)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = log(t) * a;
	t_2 = log((y * z)) + (t_1 - t);
	tmp = 0.0;
	if (a <= -780000.0)
		tmp = t_2;
	elseif (a <= 1.6e-70)
		tmp = (log(z) + log(y)) - t;
	elseif (a <= 0.32)
		tmp = log((z * (y / (t ^ (0.5 - a)))));
	elseif (a <= 9.2e+53)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$2 = N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + N[(t$95$1 - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -780000.0], t$95$2, If[LessEqual[a, 1.6e-70], N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[a, 0.32], N[Log[N[(z * N[(y / N[Power[t, N[(0.5 - a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[a, 9.2e+53], t$95$2, t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \log t \cdot a\\
t_2 := \log \left(y \cdot z\right) + \left(t\_1 - t\right)\\
\mathbf{if}\;a \leq -780000:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 1.6 \cdot 10^{-70}:\\
\;\;\;\;\left(\log z + \log y\right) - t\\

\mathbf{elif}\;a \leq 0.32:\\
\;\;\;\;\log \left(z \cdot \frac{y}{{t}^{\left(0.5 - a\right)}}\right)\\

\mathbf{elif}\;a \leq 9.2 \cdot 10^{+53}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -7.8e5 or 0.320000000000000007 < a < 9.20000000000000079e53

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \log \left(z \cdot y\right) + \left(-\color{blue}{\mathsf{fma}\left(\log t, -a, t\right)}\right) \]
    10. Applied egg-rr61.3%

      \[\leadsto \color{blue}{\log \left(z \cdot y\right) + \left(-\mathsf{fma}\left(\log t, -a, t\right)\right)} \]
    11. Step-by-step derivation
      1. neg-sub061.3%

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

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

        \[\leadsto \log \left(z \cdot y\right) + \color{blue}{\left(\left(0 - \log t \cdot \left(-a\right)\right) - t\right)} \]
      4. neg-sub061.3%

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

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

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

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

    if -7.8e5 < a < 1.5999999999999999e-70

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.5999999999999999e-70 < a < 0.320000000000000007

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 \cdot \left(\log \left(z \cdot y\right) - \color{blue}{\log \left(e^{\log t \cdot \left(0.5 - a\right)}\right)}\right) \]
      5. diff-log36.0%

        \[\leadsto 1 \cdot \color{blue}{\log \left(\frac{z \cdot y}{e^{\log t \cdot \left(0.5 - a\right)}}\right)} \]
      6. exp-to-pow36.5%

        \[\leadsto 1 \cdot \log \left(\frac{z \cdot y}{\color{blue}{{t}^{\left(0.5 - a\right)}}}\right) \]
    8. Applied egg-rr36.5%

      \[\leadsto \color{blue}{1 \cdot \log \left(\frac{z \cdot y}{{t}^{\left(0.5 - a\right)}}\right)} \]
    9. Step-by-step derivation
      1. *-lft-identity36.5%

        \[\leadsto \color{blue}{\log \left(\frac{z \cdot y}{{t}^{\left(0.5 - a\right)}}\right)} \]
      2. associate-/l*45.0%

        \[\leadsto \log \color{blue}{\left(z \cdot \frac{y}{{t}^{\left(0.5 - a\right)}}\right)} \]
    10. Simplified45.0%

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

    if 9.20000000000000079e53 < a

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\log t \cdot a} \]
    7. Simplified81.8%

      \[\leadsto \color{blue}{\log t \cdot a} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification55.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -780000:\\ \;\;\;\;\log \left(y \cdot z\right) + \left(\log t \cdot a - t\right)\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{-70}:\\ \;\;\;\;\left(\log z + \log y\right) - t\\ \mathbf{elif}\;a \leq 0.32:\\ \;\;\;\;\log \left(z \cdot \frac{y}{{t}^{\left(0.5 - a\right)}}\right)\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{+53}:\\ \;\;\;\;\log \left(y \cdot z\right) + \left(\log t \cdot a - t\right)\\ \mathbf{else}:\\ \;\;\;\;\log t \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 72.6% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;t \leq 1.9 \cdot 10^{+167}:\\
\;\;\;\;-t\\

\mathbf{elif}\;t \leq 1.12 \cdot 10^{+229}:\\
\;\;\;\;\log \left(y \cdot z\right) + \left(\log t \cdot a - t\right)\\

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


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

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, 0.5 - a, t\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r-99.4%

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

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

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

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

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

    if 3.8e99 < t < 1.89999999999999997e167

    1. Initial program 100.0%

      \[\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-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-t} \]
    7. Simplified85.3%

      \[\leadsto \color{blue}{-t} \]

    if 1.89999999999999997e167 < t < 1.12e229

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \log \left(z \cdot y\right) + \left(-\color{blue}{\mathsf{fma}\left(\log t, -a, t\right)}\right) \]
    10. Applied egg-rr73.7%

      \[\leadsto \color{blue}{\log \left(z \cdot y\right) + \left(-\mathsf{fma}\left(\log t, -a, t\right)\right)} \]
    11. Step-by-step derivation
      1. neg-sub073.7%

        \[\leadsto \log \left(z \cdot y\right) + \color{blue}{\left(0 - \mathsf{fma}\left(\log t, -a, t\right)\right)} \]
      2. fma-define73.7%

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

        \[\leadsto \log \left(z \cdot y\right) + \color{blue}{\left(\left(0 - \log t \cdot \left(-a\right)\right) - t\right)} \]
      4. neg-sub073.7%

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

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

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

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

    if 1.12e229 < t

    1. Initial program 100.0%

      \[\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-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 56.6% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;t \leq 1.9 \cdot 10^{+167}:\\
\;\;\;\;-t\\

\mathbf{elif}\;t \leq 1.12 \cdot 10^{+229}:\\
\;\;\;\;t\_1 + \left(\log t \cdot a - t\right)\\

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


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

    1. Initial program 99.4%

      \[\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-cube-cbrt98.0%

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

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

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

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

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

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

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

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

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

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

    if 3.70000000000000001e97 < t < 1.89999999999999997e167

    1. Initial program 100.0%

      \[\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-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-t} \]
    7. Simplified85.3%

      \[\leadsto \color{blue}{-t} \]

    if 1.89999999999999997e167 < t < 1.12e229

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \log \left(z \cdot y\right) + \left(-\color{blue}{\mathsf{fma}\left(\log t, -a, t\right)}\right) \]
    10. Applied egg-rr73.7%

      \[\leadsto \color{blue}{\log \left(z \cdot y\right) + \left(-\mathsf{fma}\left(\log t, -a, t\right)\right)} \]
    11. Step-by-step derivation
      1. neg-sub073.7%

        \[\leadsto \log \left(z \cdot y\right) + \color{blue}{\left(0 - \mathsf{fma}\left(\log t, -a, t\right)\right)} \]
      2. fma-define73.7%

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

        \[\leadsto \log \left(z \cdot y\right) + \color{blue}{\left(\left(0 - \log t \cdot \left(-a\right)\right) - t\right)} \]
      4. neg-sub073.7%

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

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

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

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

    if 1.12e229 < t

    1. Initial program 100.0%

      \[\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-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 67.0% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;t \leq 9.4 \cdot 10^{+95}:\\
\;\;\;\;\log \left(y \cdot z\right) + \left(\log t \cdot a - t\right)\\

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


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

    1. Initial program 99.4%

      \[\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-cube-cbrt98.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.429999999999999993 < t < 9.39999999999999945e95

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \log \left(z \cdot y\right) + \left(-\color{blue}{\mathsf{fma}\left(\log t, -a, t\right)}\right) \]
    10. Applied egg-rr58.6%

      \[\leadsto \color{blue}{\log \left(z \cdot y\right) + \left(-\mathsf{fma}\left(\log t, -a, t\right)\right)} \]
    11. Step-by-step derivation
      1. neg-sub058.6%

        \[\leadsto \log \left(z \cdot y\right) + \color{blue}{\left(0 - \mathsf{fma}\left(\log t, -a, t\right)\right)} \]
      2. fma-define58.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 54.4% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;t \leq 4.1 \cdot 10^{+98}:\\
\;\;\;\;t\_1 + \left(\log t \cdot a - t\right)\\

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


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

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\log \left(z \cdot y\right)} - \log t \cdot \left(0.5 - a\right) \]
    8. Applied egg-rr46.8%

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

    if 0.429999999999999993 < t < 4.1e98

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \log \left(z \cdot y\right) + \left(-\color{blue}{\mathsf{fma}\left(\log t, -a, t\right)}\right) \]
    10. Applied egg-rr58.6%

      \[\leadsto \color{blue}{\log \left(z \cdot y\right) + \left(-\mathsf{fma}\left(\log t, -a, t\right)\right)} \]
    11. Step-by-step derivation
      1. neg-sub058.6%

        \[\leadsto \log \left(z \cdot y\right) + \color{blue}{\left(0 - \mathsf{fma}\left(\log t, -a, t\right)\right)} \]
      2. fma-define58.6%

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

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

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

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

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

      \[\leadsto \color{blue}{\log \left(z \cdot y\right) + \left(\log t \cdot a - t\right)} \]

    if 4.1e98 < 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. associate--l+99.9%

        \[\leadsto \color{blue}{\log \left(x + y\right) + \left(\log z - \left(t - \left(a - 0.5\right) \cdot \log t\right)\right)} \]
      3. sub-neg99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \color{blue}{\left(t + \left(-\left(a - 0.5\right) \cdot \log t\right)\right)}\right) \]
      4. +-commutative99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \color{blue}{\left(\left(-\left(a - 0.5\right) \cdot \log t\right) + t\right)}\right) \]
      5. *-commutative99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \left(\left(-\color{blue}{\log t \cdot \left(a - 0.5\right)}\right) + t\right)\right) \]
      6. distribute-rgt-neg-in99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \left(\color{blue}{\log t \cdot \left(-\left(a - 0.5\right)\right)} + t\right)\right) \]
      7. fma-undefine100.0%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \color{blue}{\mathsf{fma}\left(\log t, -\left(a - 0.5\right), t\right)}\right) \]
      8. sub-neg100.0%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, -\color{blue}{\left(a + \left(-0.5\right)\right)}, t\right)\right) \]
      9. +-commutative100.0%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, -\color{blue}{\left(\left(-0.5\right) + a\right)}, t\right)\right) \]
      10. distribute-neg-in100.0%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{\left(-\left(-0.5\right)\right) + \left(-a\right)}, t\right)\right) \]
      11. metadata-eval100.0%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \left(-\color{blue}{-0.5}\right) + \left(-a\right), t\right)\right) \]
      12. metadata-eval100.0%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{0.5} + \left(-a\right), t\right)\right) \]
      13. unsub-neg100.0%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{0.5 - a}, t\right)\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, 0.5 - a, t\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 69.8%

      \[\leadsto \color{blue}{\left(\log y + \log z\right) - \left(t + \log t \cdot \left(0.5 - a\right)\right)} \]
    6. Taylor expanded in a around inf 69.8%

      \[\leadsto \left(\log y + \log z\right) - \left(t + \color{blue}{-1 \cdot \left(a \cdot \log t\right)}\right) \]
    7. Step-by-step derivation
      1. mul-1-neg69.8%

        \[\leadsto \left(\log y + \log z\right) - \left(t + \color{blue}{\left(-a \cdot \log t\right)}\right) \]
      2. *-commutative69.8%

        \[\leadsto \left(\log y + \log z\right) - \left(t + \left(-\color{blue}{\log t \cdot a}\right)\right) \]
      3. distribute-rgt-neg-in69.8%

        \[\leadsto \left(\log y + \log z\right) - \left(t + \color{blue}{\log t \cdot \left(-a\right)}\right) \]
    8. Simplified69.8%

      \[\leadsto \left(\log y + \log z\right) - \left(t + \color{blue}{\log t \cdot \left(-a\right)}\right) \]
    9. Taylor expanded in a around 0 56.4%

      \[\leadsto \color{blue}{\left(\log y + \log z\right) - t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification52.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 0.43:\\ \;\;\;\;\log \left(y \cdot z\right) + \log t \cdot \left(a - 0.5\right)\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{+98}:\\ \;\;\;\;\log \left(y \cdot z\right) + \left(\log t \cdot a - t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\log z + \log y\right) - t\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 53.2% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 1.6 \cdot 10^{+22}:\\ \;\;\;\;\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 (<= t 1.6e+22) (* (log t) a) (- (+ (log z) (log y)) t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= 1.6e+22) {
		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 (t <= 1.6d+22) 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 (t <= 1.6e+22) {
		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 t <= 1.6e+22:
		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 (t <= 1.6e+22)
		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 (t <= 1.6e+22)
		tmp = log(t) * a;
	else
		tmp = (log(z) + log(y)) - t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.6e+22], 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}\;t \leq 1.6 \cdot 10^{+22}:\\
\;\;\;\;\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 t < 1.6e22

    1. Initial program 99.4%

      \[\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.4%

        \[\leadsto \color{blue}{\left(\log \left(x + y\right) + \log z\right) - \left(t - \left(a - 0.5\right) \cdot \log t\right)} \]
      2. associate--l+99.4%

        \[\leadsto \color{blue}{\log \left(x + y\right) + \left(\log z - \left(t - \left(a - 0.5\right) \cdot \log t\right)\right)} \]
      3. sub-neg99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \color{blue}{\left(t + \left(-\left(a - 0.5\right) \cdot \log t\right)\right)}\right) \]
      4. +-commutative99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \color{blue}{\left(\left(-\left(a - 0.5\right) \cdot \log t\right) + t\right)}\right) \]
      5. *-commutative99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \left(\left(-\color{blue}{\log t \cdot \left(a - 0.5\right)}\right) + t\right)\right) \]
      6. distribute-rgt-neg-in99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \left(\color{blue}{\log t \cdot \left(-\left(a - 0.5\right)\right)} + t\right)\right) \]
      7. fma-undefine99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \color{blue}{\mathsf{fma}\left(\log t, -\left(a - 0.5\right), t\right)}\right) \]
      8. sub-neg99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, -\color{blue}{\left(a + \left(-0.5\right)\right)}, t\right)\right) \]
      9. +-commutative99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, -\color{blue}{\left(\left(-0.5\right) + a\right)}, t\right)\right) \]
      10. distribute-neg-in99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{\left(-\left(-0.5\right)\right) + \left(-a\right)}, t\right)\right) \]
      11. metadata-eval99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \left(-\color{blue}{-0.5}\right) + \left(-a\right), t\right)\right) \]
      12. metadata-eval99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{0.5} + \left(-a\right), t\right)\right) \]
      13. unsub-neg99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{0.5 - a}, t\right)\right) \]
    3. Simplified99.4%

      \[\leadsto \color{blue}{\log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, 0.5 - a, t\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 46.8%

      \[\leadsto \color{blue}{a \cdot \log t} \]
    6. Step-by-step derivation
      1. *-commutative46.8%

        \[\leadsto \color{blue}{\log t \cdot a} \]
    7. Simplified46.8%

      \[\leadsto \color{blue}{\log t \cdot a} \]

    if 1.6e22 < 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. associate--l+99.9%

        \[\leadsto \color{blue}{\log \left(x + y\right) + \left(\log z - \left(t - \left(a - 0.5\right) \cdot \log t\right)\right)} \]
      3. sub-neg99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \color{blue}{\left(t + \left(-\left(a - 0.5\right) \cdot \log t\right)\right)}\right) \]
      4. +-commutative99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \color{blue}{\left(\left(-\left(a - 0.5\right) \cdot \log t\right) + t\right)}\right) \]
      5. *-commutative99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \left(\left(-\color{blue}{\log t \cdot \left(a - 0.5\right)}\right) + t\right)\right) \]
      6. distribute-rgt-neg-in99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \left(\color{blue}{\log t \cdot \left(-\left(a - 0.5\right)\right)} + t\right)\right) \]
      7. fma-undefine99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \color{blue}{\mathsf{fma}\left(\log t, -\left(a - 0.5\right), t\right)}\right) \]
      8. sub-neg99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, -\color{blue}{\left(a + \left(-0.5\right)\right)}, t\right)\right) \]
      9. +-commutative99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, -\color{blue}{\left(\left(-0.5\right) + a\right)}, t\right)\right) \]
      10. distribute-neg-in99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{\left(-\left(-0.5\right)\right) + \left(-a\right)}, t\right)\right) \]
      11. metadata-eval99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \left(-\color{blue}{-0.5}\right) + \left(-a\right), t\right)\right) \]
      12. metadata-eval99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{0.5} + \left(-a\right), t\right)\right) \]
      13. unsub-neg99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{0.5 - a}, t\right)\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, 0.5 - a, t\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 73.5%

      \[\leadsto \color{blue}{\left(\log y + \log z\right) - \left(t + \log t \cdot \left(0.5 - a\right)\right)} \]
    6. Taylor expanded in a around inf 73.5%

      \[\leadsto \left(\log y + \log z\right) - \left(t + \color{blue}{-1 \cdot \left(a \cdot \log t\right)}\right) \]
    7. Step-by-step derivation
      1. mul-1-neg73.5%

        \[\leadsto \left(\log y + \log z\right) - \left(t + \color{blue}{\left(-a \cdot \log t\right)}\right) \]
      2. *-commutative73.5%

        \[\leadsto \left(\log y + \log z\right) - \left(t + \left(-\color{blue}{\log t \cdot a}\right)\right) \]
      3. distribute-rgt-neg-in73.5%

        \[\leadsto \left(\log y + \log z\right) - \left(t + \color{blue}{\log t \cdot \left(-a\right)}\right) \]
    8. Simplified73.5%

      \[\leadsto \left(\log y + \log z\right) - \left(t + \color{blue}{\log t \cdot \left(-a\right)}\right) \]
    9. Taylor expanded in a around 0 54.8%

      \[\leadsto \color{blue}{\left(\log y + \log z\right) - t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification50.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.6 \cdot 10^{+22}:\\ \;\;\;\;\log t \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(\log z + \log y\right) - t\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 62.2% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 7.6 \cdot 10^{+21}:\\ \;\;\;\;\log t \cdot a\\ \mathbf{else}:\\ \;\;\;\;-t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t 7.6e+21) (* (log t) a) (- t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= 7.6e+21) {
		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 <= 7.6d+21) 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 <= 7.6e+21) {
		tmp = Math.log(t) * a;
	} else {
		tmp = -t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= 7.6e+21:
		tmp = math.log(t) * a
	else:
		tmp = -t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= 7.6e+21)
		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 <= 7.6e+21)
		tmp = log(t) * a;
	else
		tmp = -t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 7.6e+21], N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision], (-t)]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq 7.6 \cdot 10^{+21}:\\
\;\;\;\;\log t \cdot a\\

\mathbf{else}:\\
\;\;\;\;-t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 7.6e21

    1. Initial program 99.4%

      \[\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.4%

        \[\leadsto \color{blue}{\left(\log \left(x + y\right) + \log z\right) - \left(t - \left(a - 0.5\right) \cdot \log t\right)} \]
      2. associate--l+99.4%

        \[\leadsto \color{blue}{\log \left(x + y\right) + \left(\log z - \left(t - \left(a - 0.5\right) \cdot \log t\right)\right)} \]
      3. sub-neg99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \color{blue}{\left(t + \left(-\left(a - 0.5\right) \cdot \log t\right)\right)}\right) \]
      4. +-commutative99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \color{blue}{\left(\left(-\left(a - 0.5\right) \cdot \log t\right) + t\right)}\right) \]
      5. *-commutative99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \left(\left(-\color{blue}{\log t \cdot \left(a - 0.5\right)}\right) + t\right)\right) \]
      6. distribute-rgt-neg-in99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \left(\color{blue}{\log t \cdot \left(-\left(a - 0.5\right)\right)} + t\right)\right) \]
      7. fma-undefine99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \color{blue}{\mathsf{fma}\left(\log t, -\left(a - 0.5\right), t\right)}\right) \]
      8. sub-neg99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, -\color{blue}{\left(a + \left(-0.5\right)\right)}, t\right)\right) \]
      9. +-commutative99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, -\color{blue}{\left(\left(-0.5\right) + a\right)}, t\right)\right) \]
      10. distribute-neg-in99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{\left(-\left(-0.5\right)\right) + \left(-a\right)}, t\right)\right) \]
      11. metadata-eval99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \left(-\color{blue}{-0.5}\right) + \left(-a\right), t\right)\right) \]
      12. metadata-eval99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{0.5} + \left(-a\right), t\right)\right) \]
      13. unsub-neg99.4%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{0.5 - a}, t\right)\right) \]
    3. Simplified99.4%

      \[\leadsto \color{blue}{\log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, 0.5 - a, t\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 46.8%

      \[\leadsto \color{blue}{a \cdot \log t} \]
    6. Step-by-step derivation
      1. *-commutative46.8%

        \[\leadsto \color{blue}{\log t \cdot a} \]
    7. Simplified46.8%

      \[\leadsto \color{blue}{\log t \cdot a} \]

    if 7.6e21 < 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. associate--l+99.9%

        \[\leadsto \color{blue}{\log \left(x + y\right) + \left(\log z - \left(t - \left(a - 0.5\right) \cdot \log t\right)\right)} \]
      3. sub-neg99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \color{blue}{\left(t + \left(-\left(a - 0.5\right) \cdot \log t\right)\right)}\right) \]
      4. +-commutative99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \color{blue}{\left(\left(-\left(a - 0.5\right) \cdot \log t\right) + t\right)}\right) \]
      5. *-commutative99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \left(\left(-\color{blue}{\log t \cdot \left(a - 0.5\right)}\right) + t\right)\right) \]
      6. distribute-rgt-neg-in99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \left(\color{blue}{\log t \cdot \left(-\left(a - 0.5\right)\right)} + t\right)\right) \]
      7. fma-undefine99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \color{blue}{\mathsf{fma}\left(\log t, -\left(a - 0.5\right), t\right)}\right) \]
      8. sub-neg99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, -\color{blue}{\left(a + \left(-0.5\right)\right)}, t\right)\right) \]
      9. +-commutative99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, -\color{blue}{\left(\left(-0.5\right) + a\right)}, t\right)\right) \]
      10. distribute-neg-in99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{\left(-\left(-0.5\right)\right) + \left(-a\right)}, t\right)\right) \]
      11. metadata-eval99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \left(-\color{blue}{-0.5}\right) + \left(-a\right), t\right)\right) \]
      12. metadata-eval99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{0.5} + \left(-a\right), t\right)\right) \]
      13. unsub-neg99.9%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{0.5 - a}, t\right)\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, 0.5 - a, t\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 78.9%

      \[\leadsto \color{blue}{-1 \cdot t} \]
    6. Step-by-step derivation
      1. neg-mul-178.9%

        \[\leadsto \color{blue}{-t} \]
    7. Simplified78.9%

      \[\leadsto \color{blue}{-t} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 19: 37.7% 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. associate--l+99.6%

      \[\leadsto \color{blue}{\log \left(x + y\right) + \left(\log z - \left(t - \left(a - 0.5\right) \cdot \log t\right)\right)} \]
    3. sub-neg99.6%

      \[\leadsto \log \left(x + y\right) + \left(\log z - \color{blue}{\left(t + \left(-\left(a - 0.5\right) \cdot \log t\right)\right)}\right) \]
    4. +-commutative99.6%

      \[\leadsto \log \left(x + y\right) + \left(\log z - \color{blue}{\left(\left(-\left(a - 0.5\right) \cdot \log t\right) + t\right)}\right) \]
    5. *-commutative99.6%

      \[\leadsto \log \left(x + y\right) + \left(\log z - \left(\left(-\color{blue}{\log t \cdot \left(a - 0.5\right)}\right) + t\right)\right) \]
    6. distribute-rgt-neg-in99.6%

      \[\leadsto \log \left(x + y\right) + \left(\log z - \left(\color{blue}{\log t \cdot \left(-\left(a - 0.5\right)\right)} + t\right)\right) \]
    7. fma-undefine99.6%

      \[\leadsto \log \left(x + y\right) + \left(\log z - \color{blue}{\mathsf{fma}\left(\log t, -\left(a - 0.5\right), t\right)}\right) \]
    8. sub-neg99.6%

      \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, -\color{blue}{\left(a + \left(-0.5\right)\right)}, t\right)\right) \]
    9. +-commutative99.6%

      \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, -\color{blue}{\left(\left(-0.5\right) + a\right)}, t\right)\right) \]
    10. distribute-neg-in99.6%

      \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{\left(-\left(-0.5\right)\right) + \left(-a\right)}, t\right)\right) \]
    11. metadata-eval99.6%

      \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \left(-\color{blue}{-0.5}\right) + \left(-a\right), t\right)\right) \]
    12. metadata-eval99.6%

      \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{0.5} + \left(-a\right), t\right)\right) \]
    13. unsub-neg99.6%

      \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{0.5 - a}, t\right)\right) \]
  3. Simplified99.6%

    \[\leadsto \color{blue}{\log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, 0.5 - a, t\right)\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in t around inf 40.7%

    \[\leadsto \color{blue}{-1 \cdot t} \]
  6. Step-by-step derivation
    1. neg-mul-140.7%

      \[\leadsto \color{blue}{-t} \]
  7. Simplified40.7%

    \[\leadsto \color{blue}{-t} \]
  8. 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 2024096 
(FPCore (x y z t a)
  :name "Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2"
  :precision binary64

  :alt
  (+ (log (+ x y)) (+ (- (log z) t) (* (- a 0.5) (log t))))

  (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))