Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2

Percentage Accurate: 99.6% → 99.6%
Time: 16.7s
Alternatives: 19
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 99.6% accurate, 1.0× speedup?

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

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

Alternative 1: 99.6% accurate, 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}
Derivation
  1. Initial program 99.7%

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

Alternative 2: 80.0% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.8%

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

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(-1 \cdot t\right)}, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{neg}\left(t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\left(0 - t\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      3. --lowering--.f6499.1%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{\_.f64}\left(0, t\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
    5. Simplified99.1%

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

    if -4e7 < (-.f64 a #s(literal 1/2 binary64)) < -0.20000000000000001

    1. Initial program 99.7%

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

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\left(\log y + \log z\right) - t\right)}, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \log y\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\color{blue}{a}, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      2. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      3. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + -1 \cdot \log \left(\frac{1}{y}\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\log z + \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\log z, \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      7. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\color{blue}{a}, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(-1 \cdot \log \left(\frac{1}{y}\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      10. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      11. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\log y, t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      12. log-lowering-log.f6466.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(y\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    5. Simplified66.6%

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

      \[\leadsto \color{blue}{\left(\log y + \left(\log z + \frac{-1}{2} \cdot \log t\right)\right) - t} \]
    7. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \log y + \color{blue}{\left(\left(\log z + \frac{-1}{2} \cdot \log t\right) - t\right)} \]
      2. remove-double-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right) + \left(\color{blue}{\left(\log z + \frac{-1}{2} \cdot \log t\right)} - t\right) \]
      3. log-recN/A

        \[\leadsto \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right) + \left(\left(\color{blue}{\log z} + \frac{-1}{2} \cdot \log t\right) - t\right) \]
      4. mul-1-negN/A

        \[\leadsto -1 \cdot \log \left(\frac{1}{y}\right) + \left(\color{blue}{\left(\log z + \frac{-1}{2} \cdot \log t\right)} - t\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(-1 \cdot \log \left(\frac{1}{y}\right)\right), \color{blue}{\left(\left(\log z + \frac{-1}{2} \cdot \log t\right) - t\right)}\right) \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right), \left(\color{blue}{\left(\log z + \frac{-1}{2} \cdot \log t\right)} - t\right)\right) \]
      7. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right), \left(\left(\color{blue}{\log z} + \frac{-1}{2} \cdot \log t\right) - t\right)\right) \]
      8. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\log y, \left(\color{blue}{\left(\log z + \frac{-1}{2} \cdot \log t\right)} - t\right)\right) \]
      9. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \left(\color{blue}{\left(\log z + \frac{-1}{2} \cdot \log t\right)} - t\right)\right) \]
      10. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \left(\log z + \color{blue}{\left(\frac{-1}{2} \cdot \log t - t\right)}\right)\right) \]
      11. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\log z, \color{blue}{\left(\frac{-1}{2} \cdot \log t - t\right)}\right)\right) \]
      12. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(\color{blue}{\frac{-1}{2} \cdot \log t} - t\right)\right)\right) \]
      13. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\frac{-1}{2} \cdot \log t\right), \color{blue}{t}\right)\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\log t \cdot \frac{-1}{2}\right), t\right)\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\log t, \frac{-1}{2}\right), t\right)\right)\right) \]
      16. log-lowering-log.f6466.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \frac{-1}{2}\right), t\right)\right)\right) \]
    8. Simplified66.6%

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

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

    1. Initial program 99.5%

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

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\left(\log y + \log z\right) - t\right)}, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \log y\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\color{blue}{a}, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      2. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      3. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + -1 \cdot \log \left(\frac{1}{y}\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\log z + \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\log z, \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      7. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\color{blue}{a}, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(-1 \cdot \log \left(\frac{1}{y}\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      10. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      11. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\log y, t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      12. log-lowering-log.f6478.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(y\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    5. Simplified78.6%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \color{blue}{\left(-1 \cdot t\right)}\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(\mathsf{neg}\left(t\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(0 - t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      3. --lowering--.f6498.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(0, t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    8. Simplified98.8%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(0, t\right)\right), \color{blue}{\left(a \cdot \log t\right)}\right) \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(0, t\right)\right), \left(\log t \cdot \color{blue}{a}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(0, t\right)\right), \mathsf{*.f64}\left(\log t, \color{blue}{a}\right)\right) \]
      3. log-lowering-log.f6498.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(0, t\right)\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), a\right)\right) \]
    11. Simplified98.8%

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

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

Alternative 3: 80.5% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.5%

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

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\left(\log y + \log z\right) - t\right)}, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \log y\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\color{blue}{a}, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      2. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      3. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + -1 \cdot \log \left(\frac{1}{y}\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\log z + \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\log z, \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      7. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\color{blue}{a}, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(-1 \cdot \log \left(\frac{1}{y}\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      10. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      11. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\log y, t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      12. log-lowering-log.f6471.1%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(y\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    5. Simplified71.1%

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

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

        \[\leadsto \left(\log z + \log t \cdot \left(a - \frac{1}{2}\right)\right) + \color{blue}{\log y} \]
      2. remove-double-negN/A

        \[\leadsto \left(\log z + \log t \cdot \left(a - \frac{1}{2}\right)\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right) \]
      3. log-recN/A

        \[\leadsto \left(\log z + \log t \cdot \left(a - \frac{1}{2}\right)\right) + \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \left(\log z + \log t \cdot \left(a - \frac{1}{2}\right)\right) + -1 \cdot \color{blue}{\log \left(\frac{1}{y}\right)} \]
      5. associate-+r+N/A

        \[\leadsto \log z + \color{blue}{\left(\log t \cdot \left(a - \frac{1}{2}\right) + -1 \cdot \log \left(\frac{1}{y}\right)\right)} \]
      6. +-commutativeN/A

        \[\leadsto \log z + \left(-1 \cdot \log \left(\frac{1}{y}\right) + \color{blue}{\log t \cdot \left(a - \frac{1}{2}\right)}\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\log z, \color{blue}{\left(-1 \cdot \log \left(\frac{1}{y}\right) + \log t \cdot \left(a - \frac{1}{2}\right)\right)}\right) \]
      8. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(\color{blue}{-1 \cdot \log \left(\frac{1}{y}\right)} + \log t \cdot \left(a - \frac{1}{2}\right)\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(\log t \cdot \left(a - \frac{1}{2}\right) + \color{blue}{-1 \cdot \log \left(\frac{1}{y}\right)}\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\left(\log t \cdot \left(a - \frac{1}{2}\right)\right), \color{blue}{\left(-1 \cdot \log \left(\frac{1}{y}\right)\right)}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\log t, \left(a - \frac{1}{2}\right)\right), \left(\color{blue}{-1} \cdot \log \left(\frac{1}{y}\right)\right)\right)\right) \]
      12. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(a - \frac{1}{2}\right)\right), \left(-1 \cdot \log \left(\frac{1}{y}\right)\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right), \left(-1 \cdot \log \left(\frac{1}{y}\right)\right)\right)\right) \]
      14. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(a + \frac{-1}{2}\right)\right), \left(-1 \cdot \log \left(\frac{1}{y}\right)\right)\right)\right) \]
      15. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \left(-1 \cdot \log \left(\frac{1}{y}\right)\right)\right)\right) \]
      16. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right)\right)\right) \]
      17. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right)\right)\right) \]
      18. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \log y\right)\right) \]
      19. log-lowering-log.f6470.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \mathsf{log.f64}\left(y\right)\right)\right) \]
    8. Simplified70.0%

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

    if 2.7000000000000002 < t

    1. Initial program 99.9%

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

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\left(\log y + \log z\right) - t\right)}, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \log y\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\color{blue}{a}, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      2. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      3. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + -1 \cdot \log \left(\frac{1}{y}\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\log z + \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\log z, \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      7. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\color{blue}{a}, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(-1 \cdot \log \left(\frac{1}{y}\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      10. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      11. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\log y, t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      12. log-lowering-log.f6476.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(y\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    5. Simplified76.6%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \color{blue}{\left(-1 \cdot t\right)}\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(\mathsf{neg}\left(t\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(0 - t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      3. --lowering--.f6498.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(0, t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    8. Simplified98.9%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(0, t\right)\right), \color{blue}{\left(a \cdot \log t\right)}\right) \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(0, t\right)\right), \left(\log t \cdot \color{blue}{a}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(0, t\right)\right), \mathsf{*.f64}\left(\log t, \color{blue}{a}\right)\right) \]
      3. log-lowering-log.f6498.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(0, t\right)\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), a\right)\right) \]
    11. Simplified98.9%

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

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

Alternative 4: 99.6% accurate, 1.0× speedup?

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

\\
\log \left(x + y\right) + \left(\log z + \left(\left(a - 0.5\right) \cdot \log t - t\right)\right)
\end{array}
Derivation
  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+N/A

      \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\left(a - \frac{1}{2}\right)} \cdot \log t \]
    2. associate-+l+N/A

      \[\leadsto \log \left(x + y\right) + \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)} \]
    3. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\log \left(x + y\right), \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right) \]
    4. log-lowering-log.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(x + y\right)\right), \left(\color{blue}{\left(\log z - t\right)} + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
    5. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\left(\color{blue}{\log z} - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
    6. associate-+l-N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\log z - \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
    7. --lowering--.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\log z, \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
    8. log-lowering-log.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(\color{blue}{t} - \left(a - \frac{1}{2}\right) \cdot \log t\right)\right)\right) \]
    9. sub-negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(t + \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
    10. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
    11. *-commutativeN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\mathsf{neg}\left(\log t \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right)\right) \]
    12. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\log t \cdot \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
    13. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\log t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
    14. log-lowering-log.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\mathsf{neg}\left(\color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right)\right) \]
    15. neg-sub0N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(0 - \color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right) \]
    16. associate--r-N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(0 - a\right) + \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right) \]
    17. neg-sub0N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(\mathsf{neg}\left(a\right)\right) + \frac{1}{2}\right)\right)\right)\right)\right) \]
    18. +-commutativeN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} + \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right)\right)\right)\right) \]
    19. unsub-negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} - \color{blue}{a}\right)\right)\right)\right)\right) \]
    20. --lowering--.f6499.6%

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\frac{1}{2}, \color{blue}{a}\right)\right)\right)\right)\right) \]
  3. Simplified99.6%

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

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

Alternative 5: 68.7% accurate, 1.0× speedup?

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

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

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

    \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\left(\log y + \log z\right) - t\right)}, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
  4. Step-by-step derivation
    1. +-commutativeN/A

      \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \log y\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\color{blue}{a}, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    2. remove-double-negN/A

      \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    3. log-recN/A

      \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    4. mul-1-negN/A

      \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + -1 \cdot \log \left(\frac{1}{y}\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    5. associate--l+N/A

      \[\leadsto \mathsf{+.f64}\left(\left(\log z + \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
    6. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\log z, \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
    7. log-lowering-log.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\color{blue}{a}, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    8. --lowering--.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(-1 \cdot \log \left(\frac{1}{y}\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    9. mul-1-negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    10. log-recN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    11. remove-double-negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\log y, t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    12. log-lowering-log.f6473.9%

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(y\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
  5. Simplified73.9%

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

Alternative 6: 68.7% accurate, 1.0× speedup?

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

\\
\log z + \left(\left(\log y - t\right) + \left(a - 0.5\right) \cdot \log t\right)
\end{array}
Derivation
  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+N/A

      \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\left(a - \frac{1}{2}\right)} \cdot \log t \]
    2. associate-+l+N/A

      \[\leadsto \log \left(x + y\right) + \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)} \]
    3. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\log \left(x + y\right), \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right) \]
    4. log-lowering-log.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(x + y\right)\right), \left(\color{blue}{\left(\log z - t\right)} + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
    5. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\left(\color{blue}{\log z} - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
    6. associate-+l-N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\log z - \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
    7. --lowering--.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\log z, \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
    8. log-lowering-log.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(\color{blue}{t} - \left(a - \frac{1}{2}\right) \cdot \log t\right)\right)\right) \]
    9. sub-negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(t + \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
    10. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
    11. *-commutativeN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\mathsf{neg}\left(\log t \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right)\right) \]
    12. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\log t \cdot \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
    13. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\log t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
    14. log-lowering-log.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\mathsf{neg}\left(\color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right)\right) \]
    15. neg-sub0N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(0 - \color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right) \]
    16. associate--r-N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(0 - a\right) + \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right) \]
    17. neg-sub0N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(\mathsf{neg}\left(a\right)\right) + \frac{1}{2}\right)\right)\right)\right)\right) \]
    18. +-commutativeN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} + \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right)\right)\right)\right) \]
    19. unsub-negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} - \color{blue}{a}\right)\right)\right)\right)\right) \]
    20. --lowering--.f6499.6%

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\frac{1}{2}, \color{blue}{a}\right)\right)\right)\right)\right) \]
  3. Simplified99.6%

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

    \[\leadsto \color{blue}{\left(\log y + \log z\right) - \left(t + \log t \cdot \left(\frac{1}{2} - a\right)\right)} \]
  6. Step-by-step derivation
    1. +-commutativeN/A

      \[\leadsto \left(\log z + \log y\right) - \left(\color{blue}{t} + \log t \cdot \left(\frac{1}{2} - a\right)\right) \]
    2. remove-double-negN/A

      \[\leadsto \left(\log z + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right)\right) - \left(t + \log t \cdot \left(\frac{1}{2} - a\right)\right) \]
    3. log-recN/A

      \[\leadsto \left(\log z + \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right)\right) - \left(t + \log t \cdot \left(\frac{1}{2} - a\right)\right) \]
    4. mul-1-negN/A

      \[\leadsto \left(\log z + -1 \cdot \log \left(\frac{1}{y}\right)\right) - \left(t + \log t \cdot \left(\frac{1}{2} - a\right)\right) \]
    5. associate--l+N/A

      \[\leadsto \log z + \color{blue}{\left(-1 \cdot \log \left(\frac{1}{y}\right) - \left(t + \log t \cdot \left(\frac{1}{2} - a\right)\right)\right)} \]
    6. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\log z, \color{blue}{\left(-1 \cdot \log \left(\frac{1}{y}\right) - \left(t + \log t \cdot \left(\frac{1}{2} - a\right)\right)\right)}\right) \]
    7. log-lowering-log.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(\color{blue}{-1 \cdot \log \left(\frac{1}{y}\right)} - \left(t + \log t \cdot \left(\frac{1}{2} - a\right)\right)\right)\right) \]
    8. associate--r+N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(\left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right) - \color{blue}{\log t \cdot \left(\frac{1}{2} - a\right)}\right)\right) \]
    9. --lowering--.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right), \color{blue}{\left(\log t \cdot \left(\frac{1}{2} - a\right)\right)}\right)\right) \]
    10. --lowering--.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot \log \left(\frac{1}{y}\right)\right), t\right), \left(\color{blue}{\log t} \cdot \left(\frac{1}{2} - a\right)\right)\right)\right) \]
    11. mul-1-negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right), t\right), \left(\log \color{blue}{t} \cdot \left(\frac{1}{2} - a\right)\right)\right)\right) \]
    12. log-recN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right), t\right), \left(\log t \cdot \left(\frac{1}{2} - a\right)\right)\right)\right) \]
    13. remove-double-negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\log y, t\right), \left(\log \color{blue}{t} \cdot \left(\frac{1}{2} - a\right)\right)\right)\right) \]
    14. log-lowering-log.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{log.f64}\left(y\right), t\right), \left(\log \color{blue}{t} \cdot \left(\frac{1}{2} - a\right)\right)\right)\right) \]
    15. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{log.f64}\left(y\right), t\right), \mathsf{*.f64}\left(\log t, \color{blue}{\left(\frac{1}{2} - a\right)}\right)\right)\right) \]
    16. log-lowering-log.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{log.f64}\left(y\right), t\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\color{blue}{\frac{1}{2}} - a\right)\right)\right)\right) \]
    17. --lowering--.f6473.9%

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{log.f64}\left(y\right), t\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\frac{1}{2}, \color{blue}{a}\right)\right)\right)\right) \]
  7. Simplified73.9%

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

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

Alternative 7: 68.7% accurate, 1.0× speedup?

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

\\
\left(\log z + \left(\left(a - 0.5\right) \cdot \log t - t\right)\right) + \log y
\end{array}
Derivation
  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+N/A

      \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\left(a - \frac{1}{2}\right)} \cdot \log t \]
    2. associate-+l+N/A

      \[\leadsto \log \left(x + y\right) + \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)} \]
    3. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\log \left(x + y\right), \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right) \]
    4. log-lowering-log.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(x + y\right)\right), \left(\color{blue}{\left(\log z - t\right)} + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
    5. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\left(\color{blue}{\log z} - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
    6. associate-+l-N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\log z - \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
    7. --lowering--.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\log z, \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
    8. log-lowering-log.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(\color{blue}{t} - \left(a - \frac{1}{2}\right) \cdot \log t\right)\right)\right) \]
    9. sub-negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(t + \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
    10. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
    11. *-commutativeN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\mathsf{neg}\left(\log t \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right)\right) \]
    12. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\log t \cdot \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
    13. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\log t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
    14. log-lowering-log.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\mathsf{neg}\left(\color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right)\right) \]
    15. neg-sub0N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(0 - \color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right) \]
    16. associate--r-N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(0 - a\right) + \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right) \]
    17. neg-sub0N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(\mathsf{neg}\left(a\right)\right) + \frac{1}{2}\right)\right)\right)\right)\right) \]
    18. +-commutativeN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} + \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right)\right)\right)\right) \]
    19. unsub-negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} - \color{blue}{a}\right)\right)\right)\right)\right) \]
    20. --lowering--.f6499.6%

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\frac{1}{2}, \color{blue}{a}\right)\right)\right)\right)\right) \]
  3. Simplified99.6%

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

    \[\leadsto \mathsf{+.f64}\left(\color{blue}{\log y}, \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\frac{1}{2}, a\right)\right)\right)\right)\right) \]
  6. Step-by-step derivation
    1. log-lowering-log.f6473.9%

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{log.f64}\left(z\right)}, \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\frac{1}{2}, a\right)\right)\right)\right)\right) \]
  7. Simplified73.9%

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

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

Alternative 8: 87.7% accurate, 1.4× speedup?

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

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

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


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

    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+N/A

        \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\left(a - \frac{1}{2}\right)} \cdot \log t \]
      2. associate-+l+N/A

        \[\leadsto \log \left(x + y\right) + \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)} \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\log \left(x + y\right), \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right) \]
      4. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(x + y\right)\right), \left(\color{blue}{\left(\log z - t\right)} + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\left(\color{blue}{\log z} - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
      6. associate-+l-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\log z - \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\log z, \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
      8. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(\color{blue}{t} - \left(a - \frac{1}{2}\right) \cdot \log t\right)\right)\right) \]
      9. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(t + \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\mathsf{neg}\left(\log t \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right)\right) \]
      12. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\log t \cdot \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\log t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      14. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\mathsf{neg}\left(\color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right)\right) \]
      15. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(0 - \color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right) \]
      16. associate--r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(0 - a\right) + \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right) \]
      17. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(\mathsf{neg}\left(a\right)\right) + \frac{1}{2}\right)\right)\right)\right)\right) \]
      18. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} + \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right)\right)\right)\right) \]
      19. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} - \color{blue}{a}\right)\right)\right)\right)\right) \]
      20. --lowering--.f6499.4%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\frac{1}{2}, \color{blue}{a}\right)\right)\right)\right)\right) \]
    3. Simplified99.4%

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

        \[\leadsto \left(\log \left(x + y\right) + \log z\right) - \color{blue}{\left(t + \log t \cdot \left(\frac{1}{2} - a\right)\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(\log \left(x + y\right) + \log z\right) - \left(\log t \cdot \left(\frac{1}{2} - a\right) + \color{blue}{t}\right) \]
      3. associate--r+N/A

        \[\leadsto \left(\left(\log \left(x + y\right) + \log z\right) - \log t \cdot \left(\frac{1}{2} - a\right)\right) - \color{blue}{t} \]
      4. flip3-+N/A

        \[\leadsto \left(\frac{{\log \left(x + y\right)}^{3} + {\log z}^{3}}{\log \left(x + y\right) \cdot \log \left(x + y\right) + \left(\log z \cdot \log z - \log \left(x + y\right) \cdot \log z\right)} - \log t \cdot \left(\frac{1}{2} - a\right)\right) - t \]
      5. div-invN/A

        \[\leadsto \left(\left({\log \left(x + y\right)}^{3} + {\log z}^{3}\right) \cdot \frac{1}{\log \left(x + y\right) \cdot \log \left(x + y\right) + \left(\log z \cdot \log z - \log \left(x + y\right) \cdot \log z\right)} - \log t \cdot \left(\frac{1}{2} - a\right)\right) - t \]
      6. fmm-defN/A

        \[\leadsto \mathsf{fma}\left({\log \left(x + y\right)}^{3} + {\log z}^{3}, \frac{1}{\log \left(x + y\right) \cdot \log \left(x + y\right) + \left(\log z \cdot \log z - \log \left(x + y\right) \cdot \log z\right)}, \mathsf{neg}\left(\log t \cdot \left(\frac{1}{2} - a\right)\right)\right) - t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left({\log \left(x + y\right)}^{3} + {\log z}^{3}, \frac{1}{\log \left(x + y\right) \cdot \log \left(x + y\right) + \left(\log z \cdot \log z - \log \left(x + y\right) \cdot \log z\right)}, \mathsf{neg}\left(\left(\frac{1}{2} - a\right) \cdot \log t\right)\right) - t \]
    6. Applied egg-rr74.2%

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

    if 5e16 < t

    1. Initial program 99.9%

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

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(-1 \cdot t\right)}, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{neg}\left(t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\left(0 - t\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      3. --lowering--.f6499.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{\_.f64}\left(0, t\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
    5. Simplified99.9%

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

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

Alternative 9: 73.2% accurate, 1.4× speedup?

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

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

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


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

    1. Initial program 99.5%

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

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\left(\log y + \log z\right) - t\right)}, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \log y\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\color{blue}{a}, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      2. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      3. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + -1 \cdot \log \left(\frac{1}{y}\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\log z + \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\log z, \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      7. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\color{blue}{a}, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(-1 \cdot \log \left(\frac{1}{y}\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      10. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      11. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\log y, t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      12. log-lowering-log.f6470.5%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(y\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    5. Simplified70.5%

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

        \[\leadsto \left(a - \frac{1}{2}\right) \cdot \log t + \color{blue}{\left(\log z + \left(\log y - t\right)\right)} \]
      2. associate-+r-N/A

        \[\leadsto \left(a - \frac{1}{2}\right) \cdot \log t + \left(\left(\log z + \log y\right) - \color{blue}{t}\right) \]
      3. associate-+r-N/A

        \[\leadsto \left(\left(a - \frac{1}{2}\right) \cdot \log t + \left(\log z + \log y\right)\right) - \color{blue}{t} \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\left(a - \frac{1}{2}\right) \cdot \log t + \left(\log z + \log y\right)\right), \color{blue}{t}\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(\left(a - \frac{1}{2}\right) \cdot \log t\right), \left(\log z + \log y\right)\right), t\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right) \cdot \log t\right), \left(\log z + \log y\right)\right), t\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(\left(a + \frac{-1}{2}\right) \cdot \log t\right), \left(\log z + \log y\right)\right), t\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(\log t \cdot \left(a + \frac{-1}{2}\right)\right), \left(\log z + \log y\right)\right), t\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\log t, \left(a + \frac{-1}{2}\right)\right), \left(\log z + \log y\right)\right), t\right) \]
      10. log-lowering-log.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(a + \frac{-1}{2}\right)\right), \left(\log z + \log y\right)\right), t\right) \]
      11. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \left(\log z + \log y\right)\right), t\right) \]
      12. sum-logN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \log \left(z \cdot y\right)\right), t\right) \]
      13. log-lowering-log.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \mathsf{log.f64}\left(\left(z \cdot y\right)\right)\right), t\right) \]
      14. *-lowering-*.f6455.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \mathsf{log.f64}\left(\mathsf{*.f64}\left(z, y\right)\right)\right), t\right) \]
    7. Applied egg-rr55.9%

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

    if 5e16 < t

    1. Initial program 99.9%

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

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(-1 \cdot t\right)}, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{neg}\left(t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\left(0 - t\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      3. --lowering--.f6499.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{\_.f64}\left(0, t\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
    5. Simplified99.9%

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

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

Alternative 10: 87.3% accurate, 1.4× speedup?

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

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

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


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

    1. Initial program 99.5%

      \[\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \left(a - \frac{1}{2}\right) \cdot \log t + \color{blue}{\left(\left(\log \left(x + y\right) + \log z\right) - t\right)} \]
      2. fma-defineN/A

        \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, \color{blue}{\log t}, \left(\log \left(x + y\right) + \log z\right) - t\right) \]
      3. fma-lowering-fma.f64N/A

        \[\leadsto \mathsf{fma.f64}\left(\left(a - \frac{1}{2}\right), \color{blue}{\log t}, \left(\left(\log \left(x + y\right) + \log z\right) - t\right)\right) \]
      4. sub-negN/A

        \[\leadsto \mathsf{fma.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right), \log \color{blue}{t}, \left(\left(\log \left(x + y\right) + \log z\right) - t\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right), \log \color{blue}{t}, \left(\left(\log \left(x + y\right) + \log z\right) - t\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{2}\right), \log t, \left(\left(\log \left(x + y\right) + \log z\right) - t\right)\right) \]
      7. log-lowering-log.f64N/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{2}\right), \mathsf{log.f64}\left(t\right), \left(\left(\log \left(x + y\right) + \log z\right) - t\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{2}\right), \mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\left(\log \left(x + y\right) + \log z\right), t\right)\right) \]
      9. sum-logN/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{2}\right), \mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\log \left(\left(x + y\right) \cdot z\right), t\right)\right) \]
      10. log-lowering-log.f64N/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{2}\right), \mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(\left(\left(x + y\right) \cdot z\right)\right), t\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{2}\right), \mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(\mathsf{*.f64}\left(\left(x + y\right), z\right)\right), t\right)\right) \]
      12. +-lowering-+.f6473.5%

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{2}\right), \mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), z\right)\right), t\right)\right) \]
    4. Applied egg-rr73.5%

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

      \[\leadsto \color{blue}{\log \left(z \cdot \left(x + y\right)\right) + \log t \cdot \left(a - \frac{1}{2}\right)} \]
    6. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \log t \cdot \left(a - \frac{1}{2}\right) + \color{blue}{\log \left(z \cdot \left(x + y\right)\right)} \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\log t \cdot \left(a - \frac{1}{2}\right)\right), \color{blue}{\log \left(z \cdot \left(x + y\right)\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\log t, \left(a - \frac{1}{2}\right)\right), \log \color{blue}{\left(z \cdot \left(x + y\right)\right)}\right) \]
      4. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(a - \frac{1}{2}\right)\right), \log \left(\color{blue}{z} \cdot \left(x + y\right)\right)\right) \]
      5. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right), \log \left(z \cdot \color{blue}{\left(x + y\right)}\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(a + \frac{-1}{2}\right)\right), \log \left(z \cdot \left(x + \color{blue}{y}\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \log \left(z \cdot \color{blue}{\left(x + y\right)}\right)\right) \]
      8. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \mathsf{log.f64}\left(\left(z \cdot \left(x + y\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \mathsf{log.f64}\left(\mathsf{*.f64}\left(z, \left(x + y\right)\right)\right)\right) \]
      10. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \mathsf{log.f64}\left(\mathsf{*.f64}\left(z, \left(y + x\right)\right)\right)\right) \]
      11. +-lowering-+.f6472.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \mathsf{log.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, x\right)\right)\right)\right) \]
    7. Simplified72.0%

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

    if 0.80000000000000004 < t

    1. Initial program 99.9%

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

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\left(\log y + \log z\right) - t\right)}, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \log y\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\color{blue}{a}, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      2. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      3. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + -1 \cdot \log \left(\frac{1}{y}\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\log z + \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\log z, \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      7. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\color{blue}{a}, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(-1 \cdot \log \left(\frac{1}{y}\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      10. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      11. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\log y, t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      12. log-lowering-log.f6476.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(y\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    5. Simplified76.6%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \color{blue}{\left(-1 \cdot t\right)}\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(\mathsf{neg}\left(t\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(0 - t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      3. --lowering--.f6498.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(0, t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    8. Simplified98.9%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(0, t\right)\right), \color{blue}{\left(a \cdot \log t\right)}\right) \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(0, t\right)\right), \left(\log t \cdot \color{blue}{a}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(0, t\right)\right), \mathsf{*.f64}\left(\log t, \color{blue}{a}\right)\right) \]
      3. log-lowering-log.f6498.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(0, t\right)\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), a\right)\right) \]
    11. Simplified98.9%

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

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

Alternative 11: 73.6% accurate, 1.5× speedup?

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

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

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


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

    1. Initial program 99.5%

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

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\left(\log y + \log z\right) - t\right)}, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \log y\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\color{blue}{a}, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      2. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      3. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + -1 \cdot \log \left(\frac{1}{y}\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\log z + \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\log z, \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      7. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\color{blue}{a}, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(-1 \cdot \log \left(\frac{1}{y}\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      10. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      11. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\log y, t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      12. log-lowering-log.f6471.1%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(y\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    5. Simplified71.1%

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

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

        \[\leadsto \left(\log z + \log t \cdot \left(a - \frac{1}{2}\right)\right) + \color{blue}{\log y} \]
      2. remove-double-negN/A

        \[\leadsto \left(\log z + \log t \cdot \left(a - \frac{1}{2}\right)\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right) \]
      3. log-recN/A

        \[\leadsto \left(\log z + \log t \cdot \left(a - \frac{1}{2}\right)\right) + \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \left(\log z + \log t \cdot \left(a - \frac{1}{2}\right)\right) + -1 \cdot \color{blue}{\log \left(\frac{1}{y}\right)} \]
      5. associate-+r+N/A

        \[\leadsto \log z + \color{blue}{\left(\log t \cdot \left(a - \frac{1}{2}\right) + -1 \cdot \log \left(\frac{1}{y}\right)\right)} \]
      6. +-commutativeN/A

        \[\leadsto \log z + \left(-1 \cdot \log \left(\frac{1}{y}\right) + \color{blue}{\log t \cdot \left(a - \frac{1}{2}\right)}\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\log z, \color{blue}{\left(-1 \cdot \log \left(\frac{1}{y}\right) + \log t \cdot \left(a - \frac{1}{2}\right)\right)}\right) \]
      8. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(\color{blue}{-1 \cdot \log \left(\frac{1}{y}\right)} + \log t \cdot \left(a - \frac{1}{2}\right)\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(\log t \cdot \left(a - \frac{1}{2}\right) + \color{blue}{-1 \cdot \log \left(\frac{1}{y}\right)}\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\left(\log t \cdot \left(a - \frac{1}{2}\right)\right), \color{blue}{\left(-1 \cdot \log \left(\frac{1}{y}\right)\right)}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\log t, \left(a - \frac{1}{2}\right)\right), \left(\color{blue}{-1} \cdot \log \left(\frac{1}{y}\right)\right)\right)\right) \]
      12. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(a - \frac{1}{2}\right)\right), \left(-1 \cdot \log \left(\frac{1}{y}\right)\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right), \left(-1 \cdot \log \left(\frac{1}{y}\right)\right)\right)\right) \]
      14. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(a + \frac{-1}{2}\right)\right), \left(-1 \cdot \log \left(\frac{1}{y}\right)\right)\right)\right) \]
      15. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \left(-1 \cdot \log \left(\frac{1}{y}\right)\right)\right)\right) \]
      16. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right)\right)\right) \]
      17. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right)\right)\right) \]
      18. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \log y\right)\right) \]
      19. log-lowering-log.f6470.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \mathsf{log.f64}\left(y\right)\right)\right) \]
    8. Simplified70.0%

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

        \[\leadsto \left(\log z + \log t \cdot \left(a + \frac{-1}{2}\right)\right) + \color{blue}{\log y} \]
      2. +-commutativeN/A

        \[\leadsto \left(\log t \cdot \left(a + \frac{-1}{2}\right) + \log z\right) + \log \color{blue}{y} \]
      3. associate-+l+N/A

        \[\leadsto \log t \cdot \left(a + \frac{-1}{2}\right) + \color{blue}{\left(\log z + \log y\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\log t \cdot \left(a + \frac{-1}{2}\right)\right), \color{blue}{\left(\log z + \log y\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\log t, \left(a + \frac{-1}{2}\right)\right), \left(\color{blue}{\log z} + \log y\right)\right) \]
      6. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(a + \frac{-1}{2}\right)\right), \left(\log \color{blue}{z} + \log y\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \left(\log z + \log y\right)\right) \]
      8. sum-logN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \log \left(z \cdot y\right)\right) \]
      9. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \mathsf{log.f64}\left(\left(z \cdot y\right)\right)\right) \]
      10. *-lowering-*.f6454.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \mathsf{log.f64}\left(\mathsf{*.f64}\left(z, y\right)\right)\right) \]
    10. Applied egg-rr54.6%

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

    if 0.80000000000000004 < t

    1. Initial program 99.9%

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

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\left(\log y + \log z\right) - t\right)}, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \log y\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\color{blue}{a}, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      2. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      3. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + -1 \cdot \log \left(\frac{1}{y}\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\log z + \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\log z, \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      7. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\color{blue}{a}, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(-1 \cdot \log \left(\frac{1}{y}\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      10. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      11. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\log y, t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      12. log-lowering-log.f6476.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(y\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    5. Simplified76.6%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \color{blue}{\left(-1 \cdot t\right)}\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(\mathsf{neg}\left(t\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(0 - t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      3. --lowering--.f6498.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(0, t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    8. Simplified98.9%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(0, t\right)\right), \color{blue}{\left(a \cdot \log t\right)}\right) \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(0, t\right)\right), \left(\log t \cdot \color{blue}{a}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(0, t\right)\right), \mathsf{*.f64}\left(\log t, \color{blue}{a}\right)\right) \]
      3. log-lowering-log.f6498.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(0, t\right)\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), a\right)\right) \]
    11. Simplified98.9%

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

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

Alternative 12: 73.5% accurate, 1.5× speedup?

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

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

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


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

    1. Initial program 99.5%

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

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\left(\log y + \log z\right) - t\right)}, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \log y\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\color{blue}{a}, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      2. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      3. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\log z + -1 \cdot \log \left(\frac{1}{y}\right)\right) - t\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\log z + \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\log z, \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      7. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(-1 \cdot \log \left(\frac{1}{y}\right) - t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\color{blue}{a}, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(-1 \cdot \log \left(\frac{1}{y}\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \color{blue}{\frac{1}{2}}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      10. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      11. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\log y, t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
      12. log-lowering-log.f6471.1%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(y\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    5. Simplified71.1%

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

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

        \[\leadsto \left(\log z + \log t \cdot \left(a - \frac{1}{2}\right)\right) + \color{blue}{\log y} \]
      2. remove-double-negN/A

        \[\leadsto \left(\log z + \log t \cdot \left(a - \frac{1}{2}\right)\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right) \]
      3. log-recN/A

        \[\leadsto \left(\log z + \log t \cdot \left(a - \frac{1}{2}\right)\right) + \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \left(\log z + \log t \cdot \left(a - \frac{1}{2}\right)\right) + -1 \cdot \color{blue}{\log \left(\frac{1}{y}\right)} \]
      5. associate-+r+N/A

        \[\leadsto \log z + \color{blue}{\left(\log t \cdot \left(a - \frac{1}{2}\right) + -1 \cdot \log \left(\frac{1}{y}\right)\right)} \]
      6. +-commutativeN/A

        \[\leadsto \log z + \left(-1 \cdot \log \left(\frac{1}{y}\right) + \color{blue}{\log t \cdot \left(a - \frac{1}{2}\right)}\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\log z, \color{blue}{\left(-1 \cdot \log \left(\frac{1}{y}\right) + \log t \cdot \left(a - \frac{1}{2}\right)\right)}\right) \]
      8. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(\color{blue}{-1 \cdot \log \left(\frac{1}{y}\right)} + \log t \cdot \left(a - \frac{1}{2}\right)\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \left(\log t \cdot \left(a - \frac{1}{2}\right) + \color{blue}{-1 \cdot \log \left(\frac{1}{y}\right)}\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\left(\log t \cdot \left(a - \frac{1}{2}\right)\right), \color{blue}{\left(-1 \cdot \log \left(\frac{1}{y}\right)\right)}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\log t, \left(a - \frac{1}{2}\right)\right), \left(\color{blue}{-1} \cdot \log \left(\frac{1}{y}\right)\right)\right)\right) \]
      12. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(a - \frac{1}{2}\right)\right), \left(-1 \cdot \log \left(\frac{1}{y}\right)\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right), \left(-1 \cdot \log \left(\frac{1}{y}\right)\right)\right)\right) \]
      14. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(a + \frac{-1}{2}\right)\right), \left(-1 \cdot \log \left(\frac{1}{y}\right)\right)\right)\right) \]
      15. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \left(-1 \cdot \log \left(\frac{1}{y}\right)\right)\right)\right) \]
      16. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right)\right)\right) \]
      17. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right)\right)\right) \]
      18. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \log y\right)\right) \]
      19. log-lowering-log.f6470.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \mathsf{log.f64}\left(y\right)\right)\right) \]
    8. Simplified70.0%

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

        \[\leadsto \left(\log z + \log t \cdot \left(a + \frac{-1}{2}\right)\right) + \color{blue}{\log y} \]
      2. +-commutativeN/A

        \[\leadsto \left(\log t \cdot \left(a + \frac{-1}{2}\right) + \log z\right) + \log \color{blue}{y} \]
      3. associate-+l+N/A

        \[\leadsto \log t \cdot \left(a + \frac{-1}{2}\right) + \color{blue}{\left(\log z + \log y\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\log t \cdot \left(a + \frac{-1}{2}\right)\right), \color{blue}{\left(\log z + \log y\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\log t, \left(a + \frac{-1}{2}\right)\right), \left(\color{blue}{\log z} + \log y\right)\right) \]
      6. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(a + \frac{-1}{2}\right)\right), \left(\log \color{blue}{z} + \log y\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \left(\log z + \log y\right)\right) \]
      8. sum-logN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \log \left(z \cdot y\right)\right) \]
      9. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \mathsf{log.f64}\left(\left(z \cdot y\right)\right)\right) \]
      10. *-lowering-*.f6454.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{+.f64}\left(a, \frac{-1}{2}\right)\right), \mathsf{log.f64}\left(\mathsf{*.f64}\left(z, y\right)\right)\right) \]
    10. Applied egg-rr54.6%

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

    if 2.2999999999999998 < t

    1. Initial program 99.9%

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

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(-1 \cdot t\right)}, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{neg}\left(t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\left(0 - t\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
      3. --lowering--.f6498.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{\_.f64}\left(0, t\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
    5. Simplified98.9%

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

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

Alternative 13: 65.5% accurate, 2.7× speedup?

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

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

\mathbf{elif}\;a \leq 6 \cdot 10^{+16}:\\
\;\;\;\;\log \left(x + y\right) - t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3e32 or 6e16 < 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+N/A

        \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\left(a - \frac{1}{2}\right)} \cdot \log t \]
      2. associate-+l+N/A

        \[\leadsto \log \left(x + y\right) + \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)} \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\log \left(x + y\right), \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right) \]
      4. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(x + y\right)\right), \left(\color{blue}{\left(\log z - t\right)} + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\left(\color{blue}{\log z} - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
      6. associate-+l-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\log z - \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\log z, \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
      8. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(\color{blue}{t} - \left(a - \frac{1}{2}\right) \cdot \log t\right)\right)\right) \]
      9. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(t + \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\mathsf{neg}\left(\log t \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right)\right) \]
      12. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\log t \cdot \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\log t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      14. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\mathsf{neg}\left(\color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right)\right) \]
      15. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(0 - \color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right) \]
      16. associate--r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(0 - a\right) + \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right) \]
      17. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(\mathsf{neg}\left(a\right)\right) + \frac{1}{2}\right)\right)\right)\right)\right) \]
      18. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} + \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right)\right)\right)\right) \]
      19. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} - \color{blue}{a}\right)\right)\right)\right)\right) \]
      20. --lowering--.f6499.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\frac{1}{2}, \color{blue}{a}\right)\right)\right)\right)\right) \]
    3. Simplified99.6%

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

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

        \[\leadsto \log t \cdot \color{blue}{a} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\log t, \color{blue}{a}\right) \]
      3. log-lowering-log.f6479.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), a\right) \]
    7. Simplified79.9%

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

    if -3e32 < a < 6e16

    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+N/A

        \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\left(a - \frac{1}{2}\right)} \cdot \log t \]
      2. associate-+l+N/A

        \[\leadsto \log \left(x + y\right) + \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)} \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\log \left(x + y\right), \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right) \]
      4. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(x + y\right)\right), \left(\color{blue}{\left(\log z - t\right)} + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\left(\color{blue}{\log z} - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
      6. associate-+l-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\log z - \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\log z, \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
      8. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(\color{blue}{t} - \left(a - \frac{1}{2}\right) \cdot \log t\right)\right)\right) \]
      9. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(t + \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\mathsf{neg}\left(\log t \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right)\right) \]
      12. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\log t \cdot \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\log t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      14. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\mathsf{neg}\left(\color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right)\right) \]
      15. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(0 - \color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right) \]
      16. associate--r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(0 - a\right) + \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right) \]
      17. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(\mathsf{neg}\left(a\right)\right) + \frac{1}{2}\right)\right)\right)\right)\right) \]
      18. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} + \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right)\right)\right)\right) \]
      19. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} - \color{blue}{a}\right)\right)\right)\right)\right) \]
      20. --lowering--.f6499.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\frac{1}{2}, \color{blue}{a}\right)\right)\right)\right)\right) \]
    3. Simplified99.6%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \color{blue}{\left(-1 \cdot t\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\mathsf{neg}\left(t\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(0 - \color{blue}{t}\right)\right) \]
      3. --lowering--.f6457.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(0, \color{blue}{t}\right)\right) \]
    7. Simplified57.8%

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

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

Alternative 14: 62.3% accurate, 2.8× speedup?

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

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

\mathbf{elif}\;a \leq 1.22 \cdot 10^{+16}:\\
\;\;\;\;0 - t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.02e34 or 1.22e16 < 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+N/A

        \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\left(a - \frac{1}{2}\right)} \cdot \log t \]
      2. associate-+l+N/A

        \[\leadsto \log \left(x + y\right) + \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)} \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\log \left(x + y\right), \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right) \]
      4. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(x + y\right)\right), \left(\color{blue}{\left(\log z - t\right)} + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\left(\color{blue}{\log z} - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
      6. associate-+l-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\log z - \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\log z, \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
      8. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(\color{blue}{t} - \left(a - \frac{1}{2}\right) \cdot \log t\right)\right)\right) \]
      9. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(t + \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\mathsf{neg}\left(\log t \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right)\right) \]
      12. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\log t \cdot \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\log t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      14. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\mathsf{neg}\left(\color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right)\right) \]
      15. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(0 - \color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right) \]
      16. associate--r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(0 - a\right) + \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right) \]
      17. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(\mathsf{neg}\left(a\right)\right) + \frac{1}{2}\right)\right)\right)\right)\right) \]
      18. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} + \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right)\right)\right)\right) \]
      19. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} - \color{blue}{a}\right)\right)\right)\right)\right) \]
      20. --lowering--.f6499.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\frac{1}{2}, \color{blue}{a}\right)\right)\right)\right)\right) \]
    3. Simplified99.6%

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

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

        \[\leadsto \log t \cdot \color{blue}{a} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\log t, \color{blue}{a}\right) \]
      3. log-lowering-log.f6479.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), a\right) \]
    7. Simplified79.9%

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

    if -1.02e34 < a < 1.22e16

    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+N/A

        \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\left(a - \frac{1}{2}\right)} \cdot \log t \]
      2. associate-+l+N/A

        \[\leadsto \log \left(x + y\right) + \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)} \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\log \left(x + y\right), \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right) \]
      4. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(x + y\right)\right), \left(\color{blue}{\left(\log z - t\right)} + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\left(\color{blue}{\log z} - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
      6. associate-+l-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\log z - \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\log z, \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
      8. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(\color{blue}{t} - \left(a - \frac{1}{2}\right) \cdot \log t\right)\right)\right) \]
      9. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(t + \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\mathsf{neg}\left(\log t \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right)\right) \]
      12. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\log t \cdot \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\log t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      14. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\mathsf{neg}\left(\color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right)\right) \]
      15. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(0 - \color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right) \]
      16. associate--r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(0 - a\right) + \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right) \]
      17. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(\mathsf{neg}\left(a\right)\right) + \frac{1}{2}\right)\right)\right)\right)\right) \]
      18. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} + \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right)\right)\right)\right) \]
      19. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} - \color{blue}{a}\right)\right)\right)\right)\right) \]
      20. --lowering--.f6499.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\frac{1}{2}, \color{blue}{a}\right)\right)\right)\right)\right) \]
    3. Simplified99.6%

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

      \[\leadsto \color{blue}{-1 \cdot t} \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(t\right) \]
      2. neg-sub0N/A

        \[\leadsto 0 - \color{blue}{t} \]
      3. --lowering--.f6451.4%

        \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{t}\right) \]
    7. Simplified51.4%

      \[\leadsto \color{blue}{0 - t} \]
    8. Step-by-step derivation
      1. sub0-negN/A

        \[\leadsto \mathsf{neg}\left(t\right) \]
      2. neg-lowering-neg.f6451.4%

        \[\leadsto \mathsf{neg.f64}\left(t\right) \]
    9. Applied egg-rr51.4%

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

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

Alternative 15: 42.0% accurate, 2.9× speedup?

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

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

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


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

    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+N/A

        \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\left(a - \frac{1}{2}\right)} \cdot \log t \]
      2. associate-+l+N/A

        \[\leadsto \log \left(x + y\right) + \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)} \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\log \left(x + y\right), \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right) \]
      4. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(x + y\right)\right), \left(\color{blue}{\left(\log z - t\right)} + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\left(\color{blue}{\log z} - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
      6. associate-+l-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\log z - \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\log z, \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
      8. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(\color{blue}{t} - \left(a - \frac{1}{2}\right) \cdot \log t\right)\right)\right) \]
      9. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(t + \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\mathsf{neg}\left(\log t \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right)\right) \]
      12. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\log t \cdot \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\log t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      14. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\mathsf{neg}\left(\color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right)\right) \]
      15. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(0 - \color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right) \]
      16. associate--r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(0 - a\right) + \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right) \]
      17. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(\mathsf{neg}\left(a\right)\right) + \frac{1}{2}\right)\right)\right)\right)\right) \]
      18. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} + \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right)\right)\right)\right) \]
      19. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} - \color{blue}{a}\right)\right)\right)\right)\right) \]
      20. --lowering--.f6499.4%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\frac{1}{2}, \color{blue}{a}\right)\right)\right)\right)\right) \]
    3. Simplified99.4%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \color{blue}{\left(a \cdot \log t\right)}\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\log t \cdot \color{blue}{a}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{*.f64}\left(\log t, \color{blue}{a}\right)\right) \]
      3. log-lowering-log.f6455.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), a\right)\right) \]
    7. Simplified55.9%

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

      \[\leadsto \color{blue}{\log \left(x + y\right)} \]
    9. Step-by-step derivation
      1. log-lowering-log.f64N/A

        \[\leadsto \mathsf{log.f64}\left(\left(x + y\right)\right) \]
      2. +-commutativeN/A

        \[\leadsto \mathsf{log.f64}\left(\left(y + x\right)\right) \]
      3. +-lowering-+.f6410.4%

        \[\leadsto \mathsf{log.f64}\left(\mathsf{+.f64}\left(y, x\right)\right) \]
    10. Simplified10.4%

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

    if 0.76000000000000001 < 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+N/A

        \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\left(a - \frac{1}{2}\right)} \cdot \log t \]
      2. associate-+l+N/A

        \[\leadsto \log \left(x + y\right) + \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)} \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\log \left(x + y\right), \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right) \]
      4. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(x + y\right)\right), \left(\color{blue}{\left(\log z - t\right)} + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\left(\color{blue}{\log z} - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
      6. associate-+l-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\log z - \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\log z, \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
      8. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(\color{blue}{t} - \left(a - \frac{1}{2}\right) \cdot \log t\right)\right)\right) \]
      9. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(t + \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\mathsf{neg}\left(\log t \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right)\right) \]
      12. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\log t \cdot \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\log t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      14. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\mathsf{neg}\left(\color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right)\right) \]
      15. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(0 - \color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right) \]
      16. associate--r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(0 - a\right) + \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right) \]
      17. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(\mathsf{neg}\left(a\right)\right) + \frac{1}{2}\right)\right)\right)\right)\right) \]
      18. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} + \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right)\right)\right)\right) \]
      19. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} - \color{blue}{a}\right)\right)\right)\right)\right) \]
      20. --lowering--.f6499.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\frac{1}{2}, \color{blue}{a}\right)\right)\right)\right)\right) \]
    3. Simplified99.9%

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

      \[\leadsto \color{blue}{-1 \cdot t} \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(t\right) \]
      2. neg-sub0N/A

        \[\leadsto 0 - \color{blue}{t} \]
      3. --lowering--.f6468.4%

        \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{t}\right) \]
    7. Simplified68.4%

      \[\leadsto \color{blue}{0 - t} \]
    8. Step-by-step derivation
      1. sub0-negN/A

        \[\leadsto \mathsf{neg}\left(t\right) \]
      2. neg-lowering-neg.f6468.4%

        \[\leadsto \mathsf{neg.f64}\left(t\right) \]
    9. Applied egg-rr68.4%

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

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

Alternative 16: 77.0% accurate, 2.9× speedup?

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

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

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

    \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(-1 \cdot t\right)}, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, \frac{1}{2}\right), \mathsf{log.f64}\left(t\right)\right)\right) \]
  4. Step-by-step derivation
    1. mul-1-negN/A

      \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{neg}\left(t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
    2. neg-sub0N/A

      \[\leadsto \mathsf{+.f64}\left(\left(0 - t\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
    3. --lowering--.f6477.2%

      \[\leadsto \mathsf{+.f64}\left(\mathsf{\_.f64}\left(0, t\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{\_.f64}\left(a, \frac{1}{2}\right)}, \mathsf{log.f64}\left(t\right)\right)\right) \]
  5. Simplified77.2%

    \[\leadsto \color{blue}{\left(0 - t\right)} + \left(a - 0.5\right) \cdot \log t \]
  6. Final simplification77.2%

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

Alternative 17: 40.4% accurate, 3.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 0.76:\\ \;\;\;\;\log y\\ \mathbf{else}:\\ \;\;\;\;0 - t\\ \end{array} \end{array} \]
(FPCore (x y z t a) :precision binary64 (if (<= t 0.76) (log y) (- 0.0 t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= 0.76) {
		tmp = log(y);
	} else {
		tmp = 0.0 - t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= 0.76d0) then
        tmp = log(y)
    else
        tmp = 0.0d0 - t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= 0.76) {
		tmp = Math.log(y);
	} else {
		tmp = 0.0 - t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= 0.76:
		tmp = math.log(y)
	else:
		tmp = 0.0 - t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= 0.76)
		tmp = log(y);
	else
		tmp = Float64(0.0 - t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= 0.76)
		tmp = log(y);
	else
		tmp = 0.0 - t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 0.76], N[Log[y], $MachinePrecision], N[(0.0 - t), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.76:\\
\;\;\;\;\log y\\

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


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

    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+N/A

        \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\left(a - \frac{1}{2}\right)} \cdot \log t \]
      2. associate-+l+N/A

        \[\leadsto \log \left(x + y\right) + \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)} \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\log \left(x + y\right), \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right) \]
      4. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(x + y\right)\right), \left(\color{blue}{\left(\log z - t\right)} + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\left(\color{blue}{\log z} - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
      6. associate-+l-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\log z - \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\log z, \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
      8. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(\color{blue}{t} - \left(a - \frac{1}{2}\right) \cdot \log t\right)\right)\right) \]
      9. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(t + \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\mathsf{neg}\left(\log t \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right)\right) \]
      12. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\log t \cdot \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\log t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      14. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\mathsf{neg}\left(\color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right)\right) \]
      15. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(0 - \color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right) \]
      16. associate--r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(0 - a\right) + \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right) \]
      17. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(\mathsf{neg}\left(a\right)\right) + \frac{1}{2}\right)\right)\right)\right)\right) \]
      18. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} + \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right)\right)\right)\right) \]
      19. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} - \color{blue}{a}\right)\right)\right)\right)\right) \]
      20. --lowering--.f6499.4%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\frac{1}{2}, \color{blue}{a}\right)\right)\right)\right)\right) \]
    3. Simplified99.4%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \color{blue}{\left(a \cdot \log t\right)}\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\log t \cdot \color{blue}{a}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{*.f64}\left(\log t, \color{blue}{a}\right)\right) \]
      3. log-lowering-log.f6455.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), a\right)\right) \]
    7. Simplified55.9%

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

      \[\leadsto \color{blue}{\log \left(x + y\right)} \]
    9. Step-by-step derivation
      1. log-lowering-log.f64N/A

        \[\leadsto \mathsf{log.f64}\left(\left(x + y\right)\right) \]
      2. +-commutativeN/A

        \[\leadsto \mathsf{log.f64}\left(\left(y + x\right)\right) \]
      3. +-lowering-+.f6410.4%

        \[\leadsto \mathsf{log.f64}\left(\mathsf{+.f64}\left(y, x\right)\right) \]
    10. Simplified10.4%

      \[\leadsto \color{blue}{\log \left(y + x\right)} \]
    11. Taylor expanded in y around inf

      \[\leadsto \color{blue}{-1 \cdot \log \left(\frac{1}{y}\right)} \]
    12. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right) \]
      2. log-recN/A

        \[\leadsto \mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right) \]
      3. remove-double-negN/A

        \[\leadsto \log y \]
      4. log-lowering-log.f646.9%

        \[\leadsto \mathsf{log.f64}\left(y\right) \]
    13. Simplified6.9%

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

    if 0.76000000000000001 < 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+N/A

        \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\left(a - \frac{1}{2}\right)} \cdot \log t \]
      2. associate-+l+N/A

        \[\leadsto \log \left(x + y\right) + \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)} \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\log \left(x + y\right), \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right) \]
      4. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(x + y\right)\right), \left(\color{blue}{\left(\log z - t\right)} + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\left(\color{blue}{\log z} - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
      6. associate-+l-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\log z - \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\log z, \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
      8. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(\color{blue}{t} - \left(a - \frac{1}{2}\right) \cdot \log t\right)\right)\right) \]
      9. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(t + \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\mathsf{neg}\left(\log t \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right)\right) \]
      12. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\log t \cdot \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\log t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      14. log-lowering-log.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\mathsf{neg}\left(\color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right)\right) \]
      15. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(0 - \color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right) \]
      16. associate--r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(0 - a\right) + \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right) \]
      17. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(\mathsf{neg}\left(a\right)\right) + \frac{1}{2}\right)\right)\right)\right)\right) \]
      18. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} + \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right)\right)\right)\right) \]
      19. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} - \color{blue}{a}\right)\right)\right)\right)\right) \]
      20. --lowering--.f6499.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\frac{1}{2}, \color{blue}{a}\right)\right)\right)\right)\right) \]
    3. Simplified99.9%

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

      \[\leadsto \color{blue}{-1 \cdot t} \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(t\right) \]
      2. neg-sub0N/A

        \[\leadsto 0 - \color{blue}{t} \]
      3. --lowering--.f6468.4%

        \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{t}\right) \]
    7. Simplified68.4%

      \[\leadsto \color{blue}{0 - t} \]
    8. Step-by-step derivation
      1. sub0-negN/A

        \[\leadsto \mathsf{neg}\left(t\right) \]
      2. neg-lowering-neg.f6468.4%

        \[\leadsto \mathsf{neg.f64}\left(t\right) \]
    9. Applied egg-rr68.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 0.76:\\ \;\;\;\;\log y\\ \mathbf{else}:\\ \;\;\;\;0 - t\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 38.7% accurate, 104.3× speedup?

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

\\
0 - t
\end{array}
Derivation
  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+N/A

      \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\left(a - \frac{1}{2}\right)} \cdot \log t \]
    2. associate-+l+N/A

      \[\leadsto \log \left(x + y\right) + \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)} \]
    3. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\log \left(x + y\right), \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right) \]
    4. log-lowering-log.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(x + y\right)\right), \left(\color{blue}{\left(\log z - t\right)} + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
    5. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\left(\color{blue}{\log z} - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
    6. associate-+l-N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\log z - \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
    7. --lowering--.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\log z, \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
    8. log-lowering-log.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(\color{blue}{t} - \left(a - \frac{1}{2}\right) \cdot \log t\right)\right)\right) \]
    9. sub-negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(t + \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
    10. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
    11. *-commutativeN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\mathsf{neg}\left(\log t \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right)\right) \]
    12. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\log t \cdot \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
    13. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\log t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
    14. log-lowering-log.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\mathsf{neg}\left(\color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right)\right) \]
    15. neg-sub0N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(0 - \color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right) \]
    16. associate--r-N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(0 - a\right) + \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right) \]
    17. neg-sub0N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(\mathsf{neg}\left(a\right)\right) + \frac{1}{2}\right)\right)\right)\right)\right) \]
    18. +-commutativeN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} + \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right)\right)\right)\right) \]
    19. unsub-negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} - \color{blue}{a}\right)\right)\right)\right)\right) \]
    20. --lowering--.f6499.6%

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\frac{1}{2}, \color{blue}{a}\right)\right)\right)\right)\right) \]
  3. Simplified99.6%

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

    \[\leadsto \color{blue}{-1 \cdot t} \]
  6. Step-by-step derivation
    1. mul-1-negN/A

      \[\leadsto \mathsf{neg}\left(t\right) \]
    2. neg-sub0N/A

      \[\leadsto 0 - \color{blue}{t} \]
    3. --lowering--.f6436.8%

      \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{t}\right) \]
  7. Simplified36.8%

    \[\leadsto \color{blue}{0 - t} \]
  8. Step-by-step derivation
    1. sub0-negN/A

      \[\leadsto \mathsf{neg}\left(t\right) \]
    2. neg-lowering-neg.f6436.8%

      \[\leadsto \mathsf{neg.f64}\left(t\right) \]
  9. Applied egg-rr36.8%

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

    \[\leadsto 0 - t \]
  11. Add Preprocessing

Alternative 19: 2.4% accurate, 313.0× 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 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.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+N/A

      \[\leadsto \left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \color{blue}{\left(a - \frac{1}{2}\right)} \cdot \log t \]
    2. associate-+l+N/A

      \[\leadsto \log \left(x + y\right) + \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)} \]
    3. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\log \left(x + y\right), \color{blue}{\left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right) \]
    4. log-lowering-log.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(x + y\right)\right), \left(\color{blue}{\left(\log z - t\right)} + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
    5. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\left(\color{blue}{\log z} - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)\right) \]
    6. associate-+l-N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \left(\log z - \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
    7. --lowering--.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\log z, \color{blue}{\left(t - \left(a - \frac{1}{2}\right) \cdot \log t\right)}\right)\right) \]
    8. log-lowering-log.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(\color{blue}{t} - \left(a - \frac{1}{2}\right) \cdot \log t\right)\right)\right) \]
    9. sub-negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \left(t + \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
    10. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right) \cdot \log t\right)\right)}\right)\right)\right) \]
    11. *-commutativeN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\mathsf{neg}\left(\log t \cdot \left(a - \frac{1}{2}\right)\right)\right)\right)\right)\right) \]
    12. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \left(\log t \cdot \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
    13. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\log t, \color{blue}{\left(\mathsf{neg}\left(\left(a - \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
    14. log-lowering-log.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\mathsf{neg}\left(\color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right)\right) \]
    15. neg-sub0N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(0 - \color{blue}{\left(a - \frac{1}{2}\right)}\right)\right)\right)\right)\right) \]
    16. associate--r-N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(0 - a\right) + \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right) \]
    17. neg-sub0N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\left(\mathsf{neg}\left(a\right)\right) + \frac{1}{2}\right)\right)\right)\right)\right) \]
    18. +-commutativeN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} + \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right)\right)\right)\right) \]
    19. unsub-negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \left(\frac{1}{2} - \color{blue}{a}\right)\right)\right)\right)\right) \]
    20. --lowering--.f6499.6%

      \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), \mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{log.f64}\left(t\right), \mathsf{\_.f64}\left(\frac{1}{2}, \color{blue}{a}\right)\right)\right)\right)\right) \]
  3. Simplified99.6%

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

    \[\leadsto \color{blue}{-1 \cdot t} \]
  6. Step-by-step derivation
    1. mul-1-negN/A

      \[\leadsto \mathsf{neg}\left(t\right) \]
    2. neg-sub0N/A

      \[\leadsto 0 - \color{blue}{t} \]
    3. --lowering--.f6436.8%

      \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{t}\right) \]
  7. Simplified36.8%

    \[\leadsto \color{blue}{0 - t} \]
  8. Step-by-step derivation
    1. sub0-negN/A

      \[\leadsto \mathsf{neg}\left(t\right) \]
    2. neg-lowering-neg.f6436.8%

      \[\leadsto \mathsf{neg.f64}\left(t\right) \]
  9. Applied egg-rr36.8%

    \[\leadsto \color{blue}{-t} \]
  10. Step-by-step derivation
    1. neg-sub0N/A

      \[\leadsto 0 - \color{blue}{t} \]
    2. flip3--N/A

      \[\leadsto \frac{{0}^{3} - {t}^{3}}{\color{blue}{0 \cdot 0 + \left(t \cdot t + 0 \cdot t\right)}} \]
    3. metadata-evalN/A

      \[\leadsto \frac{0 - {t}^{3}}{\color{blue}{0} \cdot 0 + \left(t \cdot t + 0 \cdot t\right)} \]
    4. sub-negN/A

      \[\leadsto \frac{0 + \left(\mathsf{neg}\left({t}^{3}\right)\right)}{\color{blue}{0 \cdot 0} + \left(t \cdot t + 0 \cdot t\right)} \]
    5. metadata-evalN/A

      \[\leadsto \frac{{0}^{3} + \left(\mathsf{neg}\left({t}^{3}\right)\right)}{\color{blue}{0} \cdot 0 + \left(t \cdot t + 0 \cdot t\right)} \]
    6. cube-negN/A

      \[\leadsto \frac{{0}^{3} + {\left(\mathsf{neg}\left(t\right)\right)}^{3}}{0 \cdot \color{blue}{0} + \left(t \cdot t + 0 \cdot t\right)} \]
    7. neg-sub0N/A

      \[\leadsto \frac{{0}^{3} + {\left(0 - t\right)}^{3}}{0 \cdot 0 + \left(t \cdot t + 0 \cdot t\right)} \]
    8. sqr-powN/A

      \[\leadsto \frac{{0}^{3} + {\left(0 - t\right)}^{\left(\frac{3}{2}\right)} \cdot {\left(0 - t\right)}^{\left(\frac{3}{2}\right)}}{0 \cdot \color{blue}{0} + \left(t \cdot t + 0 \cdot t\right)} \]
    9. pow-prod-downN/A

      \[\leadsto \frac{{0}^{3} + {\left(\left(0 - t\right) \cdot \left(0 - t\right)\right)}^{\left(\frac{3}{2}\right)}}{0 \cdot \color{blue}{0} + \left(t \cdot t + 0 \cdot t\right)} \]
    10. neg-sub0N/A

      \[\leadsto \frac{{0}^{3} + {\left(\left(\mathsf{neg}\left(t\right)\right) \cdot \left(0 - t\right)\right)}^{\left(\frac{3}{2}\right)}}{0 \cdot 0 + \left(t \cdot t + 0 \cdot t\right)} \]
    11. neg-sub0N/A

      \[\leadsto \frac{{0}^{3} + {\left(\left(\mathsf{neg}\left(t\right)\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}^{\left(\frac{3}{2}\right)}}{0 \cdot 0 + \left(t \cdot t + 0 \cdot t\right)} \]
    12. sqr-negN/A

      \[\leadsto \frac{{0}^{3} + {\left(t \cdot t\right)}^{\left(\frac{3}{2}\right)}}{0 \cdot 0 + \left(t \cdot t + 0 \cdot t\right)} \]
    13. pow-prod-downN/A

      \[\leadsto \frac{{0}^{3} + {t}^{\left(\frac{3}{2}\right)} \cdot {t}^{\left(\frac{3}{2}\right)}}{0 \cdot \color{blue}{0} + \left(t \cdot t + 0 \cdot t\right)} \]
    14. sqr-powN/A

      \[\leadsto \frac{{0}^{3} + {t}^{3}}{0 \cdot \color{blue}{0} + \left(t \cdot t + 0 \cdot t\right)} \]
    15. fma-defineN/A

      \[\leadsto \frac{{0}^{3} + {t}^{3}}{0 \cdot 0 + \mathsf{fma}\left(t, \color{blue}{t}, 0 \cdot t\right)} \]
    16. mul0-lftN/A

      \[\leadsto \frac{{0}^{3} + {t}^{3}}{0 \cdot 0 + \mathsf{fma}\left(t, t, 0\right)} \]
    17. metadata-evalN/A

      \[\leadsto \frac{{0}^{3} + {t}^{3}}{0 \cdot 0 + \mathsf{fma}\left(t, t, \mathsf{neg}\left(0\right)\right)} \]
    18. fmm-defN/A

      \[\leadsto \frac{{0}^{3} + {t}^{3}}{0 \cdot 0 + \left(t \cdot t - \color{blue}{0}\right)} \]
    19. mul0-lftN/A

      \[\leadsto \frac{{0}^{3} + {t}^{3}}{0 \cdot 0 + \left(t \cdot t - 0 \cdot \color{blue}{t}\right)} \]
    20. flip3-+N/A

      \[\leadsto 0 + \color{blue}{t} \]
    21. +-lft-identity2.6%

      \[\leadsto t \]
  11. Applied egg-rr2.6%

    \[\leadsto \color{blue}{t} \]
  12. 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 2024161 
(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))))