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

Percentage Accurate: 89.6% → 99.8%
Time: 12.2s
Alternatives: 15
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 15 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.6% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.7× speedup?

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

\\
\mathsf{fma}\left(\log y, x, \mathsf{fma}\left(\log y, -1, \mathsf{fma}\left(\mathsf{log1p}\left(-y\right), z - 1, -t\right)\right)\right)
\end{array}
Derivation
  1. Initial program 90.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 \color{blue}{\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t} \]
    2. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.4% accurate, 1.7× speedup?

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

\\
\left(\left(\mathsf{fma}\left(-0.5, y, -1\right) \cdot y\right) \cdot \left(z - 1\right) + \left(x - 1\right) \cdot \log y\right) - t
\end{array}
Derivation
  1. Initial program 90.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 y around 0

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

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

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

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

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

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

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

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

Alternative 3: 76.0% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x - 1 \leq -4 \cdot 10^{+91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x - 1 \leq -5 \cdot 10^{+16}:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.5, y, -1\right) \cdot z\right) \cdot y - t\\ \mathbf{elif}\;x - 1 \leq 10^{+88}:\\ \;\;\;\;\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 1.0) -4e+91)
     t_1
     (if (<= (- x 1.0) -5e+16)
       (- (* (* (fma -0.5 y -1.0) z) y) t)
       (if (<= (- x 1.0) 1e+88) (- (- (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 - 1.0) <= -4e+91) {
		tmp = t_1;
	} else if ((x - 1.0) <= -5e+16) {
		tmp = ((fma(-0.5, y, -1.0) * z) * y) - t;
	} else if ((x - 1.0) <= 1e+88) {
		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 (Float64(x - 1.0) <= -4e+91)
		tmp = t_1;
	elseif (Float64(x - 1.0) <= -5e+16)
		tmp = Float64(Float64(Float64(fma(-0.5, y, -1.0) * z) * y) - t);
	elseif (Float64(x - 1.0) <= 1e+88)
		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[N[(x - 1.0), $MachinePrecision], -4e+91], t$95$1, If[LessEqual[N[(x - 1.0), $MachinePrecision], -5e+16], N[(N[(N[(N[(-0.5 * y + -1.0), $MachinePrecision] * z), $MachinePrecision] * y), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[N[(x - 1.0), $MachinePrecision], 1e+88], 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 - 1 \leq -4 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x - 1 \leq -5 \cdot 10^{+16}:\\
\;\;\;\;\left(\mathsf{fma}\left(-0.5, y, -1\right) \cdot z\right) \cdot y - t\\

\mathbf{elif}\;x - 1 \leq 10^{+88}:\\
\;\;\;\;\left(-\log y\right) - t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 x #s(literal 1 binary64)) < -4.00000000000000032e91 or 9.99999999999999959e87 < (-.f64 x #s(literal 1 binary64))

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \log y} \]
    6. 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.f6481.0

        \[\leadsto \color{blue}{\log y} \cdot x \]
    7. Applied rewrites81.0%

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

    if -4.00000000000000032e91 < (-.f64 x #s(literal 1 binary64)) < -5e16

    1. Initial program 72.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -5e16 < (-.f64 x #s(literal 1 binary64)) < 9.99999999999999959e87

      1. Initial program 86.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 y around 0

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

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

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

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

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

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

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

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

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

      Alternative 4: 95.7% accurate, 1.7× speedup?

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

        1. Initial program 93.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}{\log y \cdot \left(x - 1\right)} - t \]
        4. Step-by-step derivation
          1. *-commutativeN/A

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

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

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

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

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

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

        1. Initial program 85.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 y around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 5: 99.4% accurate, 1.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 6: 99.4% accurate, 1.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 7: 89.6% accurate, 1.7× speedup?

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

          1. Initial program 35.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 y around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(1 - z, y, \left(x - 1\right) \cdot \log y\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 rewrites89.0%

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

            if -1.00000000000000005e248 < (-.f64 z #s(literal 1 binary64)) < 5.0000000000000002e280

            1. Initial program 94.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 y around 0

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

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

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

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

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

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

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

          Alternative 8: 87.1% accurate, 1.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y - t\\ \mathbf{if}\;x - 1 \leq -2 \cdot 10^{+16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x - 1 \leq -0.2:\\ \;\;\;\;\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 1.0) -2e+16)
               t_1
               (if (<= (- x 1.0) -0.2) (- (- (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 - 1.0) <= -2e+16) {
          		tmp = t_1;
          	} else if ((x - 1.0) <= -0.2) {
          		tmp = -log(y) - t;
          	} else {
          		tmp = t_1;
          	}
          	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) :: tmp
              t_1 = (x * log(y)) - t
              if ((x - 1.0d0) <= (-2d+16)) then
                  tmp = t_1
              else if ((x - 1.0d0) <= (-0.2d0)) then
                  tmp = -log(y) - t
              else
                  tmp = t_1
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t) {
          	double t_1 = (x * Math.log(y)) - t;
          	double tmp;
          	if ((x - 1.0) <= -2e+16) {
          		tmp = t_1;
          	} else if ((x - 1.0) <= -0.2) {
          		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 - 1.0) <= -2e+16:
          		tmp = t_1
          	elif (x - 1.0) <= -0.2:
          		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 (Float64(x - 1.0) <= -2e+16)
          		tmp = t_1;
          	elseif (Float64(x - 1.0) <= -0.2)
          		tmp = Float64(Float64(-log(y)) - t);
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t)
          	t_1 = (x * log(y)) - t;
          	tmp = 0.0;
          	if ((x - 1.0) <= -2e+16)
          		tmp = t_1;
          	elseif ((x - 1.0) <= -0.2)
          		tmp = -log(y) - t;
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[N[(x - 1.0), $MachinePrecision], -2e+16], t$95$1, If[LessEqual[N[(x - 1.0), $MachinePrecision], -0.2], 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 - 1 \leq -2 \cdot 10^{+16}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;x - 1 \leq -0.2:\\
          \;\;\;\;\left(-\log y\right) - t\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (-.f64 x #s(literal 1 binary64)) < -2e16 or -0.20000000000000001 < (-.f64 x #s(literal 1 binary64))

            1. Initial program 93.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.f6492.3

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

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

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

            1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

            Alternative 9: 67.2% accurate, 1.8× speedup?

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

              1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{x \cdot \log y} \]
              6. 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.f6481.0

                  \[\leadsto \color{blue}{\log y} \cdot x \]
              7. Applied rewrites81.0%

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

              if -4.00000000000000032e91 < (-.f64 x #s(literal 1 binary64)) < 9.99999999999999959e87

              1. Initial program 84.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(1 - z, y, \left(x - 1\right) \cdot \log y\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 rewrites63.7%

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

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

              Alternative 10: 98.9% accurate, 1.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 11: 42.7% accurate, 10.7× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+25}:\\ \;\;\;\;-t\\ \mathbf{elif}\;t \leq 2.85 \cdot 10^{+26}:\\ \;\;\;\;\left(1 - z\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;-t\\ \end{array} \end{array} \]
                (FPCore (x y z t)
                 :precision binary64
                 (if (<= t -1.05e+25) (- t) (if (<= t 2.85e+26) (* (- 1.0 z) y) (- t))))
                double code(double x, double y, double z, double t) {
                	double tmp;
                	if (t <= -1.05e+25) {
                		tmp = -t;
                	} else if (t <= 2.85e+26) {
                		tmp = (1.0 - z) * y;
                	} else {
                		tmp = -t;
                	}
                	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) :: tmp
                    if (t <= (-1.05d+25)) then
                        tmp = -t
                    else if (t <= 2.85d+26) then
                        tmp = (1.0d0 - z) * y
                    else
                        tmp = -t
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z, double t) {
                	double tmp;
                	if (t <= -1.05e+25) {
                		tmp = -t;
                	} else if (t <= 2.85e+26) {
                		tmp = (1.0 - z) * y;
                	} else {
                		tmp = -t;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t):
                	tmp = 0
                	if t <= -1.05e+25:
                		tmp = -t
                	elif t <= 2.85e+26:
                		tmp = (1.0 - z) * y
                	else:
                		tmp = -t
                	return tmp
                
                function code(x, y, z, t)
                	tmp = 0.0
                	if (t <= -1.05e+25)
                		tmp = Float64(-t);
                	elseif (t <= 2.85e+26)
                		tmp = Float64(Float64(1.0 - z) * y);
                	else
                		tmp = Float64(-t);
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t)
                	tmp = 0.0;
                	if (t <= -1.05e+25)
                		tmp = -t;
                	elseif (t <= 2.85e+26)
                		tmp = (1.0 - z) * y;
                	else
                		tmp = -t;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_] := If[LessEqual[t, -1.05e+25], (-t), If[LessEqual[t, 2.85e+26], N[(N[(1.0 - z), $MachinePrecision] * y), $MachinePrecision], (-t)]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;t \leq -1.05 \cdot 10^{+25}:\\
                \;\;\;\;-t\\
                
                \mathbf{elif}\;t \leq 2.85 \cdot 10^{+26}:\\
                \;\;\;\;\left(1 - z\right) \cdot y\\
                
                \mathbf{else}:\\
                \;\;\;\;-t\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if t < -1.05e25 or 2.8500000000000002e26 < t

                  1. Initial program 96.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 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.f6475.7

                      \[\leadsto \color{blue}{-t} \]
                  5. Applied rewrites75.7%

                    \[\leadsto \color{blue}{-t} \]

                  if -1.05e25 < t < 2.8500000000000002e26

                  1. Initial program 85.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(1 - z\right) \cdot \color{blue}{y} \]
                  10. Recombined 2 regimes into one program.
                  11. Add Preprocessing

                  Alternative 12: 46.2% accurate, 11.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 13: 46.0% accurate, 18.8× speedup?

                    \[\begin{array}{l} \\ \left(1 - z\right) \cdot y - t \end{array} \]
                    (FPCore (x y z t) :precision binary64 (- (* (- 1.0 z) y) t))
                    double code(double x, double y, double z, double t) {
                    	return ((1.0 - z) * 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 = ((1.0d0 - z) * y) - t
                    end function
                    
                    public static double code(double x, double y, double z, double t) {
                    	return ((1.0 - z) * y) - t;
                    }
                    
                    def code(x, y, z, t):
                    	return ((1.0 - z) * y) - t
                    
                    function code(x, y, z, t)
                    	return Float64(Float64(Float64(1.0 - z) * y) - t)
                    end
                    
                    function tmp = code(x, y, z, t)
                    	tmp = ((1.0 - z) * y) - t;
                    end
                    
                    code[x_, y_, z_, t_] := N[(N[(N[(1.0 - z), $MachinePrecision] * y), $MachinePrecision] - t), $MachinePrecision]
                    
                    \begin{array}{l}
                    
                    \\
                    \left(1 - z\right) \cdot y - t
                    \end{array}
                    
                    Derivation
                    1. Initial program 90.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 y around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(1 - z, y, \left(x - 1\right) \cdot \log y\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 rewrites44.2%

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

                      Alternative 14: 45.8% accurate, 20.5× speedup?

                      \[\begin{array}{l} \\ \left(-z\right) \cdot y - t \end{array} \]
                      (FPCore (x y z t) :precision binary64 (- (* (- z) y) t))
                      double code(double x, double y, double z, double t) {
                      	return (-z * 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 = (-z * y) - t
                      end function
                      
                      public static double code(double x, double y, double z, double t) {
                      	return (-z * y) - t;
                      }
                      
                      def code(x, y, z, t):
                      	return (-z * y) - t
                      
                      function code(x, y, z, t)
                      	return Float64(Float64(Float64(-z) * y) - t)
                      end
                      
                      function tmp = code(x, y, z, t)
                      	tmp = (-z * y) - t;
                      end
                      
                      code[x_, y_, z_, t_] := N[(N[((-z) * y), $MachinePrecision] - t), $MachinePrecision]
                      
                      \begin{array}{l}
                      
                      \\
                      \left(-z\right) \cdot y - t
                      \end{array}
                      
                      Derivation
                      1. Initial program 90.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 y around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\mathsf{fma}\left(1 - z, y, \left(x - 1\right) \cdot \log y\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 rewrites44.1%

                          \[\leadsto \left(-y\right) \cdot \color{blue}{z} - t \]
                        2. Final simplification44.1%

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

                        Alternative 15: 35.8% accurate, 75.3× speedup?

                        \[\begin{array}{l} \\ -t \end{array} \]
                        (FPCore (x y z t) :precision binary64 (- t))
                        double code(double x, double y, double z, double t) {
                        	return -t;
                        }
                        
                        real(8) function code(x, y, z, t)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            real(8), intent (in) :: z
                            real(8), intent (in) :: t
                            code = -t
                        end function
                        
                        public static double code(double x, double y, double z, double t) {
                        	return -t;
                        }
                        
                        def code(x, y, z, t):
                        	return -t
                        
                        function code(x, y, z, t)
                        	return Float64(-t)
                        end
                        
                        function tmp = code(x, y, z, t)
                        	tmp = -t;
                        end
                        
                        code[x_, y_, z_, t_] := (-t)
                        
                        \begin{array}{l}
                        
                        \\
                        -t
                        \end{array}
                        
                        Derivation
                        1. Initial program 90.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 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.f6435.0

                            \[\leadsto \color{blue}{-t} \]
                        5. Applied rewrites35.0%

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

                        Reproduce

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