Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2

Percentage Accurate: 99.6% → 99.6%
Time: 17.3s
Alternatives: 17
Speedup: N/A×

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, 0.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 76.4% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (log.f64 z) < 373

    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) + \left(\log z - t\right)\right)} + \left(a - 0.5\right) \cdot \log t \]
      2. sub-neg99.6%

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

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

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

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

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

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

    if 373 < (log.f64 z)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 54.7% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (log.f64 z) < 373

    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) + \left(\log z - t\right)\right)} + \left(a - 0.5\right) \cdot \log t \]
      2. sub-neg99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 373 < (log.f64 z)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 68.8% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq 1.5 \cdot 10^{+90}:\\
\;\;\;\;t\_1 + \left(\log \left(z \cdot y\right) - t\right)\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.8e6 < t < 1.49999999999999989e90

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.49999999999999989e90 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \log \left(x + y\right) + \color{blue}{-1 \cdot t} \]
    6. Step-by-step derivation
      1. neg-mul-186.3%

        \[\leadsto \log \left(x + y\right) + \color{blue}{\left(-t\right)} \]
    7. Simplified86.3%

      \[\leadsto \log \left(x + y\right) + \color{blue}{\left(-t\right)} \]
    8. Taylor expanded in t around inf 86.3%

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

        \[\leadsto \color{blue}{-t} \]
    10. Simplified86.3%

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

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

Alternative 5: 68.8% accurate, 1.0× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.6e6 < t < 2.7e91

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.7e91 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \log \left(x + y\right) + \color{blue}{-1 \cdot t} \]
    6. Step-by-step derivation
      1. neg-mul-186.3%

        \[\leadsto \log \left(x + y\right) + \color{blue}{\left(-t\right)} \]
    7. Simplified86.3%

      \[\leadsto \log \left(x + y\right) + \color{blue}{\left(-t\right)} \]
    8. Taylor expanded in t around inf 86.3%

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

        \[\leadsto \color{blue}{-t} \]
    10. Simplified86.3%

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

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

Alternative 6: 99.6% accurate, 1.0× speedup?

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

\\
\left(\left(\log z - t\right) + \log \left(x + y\right)\right) + \left(a + -0.5\right) \cdot \log 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) + \left(\log z - t\right)\right)} + \left(a - 0.5\right) \cdot \log t \]
    2. sub-neg99.6%

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

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

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

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

Alternative 7: 68.7% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 60.9% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \log \left(x + y\right)\\ \mathbf{if}\;a \leq -2.5 \cdot 10^{+21}:\\ \;\;\;\;\log \left(\sqrt[3]{t}\right) \cdot \left(a \cdot 3\right)\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-56}:\\ \;\;\;\;\left|t\_1\right| - t\\ \mathbf{elif}\;a \leq 19:\\ \;\;\;\;\log \left(y \cdot \left(z \cdot {t}^{\left(a + -0.5\right)}\right)\right) - t\\ \mathbf{else}:\\ \;\;\;\;t\_1 + a \cdot \log t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (log (+ x y))))
   (if (<= a -2.5e+21)
     (* (log (cbrt t)) (* a 3.0))
     (if (<= a -6.8e-56)
       (- (fabs t_1) t)
       (if (<= a 19.0)
         (- (log (* y (* z (pow t (+ a -0.5))))) t)
         (+ t_1 (* a (log t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = log((x + y));
	double tmp;
	if (a <= -2.5e+21) {
		tmp = log(cbrt(t)) * (a * 3.0);
	} else if (a <= -6.8e-56) {
		tmp = fabs(t_1) - t;
	} else if (a <= 19.0) {
		tmp = log((y * (z * pow(t, (a + -0.5))))) - t;
	} else {
		tmp = t_1 + (a * log(t));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = Math.log((x + y));
	double tmp;
	if (a <= -2.5e+21) {
		tmp = Math.log(Math.cbrt(t)) * (a * 3.0);
	} else if (a <= -6.8e-56) {
		tmp = Math.abs(t_1) - t;
	} else if (a <= 19.0) {
		tmp = Math.log((y * (z * Math.pow(t, (a + -0.5))))) - t;
	} else {
		tmp = t_1 + (a * Math.log(t));
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = log(Float64(x + y))
	tmp = 0.0
	if (a <= -2.5e+21)
		tmp = Float64(log(cbrt(t)) * Float64(a * 3.0));
	elseif (a <= -6.8e-56)
		tmp = Float64(abs(t_1) - t);
	elseif (a <= 19.0)
		tmp = Float64(log(Float64(y * Float64(z * (t ^ Float64(a + -0.5))))) - t);
	else
		tmp = Float64(t_1 + Float64(a * log(t)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[a, -2.5e+21], N[(N[Log[N[Power[t, 1/3], $MachinePrecision]], $MachinePrecision] * N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -6.8e-56], N[(N[Abs[t$95$1], $MachinePrecision] - t), $MachinePrecision], If[LessEqual[a, 19.0], N[(N[Log[N[(y * N[(z * N[Power[t, N[(a + -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision], N[(t$95$1 + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \log \left(x + y\right)\\
\mathbf{if}\;a \leq -2.5 \cdot 10^{+21}:\\
\;\;\;\;\log \left(\sqrt[3]{t}\right) \cdot \left(a \cdot 3\right)\\

\mathbf{elif}\;a \leq -6.8 \cdot 10^{-56}:\\
\;\;\;\;\left|t\_1\right| - t\\

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

\mathbf{else}:\\
\;\;\;\;t\_1 + a \cdot \log t\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.5e21

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\left(-1.5 \cdot \log \left(\sqrt[3]{t}\right) + 3 \cdot \left(a \cdot \log \left(\sqrt[3]{t}\right)\right)\right)} \]
    12. Step-by-step derivation
      1. associate-*r*99.7%

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

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

      \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\log \left(\sqrt[3]{t}\right) \cdot \left(-1.5 + 3 \cdot a\right)} \]
    14. Taylor expanded in a around inf 76.3%

      \[\leadsto \color{blue}{3 \cdot \left(a \cdot \log \left(\sqrt[3]{t}\right)\right)} \]
    15. Step-by-step derivation
      1. associate-*r*76.5%

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

        \[\leadsto \color{blue}{\log \left(\sqrt[3]{t}\right) \cdot \left(3 \cdot a\right)} \]
    16. Simplified76.5%

      \[\leadsto \color{blue}{\log \left(\sqrt[3]{t}\right) \cdot \left(3 \cdot a\right)} \]

    if -2.5e21 < a < -6.79999999999999964e-56

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \log \left(x + y\right) + \color{blue}{-1 \cdot t} \]
    6. Step-by-step derivation
      1. neg-mul-170.6%

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{{\log \left(x + y\right)}^{2}}} + \left(-t\right) \]
    9. Applied egg-rr71.7%

      \[\leadsto \color{blue}{\sqrt{{\log \left(x + y\right)}^{2}}} + \left(-t\right) \]
    10. Step-by-step derivation
      1. unpow271.7%

        \[\leadsto \sqrt{\color{blue}{\log \left(x + y\right) \cdot \log \left(x + y\right)}} + \left(-t\right) \]
      2. rem-sqrt-square71.7%

        \[\leadsto \color{blue}{\left|\log \left(x + y\right)\right|} + \left(-t\right) \]
      3. +-commutative71.7%

        \[\leadsto \left|\log \color{blue}{\left(y + x\right)}\right| + \left(-t\right) \]
    11. Simplified71.7%

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

    if -6.79999999999999964e-56 < a < 19

    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) + \left(\log z - t\right)\right)} + \left(a - 0.5\right) \cdot \log t \]
      2. sub-neg99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \log \left(\left(z \cdot \color{blue}{\frac{e^{\log y}}{e^{t}}}\right) \cdot e^{\left(a + -0.5\right) \cdot \log t}\right) \]
      6. add-exp-log14.3%

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

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

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

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

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

        \[\leadsto \log \left(y \cdot \color{blue}{\left(e^{\log t \cdot \left(a - 0.5\right)} \cdot z\right)}\right) + -1 \cdot t \]
      2. exp-to-pow48.4%

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

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

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

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

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

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

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

    if 19 < a

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 67.4% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \log \left(x + y\right)\\ \mathbf{if}\;a \leq -2.3 \cdot 10^{+20}:\\ \;\;\;\;\log \left(\sqrt[3]{t}\right) \cdot \left(a \cdot 3\right)\\ \mathbf{elif}\;a \leq 410000000:\\ \;\;\;\;\left(\log z - t\right) + t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_1 + a \cdot \log t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (log (+ x y))))
   (if (<= a -2.3e+20)
     (* (log (cbrt t)) (* a 3.0))
     (if (<= a 410000000.0) (+ (- (log z) t) t_1) (+ t_1 (* a (log t)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = log((x + y));
	double tmp;
	if (a <= -2.3e+20) {
		tmp = log(cbrt(t)) * (a * 3.0);
	} else if (a <= 410000000.0) {
		tmp = (log(z) - t) + t_1;
	} else {
		tmp = t_1 + (a * log(t));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = Math.log((x + y));
	double tmp;
	if (a <= -2.3e+20) {
		tmp = Math.log(Math.cbrt(t)) * (a * 3.0);
	} else if (a <= 410000000.0) {
		tmp = (Math.log(z) - t) + t_1;
	} else {
		tmp = t_1 + (a * Math.log(t));
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = log(Float64(x + y))
	tmp = 0.0
	if (a <= -2.3e+20)
		tmp = Float64(log(cbrt(t)) * Float64(a * 3.0));
	elseif (a <= 410000000.0)
		tmp = Float64(Float64(log(z) - t) + t_1);
	else
		tmp = Float64(t_1 + Float64(a * log(t)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[a, -2.3e+20], N[(N[Log[N[Power[t, 1/3], $MachinePrecision]], $MachinePrecision] * N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 410000000.0], N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \log \left(x + y\right)\\
\mathbf{if}\;a \leq -2.3 \cdot 10^{+20}:\\
\;\;\;\;\log \left(\sqrt[3]{t}\right) \cdot \left(a \cdot 3\right)\\

\mathbf{elif}\;a \leq 410000000:\\
\;\;\;\;\left(\log z - t\right) + t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_1 + a \cdot \log t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.3e20

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\left(-1.5 \cdot \log \left(\sqrt[3]{t}\right) + 3 \cdot \left(a \cdot \log \left(\sqrt[3]{t}\right)\right)\right)} \]
    12. Step-by-step derivation
      1. associate-*r*99.7%

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

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

      \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\log \left(\sqrt[3]{t}\right) \cdot \left(-1.5 + 3 \cdot a\right)} \]
    14. Taylor expanded in a around inf 76.3%

      \[\leadsto \color{blue}{3 \cdot \left(a \cdot \log \left(\sqrt[3]{t}\right)\right)} \]
    15. Step-by-step derivation
      1. associate-*r*76.5%

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

        \[\leadsto \color{blue}{\log \left(\sqrt[3]{t}\right) \cdot \left(3 \cdot a\right)} \]
    16. Simplified76.5%

      \[\leadsto \color{blue}{\log \left(\sqrt[3]{t}\right) \cdot \left(3 \cdot a\right)} \]

    if -2.3e20 < a < 4.1e8

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.1e8 < a

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 66.6% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \log \left(x + y\right)\\ \mathbf{if}\;a \leq -5.5 \cdot 10^{+20}:\\ \;\;\;\;\log \left(\sqrt[3]{t}\right) \cdot \left(a \cdot 3\right)\\ \mathbf{elif}\;a \leq 1900000000:\\ \;\;\;\;t\_1 - t\\ \mathbf{else}:\\ \;\;\;\;t\_1 + a \cdot \log t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (log (+ x y))))
   (if (<= a -5.5e+20)
     (* (log (cbrt t)) (* a 3.0))
     (if (<= a 1900000000.0) (- t_1 t) (+ t_1 (* a (log t)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = log((x + y));
	double tmp;
	if (a <= -5.5e+20) {
		tmp = log(cbrt(t)) * (a * 3.0);
	} else if (a <= 1900000000.0) {
		tmp = t_1 - t;
	} else {
		tmp = t_1 + (a * log(t));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = Math.log((x + y));
	double tmp;
	if (a <= -5.5e+20) {
		tmp = Math.log(Math.cbrt(t)) * (a * 3.0);
	} else if (a <= 1900000000.0) {
		tmp = t_1 - t;
	} else {
		tmp = t_1 + (a * Math.log(t));
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = log(Float64(x + y))
	tmp = 0.0
	if (a <= -5.5e+20)
		tmp = Float64(log(cbrt(t)) * Float64(a * 3.0));
	elseif (a <= 1900000000.0)
		tmp = Float64(t_1 - t);
	else
		tmp = Float64(t_1 + Float64(a * log(t)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[a, -5.5e+20], N[(N[Log[N[Power[t, 1/3], $MachinePrecision]], $MachinePrecision] * N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1900000000.0], N[(t$95$1 - t), $MachinePrecision], N[(t$95$1 + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \log \left(x + y\right)\\
\mathbf{if}\;a \leq -5.5 \cdot 10^{+20}:\\
\;\;\;\;\log \left(\sqrt[3]{t}\right) \cdot \left(a \cdot 3\right)\\

\mathbf{elif}\;a \leq 1900000000:\\
\;\;\;\;t\_1 - t\\

\mathbf{else}:\\
\;\;\;\;t\_1 + a \cdot \log t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.5e20

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\left(-1.5 \cdot \log \left(\sqrt[3]{t}\right) + 3 \cdot \left(a \cdot \log \left(\sqrt[3]{t}\right)\right)\right)} \]
    12. Step-by-step derivation
      1. associate-*r*99.7%

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

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

      \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\log \left(\sqrt[3]{t}\right) \cdot \left(-1.5 + 3 \cdot a\right)} \]
    14. Taylor expanded in a around inf 76.3%

      \[\leadsto \color{blue}{3 \cdot \left(a \cdot \log \left(\sqrt[3]{t}\right)\right)} \]
    15. Step-by-step derivation
      1. associate-*r*76.5%

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

        \[\leadsto \color{blue}{\log \left(\sqrt[3]{t}\right) \cdot \left(3 \cdot a\right)} \]
    16. Simplified76.5%

      \[\leadsto \color{blue}{\log \left(\sqrt[3]{t}\right) \cdot \left(3 \cdot a\right)} \]

    if -5.5e20 < a < 1.9e9

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \log \left(x + y\right) + \color{blue}{-1 \cdot t} \]
    6. Step-by-step derivation
      1. neg-mul-160.3%

        \[\leadsto \log \left(x + y\right) + \color{blue}{\left(-t\right)} \]
    7. Simplified60.3%

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

    if 1.9e9 < a

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 66.5% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.8 \cdot 10^{+20}:\\ \;\;\;\;\log \left(\sqrt[3]{t}\right) \cdot \left(a \cdot 3\right)\\ \mathbf{elif}\;a \leq 220000000:\\ \;\;\;\;\log \left(x + y\right) - t\\ \mathbf{else}:\\ \;\;\;\;a \cdot \log t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -3.8e+20)
   (* (log (cbrt t)) (* a 3.0))
   (if (<= a 220000000.0) (- (log (+ x y)) t) (* a (log t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -3.8e+20) {
		tmp = log(cbrt(t)) * (a * 3.0);
	} else if (a <= 220000000.0) {
		tmp = log((x + y)) - t;
	} else {
		tmp = a * log(t);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -3.8e+20) {
		tmp = Math.log(Math.cbrt(t)) * (a * 3.0);
	} else if (a <= 220000000.0) {
		tmp = Math.log((x + y)) - t;
	} else {
		tmp = a * Math.log(t);
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -3.8e+20)
		tmp = Float64(log(cbrt(t)) * Float64(a * 3.0));
	elseif (a <= 220000000.0)
		tmp = Float64(log(Float64(x + y)) - t);
	else
		tmp = Float64(a * log(t));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.8e+20], N[(N[Log[N[Power[t, 1/3], $MachinePrecision]], $MachinePrecision] * N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 220000000.0], N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{+20}:\\
\;\;\;\;\log \left(\sqrt[3]{t}\right) \cdot \left(a \cdot 3\right)\\

\mathbf{elif}\;a \leq 220000000:\\
\;\;\;\;\log \left(x + y\right) - t\\

\mathbf{else}:\\
\;\;\;\;a \cdot \log t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.8e20

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\left(-1.5 \cdot \log \left(\sqrt[3]{t}\right) + 3 \cdot \left(a \cdot \log \left(\sqrt[3]{t}\right)\right)\right)} \]
    12. Step-by-step derivation
      1. associate-*r*99.7%

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

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

      \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\log \left(\sqrt[3]{t}\right) \cdot \left(-1.5 + 3 \cdot a\right)} \]
    14. Taylor expanded in a around inf 76.3%

      \[\leadsto \color{blue}{3 \cdot \left(a \cdot \log \left(\sqrt[3]{t}\right)\right)} \]
    15. Step-by-step derivation
      1. associate-*r*76.5%

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

        \[\leadsto \color{blue}{\log \left(\sqrt[3]{t}\right) \cdot \left(3 \cdot a\right)} \]
    16. Simplified76.5%

      \[\leadsto \color{blue}{\log \left(\sqrt[3]{t}\right) \cdot \left(3 \cdot a\right)} \]

    if -3.8e20 < a < 2.2e8

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \log \left(x + y\right) + \color{blue}{-1 \cdot t} \]
    6. Step-by-step derivation
      1. neg-mul-160.3%

        \[\leadsto \log \left(x + y\right) + \color{blue}{\left(-t\right)} \]
    7. Simplified60.3%

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

    if 2.2e8 < a

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\log t \cdot a} \]
    10. Simplified84.8%

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

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

Alternative 12: 66.6% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{+21} \lor \neg \left(a \leq 2400000000\right):\\
\;\;\;\;a \cdot \log t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.2e21 or 2.4e9 < 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) + \left(\log z - t\right)\right)} + \left(a - 0.5\right) \cdot \log t \]
      2. sub-neg99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\log t \cdot a} \]
    10. Simplified81.0%

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

    if -7.2e21 < a < 2.4e9

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \log \left(x + y\right) + \color{blue}{-1 \cdot t} \]
    6. Step-by-step derivation
      1. neg-mul-160.3%

        \[\leadsto \log \left(x + y\right) + \color{blue}{\left(-t\right)} \]
    7. Simplified60.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{+21} \lor \neg \left(a \leq 2400000000\right):\\ \;\;\;\;a \cdot \log t\\ \mathbf{else}:\\ \;\;\;\;\log \left(x + y\right) - t\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 58.4% accurate, 2.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.8e20 or 5.4e8 < 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) + \left(\log z - t\right)\right)} + \left(a - 0.5\right) \cdot \log t \]
      2. sub-neg99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\log t \cdot a} \]
    10. Simplified81.0%

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

    if -1.8e20 < a < 5.4e8

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \log \left(x + y\right) + \color{blue}{-1 \cdot t} \]
    6. Step-by-step derivation
      1. neg-mul-160.3%

        \[\leadsto \log \left(x + y\right) + \color{blue}{\left(-t\right)} \]
    7. Simplified60.3%

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

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

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

Alternative 14: 61.8% accurate, 2.9× speedup?

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

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

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


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

    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) + \left(\log z - t\right)\right)} + \left(a - 0.5\right) \cdot \log t \]
      2. sub-neg99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\log t \cdot a} \]
    10. Simplified54.9%

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

    if 4.4999999999999998e72 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \log \left(x + y\right) + \color{blue}{-1 \cdot t} \]
    6. Step-by-step derivation
      1. neg-mul-183.8%

        \[\leadsto \log \left(x + y\right) + \color{blue}{\left(-t\right)} \]
    7. Simplified83.8%

      \[\leadsto \log \left(x + y\right) + \color{blue}{\left(-t\right)} \]
    8. Taylor expanded in t around inf 83.8%

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

        \[\leadsto \color{blue}{-t} \]
    10. Simplified83.8%

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

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

Alternative 15: 41.0% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 510:\\
\;\;\;\;\log \left(x + y\right)\\

\mathbf{else}:\\
\;\;\;\;t \cdot \left(\frac{1}{t} + -1\right) + -1\\


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

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \log \left(x + y\right) + \color{blue}{-1 \cdot t} \]
    6. Step-by-step derivation
      1. neg-mul-18.5%

        \[\leadsto \log \left(x + y\right) + \color{blue}{\left(-t\right)} \]
    7. Simplified8.5%

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

      \[\leadsto \color{blue}{\log \left(x + y\right)} \]
    9. Step-by-step derivation
      1. +-commutative8.5%

        \[\leadsto \log \color{blue}{\left(y + x\right)} \]
    10. Simplified8.5%

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

    if 510 < t

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \log \left(x + y\right) + \color{blue}{-1 \cdot t} \]
    6. Step-by-step derivation
      1. neg-mul-174.8%

        \[\leadsto \log \left(x + y\right) + \color{blue}{\left(-t\right)} \]
    7. Simplified74.8%

      \[\leadsto \log \left(x + y\right) + \color{blue}{\left(-t\right)} \]
    8. Taylor expanded in t around inf 74.8%

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

        \[\leadsto \color{blue}{-t} \]
    10. Simplified74.8%

      \[\leadsto \color{blue}{-t} \]
    11. Step-by-step derivation
      1. expm1-log1p-u0.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(-t\right)\right)} \]
      2. expm1-undefine0.0%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(-t\right)} - 1} \]
    12. Applied egg-rr0.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(-t\right)} - 1} \]
    13. Step-by-step derivation
      1. sub-neg0.0%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(-t\right)} + \left(-1\right)} \]
      2. log1p-undefine0.0%

        \[\leadsto e^{\color{blue}{\log \left(1 + \left(-t\right)\right)}} + \left(-1\right) \]
      3. rem-exp-log74.8%

        \[\leadsto \color{blue}{\left(1 + \left(-t\right)\right)} + \left(-1\right) \]
      4. unsub-neg74.8%

        \[\leadsto \color{blue}{\left(1 - t\right)} + \left(-1\right) \]
      5. metadata-eval74.8%

        \[\leadsto \left(1 - t\right) + \color{blue}{-1} \]
    14. Simplified74.8%

      \[\leadsto \color{blue}{\left(1 - t\right) + -1} \]
    15. Taylor expanded in t around inf 74.8%

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

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

Alternative 16: 37.7% accurate, 34.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \log \left(x + y\right) + \color{blue}{-1 \cdot t} \]
  6. Step-by-step derivation
    1. neg-mul-141.1%

      \[\leadsto \log \left(x + y\right) + \color{blue}{\left(-t\right)} \]
  7. Simplified41.1%

    \[\leadsto \log \left(x + y\right) + \color{blue}{\left(-t\right)} \]
  8. Taylor expanded in t around inf 38.2%

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

      \[\leadsto \color{blue}{-t} \]
  10. Simplified38.2%

    \[\leadsto \color{blue}{-t} \]
  11. Step-by-step derivation
    1. expm1-log1p-u1.4%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(-t\right)\right)} \]
    2. expm1-undefine1.4%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(-t\right)} - 1} \]
  12. Applied egg-rr1.4%

    \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(-t\right)} - 1} \]
  13. Step-by-step derivation
    1. sub-neg1.4%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(-t\right)} + \left(-1\right)} \]
    2. log1p-undefine1.4%

      \[\leadsto e^{\color{blue}{\log \left(1 + \left(-t\right)\right)}} + \left(-1\right) \]
    3. rem-exp-log38.2%

      \[\leadsto \color{blue}{\left(1 + \left(-t\right)\right)} + \left(-1\right) \]
    4. unsub-neg38.2%

      \[\leadsto \color{blue}{\left(1 - t\right)} + \left(-1\right) \]
    5. metadata-eval38.2%

      \[\leadsto \left(1 - t\right) + \color{blue}{-1} \]
  14. Simplified38.2%

    \[\leadsto \color{blue}{\left(1 - t\right) + -1} \]
  15. Taylor expanded in t around inf 38.3%

    \[\leadsto \color{blue}{t \cdot \left(\frac{1}{t} - 1\right)} + -1 \]
  16. Final simplification38.3%

    \[\leadsto t \cdot \left(\frac{1}{t} + -1\right) + -1 \]
  17. Add Preprocessing

Alternative 17: 37.7% accurate, 156.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \log \left(x + y\right) + \color{blue}{-1 \cdot t} \]
  6. Step-by-step derivation
    1. neg-mul-141.1%

      \[\leadsto \log \left(x + y\right) + \color{blue}{\left(-t\right)} \]
  7. Simplified41.1%

    \[\leadsto \log \left(x + y\right) + \color{blue}{\left(-t\right)} \]
  8. Taylor expanded in t around inf 38.2%

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

      \[\leadsto \color{blue}{-t} \]
  10. Simplified38.2%

    \[\leadsto \color{blue}{-t} \]
  11. Add Preprocessing

Developer Target 1: 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 2024137 
(FPCore (x y z t a)
  :name "Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2"
  :precision binary64

  :alt
  (! :herbie-platform default (+ (log (+ x y)) (+ (- (log z) t) (* (- a 1/2) (log t)))))

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