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

Percentage Accurate: 89.2% → 99.6%
Time: 17.0s
Alternatives: 18
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 18 alternatives:

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

Initial Program: 89.2% accurate, 1.0× speedup?

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

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

Alternative 1: 99.6% accurate, 1.5× speedup?

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

\\
\left(\left(z + -1\right) \cdot \left(y \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, -0.25, -0.3333333333333333\right), -0.5\right), -1\right)\right) + \left(x + -1\right) \cdot \log y\right) - t
\end{array}
Derivation
  1. Initial program 91.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 \left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \color{blue}{\left(y \cdot \left(y \cdot \left(y \cdot \left(\frac{-1}{4} \cdot y - \frac{1}{3}\right) - \frac{1}{2}\right) - 1\right)\right)}\right) - t \]
  4. Step-by-step derivation
    1. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 91.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(x + -1\right) \cdot \log y + \left(z + -1\right) \cdot \log \left(1 - y\right)\right) - t\\ t_2 := x \cdot \log y - t\\ \mathbf{if}\;t\_1 \leq -20000000000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 1000:\\ \;\;\;\;\left(-\log y\right) - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (+ (* (+ x -1.0) (log y)) (* (+ z -1.0) (log (- 1.0 y)))) t))
        (t_2 (- (* x (log y)) t)))
   (if (<= t_1 -20000000000.0)
     t_2
     (if (<= t_1 1000.0) (- (- (log y)) (* y z)) t_2))))
double code(double x, double y, double z, double t) {
	double t_1 = (((x + -1.0) * log(y)) + ((z + -1.0) * log((1.0 - y)))) - t;
	double t_2 = (x * log(y)) - t;
	double tmp;
	if (t_1 <= -20000000000.0) {
		tmp = t_2;
	} else if (t_1 <= 1000.0) {
		tmp = -log(y) - (y * z);
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (((x + (-1.0d0)) * log(y)) + ((z + (-1.0d0)) * log((1.0d0 - y)))) - t
    t_2 = (x * log(y)) - t
    if (t_1 <= (-20000000000.0d0)) then
        tmp = t_2
    else if (t_1 <= 1000.0d0) then
        tmp = -log(y) - (y * z)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (((x + -1.0) * Math.log(y)) + ((z + -1.0) * Math.log((1.0 - y)))) - t;
	double t_2 = (x * Math.log(y)) - t;
	double tmp;
	if (t_1 <= -20000000000.0) {
		tmp = t_2;
	} else if (t_1 <= 1000.0) {
		tmp = -Math.log(y) - (y * z);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (((x + -1.0) * math.log(y)) + ((z + -1.0) * math.log((1.0 - y)))) - t
	t_2 = (x * math.log(y)) - t
	tmp = 0
	if t_1 <= -20000000000.0:
		tmp = t_2
	elif t_1 <= 1000.0:
		tmp = -math.log(y) - (y * z)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(Float64(Float64(x + -1.0) * log(y)) + Float64(Float64(z + -1.0) * log(Float64(1.0 - y)))) - t)
	t_2 = Float64(Float64(x * log(y)) - t)
	tmp = 0.0
	if (t_1 <= -20000000000.0)
		tmp = t_2;
	elseif (t_1 <= 1000.0)
		tmp = Float64(Float64(-log(y)) - Float64(y * z));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (((x + -1.0) * log(y)) + ((z + -1.0) * log((1.0 - y)))) - t;
	t_2 = (x * log(y)) - t;
	tmp = 0.0;
	if (t_1 <= -20000000000.0)
		tmp = t_2;
	elseif (t_1 <= 1000.0)
		tmp = -log(y) - (y * z);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[t$95$1, -20000000000.0], t$95$2, If[LessEqual[t$95$1, 1000.0], N[((-N[Log[y], $MachinePrecision]) - N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq 1000:\\
\;\;\;\;\left(-\log y\right) - y \cdot z\\

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


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

    1. Initial program 94.6%

      \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    2. Add Preprocessing
    3. Taylor expanded in 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.f6493.4

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

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

    if -2e10 < (-.f64 (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y)))) t) < 1e3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\log y\right)\right) - y \cdot \color{blue}{z} \]
      3. Step-by-step derivation
        1. Applied rewrites96.6%

          \[\leadsto \left(-\log y\right) - y \cdot \color{blue}{z} \]
      4. Recombined 2 regimes into one program.
      5. Final simplification94.1%

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

      Alternative 3: 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.0000000005:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x + -1 \leq -1:\\ \;\;\;\;\left(-\log y\right) - \mathsf{fma}\left(y, z + -1, t\right)\\ \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.0000000005)
           t_1
           (if (<= (+ x -1.0) -1.0) (- (- (log y)) (fma y (+ z -1.0) 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.0000000005) {
      		tmp = t_1;
      	} else if ((x + -1.0) <= -1.0) {
      		tmp = -log(y) - fma(y, (z + -1.0), 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.0000000005)
      		tmp = t_1;
      	elseif (Float64(x + -1.0) <= -1.0)
      		tmp = Float64(Float64(-log(y)) - fma(y, Float64(z + -1.0), 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.0000000005], t$95$1, If[LessEqual[N[(x + -1.0), $MachinePrecision], -1.0], N[((-N[Log[y], $MachinePrecision]) - N[(y * N[(z + -1.0), $MachinePrecision] + t), $MachinePrecision]), $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.0000000005:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;x + -1 \leq -1:\\
      \;\;\;\;\left(-\log y\right) - \mathsf{fma}\left(y, z + -1, t\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (-.f64 x #s(literal 1 binary64)) < -1.0000000005 or -1 < (-.f64 x #s(literal 1 binary64))

        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. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 4: 95.6% accurate, 1.7× speedup?

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

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

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

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

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

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

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

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

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

          if -5.20000000000000018 < t < 1.09999999999999995e-29

          1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 5: 95.4% accurate, 1.8× speedup?

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

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

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

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

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

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

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

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

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

            if -5.20000000000000018 < t < 1.09999999999999995e-29

            1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 6: 87.2% accurate, 1.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y - t\\ \mathbf{if}\;x + -1 \leq -1000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x + -1 \leq -0.5:\\ \;\;\;\;\left(-\log y\right) - \left(t - y\right)\\ \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) -1000.0)
                 t_1
                 (if (<= (+ x -1.0) -0.5) (- (- (log y)) (- t y)) 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) <= -1000.0) {
            		tmp = t_1;
            	} else if ((x + -1.0) <= -0.5) {
            		tmp = -log(y) - (t - y);
            	} 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)) <= (-1000.0d0)) then
                    tmp = t_1
                else if ((x + (-1.0d0)) <= (-0.5d0)) then
                    tmp = -log(y) - (t - y)
                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) <= -1000.0) {
            		tmp = t_1;
            	} else if ((x + -1.0) <= -0.5) {
            		tmp = -Math.log(y) - (t - y);
            	} 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) <= -1000.0:
            		tmp = t_1
            	elif (x + -1.0) <= -0.5:
            		tmp = -math.log(y) - (t - y)
            	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) <= -1000.0)
            		tmp = t_1;
            	elseif (Float64(x + -1.0) <= -0.5)
            		tmp = Float64(Float64(-log(y)) - Float64(t - y));
            	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) <= -1000.0)
            		tmp = t_1;
            	elseif ((x + -1.0) <= -0.5)
            		tmp = -log(y) - (t - y);
            	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], -1000.0], t$95$1, If[LessEqual[N[(x + -1.0), $MachinePrecision], -0.5], N[((-N[Log[y], $MachinePrecision]) - N[(t - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := x \cdot \log y - t\\
            \mathbf{if}\;x + -1 \leq -1000:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;x + -1 \leq -0.5:\\
            \;\;\;\;\left(-\log y\right) - \left(t - y\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (-.f64 x #s(literal 1 binary64)) < -1e3 or -0.5 < (-.f64 x #s(literal 1 binary64))

              1. Initial program 94.3%

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

                \[\leadsto \color{blue}{x \cdot \log y} - t \]
              4. Step-by-step derivation
                1. *-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.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(-\log y\right) - \left(t - \color{blue}{y}\right) \]
                4. Recombined 2 regimes into one program.
                5. Final simplification90.5%

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

                Alternative 7: 75.4% accurate, 1.8× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x + -1 \leq -1 \cdot 10^{+80}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x + -1 \leq -0.5:\\ \;\;\;\;\left(-\log y\right) - \left(t - y\right)\\ \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) -1e+80)
                     t_1
                     (if (<= (+ x -1.0) -0.5) (- (- (log y)) (- t y)) t_1))))
                double code(double x, double y, double z, double t) {
                	double t_1 = x * log(y);
                	double tmp;
                	if ((x + -1.0) <= -1e+80) {
                		tmp = t_1;
                	} else if ((x + -1.0) <= -0.5) {
                		tmp = -log(y) - (t - y);
                	} 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)) <= (-1d+80)) then
                        tmp = t_1
                    else if ((x + (-1.0d0)) <= (-0.5d0)) then
                        tmp = -log(y) - (t - y)
                    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) <= -1e+80) {
                		tmp = t_1;
                	} else if ((x + -1.0) <= -0.5) {
                		tmp = -Math.log(y) - (t - y);
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t):
                	t_1 = x * math.log(y)
                	tmp = 0
                	if (x + -1.0) <= -1e+80:
                		tmp = t_1
                	elif (x + -1.0) <= -0.5:
                		tmp = -math.log(y) - (t - y)
                	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) <= -1e+80)
                		tmp = t_1;
                	elseif (Float64(x + -1.0) <= -0.5)
                		tmp = Float64(Float64(-log(y)) - Float64(t - y));
                	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) <= -1e+80)
                		tmp = t_1;
                	elseif ((x + -1.0) <= -0.5)
                		tmp = -log(y) - (t - y);
                	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], -1e+80], t$95$1, If[LessEqual[N[(x + -1.0), $MachinePrecision], -0.5], N[((-N[Log[y], $MachinePrecision]) - N[(t - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := x \cdot \log y\\
                \mathbf{if}\;x + -1 \leq -1 \cdot 10^{+80}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;x + -1 \leq -0.5:\\
                \;\;\;\;\left(-\log y\right) - \left(t - y\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (-.f64 x #s(literal 1 binary64)) < -1e80 or -0.5 < (-.f64 x #s(literal 1 binary64))

                  1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(\mathsf{neg}\left(\log y\right)\right) - \left(t + \color{blue}{-1 \cdot y}\right) \]
                    3. Step-by-step derivation
                      1. Applied rewrites83.0%

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

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

                    Alternative 8: 66.3% accurate, 1.8× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x + -1 \leq -1 \cdot 10^{+80}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x + -1 \leq 5 \cdot 10^{+57}:\\ \;\;\;\;z \cdot \left(-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) -1e+80)
                         t_1
                         (if (<= (+ x -1.0) 5e+57) (- (* 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) <= -1e+80) {
                    		tmp = t_1;
                    	} else if ((x + -1.0) <= 5e+57) {
                    		tmp = (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)) <= (-1d+80)) then
                            tmp = t_1
                        else if ((x + (-1.0d0)) <= 5d+57) then
                            tmp = (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) <= -1e+80) {
                    		tmp = t_1;
                    	} else if ((x + -1.0) <= 5e+57) {
                    		tmp = (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) <= -1e+80:
                    		tmp = t_1
                    	elif (x + -1.0) <= 5e+57:
                    		tmp = (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) <= -1e+80)
                    		tmp = t_1;
                    	elseif (Float64(x + -1.0) <= 5e+57)
                    		tmp = Float64(Float64(z * Float64(-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) <= -1e+80)
                    		tmp = t_1;
                    	elseif ((x + -1.0) <= 5e+57)
                    		tmp = (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], -1e+80], t$95$1, If[LessEqual[N[(x + -1.0), $MachinePrecision], 5e+57], N[(N[(z * (-y)), $MachinePrecision] - t), $MachinePrecision], t$95$1]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := x \cdot \log y\\
                    \mathbf{if}\;x + -1 \leq -1 \cdot 10^{+80}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;x + -1 \leq 5 \cdot 10^{+57}:\\
                    \;\;\;\;z \cdot \left(-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)) < -1e80 or 4.99999999999999972e57 < (-.f64 x #s(literal 1 binary64))

                      1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(-1 \cdot y\right) \cdot z - t \]
                      9. Step-by-step derivation
                        1. Applied rewrites60.3%

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

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

                      Alternative 9: 88.9% accurate, 1.9× speedup?

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

                        1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

                        if 5.0000000000000002e255 < (-.f64 z #s(literal 1 binary64))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(-1 \cdot y\right) \cdot z - t \]
                        9. Step-by-step derivation
                          1. Applied rewrites99.9%

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

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

                        Alternative 10: 99.1% accurate, 1.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 11: 46.4% accurate, 7.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 12: 46.3% accurate, 8.1× speedup?

                          \[\begin{array}{l} \\ y \cdot \mathsf{fma}\left(y, z \cdot \mathsf{fma}\left(y, -0.3333333333333333, -0.5\right), -z\right) - t \end{array} \]
                          (FPCore (x y z t)
                           :precision binary64
                           (- (* y (fma y (* z (fma y -0.3333333333333333 -0.5)) (- z))) t))
                          double code(double x, double y, double z, double t) {
                          	return (y * fma(y, (z * fma(y, -0.3333333333333333, -0.5)), -z)) - t;
                          }
                          
                          function code(x, y, z, t)
                          	return Float64(Float64(y * fma(y, Float64(z * fma(y, -0.3333333333333333, -0.5)), Float64(-z))) - t)
                          end
                          
                          code[x_, y_, z_, t_] := N[(N[(y * N[(y * N[(z * N[(y * -0.3333333333333333 + -0.5), $MachinePrecision]), $MachinePrecision] + (-z)), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
                          
                          \begin{array}{l}
                          
                          \\
                          y \cdot \mathsf{fma}\left(y, z \cdot \mathsf{fma}\left(y, -0.3333333333333333, -0.5\right), -z\right) - t
                          \end{array}
                          
                          Derivation
                          1. Initial program 91.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. Step-by-step derivation
                            1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 13: 46.3% accurate, 8.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 14: 43.1% accurate, 10.7× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -125000:\\ \;\;\;\;-t\\ \mathbf{elif}\;t \leq 1200:\\ \;\;\;\;y - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;-t\\ \end{array} \end{array} \]
                              (FPCore (x y z t)
                               :precision binary64
                               (if (<= t -125000.0) (- t) (if (<= t 1200.0) (- y (* y z)) (- t))))
                              double code(double x, double y, double z, double t) {
                              	double tmp;
                              	if (t <= -125000.0) {
                              		tmp = -t;
                              	} else if (t <= 1200.0) {
                              		tmp = y - (y * z);
                              	} 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 <= (-125000.0d0)) then
                                      tmp = -t
                                  else if (t <= 1200.0d0) then
                                      tmp = y - (y * z)
                                  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 <= -125000.0) {
                              		tmp = -t;
                              	} else if (t <= 1200.0) {
                              		tmp = y - (y * z);
                              	} else {
                              		tmp = -t;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t):
                              	tmp = 0
                              	if t <= -125000.0:
                              		tmp = -t
                              	elif t <= 1200.0:
                              		tmp = y - (y * z)
                              	else:
                              		tmp = -t
                              	return tmp
                              
                              function code(x, y, z, t)
                              	tmp = 0.0
                              	if (t <= -125000.0)
                              		tmp = Float64(-t);
                              	elseif (t <= 1200.0)
                              		tmp = Float64(y - Float64(y * z));
                              	else
                              		tmp = Float64(-t);
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z, t)
                              	tmp = 0.0;
                              	if (t <= -125000.0)
                              		tmp = -t;
                              	elseif (t <= 1200.0)
                              		tmp = y - (y * z);
                              	else
                              		tmp = -t;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_, t_] := If[LessEqual[t, -125000.0], (-t), If[LessEqual[t, 1200.0], N[(y - N[(y * z), $MachinePrecision]), $MachinePrecision], (-t)]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;t \leq -125000:\\
                              \;\;\;\;-t\\
                              
                              \mathbf{elif}\;t \leq 1200:\\
                              \;\;\;\;y - y \cdot z\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;-t\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if t < -125000 or 1200 < t

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

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

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

                                if -125000 < t < 1200

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto y - \color{blue}{y \cdot z} \]
                                8. Recombined 2 regimes into one program.
                                9. Add Preprocessing

                                Alternative 15: 42.8% accurate, 11.3× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -125000:\\ \;\;\;\;-t\\ \mathbf{elif}\;t \leq 1200:\\ \;\;\;\;-y \cdot z\\ \mathbf{else}:\\ \;\;\;\;-t\\ \end{array} \end{array} \]
                                (FPCore (x y z t)
                                 :precision binary64
                                 (if (<= t -125000.0) (- t) (if (<= t 1200.0) (- (* y z)) (- t))))
                                double code(double x, double y, double z, double t) {
                                	double tmp;
                                	if (t <= -125000.0) {
                                		tmp = -t;
                                	} else if (t <= 1200.0) {
                                		tmp = -(y * z);
                                	} 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 <= (-125000.0d0)) then
                                        tmp = -t
                                    else if (t <= 1200.0d0) then
                                        tmp = -(y * z)
                                    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 <= -125000.0) {
                                		tmp = -t;
                                	} else if (t <= 1200.0) {
                                		tmp = -(y * z);
                                	} else {
                                		tmp = -t;
                                	}
                                	return tmp;
                                }
                                
                                def code(x, y, z, t):
                                	tmp = 0
                                	if t <= -125000.0:
                                		tmp = -t
                                	elif t <= 1200.0:
                                		tmp = -(y * z)
                                	else:
                                		tmp = -t
                                	return tmp
                                
                                function code(x, y, z, t)
                                	tmp = 0.0
                                	if (t <= -125000.0)
                                		tmp = Float64(-t);
                                	elseif (t <= 1200.0)
                                		tmp = Float64(-Float64(y * z));
                                	else
                                		tmp = Float64(-t);
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(x, y, z, t)
                                	tmp = 0.0;
                                	if (t <= -125000.0)
                                		tmp = -t;
                                	elseif (t <= 1200.0)
                                		tmp = -(y * z);
                                	else
                                		tmp = -t;
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[x_, y_, z_, t_] := If[LessEqual[t, -125000.0], (-t), If[LessEqual[t, 1200.0], (-N[(y * z), $MachinePrecision]), (-t)]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;t \leq -125000:\\
                                \;\;\;\;-t\\
                                
                                \mathbf{elif}\;t \leq 1200:\\
                                \;\;\;\;-y \cdot z\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;-t\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if t < -125000 or 1200 < t

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

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

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

                                  if -125000 < t < 1200

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -125000:\\ \;\;\;\;-t\\ \mathbf{elif}\;t \leq 1200:\\ \;\;\;\;-y \cdot z\\ \mathbf{else}:\\ \;\;\;\;-t\\ \end{array} \]
                                  10. Add Preprocessing

                                  Alternative 16: 46.2% accurate, 11.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 17: 45.9% accurate, 20.5× speedup?

                                    \[\begin{array}{l} \\ z \cdot \left(-y\right) - 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(z * Float64(-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}
                                    
                                    \\
                                    z \cdot \left(-y\right) - t
                                    \end{array}
                                    
                                    Derivation
                                    1. Initial program 91.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. Step-by-step derivation
                                      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \left(-1 \cdot y\right) \cdot z - t \]
                                    9. Step-by-step derivation
                                      1. Applied rewrites45.4%

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

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

                                      Alternative 18: 35.6% 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 91.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 t around inf

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

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

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

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

                                      Reproduce

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