Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2

Percentage Accurate: 99.6% → 99.6%
Time: 14.7s
Alternatives: 9
Speedup: N/A×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

    \[\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t \]
  2. Step-by-step derivation
    1. associate--l+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(\log t \cdot \left(a - 0.5\right) - t\right)\right) \]
  6. Add Preprocessing

Alternative 2: 97.3% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 7.79999999999999996e-22

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.79999999999999996e-22 < 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.8%

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\log t, a\right), t\right) \]
      3. log-lowering-log.f6498.5%

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

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

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

Alternative 3: 80.3% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 7.79999999999999996e-22

    1. Initial program 99.3%

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

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(t \cdot \left(\left(\frac{\log z}{t} + \frac{\log \left(x + y\right)}{t}\right) - 1\right)\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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\log z + \left(-1 \cdot \log \left(\frac{1}{y}\right) + \log t \cdot \left(a - \frac{1}{2}\right)\right)} \]
    12. Step-by-step derivation
      1. +-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) \]
      2. 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) \]
      3. +-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)\right), \color{blue}{\left(\log t \cdot \left(a - \frac{1}{2}\right)\right)}\right)\right) \]
      4. mul-1-negN/A

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

        \[\leadsto \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), \left(\log \color{blue}{t} \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) \]
      6. remove-double-negN/A

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

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

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

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

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

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

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

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

    if 7.79999999999999996e-22 < 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.8%

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\log t, a\right), t\right) \]
      3. log-lowering-log.f6498.5%

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

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

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

Alternative 4: 73.7% accurate, 1.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 4.8000000000000001e-58

    1. Initial program 99.3%

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

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(t \cdot \left(\left(\frac{\log z}{t} + \frac{\log \left(x + y\right)}{t}\right) - 1\right)\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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.8000000000000001e-58 < 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(t \cdot \left(\left(\frac{\log z}{t} + \frac{\log \left(x + y\right)}{t}\right) - 1\right)\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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(\frac{\log \left(y + x\right)}{t} + \left(\frac{\log z}{t} + -1\right)\right)} + \left(a - 0.5\right) \cdot \log t \]
    6. 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) \]
    7. 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-lowering-neg.f6496.8%

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

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

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

Alternative 5: 77.7% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \log t \cdot a - t\\ \mathbf{if}\;a \leq -1.3:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 0.65:\\ \;\;\;\;\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 (- (* (log t) a) t)))
   (if (<= a -1.3) t_1 (if (<= a 0.65) (- (log (+ x y)) t) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (log(t) * a) - t;
	double tmp;
	if (a <= -1.3) {
		tmp = t_1;
	} else if (a <= 0.65) {
		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 = (log(t) * a) - t
    if (a <= (-1.3d0)) then
        tmp = t_1
    else if (a <= 0.65d0) 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 = (Math.log(t) * a) - t;
	double tmp;
	if (a <= -1.3) {
		tmp = t_1;
	} else if (a <= 0.65) {
		tmp = Math.log((x + y)) - t;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (math.log(t) * a) - t
	tmp = 0
	if a <= -1.3:
		tmp = t_1
	elif a <= 0.65:
		tmp = math.log((x + y)) - t
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(log(t) * a) - t)
	tmp = 0.0
	if (a <= -1.3)
		tmp = t_1;
	elseif (a <= 0.65)
		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 = (log(t) * a) - t;
	tmp = 0.0;
	if (a <= -1.3)
		tmp = t_1;
	elseif (a <= 0.65)
		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[(N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[a, -1.3], t$95$1, If[LessEqual[a, 0.65], N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \log t \cdot a - t\\
\mathbf{if}\;a \leq -1.3:\\
\;\;\;\;t\_1\\

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

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


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

    1. Initial program 99.7%

      \[\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t \]
    2. Step-by-step derivation
      1. associate--l+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.7%

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\log t, a\right), t\right) \]
      3. log-lowering-log.f6498.7%

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

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

    if -1.30000000000000004 < a < 0.650000000000000022

    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 t around inf

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(\frac{\log z}{t}\right), -1\right), \left(\color{blue}{-1} \cdot \frac{\log \left(\frac{1}{t}\right) \cdot \left(\frac{1}{2} - a\right)}{t}\right)\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(t, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\log z, t\right), -1\right), \left(-1 \cdot \frac{\log \left(\frac{1}{t}\right) \cdot \left(\frac{1}{2} - a\right)}{t}\right)\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(t, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{log.f64}\left(z\right), t\right), -1\right), \left(-1 \cdot \frac{\log \left(\frac{1}{t}\right) \cdot \left(\frac{1}{2} - a\right)}{t}\right)\right)\right)\right) \]
      9. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \log \left(x + y\right) + \color{blue}{t \cdot \left(\left(\frac{\log z}{t} + -1\right) - \left(1 \cdot \log t\right) \cdot \frac{0.5 - a}{t}\right)} \]
    8. 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) \]
    9. 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-lowering-neg.f6458.7%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, y\right)\right), \mathsf{neg.f64}\left(t\right)\right) \]
    10. Simplified58.7%

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

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

Alternative 6: 62.6% accurate, 2.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.15000000000000006e39 or 6.00000000000000033e43 < 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.f6483.8%

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

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

    if -1.15000000000000006e39 < a < 6.00000000000000033e43

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{t}\right) \]
    7. Simplified53.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.f6453.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.15 \cdot 10^{+39}:\\ \;\;\;\;\log t \cdot a\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+43}:\\ \;\;\;\;0 - t\\ \mathbf{else}:\\ \;\;\;\;\log t \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 77.4% accurate, 2.9× speedup?

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

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

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

    \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(t \cdot \left(\left(\frac{\log z}{t} + \frac{\log \left(x + y\right)}{t}\right) - 1\right)\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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{t \cdot \left(\frac{\log \left(y + x\right)}{t} + \left(\frac{\log z}{t} + -1\right)\right)} + \left(a - 0.5\right) \cdot \log t \]
  6. 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) \]
  7. 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-lowering-neg.f6476.2%

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

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

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

Alternative 8: 74.8% accurate, 3.0× speedup?

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

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

    \[\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t \]
  2. Step-by-step derivation
    1. associate--l+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. 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-rr73.5%

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

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

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\log t, a\right), t\right) \]
    3. log-lowering-log.f6473.5%

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

    \[\leadsto \color{blue}{\log t \cdot a} - t \]
  10. Add Preprocessing

Alternative 9: 37.8% 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.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 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--.f6438.9%

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

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

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

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

    \[\leadsto \color{blue}{-t} \]
  10. Final simplification38.9%

    \[\leadsto 0 - t \]
  11. Add Preprocessing

Developer Target 1: 99.6% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2024160 
(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))))