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

Percentage Accurate: 89.0% → 99.5%
Time: 12.0s
Alternatives: 14
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 14 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.0% 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.5% accurate, 1.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

    Alternative 2: 86.4% accurate, 0.3× speedup?

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

      1. Initial program 94.7%

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

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

          \[\leadsto \color{blue}{\log y \cdot x} - t \]
        2. remove-double-negN/A

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

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

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

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

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

          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log y\right)\right)}\right)\right) \cdot x - t \]
        8. remove-double-negN/A

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

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

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

      if -5e10 < (+.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)))) < 165.69999999999999

      1. Initial program 57.5%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(1 - z\right) \cdot y - t \]

          if 165.69999999999999 < (+.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)))) < 1e11

          1. Initial program 88.2%

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

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

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

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

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

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

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

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

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

              \[\leadsto -1 \cdot \log y - t \]
            3. Step-by-step derivation
              1. Applied rewrites86.6%

                \[\leadsto \left(-\log y\right) - t \]
            4. Recombined 3 regimes into one program.
            5. Add Preprocessing

            Alternative 3: 95.1% accurate, 1.7× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x - 1 \leq -100000000000 \lor \neg \left(x - 1 \leq 5000000\right):\\ \;\;\;\;\left(-1 + x\right) \cdot \log y - t\\ \mathbf{else}:\\ \;\;\;\;\left(-\mathsf{fma}\left(z - 1, y, \log y\right)\right) - t\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (if (or (<= (- x 1.0) -100000000000.0) (not (<= (- x 1.0) 5000000.0)))
               (- (* (+ -1.0 x) (log y)) t)
               (- (- (fma (- z 1.0) y (log y))) t)))
            double code(double x, double y, double z, double t) {
            	double tmp;
            	if (((x - 1.0) <= -100000000000.0) || !((x - 1.0) <= 5000000.0)) {
            		tmp = ((-1.0 + x) * log(y)) - t;
            	} else {
            		tmp = -fma((z - 1.0), y, log(y)) - t;
            	}
            	return tmp;
            }
            
            function code(x, y, z, t)
            	tmp = 0.0
            	if ((Float64(x - 1.0) <= -100000000000.0) || !(Float64(x - 1.0) <= 5000000.0))
            		tmp = Float64(Float64(Float64(-1.0 + x) * log(y)) - t);
            	else
            		tmp = Float64(Float64(-fma(Float64(z - 1.0), y, log(y))) - t);
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x - 1.0), $MachinePrecision], -100000000000.0], N[Not[LessEqual[N[(x - 1.0), $MachinePrecision], 5000000.0]], $MachinePrecision]], N[(N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[((-N[(N[(z - 1.0), $MachinePrecision] * y + N[Log[y], $MachinePrecision]), $MachinePrecision]) - t), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x - 1 \leq -100000000000 \lor \neg \left(x - 1 \leq 5000000\right):\\
            \;\;\;\;\left(-1 + x\right) \cdot \log y - t\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(-\mathsf{fma}\left(z - 1, y, \log y\right)\right) - t\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (-.f64 x #s(literal 1 binary64)) < -1e11 or 5e6 < (-.f64 x #s(literal 1 binary64))

              1. Initial program 95.2%

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

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

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

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

                  \[\leadsto \color{blue}{\left(-1 \cdot \log \left(\frac{1}{y}\right)\right)} \cdot \left(x - 1\right) - t \]
                4. distribute-rgt-out--N/A

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

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

                  \[\leadsto \left(x \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log y\right)\right)}\right)\right) - 1 \cdot \left(-1 \cdot \log \left(\frac{1}{y}\right)\right)\right) - t \]
                7. remove-double-negN/A

                  \[\leadsto \left(x \cdot \color{blue}{\log y} - 1 \cdot \left(-1 \cdot \log \left(\frac{1}{y}\right)\right)\right) - t \]
                8. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              1. Initial program 79.5%

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

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

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

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

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

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

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

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

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

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

              Alternative 4: 99.5% accurate, 1.7× speedup?

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

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

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

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

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

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

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

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

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

              Alternative 5: 89.5% accurate, 1.7× speedup?

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

                1. Initial program 38.2%

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

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

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

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

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

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

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

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

                    \[\leadsto \left(-y\right) \cdot z - t \]

                  if -1.00000000000000002e198 < (-.f64 z #s(literal 1 binary64)) < 9.99999999999999899e164

                  1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

                    if 9.99999999999999899e164 < (-.f64 z #s(literal 1 binary64))

                    1. Initial program 53.3%

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

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

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

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

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

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

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

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

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

                    Alternative 6: 89.4% accurate, 1.7× speedup?

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

                      1. Initial program 38.2%

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

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

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

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

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

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

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

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

                          \[\leadsto \left(-y\right) \cdot z - t \]

                        if -1.00000000000000002e198 < (-.f64 z #s(literal 1 binary64)) < 9.99999999999999899e164

                        1. Initial program 96.3%

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

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

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

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

                            \[\leadsto \color{blue}{\left(-1 \cdot \log \left(\frac{1}{y}\right)\right)} \cdot \left(x - 1\right) - t \]
                          4. distribute-rgt-out--N/A

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

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

                            \[\leadsto \left(x \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log y\right)\right)}\right)\right) - 1 \cdot \left(-1 \cdot \log \left(\frac{1}{y}\right)\right)\right) - t \]
                          7. remove-double-negN/A

                            \[\leadsto \left(x \cdot \color{blue}{\log y} - 1 \cdot \left(-1 \cdot \log \left(\frac{1}{y}\right)\right)\right) - t \]
                          8. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 9.99999999999999899e164 < (-.f64 z #s(literal 1 binary64))

                        1. Initial program 53.3%

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

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

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

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

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

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

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

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

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

                        Alternative 7: 74.0% accurate, 1.8× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x - 1 \leq -5 \cdot 10^{+131} \lor \neg \left(x - 1 \leq 5 \cdot 10^{+14}\right):\\ \;\;\;\;\log y \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(-\log y\right) - t\\ \end{array} \end{array} \]
                        (FPCore (x y z t)
                         :precision binary64
                         (if (or (<= (- x 1.0) -5e+131) (not (<= (- x 1.0) 5e+14)))
                           (* (log y) x)
                           (- (- (log y)) t)))
                        double code(double x, double y, double z, double t) {
                        	double tmp;
                        	if (((x - 1.0) <= -5e+131) || !((x - 1.0) <= 5e+14)) {
                        		tmp = log(y) * x;
                        	} else {
                        		tmp = -log(y) - t;
                        	}
                        	return tmp;
                        }
                        
                        real(8) function code(x, y, z, t)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            real(8), intent (in) :: z
                            real(8), intent (in) :: t
                            real(8) :: tmp
                            if (((x - 1.0d0) <= (-5d+131)) .or. (.not. ((x - 1.0d0) <= 5d+14))) then
                                tmp = log(y) * x
                            else
                                tmp = -log(y) - t
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double x, double y, double z, double t) {
                        	double tmp;
                        	if (((x - 1.0) <= -5e+131) || !((x - 1.0) <= 5e+14)) {
                        		tmp = Math.log(y) * x;
                        	} else {
                        		tmp = -Math.log(y) - t;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t):
                        	tmp = 0
                        	if ((x - 1.0) <= -5e+131) or not ((x - 1.0) <= 5e+14):
                        		tmp = math.log(y) * x
                        	else:
                        		tmp = -math.log(y) - t
                        	return tmp
                        
                        function code(x, y, z, t)
                        	tmp = 0.0
                        	if ((Float64(x - 1.0) <= -5e+131) || !(Float64(x - 1.0) <= 5e+14))
                        		tmp = Float64(log(y) * x);
                        	else
                        		tmp = Float64(Float64(-log(y)) - t);
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t)
                        	tmp = 0.0;
                        	if (((x - 1.0) <= -5e+131) || ~(((x - 1.0) <= 5e+14)))
                        		tmp = log(y) * x;
                        	else
                        		tmp = -log(y) - t;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x - 1.0), $MachinePrecision], -5e+131], N[Not[LessEqual[N[(x - 1.0), $MachinePrecision], 5e+14]], $MachinePrecision]], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision], N[((-N[Log[y], $MachinePrecision]) - t), $MachinePrecision]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;x - 1 \leq -5 \cdot 10^{+131} \lor \neg \left(x - 1 \leq 5 \cdot 10^{+14}\right):\\
                        \;\;\;\;\log y \cdot x\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\left(-\log y\right) - t\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if (-.f64 x #s(literal 1 binary64)) < -4.99999999999999995e131 or 5e14 < (-.f64 x #s(literal 1 binary64))

                          1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -4.99999999999999995e131 < (-.f64 x #s(literal 1 binary64)) < 5e14

                          1. Initial program 82.3%

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

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

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

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

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

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

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

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

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

                              \[\leadsto -1 \cdot \log y - t \]
                            3. Step-by-step derivation
                              1. Applied rewrites72.8%

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

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

                            Alternative 8: 74.3% accurate, 1.9× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4 \cdot 10^{+128} \lor \neg \left(x \leq 2.1 \cdot 10^{+16}\right):\\ \;\;\;\;\log y \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(-\left(\log y - y\right)\right) - t\\ \end{array} \end{array} \]
                            (FPCore (x y z t)
                             :precision binary64
                             (if (or (<= x -4e+128) (not (<= x 2.1e+16)))
                               (* (log y) x)
                               (- (- (- (log y) y)) t)))
                            double code(double x, double y, double z, double t) {
                            	double tmp;
                            	if ((x <= -4e+128) || !(x <= 2.1e+16)) {
                            		tmp = log(y) * x;
                            	} else {
                            		tmp = -(log(y) - y) - t;
                            	}
                            	return tmp;
                            }
                            
                            real(8) function code(x, y, z, t)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                real(8), intent (in) :: z
                                real(8), intent (in) :: t
                                real(8) :: tmp
                                if ((x <= (-4d+128)) .or. (.not. (x <= 2.1d+16))) then
                                    tmp = log(y) * x
                                else
                                    tmp = -(log(y) - y) - t
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y, double z, double t) {
                            	double tmp;
                            	if ((x <= -4e+128) || !(x <= 2.1e+16)) {
                            		tmp = Math.log(y) * x;
                            	} else {
                            		tmp = -(Math.log(y) - y) - t;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t):
                            	tmp = 0
                            	if (x <= -4e+128) or not (x <= 2.1e+16):
                            		tmp = math.log(y) * x
                            	else:
                            		tmp = -(math.log(y) - y) - t
                            	return tmp
                            
                            function code(x, y, z, t)
                            	tmp = 0.0
                            	if ((x <= -4e+128) || !(x <= 2.1e+16))
                            		tmp = Float64(log(y) * x);
                            	else
                            		tmp = Float64(Float64(-Float64(log(y) - y)) - t);
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t)
                            	tmp = 0.0;
                            	if ((x <= -4e+128) || ~((x <= 2.1e+16)))
                            		tmp = log(y) * x;
                            	else
                            		tmp = -(log(y) - y) - t;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_] := If[Or[LessEqual[x, -4e+128], N[Not[LessEqual[x, 2.1e+16]], $MachinePrecision]], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision], N[((-N[(N[Log[y], $MachinePrecision] - y), $MachinePrecision]) - t), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;x \leq -4 \cdot 10^{+128} \lor \neg \left(x \leq 2.1 \cdot 10^{+16}\right):\\
                            \;\;\;\;\log y \cdot x\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\left(-\left(\log y - y\right)\right) - t\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if x < -4.0000000000000003e128 or 2.1e16 < x

                              1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if -4.0000000000000003e128 < x < 2.1e16

                              1. Initial program 82.3%

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \left(-\left(\log y + -1 \cdot y\right)\right) - t \]
                                3. Step-by-step derivation
                                  1. Applied rewrites73.0%

                                    \[\leadsto \left(-\left(\log y - y\right)\right) - t \]
                                4. Recombined 2 regimes into one program.
                                5. Final simplification75.6%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4 \cdot 10^{+128} \lor \neg \left(x \leq 2.1 \cdot 10^{+16}\right):\\ \;\;\;\;\log y \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(-\left(\log y - y\right)\right) - t\\ \end{array} \]
                                6. Add Preprocessing

                                Alternative 9: 99.1% accurate, 1.9× speedup?

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

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

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

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

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

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

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

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

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

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

                                  Alternative 10: 64.5% accurate, 1.9× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4 \cdot 10^{+128} \lor \neg \left(x \leq 3.1 \cdot 10^{+17}\right):\\ \;\;\;\;\log y \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(1 - z\right) \cdot y - t\\ \end{array} \end{array} \]
                                  (FPCore (x y z t)
                                   :precision binary64
                                   (if (or (<= x -4e+128) (not (<= x 3.1e+17)))
                                     (* (log y) x)
                                     (- (* (- 1.0 z) y) t)))
                                  double code(double x, double y, double z, double t) {
                                  	double tmp;
                                  	if ((x <= -4e+128) || !(x <= 3.1e+17)) {
                                  		tmp = log(y) * x;
                                  	} else {
                                  		tmp = ((1.0 - z) * y) - t;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  real(8) function code(x, y, z, t)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      real(8), intent (in) :: z
                                      real(8), intent (in) :: t
                                      real(8) :: tmp
                                      if ((x <= (-4d+128)) .or. (.not. (x <= 3.1d+17))) then
                                          tmp = log(y) * x
                                      else
                                          tmp = ((1.0d0 - z) * y) - t
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double x, double y, double z, double t) {
                                  	double tmp;
                                  	if ((x <= -4e+128) || !(x <= 3.1e+17)) {
                                  		tmp = Math.log(y) * x;
                                  	} else {
                                  		tmp = ((1.0 - z) * y) - t;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x, y, z, t):
                                  	tmp = 0
                                  	if (x <= -4e+128) or not (x <= 3.1e+17):
                                  		tmp = math.log(y) * x
                                  	else:
                                  		tmp = ((1.0 - z) * y) - t
                                  	return tmp
                                  
                                  function code(x, y, z, t)
                                  	tmp = 0.0
                                  	if ((x <= -4e+128) || !(x <= 3.1e+17))
                                  		tmp = Float64(log(y) * x);
                                  	else
                                  		tmp = Float64(Float64(Float64(1.0 - z) * y) - t);
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x, y, z, t)
                                  	tmp = 0.0;
                                  	if ((x <= -4e+128) || ~((x <= 3.1e+17)))
                                  		tmp = log(y) * x;
                                  	else
                                  		tmp = ((1.0 - z) * y) - t;
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[x_, y_, z_, t_] := If[Or[LessEqual[x, -4e+128], N[Not[LessEqual[x, 3.1e+17]], $MachinePrecision]], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision], N[(N[(N[(1.0 - z), $MachinePrecision] * y), $MachinePrecision] - t), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;x \leq -4 \cdot 10^{+128} \lor \neg \left(x \leq 3.1 \cdot 10^{+17}\right):\\
                                  \;\;\;\;\log y \cdot x\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\left(1 - z\right) \cdot y - t\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if x < -4.0000000000000003e128 or 3.1e17 < x

                                    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if -4.0000000000000003e128 < x < 3.1e17

                                    1. Initial program 82.3%

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \left(1 - z\right) \cdot y - t \]
                                      4. Recombined 2 regimes into one program.
                                      5. Final simplification64.4%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4 \cdot 10^{+128} \lor \neg \left(x \leq 3.1 \cdot 10^{+17}\right):\\ \;\;\;\;\log y \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(1 - z\right) \cdot y - t\\ \end{array} \]
                                      6. Add Preprocessing

                                      Alternative 11: 45.7% accurate, 18.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

                                          Alternative 12: 45.5% 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 87.3%

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

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

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

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

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

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

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

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

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

                                            Alternative 13: 35.3% accurate, 28.3× speedup?

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \left(-\left(\log y + -1 \cdot y\right)\right) - t \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites52.4%

                                                  \[\leadsto \left(-\left(\log y - y\right)\right) - t \]
                                                2. Taylor expanded in y around inf

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

                                                    \[\leadsto \left(-\left(-y\right)\right) - t \]
                                                  2. Add Preprocessing

                                                  Alternative 14: 35.0% accurate, 75.3× speedup?

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

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

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

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

                                                  Reproduce

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