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

Percentage Accurate: 89.5% → 99.8%
Time: 14.4s
Alternatives: 15
Speedup: 1.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 89.5% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 93.1% accurate, 0.4× speedup?

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

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

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

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


\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) < 40 or 624.5 < (-.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 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. Step-by-step derivation
      1. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(x - 1, \log y, y - \color{blue}{t}\right) \]
    9. Step-by-step derivation
      1. Applied rewrites95.9%

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

      if 40 < (-.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) < 624.5

      1. Initial program 68.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 3: 95.8% accurate, 1.7× speedup?

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

          1. Initial program 96.7%

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(x - 1, \color{blue}{\log y}, \mathsf{neg}\left(t\right)\right) \]
            6. lower-neg.f6496.7

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

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

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

          1. Initial program 85.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. 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-/.f6485.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(x - 1, \log y, y - \color{blue}{t}\right) \]
            9. Step-by-step derivation
              1. Applied rewrites94.0%

                \[\leadsto \mathsf{fma}\left(x - 1, \log y, y - \color{blue}{t}\right) \]
            10. Recombined 3 regimes into one program.
            11. Add Preprocessing

            Alternative 4: 96.7% accurate, 1.8× speedup?

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

              1. Initial program 96.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -4.3e8 < t < 2.0000000000000001e-27

                1. Initial program 83.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 2.0000000000000001e-27 < t

                  1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(x - 1, \log y, y - \color{blue}{t}\right) \]
                  9. Step-by-step derivation
                    1. Applied rewrites97.4%

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

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

                  Alternative 5: 95.7% accurate, 1.8× speedup?

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

                    1. Initial program 96.7%

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(x - 1, \color{blue}{\log y}, \mathsf{neg}\left(t\right)\right) \]
                      6. lower-neg.f6496.7

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

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

                    if -1.19999999999999994e-12 < t < 2.0000000000000001e-27

                    1. Initial program 82.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 2.0000000000000001e-27 < t

                      1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(x - 1, \log y, y - \color{blue}{t}\right) \]
                      9. Step-by-step derivation
                        1. Applied rewrites97.4%

                          \[\leadsto \mathsf{fma}\left(x - 1, \log y, y - \color{blue}{t}\right) \]
                      10. Recombined 3 regimes into one program.
                      11. Final simplification98.1%

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

                      Alternative 6: 66.1% accurate, 1.8× speedup?

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

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

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

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

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

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

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

                        1. Initial program 86.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 7: 89.6% accurate, 1.9× speedup?

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

                          1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(x - 1, \log y, y - \color{blue}{t}\right) \]
                          9. Step-by-step derivation
                            1. Applied rewrites94.0%

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

                            if 2.0000000000000001e206 < (-.f64 z #s(literal 1 binary64))

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

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

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

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

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

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

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

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

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

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

                            Alternative 8: 77.6% accurate, 1.9× speedup?

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

                              1. Initial program 95.1%

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

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

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

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

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

                              if -1.65999999999999999e-6 < x < 11.5

                              1. Initial program 85.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(-y, \color{blue}{z}, y\right) - t \]
                              10. Recombined 2 regimes into one program.
                              11. Final simplification79.1%

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

                              Alternative 9: 89.4% accurate, 1.9× speedup?

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

                                1. Initial program 94.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. sub-negN/A

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(x - 1, \color{blue}{\log y}, \mathsf{neg}\left(t\right)\right) \]
                                  6. lower-neg.f6493.8

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

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

                                if 2.0000000000000001e206 < (-.f64 z #s(literal 1 binary64))

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

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

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

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

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

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

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

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

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

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

                                Alternative 10: 99.2% accurate, 1.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 11: 99.2% accurate, 1.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 12: 43.4% accurate, 11.3× speedup?

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

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

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

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

                                  if -115000 < t < 62000

                                  1. Initial program 84.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. 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-/.f6483.9

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -115000:\\ \;\;\;\;-t\\ \mathbf{elif}\;t \leq 62000:\\ \;\;\;\;\left(-y\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;-t\\ \end{array} \]
                                  12. Add Preprocessing

                                  Alternative 13: 46.4% accurate, 18.8× speedup?

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

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

                                      \[\leadsto \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-/.f6490.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 14: 46.2% accurate, 20.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

                                      Alternative 15: 36.2% accurate, 75.3× speedup?

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

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

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

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

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

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

                                      Reproduce

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