Average Error: 7.1 → 0.1
Time: 18.2s
Precision: binary64
Cost: 19968
\[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
\[\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), -1 + z, \log y \cdot \left(-1 + x\right) - t\right) \]
(FPCore (x y z t)
 :precision binary64
 (- (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y)))) t))
(FPCore (x y z t)
 :precision binary64
 (fma (log1p (- y)) (+ -1.0 z) (- (* (log y) (+ -1.0 x)) 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;
}
double code(double x, double y, double z, double t) {
	return fma(log1p(-y), (-1.0 + z), ((log(y) * (-1.0 + x)) - 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 code(x, y, z, t)
	return fma(log1p(Float64(-y)), Float64(-1.0 + z), Float64(Float64(log(y) * Float64(-1.0 + x)) - 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]
code[x_, y_, z_, t_] := N[(N[Log[1 + (-y)], $MachinePrecision] * N[(-1.0 + z), $MachinePrecision] + N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), -1 + z, \log y \cdot \left(-1 + x\right) - t\right)

Error

Derivation

  1. Initial program 7.1

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  2. Simplified0.1

    \[\leadsto \color{blue}{\left(x + -1\right) \cdot \log y - \mathsf{fma}\left(\mathsf{log1p}\left(-y\right), 1 - z, t\right)} \]
    Proof
    (-.f64 (*.f64 (+.f64 x -1) (log.f64 y)) (fma.f64 (log1p.f64 (neg.f64 y)) (-.f64 1 z) t)): 0 points increase in error, 0 points decrease in error
    (-.f64 (*.f64 (+.f64 x (Rewrite<= metadata-eval (neg.f64 1))) (log.f64 y)) (fma.f64 (log1p.f64 (neg.f64 y)) (-.f64 1 z) t)): 0 points increase in error, 0 points decrease in error
    (-.f64 (*.f64 (Rewrite<= sub-neg_binary64 (-.f64 x 1)) (log.f64 y)) (fma.f64 (log1p.f64 (neg.f64 y)) (-.f64 1 z) t)): 0 points increase in error, 0 points decrease in error
    (-.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (fma.f64 (Rewrite<= log1p-def_binary64 (log.f64 (+.f64 1 (neg.f64 y)))) (-.f64 1 z) t)): 34 points increase in error, 0 points decrease in error
    (-.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (fma.f64 (log.f64 (Rewrite<= sub-neg_binary64 (-.f64 1 y))) (-.f64 1 z) t)): 0 points increase in error, 0 points decrease in error
    (-.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (fma.f64 (log.f64 (-.f64 1 y)) (Rewrite<= unsub-neg_binary64 (+.f64 1 (neg.f64 z))) t)): 0 points increase in error, 0 points decrease in error
    (-.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (fma.f64 (log.f64 (-.f64 1 y)) (Rewrite=> +-commutative_binary64 (+.f64 (neg.f64 z) 1)) t)): 0 points increase in error, 0 points decrease in error
    (-.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (fma.f64 (log.f64 (-.f64 1 y)) (+.f64 (Rewrite=> neg-sub0_binary64 (-.f64 0 z)) 1) t)): 0 points increase in error, 0 points decrease in error
    (-.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (fma.f64 (log.f64 (-.f64 1 y)) (Rewrite<= associate--r-_binary64 (-.f64 0 (-.f64 z 1))) t)): 0 points increase in error, 0 points decrease in error
    (-.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (fma.f64 (log.f64 (-.f64 1 y)) (Rewrite<= neg-sub0_binary64 (neg.f64 (-.f64 z 1))) t)): 0 points increase in error, 0 points decrease in error
    (-.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (fma.f64 (log.f64 (-.f64 1 y)) (neg.f64 (-.f64 z 1)) (Rewrite<= remove-double-neg_binary64 (neg.f64 (neg.f64 t))))): 0 points increase in error, 0 points decrease in error
    (-.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 (log.f64 (-.f64 1 y)) (neg.f64 (-.f64 z 1))) (neg.f64 t)))): 0 points increase in error, 0 points decrease in error
    (-.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (-.f64 (Rewrite<= *-commutative_binary64 (*.f64 (neg.f64 (-.f64 z 1)) (log.f64 (-.f64 1 y)))) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
    (-.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (-.f64 (*.f64 (Rewrite=> neg-sub0_binary64 (-.f64 0 (-.f64 z 1))) (log.f64 (-.f64 1 y))) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
    (-.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (-.f64 (*.f64 (Rewrite=> associate--r-_binary64 (+.f64 (-.f64 0 z) 1)) (log.f64 (-.f64 1 y))) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
    (-.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (-.f64 (*.f64 (+.f64 (Rewrite<= neg-sub0_binary64 (neg.f64 z)) 1) (log.f64 (-.f64 1 y))) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
    (-.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (-.f64 (Rewrite<= distribute-rgt1-in_binary64 (+.f64 (log.f64 (-.f64 1 y)) (*.f64 (neg.f64 z) (log.f64 (-.f64 1 y))))) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
    (-.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (-.f64 (Rewrite<= cancel-sign-sub-inv_binary64 (-.f64 (log.f64 (-.f64 1 y)) (*.f64 z (log.f64 (-.f64 1 y))))) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
    (-.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (-.f64 (-.f64 (log.f64 (-.f64 1 y)) (Rewrite<= *-commutative_binary64 (*.f64 (log.f64 (-.f64 1 y)) z))) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
    (-.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (Rewrite<= associate--r+_binary64 (-.f64 (log.f64 (-.f64 1 y)) (+.f64 (*.f64 (log.f64 (-.f64 1 y)) z) (neg.f64 t))))): 0 points increase in error, 0 points decrease in error
    (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (log.f64 (-.f64 1 y))) (+.f64 (*.f64 (log.f64 (-.f64 1 y)) z) (neg.f64 t)))): 0 points increase in error, 0 points decrease in error
    (+.f64 (-.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (Rewrite<= *-lft-identity_binary64 (*.f64 1 (log.f64 (-.f64 1 y))))) (+.f64 (*.f64 (log.f64 (-.f64 1 y)) z) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
    (+.f64 (Rewrite=> cancel-sign-sub-inv_binary64 (+.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (*.f64 (neg.f64 1) (log.f64 (-.f64 1 y))))) (+.f64 (*.f64 (log.f64 (-.f64 1 y)) z) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
    (+.f64 (+.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (Rewrite<= *-commutative_binary64 (*.f64 (log.f64 (-.f64 1 y)) (neg.f64 1)))) (+.f64 (*.f64 (log.f64 (-.f64 1 y)) z) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
    (Rewrite<= associate-+r+_binary64 (+.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (+.f64 (*.f64 (log.f64 (-.f64 1 y)) (neg.f64 1)) (+.f64 (*.f64 (log.f64 (-.f64 1 y)) z) (neg.f64 t))))): 0 points increase in error, 0 points decrease in error
    (+.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 (*.f64 (log.f64 (-.f64 1 y)) (neg.f64 1)) (*.f64 (log.f64 (-.f64 1 y)) z)) (neg.f64 t)))): 0 points increase in error, 0 points decrease in error
    (+.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (+.f64 (Rewrite<= distribute-lft-in_binary64 (*.f64 (log.f64 (-.f64 1 y)) (+.f64 (neg.f64 1) z))) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
    (+.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (+.f64 (*.f64 (log.f64 (-.f64 1 y)) (Rewrite<= +-commutative_binary64 (+.f64 z (neg.f64 1)))) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
    (+.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (+.f64 (*.f64 (log.f64 (-.f64 1 y)) (Rewrite<= sub-neg_binary64 (-.f64 z 1))) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
    (+.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (-.f64 z 1) (log.f64 (-.f64 1 y)))) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
    (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (*.f64 (-.f64 z 1) (log.f64 (-.f64 1 y)))) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
    (Rewrite<= sub-neg_binary64 (-.f64 (+.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (*.f64 (-.f64 z 1) (log.f64 (-.f64 1 y)))) t)): 0 points increase in error, 0 points decrease in error
  3. Taylor expanded in x around 0 7.1

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), -1 + z, \log y \cdot \left(-1 + x\right) - t\right)} \]
    Proof
    (fma.f64 (log1p.f64 (neg.f64 y)) (+.f64 -1 z) (-.f64 (*.f64 (log.f64 y) (+.f64 -1 x)) t)): 0 points increase in error, 0 points decrease in error
    (fma.f64 (Rewrite<= log1p-def_binary64 (log.f64 (+.f64 1 (neg.f64 y)))) (+.f64 -1 z) (-.f64 (*.f64 (log.f64 y) (+.f64 -1 x)) t)): 34 points increase in error, 0 points decrease in error
    (fma.f64 (log.f64 (Rewrite<= sub-neg_binary64 (-.f64 1 y))) (+.f64 -1 z) (-.f64 (*.f64 (log.f64 y) (+.f64 -1 x)) t)): 0 points increase in error, 0 points decrease in error
    (fma.f64 (log.f64 (-.f64 1 y)) (+.f64 (Rewrite<= metadata-eval (-.f64 0 1)) z) (-.f64 (*.f64 (log.f64 y) (+.f64 -1 x)) t)): 0 points increase in error, 0 points decrease in error
    (fma.f64 (log.f64 (-.f64 1 y)) (+.f64 (-.f64 (Rewrite<= metadata-eval (log.f64 1)) 1) z) (-.f64 (*.f64 (log.f64 y) (+.f64 -1 x)) t)): 0 points increase in error, 0 points decrease in error
    (fma.f64 (log.f64 (-.f64 1 y)) (Rewrite<= associate--r-_binary64 (-.f64 (log.f64 1) (-.f64 1 z))) (-.f64 (*.f64 (log.f64 y) (+.f64 -1 x)) t)): 0 points increase in error, 0 points decrease in error
    (fma.f64 (log.f64 (-.f64 1 y)) (-.f64 (Rewrite=> metadata-eval 0) (-.f64 1 z)) (-.f64 (*.f64 (log.f64 y) (+.f64 -1 x)) t)): 0 points increase in error, 0 points decrease in error
    (fma.f64 (log.f64 (-.f64 1 y)) (Rewrite<= neg-sub0_binary64 (neg.f64 (-.f64 1 z))) (-.f64 (*.f64 (log.f64 y) (+.f64 -1 x)) t)): 0 points increase in error, 0 points decrease in error
    (fma.f64 (log.f64 (-.f64 1 y)) (Rewrite=> neg-mul-1_binary64 (*.f64 -1 (-.f64 1 z))) (-.f64 (*.f64 (log.f64 y) (+.f64 -1 x)) t)): 0 points increase in error, 0 points decrease in error
    (fma.f64 (log.f64 (-.f64 1 y)) (*.f64 -1 (-.f64 1 z)) (-.f64 (Rewrite<= distribute-rgt-out_binary64 (+.f64 (*.f64 -1 (log.f64 y)) (*.f64 x (log.f64 y)))) t)): 0 points increase in error, 1 points decrease in error
    (fma.f64 (log.f64 (-.f64 1 y)) (*.f64 -1 (-.f64 1 z)) (-.f64 (+.f64 (*.f64 -1 (log.f64 y)) (Rewrite<= *-commutative_binary64 (*.f64 (log.f64 y) x))) t)): 0 points increase in error, 0 points decrease in error
    (fma.f64 (log.f64 (-.f64 1 y)) (*.f64 -1 (-.f64 1 z)) (-.f64 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 (log.f64 y) x) (*.f64 -1 (log.f64 y)))) t)): 0 points increase in error, 0 points decrease in error
    (fma.f64 (log.f64 (-.f64 1 y)) (*.f64 -1 (-.f64 1 z)) (Rewrite=> sub-neg_binary64 (+.f64 (+.f64 (*.f64 (log.f64 y) x) (*.f64 -1 (log.f64 y))) (neg.f64 t)))): 0 points increase in error, 0 points decrease in error
    (fma.f64 (log.f64 (-.f64 1 y)) (*.f64 -1 (-.f64 1 z)) (+.f64 (+.f64 (Rewrite=> *-commutative_binary64 (*.f64 x (log.f64 y))) (*.f64 -1 (log.f64 y))) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
    (fma.f64 (log.f64 (-.f64 1 y)) (*.f64 -1 (-.f64 1 z)) (+.f64 (Rewrite=> distribute-rgt-out_binary64 (*.f64 (log.f64 y) (+.f64 x -1))) (neg.f64 t))): 1 points increase in error, 0 points decrease in error
    (fma.f64 (log.f64 (-.f64 1 y)) (*.f64 -1 (-.f64 1 z)) (+.f64 (*.f64 (log.f64 y) (+.f64 x (Rewrite<= metadata-eval (neg.f64 1)))) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
    (fma.f64 (log.f64 (-.f64 1 y)) (*.f64 -1 (-.f64 1 z)) (+.f64 (*.f64 (log.f64 y) (Rewrite<= sub-neg_binary64 (-.f64 x 1))) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
    (fma.f64 (log.f64 (-.f64 1 y)) (*.f64 -1 (-.f64 1 z)) (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (-.f64 x 1) (log.f64 y))) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
    (fma.f64 (log.f64 (-.f64 1 y)) (*.f64 -1 (-.f64 1 z)) (Rewrite<= +-commutative_binary64 (+.f64 (neg.f64 t) (*.f64 (-.f64 x 1) (log.f64 y))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 (log.f64 (-.f64 1 y)) (*.f64 -1 (-.f64 1 z)) (+.f64 (Rewrite<= mul-1-neg_binary64 (*.f64 -1 t)) (*.f64 (-.f64 x 1) (log.f64 y)))): 0 points increase in error, 0 points decrease in error
    (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (log.f64 (-.f64 1 y)) (*.f64 -1 (-.f64 1 z))) (+.f64 (*.f64 -1 t) (*.f64 (-.f64 x 1) (log.f64 y))))): 0 points increase in error, 0 points decrease in error
    (+.f64 (*.f64 (log.f64 (-.f64 1 y)) (Rewrite<= neg-mul-1_binary64 (neg.f64 (-.f64 1 z)))) (+.f64 (*.f64 -1 t) (*.f64 (-.f64 x 1) (log.f64 y)))): 0 points increase in error, 0 points decrease in error
    (+.f64 (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 (log.f64 (-.f64 1 y)) (-.f64 1 z)))) (+.f64 (*.f64 -1 t) (*.f64 (-.f64 x 1) (log.f64 y)))): 0 points increase in error, 0 points decrease in error
    (+.f64 (neg.f64 (Rewrite<= *-commutative_binary64 (*.f64 (-.f64 1 z) (log.f64 (-.f64 1 y))))) (+.f64 (*.f64 -1 t) (*.f64 (-.f64 x 1) (log.f64 y)))): 0 points increase in error, 0 points decrease in error
    (Rewrite<= +-commutative_binary64 (+.f64 (+.f64 (*.f64 -1 t) (*.f64 (-.f64 x 1) (log.f64 y))) (neg.f64 (*.f64 (-.f64 1 z) (log.f64 (-.f64 1 y)))))): 0 points increase in error, 0 points decrease in error
    (Rewrite<= sub-neg_binary64 (-.f64 (+.f64 (*.f64 -1 t) (*.f64 (-.f64 x 1) (log.f64 y))) (*.f64 (-.f64 1 z) (log.f64 (-.f64 1 y))))): 0 points increase in error, 0 points decrease in error
    (-.f64 (+.f64 (Rewrite=> mul-1-neg_binary64 (neg.f64 t)) (*.f64 (-.f64 x 1) (log.f64 y))) (*.f64 (-.f64 1 z) (log.f64 (-.f64 1 y)))): 0 points increase in error, 0 points decrease in error
    (-.f64 (Rewrite=> +-commutative_binary64 (+.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (neg.f64 t))) (*.f64 (-.f64 1 z) (log.f64 (-.f64 1 y)))): 0 points increase in error, 0 points decrease in error
    (-.f64 (Rewrite<= sub-neg_binary64 (-.f64 (*.f64 (-.f64 x 1) (log.f64 y)) t)) (*.f64 (-.f64 1 z) (log.f64 (-.f64 1 y)))): 0 points increase in error, 0 points decrease in error
    (Rewrite=> associate--l-_binary64 (-.f64 (*.f64 (-.f64 x 1) (log.f64 y)) (+.f64 t (*.f64 (-.f64 1 z) (log.f64 (-.f64 1 y)))))): 0 points increase in error, 0 points decrease in error
    (-.f64 (Rewrite=> *-commutative_binary64 (*.f64 (log.f64 y) (-.f64 x 1))) (+.f64 t (*.f64 (-.f64 1 z) (log.f64 (-.f64 1 y))))): 0 points increase in error, 0 points decrease in error
    (-.f64 (*.f64 (log.f64 y) (Rewrite=> sub-neg_binary64 (+.f64 x (neg.f64 1)))) (+.f64 t (*.f64 (-.f64 1 z) (log.f64 (-.f64 1 y))))): 0 points increase in error, 0 points decrease in error
    (-.f64 (*.f64 (log.f64 y) (+.f64 x (Rewrite=> metadata-eval -1))) (+.f64 t (*.f64 (-.f64 1 z) (log.f64 (-.f64 1 y))))): 0 points increase in error, 0 points decrease in error
    (-.f64 (Rewrite<= distribute-rgt-out_binary64 (+.f64 (*.f64 x (log.f64 y)) (*.f64 -1 (log.f64 y)))) (+.f64 t (*.f64 (-.f64 1 z) (log.f64 (-.f64 1 y))))): 0 points increase in error, 1 points decrease in error
    (-.f64 (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (log.f64 y) x)) (*.f64 -1 (log.f64 y))) (+.f64 t (*.f64 (-.f64 1 z) (log.f64 (-.f64 1 y))))): 0 points increase in error, 0 points decrease in error
  5. Final simplification0.1

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

Alternatives

Alternative 1
Error0.2
Cost8128
\[\left(\log y \cdot \left(-1 + x\right) + \left(-1 + z\right) \cdot \left(\left(y \cdot y\right) \cdot \left(-0.5 + y \cdot \left(-0.3333333333333333 + y \cdot -0.25\right)\right) - y\right)\right) - t \]
Alternative 2
Error0.3
Cost7872
\[\left(\log y \cdot \left(-1 + x\right) + \left(-1 + z\right) \cdot \left(\left(y \cdot y\right) \cdot \left(-0.5 + y \cdot -0.3333333333333333\right) - y\right)\right) - t \]
Alternative 3
Error3.5
Cost7496
\[\begin{array}{l} \mathbf{if}\;-1 + x \leq -1 \cdot 10^{+40}:\\ \;\;\;\;\log y \cdot x - t\\ \mathbf{elif}\;-1 + x \leq -1:\\ \;\;\;\;\left(\left(y - y \cdot z\right) - \log y\right) - t\\ \mathbf{else}:\\ \;\;\;\;\left(y + \log y \cdot \left(-1 + x\right)\right) - t\\ \end{array} \]
Alternative 4
Error0.5
Cost7488
\[\left(\log y \cdot \left(-1 + x\right) + \left(-1 + y \cdot -0.5\right) \cdot \left(y \cdot z\right)\right) - t \]
Alternative 5
Error2.7
Cost7368
\[\begin{array}{l} t_1 := \log y \cdot \left(-1 + x\right)\\ t_2 := y + t_1\\ \mathbf{if}\;t \leq -6.739339947041853 \cdot 10^{-9}:\\ \;\;\;\;t_1 - t\\ \mathbf{elif}\;t \leq 1.932986524217917 \cdot 10^{-5}:\\ \;\;\;\;t_2 - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t_2 - t\\ \end{array} \]
Alternative 6
Error16.3
Cost7252
\[\begin{array}{l} t_1 := \log y \cdot x\\ \mathbf{if}\;x \leq -1.6088301871447675 \cdot 10^{+80}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -6.935641750646083 \cdot 10^{-32}:\\ \;\;\;\;y \cdot \left(z \cdot \left(y \cdot -0.5\right) - z\right) - t\\ \mathbf{elif}\;x \leq 133427333.80202834:\\ \;\;\;\;\left(-\log y\right) - t\\ \mathbf{elif}\;x \leq 1.423226789180097 \cdot 10^{+93}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 9.877097171280746 \cdot 10^{+133}:\\ \;\;\;\;\left(-t\right) - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error0.6
Cost7232
\[\left(\log y \cdot \left(-1 + x\right) + \left(y - y \cdot z\right)\right) - t \]
Alternative 8
Error22.6
Cost7120
\[\begin{array}{l} t_1 := \log y \cdot x\\ \mathbf{if}\;x \leq -1.6088301871447675 \cdot 10^{+80}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 133427333.80202834:\\ \;\;\;\;y \cdot \left(z \cdot \left(y \cdot -0.5\right) - z\right) - t\\ \mathbf{elif}\;x \leq 1.423226789180097 \cdot 10^{+93}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 9.877097171280746 \cdot 10^{+133}:\\ \;\;\;\;\left(-t\right) - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error9.1
Cost7116
\[\begin{array}{l} t_1 := \log y \cdot x - t\\ \mathbf{if}\;x \leq -1.906552796828781 \cdot 10^{+40}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -6.935641750646083 \cdot 10^{-32}:\\ \;\;\;\;y \cdot \left(z \cdot \left(y \cdot -0.5\right) - z\right) - t\\ \mathbf{elif}\;x \leq 0.011357516069058729:\\ \;\;\;\;\left(-\log y\right) - t\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error7.2
Cost7108
\[\begin{array}{l} \mathbf{if}\;z \leq 5.251604465123984 \cdot 10^{+234}:\\ \;\;\;\;\left(y + \log y \cdot \left(-1 + x\right)\right) - t\\ \mathbf{else}:\\ \;\;\;\;\left(-t\right) - y \cdot z\\ \end{array} \]
Alternative 11
Error7.3
Cost6980
\[\begin{array}{l} \mathbf{if}\;z \leq 5.251604465123984 \cdot 10^{+234}:\\ \;\;\;\;\log y \cdot \left(-1 + x\right) - t\\ \mathbf{else}:\\ \;\;\;\;\left(-t\right) - y \cdot z\\ \end{array} \]
Alternative 12
Error34.6
Cost704
\[y \cdot \left(z \cdot \left(y \cdot -0.5\right) - z\right) - t \]
Alternative 13
Error34.7
Cost448
\[y \cdot \left(1 - z\right) - t \]
Alternative 14
Error34.8
Cost384
\[\left(-t\right) - y \cdot z \]
Alternative 15
Error41.7
Cost128
\[-t \]

Error

Reproduce

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