Statistics.Distribution.Beta:$cdensity from math-functions-0.1.5.2

Percentage Accurate: 89.1% → 99.8%
Time: 15.1s
Alternatives: 20
Speedup: 1.9×

Specification

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

\\
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - 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 20 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: 89.1% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.7× speedup?

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

\\
\left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, \log y \cdot x\right) - \log y\right) - t
\end{array}
Derivation
  1. Initial program 86.1%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(\left(z - 1\right) \cdot \log \left(1 - y\right) + x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right)} - t \]
    10. lift-*.f64N/A

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

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

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

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

      \[\leadsto \left(\mathsf{fma}\left(\log \color{blue}{\left(1 - y\right)}, z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
    15. sub-negN/A

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

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

      \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(\color{blue}{-y}\right), z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
    18. lower-*.f64N/A

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

      \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{-1} \cdot \log y\right) - t \]
    20. mul-1-negN/A

      \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{\left(\mathsf{neg}\left(\log y\right)\right)}\right) - t \]
    21. lower-neg.f6499.8

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

    \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \left(-\log y\right)\right)} - t \]
  5. Final simplification99.8%

    \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, \log y \cdot x\right) - \log y\right) - t \]
  6. Add Preprocessing

Alternative 2: 85.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \log y \cdot x - t\\ t_2 := \log \left(1 - y\right) \cdot \left(z - 1\right) + \left(x - 1\right) \cdot \log y\\ \mathbf{if}\;t\_2 \leq -2000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 339.5:\\ \;\;\;\;z \cdot \mathsf{log1p}\left(-y\right) - t\\ \mathbf{elif}\;t\_2 \leq 700:\\ \;\;\;\;\left(-\log y\right) - t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* (log y) x) t))
        (t_2 (+ (* (log (- 1.0 y)) (- z 1.0)) (* (- x 1.0) (log y)))))
   (if (<= t_2 -2000000000.0)
     t_1
     (if (<= t_2 339.5)
       (- (* z (log1p (- y))) t)
       (if (<= t_2 700.0) (- (- (log y)) t) t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = (log(y) * x) - t;
	double t_2 = (log((1.0 - y)) * (z - 1.0)) + ((x - 1.0) * log(y));
	double tmp;
	if (t_2 <= -2000000000.0) {
		tmp = t_1;
	} else if (t_2 <= 339.5) {
		tmp = (z * log1p(-y)) - t;
	} else if (t_2 <= 700.0) {
		tmp = -log(y) - t;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = (Math.log(y) * x) - t;
	double t_2 = (Math.log((1.0 - y)) * (z - 1.0)) + ((x - 1.0) * Math.log(y));
	double tmp;
	if (t_2 <= -2000000000.0) {
		tmp = t_1;
	} else if (t_2 <= 339.5) {
		tmp = (z * Math.log1p(-y)) - t;
	} else if (t_2 <= 700.0) {
		tmp = -Math.log(y) - t;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (math.log(y) * x) - t
	t_2 = (math.log((1.0 - y)) * (z - 1.0)) + ((x - 1.0) * math.log(y))
	tmp = 0
	if t_2 <= -2000000000.0:
		tmp = t_1
	elif t_2 <= 339.5:
		tmp = (z * math.log1p(-y)) - t
	elif t_2 <= 700.0:
		tmp = -math.log(y) - t
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(log(y) * x) - t)
	t_2 = Float64(Float64(log(Float64(1.0 - y)) * Float64(z - 1.0)) + Float64(Float64(x - 1.0) * log(y)))
	tmp = 0.0
	if (t_2 <= -2000000000.0)
		tmp = t_1;
	elseif (t_2 <= 339.5)
		tmp = Float64(Float64(z * log1p(Float64(-y))) - t);
	elseif (t_2 <= 700.0)
		tmp = Float64(Float64(-log(y)) - t);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] - t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision] * N[(z - 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2000000000.0], t$95$1, If[LessEqual[t$95$2, 339.5], N[(N[(z * N[Log[1 + (-y)], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t$95$2, 700.0], N[((-N[Log[y], $MachinePrecision]) - t), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \log y \cdot x - t\\
t_2 := \log \left(1 - y\right) \cdot \left(z - 1\right) + \left(x - 1\right) \cdot \log y\\
\mathbf{if}\;t\_2 \leq -2000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 339.5:\\
\;\;\;\;z \cdot \mathsf{log1p}\left(-y\right) - t\\

\mathbf{elif}\;t\_2 \leq 700:\\
\;\;\;\;\left(-\log y\right) - t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y)))) < -2e9 or 700 < (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y))))

    1. Initial program 95.3%

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

      \[\leadsto \color{blue}{x \cdot \log y} - t \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \log y} - t \]
      2. lower-log.f6492.6

        \[\leadsto x \cdot \color{blue}{\log y} - t \]
    5. Applied rewrites92.6%

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

    if -2e9 < (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y)))) < 339.5

    1. Initial program 56.5%

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(y\right)\right)} - t \]
      4. lower-neg.f6475.2

        \[\leadsto z \cdot \mathsf{log1p}\left(\color{blue}{-y}\right) - t \]
    5. Applied rewrites75.2%

      \[\leadsto \color{blue}{z \cdot \mathsf{log1p}\left(-y\right)} - t \]

    if 339.5 < (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y)))) < 700

    1. Initial program 92.7%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{z - 1}, \log \left(1 - y\right), -1 \cdot \log y\right) - t \]
      5. sub-negN/A

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

        \[\leadsto \mathsf{fma}\left(z - 1, \color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(y\right)\right)}, -1 \cdot \log y\right) - t \]
      7. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(z - 1, \mathsf{log1p}\left(\color{blue}{-y}\right), -1 \cdot \log y\right) - t \]
      8. mul-1-negN/A

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

        \[\leadsto \mathsf{fma}\left(z - 1, \mathsf{log1p}\left(-y\right), \color{blue}{-\log y}\right) - t \]
      10. lower-log.f6499.5

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

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

      \[\leadsto -1 \cdot \color{blue}{\log y} - t \]
    7. Step-by-step derivation
      1. Applied rewrites92.2%

        \[\leadsto \left(-\log y\right) - t \]
    8. Recombined 3 regimes into one program.
    9. Final simplification88.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\log \left(1 - y\right) \cdot \left(z - 1\right) + \left(x - 1\right) \cdot \log y \leq -2000000000:\\ \;\;\;\;\log y \cdot x - t\\ \mathbf{elif}\;\log \left(1 - y\right) \cdot \left(z - 1\right) + \left(x - 1\right) \cdot \log y \leq 339.5:\\ \;\;\;\;z \cdot \mathsf{log1p}\left(-y\right) - t\\ \mathbf{elif}\;\log \left(1 - y\right) \cdot \left(z - 1\right) + \left(x - 1\right) \cdot \log y \leq 700:\\ \;\;\;\;\left(-\log y\right) - t\\ \mathbf{else}:\\ \;\;\;\;\log y \cdot x - t\\ \end{array} \]
    10. Add Preprocessing

    Alternative 3: 85.0% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \log y \cdot x - t\\ t_2 := \log \left(1 - y\right) \cdot \left(z - 1\right) + \left(x - 1\right) \cdot \log y\\ \mathbf{if}\;t\_2 \leq -2000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 339.5:\\ \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.25, y, -0.3333333333333333\right), y, -0.5\right), y, -1\right) \cdot y\right) \cdot z - t\\ \mathbf{elif}\;t\_2 \leq 700:\\ \;\;\;\;\left(-\log y\right) - t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (let* ((t_1 (- (* (log y) x) t))
            (t_2 (+ (* (log (- 1.0 y)) (- z 1.0)) (* (- x 1.0) (log y)))))
       (if (<= t_2 -2000000000.0)
         t_1
         (if (<= t_2 339.5)
           (-
            (* (* (fma (fma (fma -0.25 y -0.3333333333333333) y -0.5) y -1.0) y) z)
            t)
           (if (<= t_2 700.0) (- (- (log y)) t) t_1)))))
    double code(double x, double y, double z, double t) {
    	double t_1 = (log(y) * x) - t;
    	double t_2 = (log((1.0 - y)) * (z - 1.0)) + ((x - 1.0) * log(y));
    	double tmp;
    	if (t_2 <= -2000000000.0) {
    		tmp = t_1;
    	} else if (t_2 <= 339.5) {
    		tmp = ((fma(fma(fma(-0.25, y, -0.3333333333333333), y, -0.5), y, -1.0) * y) * z) - t;
    	} else if (t_2 <= 700.0) {
    		tmp = -log(y) - t;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t)
    	t_1 = Float64(Float64(log(y) * x) - t)
    	t_2 = Float64(Float64(log(Float64(1.0 - y)) * Float64(z - 1.0)) + Float64(Float64(x - 1.0) * log(y)))
    	tmp = 0.0
    	if (t_2 <= -2000000000.0)
    		tmp = t_1;
    	elseif (t_2 <= 339.5)
    		tmp = Float64(Float64(Float64(fma(fma(fma(-0.25, y, -0.3333333333333333), y, -0.5), y, -1.0) * y) * z) - t);
    	elseif (t_2 <= 700.0)
    		tmp = Float64(Float64(-log(y)) - t);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] - t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision] * N[(z - 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2000000000.0], t$95$1, If[LessEqual[t$95$2, 339.5], N[(N[(N[(N[(N[(N[(-0.25 * y + -0.3333333333333333), $MachinePrecision] * y + -0.5), $MachinePrecision] * y + -1.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t$95$2, 700.0], N[((-N[Log[y], $MachinePrecision]) - t), $MachinePrecision], t$95$1]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \log y \cdot x - t\\
    t_2 := \log \left(1 - y\right) \cdot \left(z - 1\right) + \left(x - 1\right) \cdot \log y\\
    \mathbf{if}\;t\_2 \leq -2000000000:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t\_2 \leq 339.5:\\
    \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.25, y, -0.3333333333333333\right), y, -0.5\right), y, -1\right) \cdot y\right) \cdot z - t\\
    
    \mathbf{elif}\;t\_2 \leq 700:\\
    \;\;\;\;\left(-\log y\right) - t\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y)))) < -2e9 or 700 < (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y))))

      1. Initial program 95.3%

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

        \[\leadsto \color{blue}{x \cdot \log y} - t \]
      4. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \color{blue}{x \cdot \log y} - t \]
        2. lower-log.f6492.6

          \[\leadsto x \cdot \color{blue}{\log y} - t \]
      5. Applied rewrites92.6%

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

      if -2e9 < (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y)))) < 339.5

      1. Initial program 56.5%

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(\left(\left(z - 1\right) \cdot \log \left(1 - y\right) + x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right)} - t \]
        10. lift-*.f64N/A

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

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

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

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

          \[\leadsto \left(\mathsf{fma}\left(\log \color{blue}{\left(1 - y\right)}, z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
        15. sub-negN/A

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

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

          \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(\color{blue}{-y}\right), z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
        18. lower-*.f64N/A

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

          \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{-1} \cdot \log y\right) - t \]
        20. mul-1-negN/A

          \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{\left(\mathsf{neg}\left(\log y\right)\right)}\right) - t \]
        21. lower-neg.f64100.0

          \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{\left(-\log y\right)}\right) - t \]
      4. Applied rewrites100.0%

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

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

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

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

          \[\leadsto z \cdot \color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(y\right)\right)} - t \]
        4. lower-neg.f6475.2

          \[\leadsto z \cdot \mathsf{log1p}\left(\color{blue}{-y}\right) - t \]
      7. Applied rewrites75.2%

        \[\leadsto \color{blue}{z \cdot \mathsf{log1p}\left(-y\right)} - t \]
      8. Taylor expanded in y around 0

        \[\leadsto z \cdot \left(y \cdot \color{blue}{\left(y \cdot \left(y \cdot \left(\frac{-1}{4} \cdot y - \frac{1}{3}\right) - \frac{1}{2}\right) - 1\right)}\right) - t \]
      9. Step-by-step derivation
        1. Applied rewrites75.2%

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

        if 339.5 < (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y)))) < 700

        1. Initial program 92.7%

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\color{blue}{z - 1}, \log \left(1 - y\right), -1 \cdot \log y\right) - t \]
          5. sub-negN/A

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

            \[\leadsto \mathsf{fma}\left(z - 1, \color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(y\right)\right)}, -1 \cdot \log y\right) - t \]
          7. lower-neg.f64N/A

            \[\leadsto \mathsf{fma}\left(z - 1, \mathsf{log1p}\left(\color{blue}{-y}\right), -1 \cdot \log y\right) - t \]
          8. mul-1-negN/A

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

            \[\leadsto \mathsf{fma}\left(z - 1, \mathsf{log1p}\left(-y\right), \color{blue}{-\log y}\right) - t \]
          10. lower-log.f6499.5

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

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

          \[\leadsto -1 \cdot \color{blue}{\log y} - t \]
        7. Step-by-step derivation
          1. Applied rewrites92.2%

            \[\leadsto \left(-\log y\right) - t \]
        8. Recombined 3 regimes into one program.
        9. Final simplification88.7%

          \[\leadsto \begin{array}{l} \mathbf{if}\;\log \left(1 - y\right) \cdot \left(z - 1\right) + \left(x - 1\right) \cdot \log y \leq -2000000000:\\ \;\;\;\;\log y \cdot x - t\\ \mathbf{elif}\;\log \left(1 - y\right) \cdot \left(z - 1\right) + \left(x - 1\right) \cdot \log y \leq 339.5:\\ \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.25, y, -0.3333333333333333\right), y, -0.5\right), y, -1\right) \cdot y\right) \cdot z - t\\ \mathbf{elif}\;\log \left(1 - y\right) \cdot \left(z - 1\right) + \left(x - 1\right) \cdot \log y \leq 700:\\ \;\;\;\;\left(-\log y\right) - t\\ \mathbf{else}:\\ \;\;\;\;\log y \cdot x - t\\ \end{array} \]
        10. Add Preprocessing

        Alternative 4: 73.2% accurate, 0.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \log y \cdot x\\ t_2 := \log \left(1 - y\right) \cdot \left(z - 1\right) + \left(x - 1\right) \cdot \log y\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+160}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 339.5:\\ \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.25, y, -0.3333333333333333\right), y, -0.5\right), y, -1\right) \cdot y\right) \cdot z - t\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+35}:\\ \;\;\;\;\left(-\log y\right) - t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (let* ((t_1 (* (log y) x))
                (t_2 (+ (* (log (- 1.0 y)) (- z 1.0)) (* (- x 1.0) (log y)))))
           (if (<= t_2 -5e+160)
             t_1
             (if (<= t_2 339.5)
               (-
                (* (* (fma (fma (fma -0.25 y -0.3333333333333333) y -0.5) y -1.0) y) z)
                t)
               (if (<= t_2 5e+35) (- (- (log y)) t) t_1)))))
        double code(double x, double y, double z, double t) {
        	double t_1 = log(y) * x;
        	double t_2 = (log((1.0 - y)) * (z - 1.0)) + ((x - 1.0) * log(y));
        	double tmp;
        	if (t_2 <= -5e+160) {
        		tmp = t_1;
        	} else if (t_2 <= 339.5) {
        		tmp = ((fma(fma(fma(-0.25, y, -0.3333333333333333), y, -0.5), y, -1.0) * y) * z) - t;
        	} else if (t_2 <= 5e+35) {
        		tmp = -log(y) - t;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t)
        	t_1 = Float64(log(y) * x)
        	t_2 = Float64(Float64(log(Float64(1.0 - y)) * Float64(z - 1.0)) + Float64(Float64(x - 1.0) * log(y)))
        	tmp = 0.0
        	if (t_2 <= -5e+160)
        		tmp = t_1;
        	elseif (t_2 <= 339.5)
        		tmp = Float64(Float64(Float64(fma(fma(fma(-0.25, y, -0.3333333333333333), y, -0.5), y, -1.0) * y) * z) - t);
        	elseif (t_2 <= 5e+35)
        		tmp = Float64(Float64(-log(y)) - t);
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision] * N[(z - 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+160], t$95$1, If[LessEqual[t$95$2, 339.5], N[(N[(N[(N[(N[(N[(-0.25 * y + -0.3333333333333333), $MachinePrecision] * y + -0.5), $MachinePrecision] * y + -1.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t$95$2, 5e+35], N[((-N[Log[y], $MachinePrecision]) - t), $MachinePrecision], t$95$1]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \log y \cdot x\\
        t_2 := \log \left(1 - y\right) \cdot \left(z - 1\right) + \left(x - 1\right) \cdot \log y\\
        \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+160}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t\_2 \leq 339.5:\\
        \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.25, y, -0.3333333333333333\right), y, -0.5\right), y, -1\right) \cdot y\right) \cdot z - t\\
        
        \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+35}:\\
        \;\;\;\;\left(-\log y\right) - t\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y)))) < -5.0000000000000002e160 or 5.00000000000000021e35 < (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y))))

          1. Initial program 97.4%

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

            \[\leadsto \color{blue}{x \cdot \log y} \]
          4. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto \color{blue}{x \cdot \log y} \]
            2. lower-log.f6472.6

              \[\leadsto x \cdot \color{blue}{\log y} \]
          5. Applied rewrites72.6%

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

          if -5.0000000000000002e160 < (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y)))) < 339.5

          1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\left(\left(\left(z - 1\right) \cdot \log \left(1 - y\right) + x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right)} - t \]
            10. lift-*.f64N/A

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

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

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

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

              \[\leadsto \left(\mathsf{fma}\left(\log \color{blue}{\left(1 - y\right)}, z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
            15. sub-negN/A

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

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

              \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(\color{blue}{-y}\right), z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
            18. lower-*.f64N/A

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

              \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{-1} \cdot \log y\right) - t \]
            20. mul-1-negN/A

              \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{\left(\mathsf{neg}\left(\log y\right)\right)}\right) - t \]
            21. lower-neg.f6499.9

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

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

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

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

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

              \[\leadsto z \cdot \color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(y\right)\right)} - t \]
            4. lower-neg.f6467.9

              \[\leadsto z \cdot \mathsf{log1p}\left(\color{blue}{-y}\right) - t \]
          7. Applied rewrites67.9%

            \[\leadsto \color{blue}{z \cdot \mathsf{log1p}\left(-y\right)} - t \]
          8. Taylor expanded in y around 0

            \[\leadsto z \cdot \left(y \cdot \color{blue}{\left(y \cdot \left(y \cdot \left(\frac{-1}{4} \cdot y - \frac{1}{3}\right) - \frac{1}{2}\right) - 1\right)}\right) - t \]
          9. Step-by-step derivation
            1. Applied rewrites67.9%

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

            if 339.5 < (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y)))) < 5.00000000000000021e35

            1. Initial program 92.2%

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\color{blue}{z - 1}, \log \left(1 - y\right), -1 \cdot \log y\right) - t \]
              5. sub-negN/A

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

                \[\leadsto \mathsf{fma}\left(z - 1, \color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(y\right)\right)}, -1 \cdot \log y\right) - t \]
              7. lower-neg.f64N/A

                \[\leadsto \mathsf{fma}\left(z - 1, \mathsf{log1p}\left(\color{blue}{-y}\right), -1 \cdot \log y\right) - t \]
              8. mul-1-negN/A

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

                \[\leadsto \mathsf{fma}\left(z - 1, \mathsf{log1p}\left(-y\right), \color{blue}{-\log y}\right) - t \]
              10. lower-log.f6496.8

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

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

              \[\leadsto -1 \cdot \color{blue}{\log y} - t \]
            7. Step-by-step derivation
              1. Applied rewrites89.0%

                \[\leadsto \left(-\log y\right) - t \]
            8. Recombined 3 regimes into one program.
            9. Final simplification75.2%

              \[\leadsto \begin{array}{l} \mathbf{if}\;\log \left(1 - y\right) \cdot \left(z - 1\right) + \left(x - 1\right) \cdot \log y \leq -5 \cdot 10^{+160}:\\ \;\;\;\;\log y \cdot x\\ \mathbf{elif}\;\log \left(1 - y\right) \cdot \left(z - 1\right) + \left(x - 1\right) \cdot \log y \leq 339.5:\\ \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.25, y, -0.3333333333333333\right), y, -0.5\right), y, -1\right) \cdot y\right) \cdot z - t\\ \mathbf{elif}\;\log \left(1 - y\right) \cdot \left(z - 1\right) + \left(x - 1\right) \cdot \log y \leq 5 \cdot 10^{+35}:\\ \;\;\;\;\left(-\log y\right) - t\\ \mathbf{else}:\\ \;\;\;\;\log y \cdot x\\ \end{array} \]
            10. Add Preprocessing

            Alternative 5: 86.6% accurate, 0.4× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x - 1\right) \cdot \log y\\ t_2 := t\_1 - t\\ t_3 := \log \left(1 - y\right) \cdot \left(z - 1\right) + t\_1\\ \mathbf{if}\;t\_3 \leq 40:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_3 \leq 339.5:\\ \;\;\;\;\left(-y\right) \cdot z - t\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (let* ((t_1 (* (- x 1.0) (log y)))
                    (t_2 (- t_1 t))
                    (t_3 (+ (* (log (- 1.0 y)) (- z 1.0)) t_1)))
               (if (<= t_3 40.0) t_2 (if (<= t_3 339.5) (- (* (- y) z) t) t_2))))
            double code(double x, double y, double z, double t) {
            	double t_1 = (x - 1.0) * log(y);
            	double t_2 = t_1 - t;
            	double t_3 = (log((1.0 - y)) * (z - 1.0)) + t_1;
            	double tmp;
            	if (t_3 <= 40.0) {
            		tmp = t_2;
            	} else if (t_3 <= 339.5) {
            		tmp = (-y * z) - t;
            	} else {
            		tmp = t_2;
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z, t)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8) :: t_1
                real(8) :: t_2
                real(8) :: t_3
                real(8) :: tmp
                t_1 = (x - 1.0d0) * log(y)
                t_2 = t_1 - t
                t_3 = (log((1.0d0 - y)) * (z - 1.0d0)) + t_1
                if (t_3 <= 40.0d0) then
                    tmp = t_2
                else if (t_3 <= 339.5d0) then
                    tmp = (-y * z) - t
                else
                    tmp = t_2
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t) {
            	double t_1 = (x - 1.0) * Math.log(y);
            	double t_2 = t_1 - t;
            	double t_3 = (Math.log((1.0 - y)) * (z - 1.0)) + t_1;
            	double tmp;
            	if (t_3 <= 40.0) {
            		tmp = t_2;
            	} else if (t_3 <= 339.5) {
            		tmp = (-y * z) - t;
            	} else {
            		tmp = t_2;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	t_1 = (x - 1.0) * math.log(y)
            	t_2 = t_1 - t
            	t_3 = (math.log((1.0 - y)) * (z - 1.0)) + t_1
            	tmp = 0
            	if t_3 <= 40.0:
            		tmp = t_2
            	elif t_3 <= 339.5:
            		tmp = (-y * z) - t
            	else:
            		tmp = t_2
            	return tmp
            
            function code(x, y, z, t)
            	t_1 = Float64(Float64(x - 1.0) * log(y))
            	t_2 = Float64(t_1 - t)
            	t_3 = Float64(Float64(log(Float64(1.0 - y)) * Float64(z - 1.0)) + t_1)
            	tmp = 0.0
            	if (t_3 <= 40.0)
            		tmp = t_2;
            	elseif (t_3 <= 339.5)
            		tmp = Float64(Float64(Float64(-y) * z) - t);
            	else
            		tmp = t_2;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	t_1 = (x - 1.0) * log(y);
            	t_2 = t_1 - t;
            	t_3 = (log((1.0 - y)) * (z - 1.0)) + t_1;
            	tmp = 0.0;
            	if (t_3 <= 40.0)
            		tmp = t_2;
            	elseif (t_3 <= 339.5)
            		tmp = (-y * z) - t;
            	else
            		tmp = t_2;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - t), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision] * N[(z - 1.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, 40.0], t$95$2, If[LessEqual[t$95$3, 339.5], N[(N[((-y) * z), $MachinePrecision] - t), $MachinePrecision], t$95$2]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \left(x - 1\right) \cdot \log y\\
            t_2 := t\_1 - t\\
            t_3 := \log \left(1 - y\right) \cdot \left(z - 1\right) + t\_1\\
            \mathbf{if}\;t\_3 \leq 40:\\
            \;\;\;\;t\_2\\
            
            \mathbf{elif}\;t\_3 \leq 339.5:\\
            \;\;\;\;\left(-y\right) \cdot z - t\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_2\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y)))) < 40 or 339.5 < (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y))))

              1. Initial program 94.6%

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

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

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

                  \[\leadsto \color{blue}{\left(x - 1\right) \cdot \log y} - t \]
                3. lower--.f64N/A

                  \[\leadsto \color{blue}{\left(x - 1\right)} \cdot \log y - t \]
                4. lower-log.f6492.8

                  \[\leadsto \left(x - 1\right) \cdot \color{blue}{\log y} - t \]
              5. Applied rewrites92.8%

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

              if 40 < (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y)))) < 339.5

              1. Initial program 54.9%

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

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\left(\left(\left(z - 1\right) \cdot \log \left(1 - y\right) + x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right)} - t \]
                10. lift-*.f64N/A

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

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

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

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

                  \[\leadsto \left(\mathsf{fma}\left(\log \color{blue}{\left(1 - y\right)}, z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
                15. sub-negN/A

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

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

                  \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(\color{blue}{-y}\right), z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
                18. lower-*.f64N/A

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

                  \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{-1} \cdot \log y\right) - t \]
                20. mul-1-negN/A

                  \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{\left(\mathsf{neg}\left(\log y\right)\right)}\right) - t \]
                21. lower-neg.f64100.0

                  \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{\left(-\log y\right)}\right) - t \]
              4. Applied rewrites100.0%

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

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

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

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

                  \[\leadsto z \cdot \color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(y\right)\right)} - t \]
                4. lower-neg.f6477.9

                  \[\leadsto z \cdot \mathsf{log1p}\left(\color{blue}{-y}\right) - t \]
              7. Applied rewrites77.9%

                \[\leadsto \color{blue}{z \cdot \mathsf{log1p}\left(-y\right)} - t \]
              8. Taylor expanded in y around 0

                \[\leadsto z \cdot \left(-1 \cdot \color{blue}{y}\right) - t \]
              9. Step-by-step derivation
                1. Applied rewrites77.9%

                  \[\leadsto z \cdot \left(-y\right) - t \]
              10. Recombined 2 regimes into one program.
              11. Final simplification89.6%

                \[\leadsto \begin{array}{l} \mathbf{if}\;\log \left(1 - y\right) \cdot \left(z - 1\right) + \left(x - 1\right) \cdot \log y \leq 40:\\ \;\;\;\;\left(x - 1\right) \cdot \log y - t\\ \mathbf{elif}\;\log \left(1 - y\right) \cdot \left(z - 1\right) + \left(x - 1\right) \cdot \log y \leq 339.5:\\ \;\;\;\;\left(-y\right) \cdot z - t\\ \mathbf{else}:\\ \;\;\;\;\left(x - 1\right) \cdot \log y - t\\ \end{array} \]
              12. Add Preprocessing

              Alternative 6: 99.6% accurate, 0.9× speedup?

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\frac{1}{\frac{1}{\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, \mathsf{fma}\left(\log y, x - 1, -t\right)\right)}}} \]
              5. Add Preprocessing

              Alternative 7: 99.6% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 8: 99.5% accurate, 1.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 9: 99.4% accurate, 1.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 10: 95.0% accurate, 1.8× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{+26}:\\ \;\;\;\;\log y \cdot x - t\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{-15}:\\ \;\;\;\;\left(-\mathsf{fma}\left(z - 1, y, \log y\right)\right) - t\\ \mathbf{else}:\\ \;\;\;\;\left(x - 1\right) \cdot \log y - t\\ \end{array} \end{array} \]
              (FPCore (x y z t)
               :precision binary64
               (if (<= x -1.7e+26)
                 (- (* (log y) x) t)
                 (if (<= x 5.2e-15)
                   (- (- (fma (- z 1.0) y (log y))) t)
                   (- (* (- x 1.0) (log y)) t))))
              double code(double x, double y, double z, double t) {
              	double tmp;
              	if (x <= -1.7e+26) {
              		tmp = (log(y) * x) - t;
              	} else if (x <= 5.2e-15) {
              		tmp = -fma((z - 1.0), y, log(y)) - t;
              	} else {
              		tmp = ((x - 1.0) * log(y)) - t;
              	}
              	return tmp;
              }
              
              function code(x, y, z, t)
              	tmp = 0.0
              	if (x <= -1.7e+26)
              		tmp = Float64(Float64(log(y) * x) - t);
              	elseif (x <= 5.2e-15)
              		tmp = Float64(Float64(-fma(Float64(z - 1.0), y, log(y))) - t);
              	else
              		tmp = Float64(Float64(Float64(x - 1.0) * log(y)) - t);
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_] := If[LessEqual[x, -1.7e+26], N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[x, 5.2e-15], N[((-N[(N[(z - 1.0), $MachinePrecision] * y + N[Log[y], $MachinePrecision]), $MachinePrecision]) - t), $MachinePrecision], N[(N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;x \leq -1.7 \cdot 10^{+26}:\\
              \;\;\;\;\log y \cdot x - t\\
              
              \mathbf{elif}\;x \leq 5.2 \cdot 10^{-15}:\\
              \;\;\;\;\left(-\mathsf{fma}\left(z - 1, y, \log y\right)\right) - t\\
              
              \mathbf{else}:\\
              \;\;\;\;\left(x - 1\right) \cdot \log y - t\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if x < -1.7000000000000001e26

                1. Initial program 99.7%

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

                  \[\leadsto \color{blue}{x \cdot \log y} - t \]
                4. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto \color{blue}{x \cdot \log y} - t \]
                  2. lower-log.f6499.7

                    \[\leadsto x \cdot \color{blue}{\log y} - t \]
                5. Applied rewrites99.7%

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

                if -1.7000000000000001e26 < x < 5.20000000000000009e-15

                1. Initial program 74.2%

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(\color{blue}{z - 1}, \log \left(1 - y\right), -1 \cdot \log y\right) - t \]
                  5. sub-negN/A

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

                    \[\leadsto \mathsf{fma}\left(z - 1, \color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(y\right)\right)}, -1 \cdot \log y\right) - t \]
                  7. lower-neg.f64N/A

                    \[\leadsto \mathsf{fma}\left(z - 1, \mathsf{log1p}\left(\color{blue}{-y}\right), -1 \cdot \log y\right) - t \]
                  8. mul-1-negN/A

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

                    \[\leadsto \mathsf{fma}\left(z - 1, \mathsf{log1p}\left(-y\right), \color{blue}{-\log y}\right) - t \]
                  10. lower-log.f6499.2

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

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

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

                    \[\leadsto \left(-\mathsf{fma}\left(z - 1, y, \log y\right)\right) - t \]

                  if 5.20000000000000009e-15 < x

                  1. Initial program 93.3%

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

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

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

                      \[\leadsto \color{blue}{\left(x - 1\right) \cdot \log y} - t \]
                    3. lower--.f64N/A

                      \[\leadsto \color{blue}{\left(x - 1\right)} \cdot \log y - t \]
                    4. lower-log.f6491.9

                      \[\leadsto \left(x - 1\right) \cdot \color{blue}{\log y} - t \]
                  5. Applied rewrites91.9%

                    \[\leadsto \color{blue}{\left(x - 1\right) \cdot \log y} - t \]
                8. Recombined 3 regimes into one program.
                9. Final simplification96.7%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{+26}:\\ \;\;\;\;\log y \cdot x - t\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{-15}:\\ \;\;\;\;\left(-\mathsf{fma}\left(z - 1, y, \log y\right)\right) - t\\ \mathbf{else}:\\ \;\;\;\;\left(x - 1\right) \cdot \log y - t\\ \end{array} \]
                10. Add Preprocessing

                Alternative 11: 98.9% accurate, 1.9× speedup?

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

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

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

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

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(z - 1\right), y, \log y \cdot \left(x - 1\right)\right)} - t \]
                  4. mul-1-negN/A

                    \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(\left(z - 1\right)\right)}, y, \log y \cdot \left(x - 1\right)\right) - t \]
                  5. neg-sub0N/A

                    \[\leadsto \mathsf{fma}\left(\color{blue}{0 - \left(z - 1\right)}, y, \log y \cdot \left(x - 1\right)\right) - t \]
                  6. sub-negN/A

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

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

                    \[\leadsto \mathsf{fma}\left(0 - \color{blue}{\left(-1 + z\right)}, y, \log y \cdot \left(x - 1\right)\right) - t \]
                  9. associate--r+N/A

                    \[\leadsto \mathsf{fma}\left(\color{blue}{\left(0 - -1\right) - z}, y, \log y \cdot \left(x - 1\right)\right) - t \]
                  10. metadata-evalN/A

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(1 - z, y, \color{blue}{\left(x - 1\right)} \cdot \log y\right) - t \]
                  15. lower-log.f6498.8

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

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

                Alternative 12: 65.7% accurate, 1.9× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \log y \cdot x\\ \mathbf{if}\;x \leq -1.6 \cdot 10^{+42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{+156}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.25, y, -0.3333333333333333\right), y, -0.5\right) \cdot y, y, -y\right) \cdot z - t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                (FPCore (x y z t)
                 :precision binary64
                 (let* ((t_1 (* (log y) x)))
                   (if (<= x -1.6e+42)
                     t_1
                     (if (<= x 1.7e+156)
                       (-
                        (*
                         (fma (* (fma (fma -0.25 y -0.3333333333333333) y -0.5) y) y (- y))
                         z)
                        t)
                       t_1))))
                double code(double x, double y, double z, double t) {
                	double t_1 = log(y) * x;
                	double tmp;
                	if (x <= -1.6e+42) {
                		tmp = t_1;
                	} else if (x <= 1.7e+156) {
                		tmp = (fma((fma(fma(-0.25, y, -0.3333333333333333), y, -0.5) * y), y, -y) * z) - t;
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                function code(x, y, z, t)
                	t_1 = Float64(log(y) * x)
                	tmp = 0.0
                	if (x <= -1.6e+42)
                		tmp = t_1;
                	elseif (x <= 1.7e+156)
                		tmp = Float64(Float64(fma(Float64(fma(fma(-0.25, y, -0.3333333333333333), y, -0.5) * y), y, Float64(-y)) * z) - t);
                	else
                		tmp = t_1;
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.6e+42], t$95$1, If[LessEqual[x, 1.7e+156], N[(N[(N[(N[(N[(N[(-0.25 * y + -0.3333333333333333), $MachinePrecision] * y + -0.5), $MachinePrecision] * y), $MachinePrecision] * y + (-y)), $MachinePrecision] * z), $MachinePrecision] - t), $MachinePrecision], t$95$1]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \log y \cdot x\\
                \mathbf{if}\;x \leq -1.6 \cdot 10^{+42}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;x \leq 1.7 \cdot 10^{+156}:\\
                \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.25, y, -0.3333333333333333\right), y, -0.5\right) \cdot y, y, -y\right) \cdot z - t\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if x < -1.60000000000000001e42 or 1.7e156 < x

                  1. Initial program 98.3%

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

                    \[\leadsto \color{blue}{x \cdot \log y} \]
                  4. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto \color{blue}{x \cdot \log y} \]
                    2. lower-log.f6475.4

                      \[\leadsto x \cdot \color{blue}{\log y} \]
                  5. Applied rewrites75.4%

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

                  if -1.60000000000000001e42 < x < 1.7e156

                  1. Initial program 78.1%

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\left(\left(\left(z - 1\right) \cdot \log \left(1 - y\right) + x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right)} - t \]
                    10. lift-*.f64N/A

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

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

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

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

                      \[\leadsto \left(\mathsf{fma}\left(\log \color{blue}{\left(1 - y\right)}, z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
                    15. sub-negN/A

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

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

                      \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(\color{blue}{-y}\right), z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
                    18. lower-*.f64N/A

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

                      \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{-1} \cdot \log y\right) - t \]
                    20. mul-1-negN/A

                      \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{\left(\mathsf{neg}\left(\log y\right)\right)}\right) - t \]
                    21. lower-neg.f6499.9

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

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

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

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

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

                      \[\leadsto z \cdot \color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(y\right)\right)} - t \]
                    4. lower-neg.f6461.6

                      \[\leadsto z \cdot \mathsf{log1p}\left(\color{blue}{-y}\right) - t \]
                  7. Applied rewrites61.6%

                    \[\leadsto \color{blue}{z \cdot \mathsf{log1p}\left(-y\right)} - t \]
                  8. Taylor expanded in y around 0

                    \[\leadsto z \cdot \left(y \cdot \color{blue}{\left(y \cdot \left(y \cdot \left(\frac{-1}{4} \cdot y - \frac{1}{3}\right) - \frac{1}{2}\right) - 1\right)}\right) - t \]
                  9. Step-by-step derivation
                    1. Applied rewrites61.2%

                      \[\leadsto z \cdot \left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.25, y, -0.3333333333333333\right), y, -0.5\right), y, -1\right) \cdot \color{blue}{y}\right) - t \]
                    2. Step-by-step derivation
                      1. Applied rewrites61.2%

                        \[\leadsto z \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.25, y, -0.3333333333333333\right), y, -0.5\right) \cdot y, y, -y\right) - t \]
                    3. Recombined 2 regimes into one program.
                    4. Final simplification66.8%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.6 \cdot 10^{+42}:\\ \;\;\;\;\log y \cdot x\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{+156}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.25, y, -0.3333333333333333\right), y, -0.5\right) \cdot y, y, -y\right) \cdot z - t\\ \mathbf{else}:\\ \;\;\;\;\log y \cdot x\\ \end{array} \]
                    5. Add Preprocessing

                    Alternative 13: 46.9% accurate, 6.6× speedup?

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\left(\left(\left(z - 1\right) \cdot \log \left(1 - y\right) + x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right)} - t \]
                      10. lift-*.f64N/A

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

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

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

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

                        \[\leadsto \left(\mathsf{fma}\left(\log \color{blue}{\left(1 - y\right)}, z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
                      15. sub-negN/A

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

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

                        \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(\color{blue}{-y}\right), z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
                      18. lower-*.f64N/A

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

                        \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{-1} \cdot \log y\right) - t \]
                      20. mul-1-negN/A

                        \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{\left(\mathsf{neg}\left(\log y\right)\right)}\right) - t \]
                      21. lower-neg.f6499.8

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

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

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

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

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

                        \[\leadsto z \cdot \color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(y\right)\right)} - t \]
                      4. lower-neg.f6447.1

                        \[\leadsto z \cdot \mathsf{log1p}\left(\color{blue}{-y}\right) - t \]
                    7. Applied rewrites47.1%

                      \[\leadsto \color{blue}{z \cdot \mathsf{log1p}\left(-y\right)} - t \]
                    8. Taylor expanded in y around 0

                      \[\leadsto z \cdot \left(y \cdot \color{blue}{\left(y \cdot \left(y \cdot \left(\frac{-1}{4} \cdot y - \frac{1}{3}\right) - \frac{1}{2}\right) - 1\right)}\right) - t \]
                    9. Step-by-step derivation
                      1. Applied rewrites46.9%

                        \[\leadsto z \cdot \left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.25, y, -0.3333333333333333\right), y, -0.5\right), y, -1\right) \cdot \color{blue}{y}\right) - t \]
                      2. Step-by-step derivation
                        1. Applied rewrites46.9%

                          \[\leadsto z \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.25, y, -0.3333333333333333\right), y, -0.5\right) \cdot y, y, -y\right) - t \]
                        2. Final simplification46.9%

                          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.25, y, -0.3333333333333333\right), y, -0.5\right) \cdot y, y, -y\right) \cdot z - t \]
                        3. Add Preprocessing

                        Alternative 14: 46.9% accurate, 7.1× speedup?

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{\left(\left(\left(z - 1\right) \cdot \log \left(1 - y\right) + x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right)} - t \]
                          10. lift-*.f64N/A

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

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

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

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

                            \[\leadsto \left(\mathsf{fma}\left(\log \color{blue}{\left(1 - y\right)}, z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
                          15. sub-negN/A

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

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

                            \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(\color{blue}{-y}\right), z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
                          18. lower-*.f64N/A

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

                            \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{-1} \cdot \log y\right) - t \]
                          20. mul-1-negN/A

                            \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{\left(\mathsf{neg}\left(\log y\right)\right)}\right) - t \]
                          21. lower-neg.f6499.8

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

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

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

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

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

                            \[\leadsto z \cdot \color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(y\right)\right)} - t \]
                          4. lower-neg.f6447.1

                            \[\leadsto z \cdot \mathsf{log1p}\left(\color{blue}{-y}\right) - t \]
                        7. Applied rewrites47.1%

                          \[\leadsto \color{blue}{z \cdot \mathsf{log1p}\left(-y\right)} - t \]
                        8. Taylor expanded in y around 0

                          \[\leadsto z \cdot \left(y \cdot \color{blue}{\left(y \cdot \left(y \cdot \left(\frac{-1}{4} \cdot y - \frac{1}{3}\right) - \frac{1}{2}\right) - 1\right)}\right) - t \]
                        9. Step-by-step derivation
                          1. Applied rewrites46.9%

                            \[\leadsto z \cdot \left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.25, y, -0.3333333333333333\right), y, -0.5\right), y, -1\right) \cdot \color{blue}{y}\right) - t \]
                          2. Final simplification46.9%

                            \[\leadsto \left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.25, y, -0.3333333333333333\right), y, -0.5\right), y, -1\right) \cdot y\right) \cdot z - t \]
                          3. Add Preprocessing

                          Alternative 15: 46.8% accurate, 8.1× speedup?

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \color{blue}{\left(\left(\left(z - 1\right) \cdot \log \left(1 - y\right) + x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right)} - t \]
                            10. lift-*.f64N/A

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

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

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

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

                              \[\leadsto \left(\mathsf{fma}\left(\log \color{blue}{\left(1 - y\right)}, z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
                            15. sub-negN/A

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

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

                              \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(\color{blue}{-y}\right), z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
                            18. lower-*.f64N/A

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

                              \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{-1} \cdot \log y\right) - t \]
                            20. mul-1-negN/A

                              \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{\left(\mathsf{neg}\left(\log y\right)\right)}\right) - t \]
                            21. lower-neg.f6499.8

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

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

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

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

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

                              \[\leadsto z \cdot \color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(y\right)\right)} - t \]
                            4. lower-neg.f6447.1

                              \[\leadsto z \cdot \mathsf{log1p}\left(\color{blue}{-y}\right) - t \]
                          7. Applied rewrites47.1%

                            \[\leadsto \color{blue}{z \cdot \mathsf{log1p}\left(-y\right)} - t \]
                          8. Taylor expanded in y around 0

                            \[\leadsto y \cdot \color{blue}{\left(-1 \cdot z + y \cdot \left(\frac{-1}{2} \cdot z + \frac{-1}{3} \cdot \left(y \cdot z\right)\right)\right)} - t \]
                          9. Step-by-step derivation
                            1. Applied rewrites46.8%

                              \[\leadsto \mathsf{fma}\left(z \cdot \mathsf{fma}\left(-0.3333333333333333, y, -0.5\right), y, -z\right) \cdot \color{blue}{y} - t \]
                            2. Final simplification46.8%

                              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-0.3333333333333333, y, -0.5\right) \cdot z, y, -z\right) \cdot y - t \]
                            3. Add Preprocessing

                            Alternative 16: 46.8% accurate, 8.7× speedup?

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \color{blue}{\left(\left(\left(z - 1\right) \cdot \log \left(1 - y\right) + x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right)} - t \]
                              10. lift-*.f64N/A

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

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

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

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

                                \[\leadsto \left(\mathsf{fma}\left(\log \color{blue}{\left(1 - y\right)}, z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
                              15. sub-negN/A

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

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

                                \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(\color{blue}{-y}\right), z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
                              18. lower-*.f64N/A

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

                                \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{-1} \cdot \log y\right) - t \]
                              20. mul-1-negN/A

                                \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{\left(\mathsf{neg}\left(\log y\right)\right)}\right) - t \]
                              21. lower-neg.f6499.8

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

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

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

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

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

                                \[\leadsto z \cdot \color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(y\right)\right)} - t \]
                              4. lower-neg.f6447.1

                                \[\leadsto z \cdot \mathsf{log1p}\left(\color{blue}{-y}\right) - t \]
                            7. Applied rewrites47.1%

                              \[\leadsto \color{blue}{z \cdot \mathsf{log1p}\left(-y\right)} - t \]
                            8. Taylor expanded in y around 0

                              \[\leadsto z \cdot \left(y \cdot \color{blue}{\left(y \cdot \left(\frac{-1}{3} \cdot y - \frac{1}{2}\right) - 1\right)}\right) - t \]
                            9. Step-by-step derivation
                              1. Applied rewrites46.8%

                                \[\leadsto z \cdot \left(\mathsf{fma}\left(\mathsf{fma}\left(-0.3333333333333333, y, -0.5\right), y, -1\right) \cdot \color{blue}{y}\right) - t \]
                              2. Final simplification46.8%

                                \[\leadsto \left(\mathsf{fma}\left(\mathsf{fma}\left(-0.3333333333333333, y, -0.5\right), y, -1\right) \cdot y\right) \cdot z - t \]
                              3. Add Preprocessing

                              Alternative 17: 46.7% accurate, 11.3× speedup?

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \color{blue}{\left(\left(\left(z - 1\right) \cdot \log \left(1 - y\right) + x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right)} - t \]
                                10. lift-*.f64N/A

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

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

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

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

                                  \[\leadsto \left(\mathsf{fma}\left(\log \color{blue}{\left(1 - y\right)}, z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
                                15. sub-negN/A

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

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

                                  \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(\color{blue}{-y}\right), z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
                                18. lower-*.f64N/A

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

                                  \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{-1} \cdot \log y\right) - t \]
                                20. mul-1-negN/A

                                  \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{\left(\mathsf{neg}\left(\log y\right)\right)}\right) - t \]
                                21. lower-neg.f6499.8

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

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

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

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

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

                                  \[\leadsto z \cdot \color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(y\right)\right)} - t \]
                                4. lower-neg.f6447.1

                                  \[\leadsto z \cdot \mathsf{log1p}\left(\color{blue}{-y}\right) - t \]
                              7. Applied rewrites47.1%

                                \[\leadsto \color{blue}{z \cdot \mathsf{log1p}\left(-y\right)} - t \]
                              8. Taylor expanded in y around 0

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

                                  \[\leadsto \left(z \cdot \mathsf{fma}\left(-0.5, y, -1\right)\right) \cdot \color{blue}{y} - t \]
                                2. Final simplification46.7%

                                  \[\leadsto \left(\mathsf{fma}\left(-0.5, y, -1\right) \cdot z\right) \cdot y - t \]
                                3. Add Preprocessing

                                Alternative 18: 46.3% accurate, 20.5× speedup?

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \color{blue}{\left(\left(\left(z - 1\right) \cdot \log \left(1 - y\right) + x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right)} - t \]
                                  10. lift-*.f64N/A

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

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

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

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

                                    \[\leadsto \left(\mathsf{fma}\left(\log \color{blue}{\left(1 - y\right)}, z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
                                  15. sub-negN/A

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

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

                                    \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(\color{blue}{-y}\right), z - 1, x \cdot \log y\right) + \left(\mathsf{neg}\left(1\right)\right) \cdot \log y\right) - t \]
                                  18. lower-*.f64N/A

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

                                    \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{-1} \cdot \log y\right) - t \]
                                  20. mul-1-negN/A

                                    \[\leadsto \left(\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, x \cdot \log y\right) + \color{blue}{\left(\mathsf{neg}\left(\log y\right)\right)}\right) - t \]
                                  21. lower-neg.f6499.8

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

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

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

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

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

                                    \[\leadsto z \cdot \color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(y\right)\right)} - t \]
                                  4. lower-neg.f6447.1

                                    \[\leadsto z \cdot \mathsf{log1p}\left(\color{blue}{-y}\right) - t \]
                                7. Applied rewrites47.1%

                                  \[\leadsto \color{blue}{z \cdot \mathsf{log1p}\left(-y\right)} - t \]
                                8. Taylor expanded in y around 0

                                  \[\leadsto z \cdot \left(-1 \cdot \color{blue}{y}\right) - t \]
                                9. Step-by-step derivation
                                  1. Applied rewrites46.4%

                                    \[\leadsto z \cdot \left(-y\right) - t \]
                                  2. Final simplification46.4%

                                    \[\leadsto \left(-y\right) \cdot z - t \]
                                  3. Add Preprocessing

                                  Alternative 19: 35.8% accurate, 75.3× speedup?

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

                                    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - 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.f6432.9

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

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

                                  Alternative 20: 2.2% accurate, 226.0× speedup?

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

                                    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - 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.f6432.9

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

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

                                      \[\leadsto \frac{0 - t \cdot t}{\color{blue}{0 + t}} \]
                                    2. Step-by-step derivation
                                      1. Applied rewrites2.4%

                                        \[\leadsto t \]
                                      2. Add Preprocessing

                                      Reproduce

                                      ?
                                      herbie shell --seed 2024277 
                                      (FPCore (x y z t)
                                        :name "Statistics.Distribution.Beta:$cdensity from math-functions-0.1.5.2"
                                        :precision binary64
                                        (- (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y)))) t))