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

Percentage Accurate: 89.2% → 99.8%
Time: 18.3s
Alternatives: 17
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 17 alternatives:

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

Initial Program: 89.2% 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.9× speedup?

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

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

    \[\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 \left(\left(x - 1\right) \cdot \log y + \color{blue}{\left(z - 1\right) \cdot \log \left(1 - y\right)}\right) - t \]
    2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(x - 1\right) \cdot \log y + \frac{\mathsf{log1p}\left(\mathsf{neg}\left(y\right)\right)}{\frac{1}{\color{blue}{z + \left(\mathsf{neg}\left(1\right)\right)}}}\right) - t \]
    20. metadata-eval99.7

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

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

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

Alternative 2: 98.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, 1 - z, x \cdot \log y\right) - t\\ t_2 := \log y \cdot \left(x + -1\right) + \left(z + -1\right) \cdot \log \left(1 - y\right)\\ \mathbf{if}\;t\_2 \leq -1.5 \cdot 10^{+14}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 1000:\\ \;\;\;\;\mathsf{fma}\left(y, 1 - z, -\log y\right) - t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (fma y (- 1.0 z) (* x (log y))) t))
        (t_2 (+ (* (log y) (+ x -1.0)) (* (+ z -1.0) (log (- 1.0 y))))))
   (if (<= t_2 -1.5e+14)
     t_1
     (if (<= t_2 1000.0) (- (fma y (- 1.0 z) (- (log y))) t) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = fma(y, (1.0 - z), (x * log(y))) - t;
	double t_2 = (log(y) * (x + -1.0)) + ((z + -1.0) * log((1.0 - y)));
	double tmp;
	if (t_2 <= -1.5e+14) {
		tmp = t_1;
	} else if (t_2 <= 1000.0) {
		tmp = fma(y, (1.0 - z), -log(y)) - t;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(fma(y, Float64(1.0 - z), Float64(x * log(y))) - t)
	t_2 = Float64(Float64(log(y) * Float64(x + -1.0)) + Float64(Float64(z + -1.0) * log(Float64(1.0 - y))))
	tmp = 0.0
	if (t_2 <= -1.5e+14)
		tmp = t_1;
	elseif (t_2 <= 1000.0)
		tmp = Float64(fma(y, Float64(1.0 - z), Float64(-log(y))) - t);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y * N[(1.0 - z), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(z + -1.0), $MachinePrecision] * N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1.5e+14], t$95$1, If[LessEqual[t$95$2, 1000.0], N[(N[(y * N[(1.0 - z), $MachinePrecision] + (-N[Log[y], $MachinePrecision])), $MachinePrecision] - t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, 1 - z, x \cdot \log y\right) - t\\
t_2 := \log y \cdot \left(x + -1\right) + \left(z + -1\right) \cdot \log \left(1 - y\right)\\
\mathbf{if}\;t\_2 \leq -1.5 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 1000:\\
\;\;\;\;\mathsf{fma}\left(y, 1 - z, -\log y\right) - t\\

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


\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)))) < -1.5e14 or 1e3 < (+.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 89.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. 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y, 1 - z, x \cdot \log y\right) - t \]
    7. Step-by-step derivation
      1. Applied rewrites97.5%

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

      if -1.5e14 < (+.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)))) < 1e3

      1. Initial program 85.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}{\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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(y, 1 - z, -\log y\right) - t \]
      8. Recombined 2 regimes into one program.
      9. Final simplification98.0%

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

      Alternative 3: 87.0% accurate, 0.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\log y \cdot \left(x + -1\right) + \left(z + -1\right) \cdot \log \left(1 - y\right)\right) - t\\ t_2 := x \cdot \log y - t\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+14}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 20000000000:\\ \;\;\;\;\left(-\log y\right) - t\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (let* ((t_1 (- (+ (* (log y) (+ x -1.0)) (* (+ z -1.0) (log (- 1.0 y)))) t))
              (t_2 (- (* x (log y)) t)))
         (if (<= t_1 -1e+14) t_2 (if (<= t_1 20000000000.0) (- (- (log y)) t) t_2))))
      double code(double x, double y, double z, double t) {
      	double t_1 = ((log(y) * (x + -1.0)) + ((z + -1.0) * log((1.0 - y)))) - t;
      	double t_2 = (x * log(y)) - t;
      	double tmp;
      	if (t_1 <= -1e+14) {
      		tmp = t_2;
      	} else if (t_1 <= 20000000000.0) {
      		tmp = -log(y) - 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) :: tmp
          t_1 = ((log(y) * (x + (-1.0d0))) + ((z + (-1.0d0)) * log((1.0d0 - y)))) - t
          t_2 = (x * log(y)) - t
          if (t_1 <= (-1d+14)) then
              tmp = t_2
          else if (t_1 <= 20000000000.0d0) then
              tmp = -log(y) - 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 = ((Math.log(y) * (x + -1.0)) + ((z + -1.0) * Math.log((1.0 - y)))) - t;
      	double t_2 = (x * Math.log(y)) - t;
      	double tmp;
      	if (t_1 <= -1e+14) {
      		tmp = t_2;
      	} else if (t_1 <= 20000000000.0) {
      		tmp = -Math.log(y) - t;
      	} else {
      		tmp = t_2;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t):
      	t_1 = ((math.log(y) * (x + -1.0)) + ((z + -1.0) * math.log((1.0 - y)))) - t
      	t_2 = (x * math.log(y)) - t
      	tmp = 0
      	if t_1 <= -1e+14:
      		tmp = t_2
      	elif t_1 <= 20000000000.0:
      		tmp = -math.log(y) - t
      	else:
      		tmp = t_2
      	return tmp
      
      function code(x, y, z, t)
      	t_1 = Float64(Float64(Float64(log(y) * Float64(x + -1.0)) + Float64(Float64(z + -1.0) * log(Float64(1.0 - y)))) - t)
      	t_2 = Float64(Float64(x * log(y)) - t)
      	tmp = 0.0
      	if (t_1 <= -1e+14)
      		tmp = t_2;
      	elseif (t_1 <= 20000000000.0)
      		tmp = Float64(Float64(-log(y)) - t);
      	else
      		tmp = t_2;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t)
      	t_1 = ((log(y) * (x + -1.0)) + ((z + -1.0) * log((1.0 - y)))) - t;
      	t_2 = (x * log(y)) - t;
      	tmp = 0.0;
      	if (t_1 <= -1e+14)
      		tmp = t_2;
      	elseif (t_1 <= 20000000000.0)
      		tmp = -log(y) - t;
      	else
      		tmp = t_2;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(z + -1.0), $MachinePrecision] * N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+14], t$95$2, If[LessEqual[t$95$1, 20000000000.0], N[((-N[Log[y], $MachinePrecision]) - t), $MachinePrecision], t$95$2]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \left(\log y \cdot \left(x + -1\right) + \left(z + -1\right) \cdot \log \left(1 - y\right)\right) - t\\
      t_2 := x \cdot \log y - t\\
      \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+14}:\\
      \;\;\;\;t\_2\\
      
      \mathbf{elif}\;t\_1 \leq 20000000000:\\
      \;\;\;\;\left(-\log y\right) - t\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_2\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (-.f64 (+.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)))) t) < -1e14 or 2e10 < (-.f64 (+.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)))) t)

        1. Initial program 90.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. Taylor expanded in x around inf

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

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

            \[\leadsto \color{blue}{\log y \cdot x} - t \]
          3. lower-log.f6489.1

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

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

        if -1e14 < (-.f64 (+.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)))) t) < 2e10

        1. Initial program 77.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. Step-by-step derivation
          1. lift-*.f64N/A

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

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

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

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

            \[\leadsto \left(\log y \cdot \color{blue}{\frac{1}{\frac{x \cdot x + \left(1 \cdot 1 + x \cdot 1\right)}{{x}^{3} - {1}^{3}}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
          6. un-div-invN/A

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

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

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

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

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

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

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

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

            \[\leadsto \left(\frac{\log y}{\frac{1}{\color{blue}{x + \left(\mathsf{neg}\left(1\right)\right)}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
          15. metadata-eval77.4

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

          \[\leadsto \left(\color{blue}{\frac{\log y}{\frac{1}{x + -1}}} + \left(z - 1\right) \cdot \log \left(1 - 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

            \[\leadsto \log y \cdot \left(x + \color{blue}{-1}\right) - t \]
          5. lower-+.f6475.3

            \[\leadsto \log y \cdot \color{blue}{\left(x + -1\right)} - t \]
        10. Applied rewrites75.3%

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

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

            \[\leadsto \left(-\log y\right) - t \]
        13. Recombined 2 regimes into one program.
        14. Final simplification85.4%

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

        Alternative 4: 99.5% accurate, 1.6× speedup?

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

          \[\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 \left(\color{blue}{\left(x - 1\right) \cdot \log y} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
          2. *-commutativeN/A

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

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

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

            \[\leadsto \left(\log y \cdot \color{blue}{\frac{1}{\frac{x \cdot x + \left(1 \cdot 1 + x \cdot 1\right)}{{x}^{3} - {1}^{3}}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
          6. un-div-invN/A

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

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

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

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

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

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

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

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

            \[\leadsto \left(\frac{\log y}{\frac{1}{\color{blue}{x + \left(\mathsf{neg}\left(1\right)\right)}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
          15. metadata-eval87.7

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

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

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

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

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

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

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

        Alternative 5: 99.5% accurate, 1.6× speedup?

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

          \[\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) + y \cdot \left(\frac{-1}{2} \cdot \left(z - 1\right) + \frac{-1}{3} \cdot \left(y \cdot \left(z - 1\right)\right)\right)\right) + \log y \cdot \left(x - 1\right)\right) - t} \]
        4. Step-by-step derivation
          1. associate--l+N/A

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

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

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

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

        Alternative 6: 94.2% accurate, 1.7× speedup?

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

          1. Initial program 97.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 x around inf

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

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

              \[\leadsto \color{blue}{\log y \cdot x} - t \]
            3. lower-log.f6495.8

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

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

          if -1.00000000000000004e62 < (-.f64 x #s(literal 1 binary64)) < -1

          1. Initial program 83.8%

            \[\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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -1 < (-.f64 x #s(literal 1 binary64))

            1. Initial program 87.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 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(y + \color{blue}{\log y \cdot \left(x - 1\right)}\right) - t \]
            7. Step-by-step derivation
              1. Applied rewrites87.3%

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

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

            Alternative 7: 99.4% accurate, 1.7× speedup?

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

              \[\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. *-commutativeN/A

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

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

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

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

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

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

            Alternative 8: 89.5% accurate, 1.7× speedup?

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

              1. Initial program 43.8%

                \[\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 \left(\color{blue}{\left(x - 1\right) \cdot \log y} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
                2. *-commutativeN/A

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

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

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

                  \[\leadsto \left(\log y \cdot \color{blue}{\frac{1}{\frac{x \cdot x + \left(1 \cdot 1 + x \cdot 1\right)}{{x}^{3} - {1}^{3}}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
                6. un-div-invN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \left(\frac{\log y}{\frac{1}{\color{blue}{x + \left(\mathsf{neg}\left(1\right)\right)}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
                15. metadata-eval43.8

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

                \[\leadsto \left(\color{blue}{\frac{\log y}{\frac{1}{x + -1}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
              5. 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 \]
              6. Step-by-step derivation
                1. *-commutativeN/A

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

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

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

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

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

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

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

                if -9.9999999999999998e207 < (-.f64 z #s(literal 1 binary64)) < 1.00000000000000004e264

                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 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(y + \color{blue}{\log y \cdot \left(x - 1\right)}\right) - t \]
                7. Step-by-step derivation
                  1. Applied rewrites94.0%

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

                  if 1.00000000000000004e264 < (-.f64 z #s(literal 1 binary64))

                  1. Initial program 24.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}{\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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto y \cdot \color{blue}{\left(-z\right)} - t \]
                  8. Recombined 3 regimes into one program.
                  9. Final simplification93.4%

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

                  Alternative 9: 89.4% accurate, 1.7× speedup?

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

                    1. Initial program 43.8%

                      \[\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 \left(\color{blue}{\left(x - 1\right) \cdot \log y} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
                      2. *-commutativeN/A

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

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

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

                        \[\leadsto \left(\log y \cdot \color{blue}{\frac{1}{\frac{x \cdot x + \left(1 \cdot 1 + x \cdot 1\right)}{{x}^{3} - {1}^{3}}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
                      6. un-div-invN/A

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

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

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

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

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

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

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

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

                        \[\leadsto \left(\frac{\log y}{\frac{1}{\color{blue}{x + \left(\mathsf{neg}\left(1\right)\right)}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
                      15. metadata-eval43.8

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

                      \[\leadsto \left(\color{blue}{\frac{\log y}{\frac{1}{x + -1}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
                    5. 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 \]
                    6. Step-by-step derivation
                      1. *-commutativeN/A

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

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

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

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

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

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

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

                      if -9.9999999999999998e207 < (-.f64 z #s(literal 1 binary64)) < 1.00000000000000004e264

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

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

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

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

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

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

                          \[\leadsto \log y \cdot \color{blue}{\left(-1 + x\right)} - t \]
                        6. lower-+.f6493.5

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

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

                      if 1.00000000000000004e264 < (-.f64 z #s(literal 1 binary64))

                      1. Initial program 24.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}{\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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto y \cdot \color{blue}{\left(-z\right)} - t \]
                      8. Recombined 3 regimes into one program.
                      9. Final simplification93.0%

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

                      Alternative 10: 85.6% accurate, 1.8× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y - t\\ \mathbf{if}\;x \leq -4.8 \cdot 10^{+57}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -7.2 \cdot 10^{-47}:\\ \;\;\;\;\mathsf{log1p}\left(-y\right) \cdot z - t\\ \mathbf{elif}\;x \leq 1:\\ \;\;\;\;\left(-\log y\right) - t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                      (FPCore (x y z t)
                       :precision binary64
                       (let* ((t_1 (- (* x (log y)) t)))
                         (if (<= x -4.8e+57)
                           t_1
                           (if (<= x -7.2e-47)
                             (- (* (log1p (- y)) z) t)
                             (if (<= x 1.0) (- (- (log y)) t) t_1)))))
                      double code(double x, double y, double z, double t) {
                      	double t_1 = (x * log(y)) - t;
                      	double tmp;
                      	if (x <= -4.8e+57) {
                      		tmp = t_1;
                      	} else if (x <= -7.2e-47) {
                      		tmp = (log1p(-y) * z) - t;
                      	} else if (x <= 1.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 = (x * Math.log(y)) - t;
                      	double tmp;
                      	if (x <= -4.8e+57) {
                      		tmp = t_1;
                      	} else if (x <= -7.2e-47) {
                      		tmp = (Math.log1p(-y) * z) - t;
                      	} else if (x <= 1.0) {
                      		tmp = -Math.log(y) - t;
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t):
                      	t_1 = (x * math.log(y)) - t
                      	tmp = 0
                      	if x <= -4.8e+57:
                      		tmp = t_1
                      	elif x <= -7.2e-47:
                      		tmp = (math.log1p(-y) * z) - t
                      	elif x <= 1.0:
                      		tmp = -math.log(y) - t
                      	else:
                      		tmp = t_1
                      	return tmp
                      
                      function code(x, y, z, t)
                      	t_1 = Float64(Float64(x * log(y)) - t)
                      	tmp = 0.0
                      	if (x <= -4.8e+57)
                      		tmp = t_1;
                      	elseif (x <= -7.2e-47)
                      		tmp = Float64(Float64(log1p(Float64(-y)) * z) - t);
                      	elseif (x <= 1.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[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[x, -4.8e+57], t$95$1, If[LessEqual[x, -7.2e-47], N[(N[(N[Log[1 + (-y)], $MachinePrecision] * z), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[x, 1.0], N[((-N[Log[y], $MachinePrecision]) - t), $MachinePrecision], t$95$1]]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := x \cdot \log y - t\\
                      \mathbf{if}\;x \leq -4.8 \cdot 10^{+57}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;x \leq -7.2 \cdot 10^{-47}:\\
                      \;\;\;\;\mathsf{log1p}\left(-y\right) \cdot z - t\\
                      
                      \mathbf{elif}\;x \leq 1:\\
                      \;\;\;\;\left(-\log y\right) - t\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if x < -4.80000000000000009e57 or 1 < x

                        1. Initial program 91.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 inf

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

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

                            \[\leadsto \color{blue}{\log y \cdot x} - t \]
                          3. lower-log.f6490.0

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

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

                        if -4.80000000000000009e57 < x < -7.19999999999999982e-47

                        1. Initial program 68.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 z around inf

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

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

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

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

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

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

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

                        if -7.19999999999999982e-47 < x < 1

                        1. Initial program 86.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 \left(\color{blue}{\left(x - 1\right) \cdot \log y} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
                          2. *-commutativeN/A

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

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

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

                            \[\leadsto \left(\log y \cdot \color{blue}{\frac{1}{\frac{x \cdot x + \left(1 \cdot 1 + x \cdot 1\right)}{{x}^{3} - {1}^{3}}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
                          6. un-div-invN/A

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

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

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

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

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

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

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

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

                            \[\leadsto \left(\frac{\log y}{\frac{1}{\color{blue}{x + \left(\mathsf{neg}\left(1\right)\right)}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
                          15. metadata-eval86.9

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

                          \[\leadsto \left(\color{blue}{\frac{\log y}{\frac{1}{x + -1}}} + \left(z - 1\right) \cdot \log \left(1 - 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(-\log y\right) - t \]
                        13. Recombined 3 regimes into one program.
                        14. Final simplification87.3%

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

                        Alternative 11: 75.6% accurate, 1.8× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -7 \cdot 10^{+80}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -7.2 \cdot 10^{-47}:\\ \;\;\;\;z \cdot \left(y \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, -0.25, -0.3333333333333333\right), -0.5\right), -1\right)\right) - t\\ \mathbf{elif}\;x \leq 6 \cdot 10^{+24}:\\ \;\;\;\;\left(-\log y\right) - t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                        (FPCore (x y z t)
                         :precision binary64
                         (let* ((t_1 (* x (log y))))
                           (if (<= x -7e+80)
                             t_1
                             (if (<= x -7.2e-47)
                               (-
                                (* z (* y (fma y (fma y (fma y -0.25 -0.3333333333333333) -0.5) -1.0)))
                                t)
                               (if (<= x 6e+24) (- (- (log y)) t) t_1)))))
                        double code(double x, double y, double z, double t) {
                        	double t_1 = x * log(y);
                        	double tmp;
                        	if (x <= -7e+80) {
                        		tmp = t_1;
                        	} else if (x <= -7.2e-47) {
                        		tmp = (z * (y * fma(y, fma(y, fma(y, -0.25, -0.3333333333333333), -0.5), -1.0))) - t;
                        	} else if (x <= 6e+24) {
                        		tmp = -log(y) - t;
                        	} else {
                        		tmp = t_1;
                        	}
                        	return tmp;
                        }
                        
                        function code(x, y, z, t)
                        	t_1 = Float64(x * log(y))
                        	tmp = 0.0
                        	if (x <= -7e+80)
                        		tmp = t_1;
                        	elseif (x <= -7.2e-47)
                        		tmp = Float64(Float64(z * Float64(y * fma(y, fma(y, fma(y, -0.25, -0.3333333333333333), -0.5), -1.0))) - t);
                        	elseif (x <= 6e+24)
                        		tmp = Float64(Float64(-log(y)) - t);
                        	else
                        		tmp = t_1;
                        	end
                        	return tmp
                        end
                        
                        code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7e+80], t$95$1, If[LessEqual[x, -7.2e-47], N[(N[(z * N[(y * N[(y * N[(y * N[(y * -0.25 + -0.3333333333333333), $MachinePrecision] + -0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[x, 6e+24], N[((-N[Log[y], $MachinePrecision]) - t), $MachinePrecision], t$95$1]]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_1 := x \cdot \log y\\
                        \mathbf{if}\;x \leq -7 \cdot 10^{+80}:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{elif}\;x \leq -7.2 \cdot 10^{-47}:\\
                        \;\;\;\;z \cdot \left(y \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, -0.25, -0.3333333333333333\right), -0.5\right), -1\right)\right) - t\\
                        
                        \mathbf{elif}\;x \leq 6 \cdot 10^{+24}:\\
                        \;\;\;\;\left(-\log y\right) - t\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_1\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if x < -6.99999999999999987e80 or 5.9999999999999999e24 < x

                          1. Initial program 92.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 x around inf

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

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

                              \[\leadsto \color{blue}{\log y \cdot x} \]
                            3. lower-log.f6471.3

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

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

                          if -6.99999999999999987e80 < x < -7.19999999999999982e-47

                          1. Initial program 75.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. Step-by-step derivation
                            1. lift-*.f64N/A

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

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

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

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

                              \[\leadsto \left(\log y \cdot \color{blue}{\frac{1}{\frac{x \cdot x + \left(1 \cdot 1 + x \cdot 1\right)}{{x}^{3} - {1}^{3}}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
                            6. un-div-invN/A

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(\color{blue}{\frac{\log y}{\frac{1}{x + -1}}} + \left(z - 1\right) \cdot \log \left(1 - 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. mul-1-negN/A

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

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

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

                              \[\leadsto z \cdot \mathsf{log1p}\left(\color{blue}{-y}\right) - t \]
                          7. Applied rewrites82.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 rewrites78.4%

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

                            if -7.19999999999999982e-47 < x < 5.9999999999999999e24

                            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 \left(\color{blue}{\left(x - 1\right) \cdot \log y} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
                              2. *-commutativeN/A

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

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

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

                                \[\leadsto \left(\log y \cdot \color{blue}{\frac{1}{\frac{x \cdot x + \left(1 \cdot 1 + x \cdot 1\right)}{{x}^{3} - {1}^{3}}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
                              6. un-div-invN/A

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

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

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

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

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

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

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

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

                                \[\leadsto \left(\frac{\log y}{\frac{1}{\color{blue}{x + \left(\mathsf{neg}\left(1\right)\right)}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
                              15. metadata-eval86.1

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

                              \[\leadsto \left(\color{blue}{\frac{\log y}{\frac{1}{x + -1}}} + \left(z - 1\right) \cdot \log \left(1 - 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

                                \[\leadsto \log y \cdot \left(x + \color{blue}{-1}\right) - t \]
                              5. lower-+.f6485.0

                                \[\leadsto \log y \cdot \color{blue}{\left(x + -1\right)} - t \]
                            10. Applied rewrites85.0%

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

                              \[\leadsto -1 \cdot \color{blue}{\log y} - t \]
                            12. Step-by-step derivation
                              1. Applied rewrites82.3%

                                \[\leadsto \left(-\log y\right) - t \]
                            13. Recombined 3 regimes into one program.
                            14. Final simplification77.0%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7 \cdot 10^{+80}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;x \leq -7.2 \cdot 10^{-47}:\\ \;\;\;\;z \cdot \left(y \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, -0.25, -0.3333333333333333\right), -0.5\right), -1\right)\right) - t\\ \mathbf{elif}\;x \leq 6 \cdot 10^{+24}:\\ \;\;\;\;\left(-\log y\right) - t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log y\\ \end{array} \]
                            15. Add Preprocessing

                            Alternative 12: 99.1% accurate, 1.9× speedup?

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

                              \[\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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 13: 66.9% accurate, 1.9× speedup?

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

                              1. Initial program 92.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 x around inf

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

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

                                  \[\leadsto \color{blue}{\log y \cdot x} \]
                                3. lower-log.f6471.3

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

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

                              if -4.50000000000000017e81 < x < 8.00000000000000038e26

                              1. Initial program 84.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}{\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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(y, \color{blue}{-z}, y\right) - t \]
                              8. Recombined 2 regimes into one program.
                              9. Final simplification68.4%

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

                              Alternative 14: 46.7% accurate, 7.1× speedup?

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

                                \[\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 \left(\color{blue}{\left(x - 1\right) \cdot \log y} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
                                2. *-commutativeN/A

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

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

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

                                  \[\leadsto \left(\log y \cdot \color{blue}{\frac{1}{\frac{x \cdot x + \left(1 \cdot 1 + x \cdot 1\right)}{{x}^{3} - {1}^{3}}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
                                6. un-div-invN/A

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

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

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

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

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

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

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

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

                                  \[\leadsto \left(\frac{\log y}{\frac{1}{\color{blue}{x + \left(\mathsf{neg}\left(1\right)\right)}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
                                15. metadata-eval87.7

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

                                \[\leadsto \left(\color{blue}{\frac{\log y}{\frac{1}{x + -1}}} + \left(z - 1\right) \cdot \log \left(1 - 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. mul-1-negN/A

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

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

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

                                  \[\leadsto z \cdot \mathsf{log1p}\left(\color{blue}{-y}\right) - t \]
                              7. Applied rewrites49.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 rewrites49.3%

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

                                Alternative 15: 46.5% accurate, 18.8× speedup?

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

                                  \[\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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  Alternative 16: 46.3% accurate, 20.5× speedup?

                                  \[\begin{array}{l} \\ y \cdot \left(-z\right) - 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(y * Float64(-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}
                                  
                                  \\
                                  y \cdot \left(-z\right) - t
                                  \end{array}
                                  
                                  Derivation
                                  1. Initial program 87.8%

                                    \[\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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto y \cdot \color{blue}{\left(-z\right)} - t \]
                                    2. Add Preprocessing

                                    Alternative 17: 36.0% 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 87.8%

                                      \[\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.f6437.6

                                        \[\leadsto \color{blue}{-t} \]
                                    5. Applied rewrites37.6%

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

                                    Reproduce

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