Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2

Percentage Accurate: 99.6% → 99.6%
Time: 26.0s
Alternatives: 17
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 17 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, 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 2: 60.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \log \left(y \cdot z\right)\\ \mathbf{if}\;t \leq 1.4 \cdot 10^{-281}:\\ \;\;\;\;\mathsf{fma}\left(\log t, a + -0.5, t\_1\right)\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-188}:\\ \;\;\;\;\log z + \left(\log \left(x + y\right) + \log t \cdot -0.5\right)\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{+105}:\\ \;\;\;\;t\_1 + \left(\log t \cdot \left(a + -0.5\right) - t\right)\\ \mathbf{else}:\\ \;\;\;\;-t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (log (* y z))))
   (if (<= t 1.4e-281)
     (fma (log t) (+ a -0.5) t_1)
     (if (<= t 2.2e-188)
       (+ (log z) (+ (log (+ x y)) (* (log t) -0.5)))
       (if (<= t 1.5e+105) (+ t_1 (- (* (log t) (+ a -0.5)) t)) (- t))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = log((y * z));
	double tmp;
	if (t <= 1.4e-281) {
		tmp = fma(log(t), (a + -0.5), t_1);
	} else if (t <= 2.2e-188) {
		tmp = log(z) + (log((x + y)) + (log(t) * -0.5));
	} else if (t <= 1.5e+105) {
		tmp = t_1 + ((log(t) * (a + -0.5)) - t);
	} else {
		tmp = -t;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = log(Float64(y * z))
	tmp = 0.0
	if (t <= 1.4e-281)
		tmp = fma(log(t), Float64(a + -0.5), t_1);
	elseif (t <= 2.2e-188)
		tmp = Float64(log(z) + Float64(log(Float64(x + y)) + Float64(log(t) * -0.5)));
	elseif (t <= 1.5e+105)
		tmp = Float64(t_1 + Float64(Float64(log(t) * Float64(a + -0.5)) - t));
	else
		tmp = Float64(-t);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 1.4e-281], N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 2.2e-188], N[(N[Log[z], $MachinePrecision] + N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e+105], N[(t$95$1 + N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], (-t)]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 2.2 \cdot 10^{-188}:\\
\;\;\;\;\log z + \left(\log \left(x + y\right) + \log t \cdot -0.5\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < 1.40000000000000003e-281

    1. Initial program 99.3%

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

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

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

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

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

        \[\leadsto \left(\left(\log \left(x + y\right) + \log z\right) - t\right) + {\left(\sqrt[3]{\log t \cdot \left(1 \cdot \color{blue}{\left(a + \left(-0.5\right)\right)}\right)}\right)}^{3} \]
      6. *-un-lft-identity97.7%

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

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

      \[\leadsto \left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \color{blue}{{\left(\sqrt[3]{\log t \cdot \left(a + -0.5\right)}\right)}^{3}} \]
    5. Step-by-step derivation
      1. sum-log97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.40000000000000003e-281 < t < 2.2e-188

    1. Initial program 99.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-99.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+98.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-neg98.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. +-commutative98.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. *-commutative98.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-in98.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-udef98.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-neg98.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. +-commutative98.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-in98.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-eval98.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-eval98.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-neg98.8%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{0.5 - a}, t\right)\right) \]
    3. Simplified98.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 t around 0 98.8%

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

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

        \[\leadsto \color{blue}{\log \left(z \cdot \left(x + y\right)\right)} - 0.5 \cdot \log t \]
      2. cancel-sign-sub-inv45.1%

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

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

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

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

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

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

    if 2.2e-188 < t < 1.5e105

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \color{blue}{{\left(\sqrt[3]{\log t \cdot \left(a + -0.5\right)}\right)}^{3}} \]
    5. Step-by-step derivation
      1. sum-log77.1%

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

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

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

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

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

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

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

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

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

    if 1.5e105 < 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-udef99.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 84.8%

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

        \[\leadsto \color{blue}{-t} \]
    7. Simplified84.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.4 \cdot 10^{-281}:\\ \;\;\;\;\mathsf{fma}\left(\log t, a + -0.5, \log \left(y \cdot z\right)\right)\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-188}:\\ \;\;\;\;\log z + \left(\log \left(x + y\right) + \log t \cdot -0.5\right)\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{+105}:\\ \;\;\;\;\log \left(y \cdot z\right) + \left(\log t \cdot \left(a + -0.5\right) - t\right)\\ \mathbf{else}:\\ \;\;\;\;-t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 58.1% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < 1.40000000000000003e-281

    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.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-udef99.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 t around 0 99.4%

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

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

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

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

    if 1.40000000000000003e-281 < t < 2e-204

    1. Initial program 99.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-99.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+98.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-neg98.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. +-commutative98.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. *-commutative98.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-in98.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-udef98.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-neg98.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. +-commutative98.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-in98.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-eval98.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-eval98.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-neg98.8%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{0.5 - a}, t\right)\right) \]
    3. Simplified98.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 t around 0 98.8%

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

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

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

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

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

    if 2e-204 < t < 1.25000000000000011e105

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \color{blue}{{\left(\sqrt[3]{\log t \cdot \left(a + -0.5\right)}\right)}^{3}} \]
    5. Step-by-step derivation
      1. sum-log77.5%

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

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

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

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

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

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

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

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

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

    if 1.25000000000000011e105 < 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-udef99.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 84.8%

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

        \[\leadsto \color{blue}{-t} \]
    7. Simplified84.8%

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

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

Alternative 4: 58.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \log \left(y \cdot z\right)\\ \mathbf{if}\;t \leq 1.4 \cdot 10^{-281}:\\ \;\;\;\;\mathsf{fma}\left(\log t, a + -0.5, t\_1\right)\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{-204}:\\ \;\;\;\;\left(\log z + \log y\right) - 0.5 \cdot \log t\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{+104}:\\ \;\;\;\;t\_1 + \left(\log t \cdot \left(a + -0.5\right) - t\right)\\ \mathbf{else}:\\ \;\;\;\;-t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (log (* y z))))
   (if (<= t 1.4e-281)
     (fma (log t) (+ a -0.5) t_1)
     (if (<= t 2.05e-204)
       (- (+ (log z) (log y)) (* 0.5 (log t)))
       (if (<= t 1.95e+104) (+ t_1 (- (* (log t) (+ a -0.5)) t)) (- t))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = log((y * z));
	double tmp;
	if (t <= 1.4e-281) {
		tmp = fma(log(t), (a + -0.5), t_1);
	} else if (t <= 2.05e-204) {
		tmp = (log(z) + log(y)) - (0.5 * log(t));
	} else if (t <= 1.95e+104) {
		tmp = t_1 + ((log(t) * (a + -0.5)) - t);
	} else {
		tmp = -t;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = log(Float64(y * z))
	tmp = 0.0
	if (t <= 1.4e-281)
		tmp = fma(log(t), Float64(a + -0.5), t_1);
	elseif (t <= 2.05e-204)
		tmp = Float64(Float64(log(z) + log(y)) - Float64(0.5 * log(t)));
	elseif (t <= 1.95e+104)
		tmp = Float64(t_1 + Float64(Float64(log(t) * Float64(a + -0.5)) - t));
	else
		tmp = Float64(-t);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 1.4e-281], N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 2.05e-204], N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - N[(0.5 * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.95e+104], N[(t$95$1 + N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], (-t)]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < 1.40000000000000003e-281

    1. Initial program 99.3%

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

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

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

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

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

        \[\leadsto \left(\left(\log \left(x + y\right) + \log z\right) - t\right) + {\left(\sqrt[3]{\log t \cdot \left(1 \cdot \color{blue}{\left(a + \left(-0.5\right)\right)}\right)}\right)}^{3} \]
      6. *-un-lft-identity97.7%

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

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

      \[\leadsto \left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \color{blue}{{\left(\sqrt[3]{\log t \cdot \left(a + -0.5\right)}\right)}^{3}} \]
    5. Step-by-step derivation
      1. sum-log97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.40000000000000003e-281 < t < 2.05e-204

    1. Initial program 99.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-99.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+98.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-neg98.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. +-commutative98.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. *-commutative98.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-in98.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-udef98.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-neg98.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. +-commutative98.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-in98.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-eval98.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-eval98.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-neg98.8%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{0.5 - a}, t\right)\right) \]
    3. Simplified98.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 t around 0 98.8%

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

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

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

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

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

    if 2.05e-204 < t < 1.95000000000000008e104

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \color{blue}{{\left(\sqrt[3]{\log t \cdot \left(a + -0.5\right)}\right)}^{3}} \]
    5. Step-by-step derivation
      1. sum-log77.5%

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

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

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

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

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

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

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

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

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

    if 1.95000000000000008e104 < 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-udef99.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 84.8%

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

        \[\leadsto \color{blue}{-t} \]
    7. Simplified84.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.4 \cdot 10^{-281}:\\ \;\;\;\;\mathsf{fma}\left(\log t, a + -0.5, \log \left(y \cdot z\right)\right)\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{-204}:\\ \;\;\;\;\left(\log z + \log y\right) - 0.5 \cdot \log t\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{+104}:\\ \;\;\;\;\log \left(y \cdot z\right) + \left(\log t \cdot \left(a + -0.5\right) - t\right)\\ \mathbf{else}:\\ \;\;\;\;-t\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 85.2% accurate, 1.0× speedup?

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

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

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

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


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

    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 97.2%

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

    if 3.0999999999999998e30 < t < 2.6499999999999999e104

    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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.1%

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

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

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

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

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

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

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

      \[\leadsto \left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \color{blue}{{\left(\sqrt[3]{\log t \cdot \left(a + -0.5\right)}\right)}^{3}} \]
    5. Step-by-step derivation
      1. sum-log88.4%

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

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

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

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

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

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

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

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

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

    if 2.6499999999999999e104 < 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-udef99.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 84.8%

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

        \[\leadsto \color{blue}{-t} \]
    7. Simplified84.8%

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

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

Alternative 6: 85.2% accurate, 1.0× speedup?

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

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

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

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


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

    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-udef99.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 t around 0 97.2%

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

    if 2.99999999999999978e30 < t < 2.5500000000000001e104

    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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.1%

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

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

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

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

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

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

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

      \[\leadsto \left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \color{blue}{{\left(\sqrt[3]{\log t \cdot \left(a + -0.5\right)}\right)}^{3}} \]
    5. Step-by-step derivation
      1. sum-log88.4%

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

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

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

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

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

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

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

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

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

    if 2.5500000000000001e104 < 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-udef99.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 84.8%

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

        \[\leadsto \color{blue}{-t} \]
    7. Simplified84.8%

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

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

Alternative 7: 85.2% accurate, 1.0× speedup?

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

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

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

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


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

    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-udef99.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 t around 0 97.3%

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

    if 2.99999999999999978e30 < t < 6.7999999999999994e104

    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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.1%

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

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

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

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

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

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

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

      \[\leadsto \left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \color{blue}{{\left(\sqrt[3]{\log t \cdot \left(a + -0.5\right)}\right)}^{3}} \]
    5. Step-by-step derivation
      1. sum-log88.4%

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

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

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

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

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

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

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

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

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

    if 6.7999999999999994e104 < 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-udef99.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 84.8%

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

        \[\leadsto \color{blue}{-t} \]
    7. Simplified84.8%

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

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

Alternative 8: 66.3% accurate, 1.0× speedup?

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

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

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

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


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

    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-udef99.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 t around 0 97.2%

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

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

    if 2.99999999999999978e30 < t < 3.90000000000000017e104

    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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.1%

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

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

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

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

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

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

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

      \[\leadsto \left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \color{blue}{{\left(\sqrt[3]{\log t \cdot \left(a + -0.5\right)}\right)}^{3}} \]
    5. Step-by-step derivation
      1. sum-log88.4%

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

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

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

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

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

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

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

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

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

    if 3.90000000000000017e104 < 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-udef99.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 84.8%

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

        \[\leadsto \color{blue}{-t} \]
    7. Simplified84.8%

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

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

Alternative 9: 63.3% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;a \leq -1.25 \cdot 10^{-277}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;a \leq 8 \cdot 10^{-135}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 6.5 \cdot 10^{-96}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;a \leq 2 \cdot 10^{+34}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.09999999999999995e42 or 1.99999999999999989e34 < a

    1. Initial program 99.7%

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

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

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

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

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

    if -2.09999999999999995e42 < a < -1.25e-277 or 8.0000000000000003e-135 < a < 6.50000000000000001e-96

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \color{blue}{{\left(\sqrt[3]{\log t \cdot \left(a + -0.5\right)}\right)}^{3}} \]
    5. Step-by-step derivation
      1. sum-log77.4%

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

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

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

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

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

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

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

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

    if -1.25e-277 < a < 8.0000000000000003e-135 or 6.50000000000000001e-96 < a < 1.99999999999999989e34

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{+42}:\\ \;\;\;\;a \cdot \log t\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-277}:\\ \;\;\;\;\left(\log \left(y \cdot z\right) - t\right) + \log t \cdot -0.5\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-135}:\\ \;\;\;\;\log \left(x + y\right) + \left(\log z - t\right)\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-96}:\\ \;\;\;\;\left(\log \left(y \cdot z\right) - t\right) + \log t \cdot -0.5\\ \mathbf{elif}\;a \leq 2 \cdot 10^{+34}:\\ \;\;\;\;\log \left(x + y\right) + \left(\log z - t\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \log t\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 66.4% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;a \leq -2.4 \cdot 10^{-243}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;a \leq 2 \cdot 10^{+36}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.80000000000000019e43 or 2.00000000000000008e36 < a

    1. Initial program 99.7%

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

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

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

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

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

    if -2.80000000000000019e43 < a < -2.4000000000000001e-243 or -1.6500000000000001e-248 < a < 2.00000000000000008e36

    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-udef99.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 61.4%

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

    if -2.4000000000000001e-243 < a < -1.6500000000000001e-248

    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.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-udef99.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 t around 0 97.6%

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

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

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

        \[\leadsto \color{blue}{\log \left(y \cdot z\right)} - 0.5 \cdot \log t \]
      2. cancel-sign-sub-inv83.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.8 \cdot 10^{+43}:\\ \;\;\;\;a \cdot \log t\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-243}:\\ \;\;\;\;\log \left(x + y\right) + \left(\log z - t\right)\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-248}:\\ \;\;\;\;\log \left(y \cdot z\right) + \log t \cdot -0.5\\ \mathbf{elif}\;a \leq 2 \cdot 10^{+36}:\\ \;\;\;\;\log \left(x + y\right) + \left(\log z - t\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \log t\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 78.0% accurate, 1.4× speedup?

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

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

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


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

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.64999999999999999e105 < 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-udef99.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 84.8%

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

        \[\leadsto \color{blue}{-t} \]
    7. Simplified84.8%

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

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

Alternative 12: 58.4% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \log t\\
\mathbf{if}\;t \leq 1.8 \cdot 10^{-286}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 3.7 \cdot 10^{-191}:\\
\;\;\;\;\log \left(\frac{\left(x + y\right) \cdot z}{\sqrt{t}}\right)\\

\mathbf{elif}\;t \leq 4.5 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 1.80000000000000007e-286 or 3.6999999999999997e-191 < t < 4.5000000000000001e46

    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-udef99.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 62.6%

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

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

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

    if 1.80000000000000007e-286 < t < 3.6999999999999997e-191

    1. Initial program 98.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-98.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+98.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-neg98.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. +-commutative98.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. *-commutative98.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-in98.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-udef98.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-neg98.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. +-commutative98.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-in98.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-eval98.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-eval98.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-neg98.8%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{0.5 - a}, t\right)\right) \]
    3. Simplified98.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 t around 0 98.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \log \left(z \cdot \left(y + x\right)\right) + \sqrt{\left(\log t \cdot \log t\right) \cdot \color{blue}{0.25}} \]
      5. metadata-eval45.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \log \left(\frac{z \cdot \left(y + x\right)}{e^{\color{blue}{\sqrt{\left(\log t \cdot -0.5\right) \cdot \left(\log t \cdot -0.5\right)}}}}\right) \]
      17. swap-sqr5.4%

        \[\leadsto \log \left(\frac{z \cdot \left(y + x\right)}{e^{\sqrt{\color{blue}{\left(\log t \cdot \log t\right) \cdot \left(-0.5 \cdot -0.5\right)}}}}\right) \]
      18. metadata-eval5.4%

        \[\leadsto \log \left(\frac{z \cdot \left(y + x\right)}{e^{\sqrt{\left(\log t \cdot \log t\right) \cdot \color{blue}{0.25}}}}\right) \]
      19. metadata-eval5.4%

        \[\leadsto \log \left(\frac{z \cdot \left(y + x\right)}{e^{\sqrt{\left(\log t \cdot \log t\right) \cdot \color{blue}{\left(0.5 \cdot 0.5\right)}}}}\right) \]
    10. Applied egg-rr38.3%

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

    if 4.5000000000000001e46 < 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-udef99.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 79.4%

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

        \[\leadsto \color{blue}{-t} \]
    7. Simplified79.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.8 \cdot 10^{-286}:\\ \;\;\;\;a \cdot \log t\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{-191}:\\ \;\;\;\;\log \left(\frac{\left(x + y\right) \cdot z}{\sqrt{t}}\right)\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{+46}:\\ \;\;\;\;a \cdot \log t\\ \mathbf{else}:\\ \;\;\;\;-t\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 57.3% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \log t\\
\mathbf{if}\;t \leq 1.4 \cdot 10^{-281}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 2.7 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 1.40000000000000003e-281 or 8.2000000000000004e-191 < t < 2.7000000000000002e46

    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-udef99.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 62.3%

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

        \[\leadsto \color{blue}{\log t \cdot a} \]
    7. Simplified62.3%

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

    if 1.40000000000000003e-281 < t < 8.2000000000000004e-191

    1. Initial program 99.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-99.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+98.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-neg98.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. +-commutative98.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. *-commutative98.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-in98.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-udef98.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-neg98.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. +-commutative98.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-in98.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-eval98.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-eval98.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-neg98.8%

        \[\leadsto \log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, \color{blue}{0.5 - a}, t\right)\right) \]
    3. Simplified98.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 t around 0 98.8%

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

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

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

        \[\leadsto \color{blue}{\log \left(y \cdot z\right)} - 0.5 \cdot \log t \]
      2. cancel-sign-sub-inv16.1%

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

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

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

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

    if 2.7000000000000002e46 < 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-udef99.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 79.4%

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

        \[\leadsto \color{blue}{-t} \]
    7. Simplified79.4%

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

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

Alternative 14: 60.6% accurate, 1.4× speedup?

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

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

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


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

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \color{blue}{{\left(\sqrt[3]{\log t \cdot \left(a + -0.5\right)}\right)}^{3}} \]
    5. Step-by-step derivation
      1. sum-log74.0%

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

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

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

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

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

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

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

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

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

    if 9.49999999999999922e103 < 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-udef99.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 84.8%

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

        \[\leadsto \color{blue}{-t} \]
    7. Simplified84.8%

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

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

Alternative 15: 59.1% accurate, 1.5× speedup?

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

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

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


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

    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-udef99.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 t around 0 95.9%

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

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

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

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

    if 2.64999999999999989e46 < 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-udef99.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 79.4%

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

        \[\leadsto \color{blue}{-t} \]
    7. Simplified79.4%

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

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

Alternative 16: 61.6% accurate, 2.9× speedup?

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

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

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


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

    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-udef99.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 52.3%

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

        \[\leadsto \color{blue}{\log t \cdot a} \]
    7. Simplified52.3%

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

    if 4e46 < 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-udef99.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 79.4%

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

        \[\leadsto \color{blue}{-t} \]
    7. Simplified79.4%

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

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

Alternative 17: 38.1% 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-udef99.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 39.5%

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

      \[\leadsto \color{blue}{-t} \]
  7. Simplified39.5%

    \[\leadsto \color{blue}{-t} \]
  8. Final simplification39.5%

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

Developer target: 99.6% accurate, 1.0× speedup?

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

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

Reproduce

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

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

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