Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2

Percentage Accurate: 99.6% → 99.3%
Time: 12.2s
Alternatives: 11
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 11 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.3% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(\mathsf{neg}\left(t\right)\right) \cdot \left(-1 \cdot \frac{\log z + \log \left(x + y\right)}{t}\right) + \color{blue}{\left(\mathsf{neg}\left(t\right)\right)}\right) + \left(a - \frac{1}{2}\right) \cdot \log t \]
    6. distribute-lft-neg-inN/A

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

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

      \[\leadsto \left(\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\frac{\log z + \log \left(x + y\right)}{t}\right)\right)} \cdot t\right)\right) + \left(\mathsf{neg}\left(t\right)\right)\right) + \left(a - \frac{1}{2}\right) \cdot \log t \]
    9. distribute-lft-neg-outN/A

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\log z + \log \left(x + y\right)}{t}, t, \mathsf{neg}\left(t\right)\right)} + \left(a - \frac{1}{2}\right) \cdot \log t \]
  5. Applied rewrites99.6%

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

    \[\leadsto \mathsf{fma}\left(\frac{\log z + \log \left(y + x\right)}{t}, t, -t\right) - \left(0.5 - a\right) \cdot \log t \]
  7. Add Preprocessing

Alternative 2: 90.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \log z + \log \left(y + x\right)\\ t_2 := \mathsf{fma}\left(\frac{\log t}{t} \cdot a, t, -t\right)\\ \mathbf{if}\;t\_1 \leq -750:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 720:\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, \log t, \log \left(\left(y + x\right) \cdot z\right) - t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ (log z) (log (+ y x))))
        (t_2 (fma (* (/ (log t) t) a) t (- t))))
   (if (<= t_1 -750.0)
     t_2
     (if (<= t_1 720.0)
       (fma (- a 0.5) (log t) (- (log (* (+ y x) z)) t))
       t_2))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = log(z) + log((y + x));
	double t_2 = fma(((log(t) / t) * a), t, -t);
	double tmp;
	if (t_1 <= -750.0) {
		tmp = t_2;
	} else if (t_1 <= 720.0) {
		tmp = fma((a - 0.5), log(t), (log(((y + x) * z)) - t));
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(log(z) + log(Float64(y + x)))
	t_2 = fma(Float64(Float64(log(t) / t) * a), t, Float64(-t))
	tmp = 0.0
	if (t_1 <= -750.0)
		tmp = t_2;
	elseif (t_1 <= 720.0)
		tmp = fma(Float64(a - 0.5), log(t), Float64(log(Float64(Float64(y + x) * z)) - t));
	else
		tmp = t_2;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[z], $MachinePrecision] + N[Log[N[(y + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[Log[t], $MachinePrecision] / t), $MachinePrecision] * a), $MachinePrecision] * t + (-t)), $MachinePrecision]}, If[LessEqual[t$95$1, -750.0], t$95$2, If[LessEqual[t$95$1, 720.0], N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision] + N[(N[Log[N[(N[(y + x), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq 720:\\
\;\;\;\;\mathsf{fma}\left(a - 0.5, \log t, \log \left(\left(y + x\right) \cdot z\right) - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < -750 or 720 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z))

    1. Initial program 99.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \frac{\log \left(\frac{1}{t}\right) \cdot \left(a - \frac{1}{2}\right)}{t} + \left(\frac{\log z}{t} + \frac{\log \left(x + y\right)}{t}\right), t, \mathsf{neg}\left(t\right)\right)} \]
    5. Applied rewrites95.8%

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

      \[\leadsto \mathsf{fma}\left(\frac{a \cdot \log t}{t}, t, -t\right) \]
    7. Step-by-step derivation
      1. Applied rewrites72.1%

        \[\leadsto \mathsf{fma}\left(\frac{\log t}{t} \cdot a, t, -t\right) \]

      if -750 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 720

      1. Initial program 99.6%

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

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

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

          \[\leadsto \color{blue}{\left(a - \frac{1}{2}\right) \cdot \log t} + \left(\left(\log \left(x + y\right) + \log z\right) - t\right) \]
        4. lower-fma.f6499.6

          \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, \log t, \left(\log \left(x + y\right) + \log z\right) - t\right)} \]
        5. lift-+.f64N/A

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, \log t, \log \color{blue}{\left(z \cdot \left(x + y\right)\right)} - t\right) \]
        11. lower-*.f6499.2

          \[\leadsto \mathsf{fma}\left(a - 0.5, \log t, \log \color{blue}{\left(z \cdot \left(x + y\right)\right)} - t\right) \]
        12. lift-+.f64N/A

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

          \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, \log t, \log \left(z \cdot \color{blue}{\left(y + x\right)}\right) - t\right) \]
        14. lower-+.f6499.2

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, \log t, \log \left(z \cdot \left(y + x\right)\right) - t\right)} \]
    8. Recombined 2 regimes into one program.
    9. Final simplification94.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\log z + \log \left(y + x\right) \leq -750:\\ \;\;\;\;\mathsf{fma}\left(\frac{\log t}{t} \cdot a, t, -t\right)\\ \mathbf{elif}\;\log z + \log \left(y + x\right) \leq 720:\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, \log t, \log \left(\left(y + x\right) \cdot z\right) - t\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\log t}{t} \cdot a, t, -t\right)\\ \end{array} \]
    10. Add Preprocessing

    Alternative 3: 64.7% accurate, 0.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \log z + \log \left(y + x\right)\\ t_2 := \mathsf{fma}\left(\frac{\log t}{t} \cdot a, t, -t\right)\\ \mathbf{if}\;t\_1 \leq -750:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 720:\\ \;\;\;\;\mathsf{fma}\left(\log t, a - 0.5, \log \left(z \cdot y\right)\right) - t\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (+ (log z) (log (+ y x))))
            (t_2 (fma (* (/ (log t) t) a) t (- t))))
       (if (<= t_1 -750.0)
         t_2
         (if (<= t_1 720.0) (- (fma (log t) (- a 0.5) (log (* z y))) t) t_2))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = log(z) + log((y + x));
    	double t_2 = fma(((log(t) / t) * a), t, -t);
    	double tmp;
    	if (t_1 <= -750.0) {
    		tmp = t_2;
    	} else if (t_1 <= 720.0) {
    		tmp = fma(log(t), (a - 0.5), log((z * y))) - t;
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	t_1 = Float64(log(z) + log(Float64(y + x)))
    	t_2 = fma(Float64(Float64(log(t) / t) * a), t, Float64(-t))
    	tmp = 0.0
    	if (t_1 <= -750.0)
    		tmp = t_2;
    	elseif (t_1 <= 720.0)
    		tmp = Float64(fma(log(t), Float64(a - 0.5), log(Float64(z * y))) - t);
    	else
    		tmp = t_2;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[z], $MachinePrecision] + N[Log[N[(y + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[Log[t], $MachinePrecision] / t), $MachinePrecision] * a), $MachinePrecision] * t + (-t)), $MachinePrecision]}, If[LessEqual[t$95$1, -750.0], t$95$2, If[LessEqual[t$95$1, 720.0], N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision] + N[Log[N[(z * y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], t$95$2]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \log z + \log \left(y + x\right)\\
    t_2 := \mathsf{fma}\left(\frac{\log t}{t} \cdot a, t, -t\right)\\
    \mathbf{if}\;t\_1 \leq -750:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;t\_1 \leq 720:\\
    \;\;\;\;\mathsf{fma}\left(\log t, a - 0.5, \log \left(z \cdot y\right)\right) - t\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_2\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < -750 or 720 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z))

      1. Initial program 99.7%

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

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

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

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

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \frac{\log \left(\frac{1}{t}\right) \cdot \left(a - \frac{1}{2}\right)}{t} + \left(\frac{\log z}{t} + \frac{\log \left(x + y\right)}{t}\right), t, \mathsf{neg}\left(t\right)\right)} \]
      5. Applied rewrites95.8%

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

        \[\leadsto \mathsf{fma}\left(\frac{a \cdot \log t}{t}, t, -t\right) \]
      7. Step-by-step derivation
        1. Applied rewrites72.1%

          \[\leadsto \mathsf{fma}\left(\frac{\log t}{t} \cdot a, t, -t\right) \]

        if -750 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 720

        1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\log t, a - \frac{1}{2}, \log \color{blue}{\left(z \cdot y\right)}\right) - t \]
          8. lower-*.f6461.0

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(\log t, a - 0.5, \log \left(z \cdot y\right)\right) - t} \]
      8. Recombined 2 regimes into one program.
      9. Final simplification63.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\log z + \log \left(y + x\right) \leq -750:\\ \;\;\;\;\mathsf{fma}\left(\frac{\log t}{t} \cdot a, t, -t\right)\\ \mathbf{elif}\;\log z + \log \left(y + x\right) \leq 720:\\ \;\;\;\;\mathsf{fma}\left(\log t, a - 0.5, \log \left(z \cdot y\right)\right) - t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\log t}{t} \cdot a, t, -t\right)\\ \end{array} \]
      10. Add Preprocessing

      Alternative 4: 99.6% accurate, 1.0× speedup?

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

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

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

      Alternative 5: 80.0% accurate, 1.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 10.5:\\ \;\;\;\;\mathsf{fma}\left(-0.5 + a, \log t, \log z\right) + \log y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\log t}{t} \cdot a, t, -t\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (if (<= t 10.5)
         (+ (fma (+ -0.5 a) (log t) (log z)) (log y))
         (fma (* (/ (log t) t) a) t (- t))))
      double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if (t <= 10.5) {
      		tmp = fma((-0.5 + a), log(t), log(z)) + log(y);
      	} else {
      		tmp = fma(((log(t) / t) * a), t, -t);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a)
      	tmp = 0.0
      	if (t <= 10.5)
      		tmp = Float64(fma(Float64(-0.5 + a), log(t), log(z)) + log(y));
      	else
      		tmp = fma(Float64(Float64(log(t) / t) * a), t, Float64(-t));
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_] := If[LessEqual[t, 10.5], N[(N[(N[(-0.5 + a), $MachinePrecision] * N[Log[t], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Log[t], $MachinePrecision] / t), $MachinePrecision] * a), $MachinePrecision] * t + (-t)), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;t \leq 10.5:\\
      \;\;\;\;\mathsf{fma}\left(-0.5 + a, \log t, \log z\right) + \log y\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(\frac{\log t}{t} \cdot a, t, -t\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < 10.5

        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 x around 0

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, \log t, \log z\right) - \color{blue}{\left(t - \log y\right)} \]
          12. lower-log.f6453.0

            \[\leadsto \mathsf{fma}\left(a - 0.5, \log t, \log z\right) - \left(t - \color{blue}{\log y}\right) \]
        5. Applied rewrites53.0%

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

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

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

          if 10.5 < 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 \color{blue}{t \cdot \left(\left(-1 \cdot \frac{\log \left(\frac{1}{t}\right) \cdot \left(a - \frac{1}{2}\right)}{t} + \left(\frac{\log z}{t} + \frac{\log \left(x + y\right)}{t}\right)\right) - 1\right)} \]
          4. Step-by-step derivation
            1. sub-negN/A

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\frac{a \cdot \log t}{t}, t, -t\right) \]
          7. Step-by-step derivation
            1. Applied rewrites98.8%

              \[\leadsto \mathsf{fma}\left(\frac{\log t}{t} \cdot a, t, -t\right) \]
          8. Recombined 2 regimes into one program.
          9. Add Preprocessing

          Alternative 6: 69.0% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, \log t, \log z\right) - \color{blue}{\left(t - \log y\right)} \]
            12. lower-log.f6463.4

              \[\leadsto \mathsf{fma}\left(a - 0.5, \log t, \log z\right) - \left(t - \color{blue}{\log y}\right) \]
          5. Applied rewrites63.4%

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

          Alternative 7: 73.4% accurate, 1.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 1.35 \cdot 10^{-18}:\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, \log t, \log \left(z \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\log t}{t} \cdot a, t, -t\right)\\ \end{array} \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (if (<= t 1.35e-18)
             (fma (- a 0.5) (log t) (log (* z y)))
             (fma (* (/ (log t) t) a) t (- t))))
          double code(double x, double y, double z, double t, double a) {
          	double tmp;
          	if (t <= 1.35e-18) {
          		tmp = fma((a - 0.5), log(t), log((z * y)));
          	} else {
          		tmp = fma(((log(t) / t) * a), t, -t);
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a)
          	tmp = 0.0
          	if (t <= 1.35e-18)
          		tmp = fma(Float64(a - 0.5), log(t), log(Float64(z * y)));
          	else
          		tmp = fma(Float64(Float64(log(t) / t) * a), t, Float64(-t));
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.35e-18], N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision] + N[Log[N[(z * y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Log[t], $MachinePrecision] / t), $MachinePrecision] * a), $MachinePrecision] * t + (-t)), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;t \leq 1.35 \cdot 10^{-18}:\\
          \;\;\;\;\mathsf{fma}\left(a - 0.5, \log t, \log \left(z \cdot y\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(\frac{\log t}{t} \cdot a, t, -t\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if t < 1.34999999999999994e-18

            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 x around 0

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, \log t, \log z\right) - \color{blue}{\left(t - \log y\right)} \]
              12. lower-log.f6452.1

                \[\leadsto \mathsf{fma}\left(a - 0.5, \log t, \log z\right) - \left(t - \color{blue}{\log y}\right) \]
            5. Applied rewrites52.1%

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

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

                \[\leadsto \mathsf{fma}\left(-0.5 + a, \log t, \log z\right) + \color{blue}{\log y} \]
              2. Step-by-step derivation
                1. Applied rewrites43.4%

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

                if 1.34999999999999994e-18 < 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 \color{blue}{t \cdot \left(\left(-1 \cdot \frac{\log \left(\frac{1}{t}\right) \cdot \left(a - \frac{1}{2}\right)}{t} + \left(\frac{\log z}{t} + \frac{\log \left(x + y\right)}{t}\right)\right) - 1\right)} \]
                4. Step-by-step derivation
                  1. sub-negN/A

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

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

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

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \frac{\log \left(\frac{1}{t}\right) \cdot \left(a - \frac{1}{2}\right)}{t} + \left(\frac{\log z}{t} + \frac{\log \left(x + y\right)}{t}\right), t, \mathsf{neg}\left(t\right)\right)} \]
                5. Applied rewrites99.8%

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

                  \[\leadsto \mathsf{fma}\left(\frac{a \cdot \log t}{t}, t, -t\right) \]
                7. Step-by-step derivation
                  1. Applied rewrites97.6%

                    \[\leadsto \mathsf{fma}\left(\frac{\log t}{t} \cdot a, t, -t\right) \]
                8. Recombined 2 regimes into one program.
                9. Add Preprocessing

                Alternative 8: 73.9% accurate, 2.5× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 5.9 \cdot 10^{-52}:\\ \;\;\;\;\log t \cdot a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\log t}{t} \cdot a, t, -t\right)\\ \end{array} \end{array} \]
                (FPCore (x y z t a)
                 :precision binary64
                 (if (<= t 5.9e-52) (* (log t) a) (fma (* (/ (log t) t) a) t (- t))))
                double code(double x, double y, double z, double t, double a) {
                	double tmp;
                	if (t <= 5.9e-52) {
                		tmp = log(t) * a;
                	} else {
                		tmp = fma(((log(t) / t) * a), t, -t);
                	}
                	return tmp;
                }
                
                function code(x, y, z, t, a)
                	tmp = 0.0
                	if (t <= 5.9e-52)
                		tmp = Float64(log(t) * a);
                	else
                		tmp = fma(Float64(Float64(log(t) / t) * a), t, Float64(-t));
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_, a_] := If[LessEqual[t, 5.9e-52], N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision], N[(N[(N[(N[Log[t], $MachinePrecision] / t), $MachinePrecision] * a), $MachinePrecision] * t + (-t)), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;t \leq 5.9 \cdot 10^{-52}:\\
                \;\;\;\;\log t \cdot a\\
                
                \mathbf{else}:\\
                \;\;\;\;\mathsf{fma}\left(\frac{\log t}{t} \cdot a, t, -t\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if t < 5.90000000000000019e-52

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

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

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

                      \[\leadsto \color{blue}{\log t \cdot a} \]
                    3. lower-log.f6447.9

                      \[\leadsto \color{blue}{\log t} \cdot a \]
                  5. Applied rewrites47.9%

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

                  if 5.90000000000000019e-52 < t

                  1. Initial program 99.8%

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \frac{\log \left(\frac{1}{t}\right) \cdot \left(a - \frac{1}{2}\right)}{t} + \left(\frac{\log z}{t} + \frac{\log \left(x + y\right)}{t}\right), t, \mathsf{neg}\left(t\right)\right)} \]
                  5. Applied rewrites99.8%

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

                    \[\leadsto \mathsf{fma}\left(\frac{a \cdot \log t}{t}, t, -t\right) \]
                  7. Step-by-step derivation
                    1. Applied rewrites94.0%

                      \[\leadsto \mathsf{fma}\left(\frac{\log t}{t} \cdot a, t, -t\right) \]
                  8. Recombined 2 regimes into one program.
                  9. Add Preprocessing

                  Alternative 9: 62.0% accurate, 2.9× speedup?

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

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

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

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

                        \[\leadsto \color{blue}{\log t \cdot a} \]
                      3. lower-log.f6452.3

                        \[\leadsto \color{blue}{\log t} \cdot a \]
                    5. Applied rewrites52.3%

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

                    if 1.25000000000000001e40 < 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 \color{blue}{-1 \cdot t} \]
                    4. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto \color{blue}{\mathsf{neg}\left(t\right)} \]
                      2. lower-neg.f6479.9

                        \[\leadsto \color{blue}{-t} \]
                    5. Applied rewrites79.9%

                      \[\leadsto \color{blue}{-t} \]
                  3. Recombined 2 regimes into one program.
                  4. Add Preprocessing

                  Alternative 10: 37.5% accurate, 107.0× speedup?

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

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

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

                      \[\leadsto \color{blue}{\mathsf{neg}\left(t\right)} \]
                    2. lower-neg.f6439.3

                      \[\leadsto \color{blue}{-t} \]
                  5. Applied rewrites39.3%

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

                  Alternative 11: 2.4% accurate, 321.0× speedup?

                  \[\begin{array}{l} \\ t \end{array} \]
                  (FPCore (x y z t a) :precision binary64 t)
                  double code(double x, double y, double z, double t, double a) {
                  	return t;
                  }
                  
                  real(8) function code(x, y, z, t, a)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      code = t
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a) {
                  	return t;
                  }
                  
                  def code(x, y, z, t, a):
                  	return t
                  
                  function code(x, y, z, t, a)
                  	return t
                  end
                  
                  function tmp = code(x, y, z, t, a)
                  	tmp = t;
                  end
                  
                  code[x_, y_, z_, t_, a_] := t
                  
                  \begin{array}{l}
                  
                  \\
                  t
                  \end{array}
                  
                  Derivation
                  1. Initial program 99.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 \color{blue}{-1 \cdot t} \]
                  4. Step-by-step derivation
                    1. mul-1-negN/A

                      \[\leadsto \color{blue}{\mathsf{neg}\left(t\right)} \]
                    2. lower-neg.f6439.3

                      \[\leadsto \color{blue}{-t} \]
                  5. Applied rewrites39.3%

                    \[\leadsto \color{blue}{-t} \]
                  6. Step-by-step derivation
                    1. Applied rewrites17.4%

                      \[\leadsto \frac{0 - t \cdot t}{\color{blue}{0 + t}} \]
                    2. Applied rewrites2.3%

                      \[\leadsto \color{blue}{t} \]
                    3. 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 2024296 
                    (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))))