Average Error: 26.6 → 0.2
Time: 1.4m
Precision: 64
Internal precision: 128
\[\left(x \cdot \log y + z \cdot \log \left(1.0 - y\right)\right) - t\]
\[\left(\log 1.0 \cdot z - \left(z \cdot y\right) \cdot \left(1.0 + 0.5 \cdot y\right)\right) - \left(t - \log y \cdot x\right)\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Target

Original26.6
Comparison14.4
Herbie0.2
\[ \left(-z\right) \cdot \left(\left(0.5 \cdot {y}^2 + y\right) + \frac{\frac{1}{3}}{1.0 \cdot \left(1.0 \cdot 1.0\right)} \cdot \left(y \cdot \left(y \cdot y\right)\right)\right) - \left(t - x \cdot \log y\right) \]

Derivation

  1. Initial program 26.6

    \[\left(x \cdot \log y + z \cdot \log \left(1.0 - y\right)\right) - t\]
  2. Applied taylor 5.1

    \[\leadsto \left(x \cdot \log y + \left(z \cdot \log 1.0 - \left(1.0 \cdot \left(z \cdot y\right) + 0.5 \cdot \left(z \cdot {y}^2\right)\right)\right)\right) - t\]
  3. Taylor expanded around 0 5.1

    \[\leadsto \left(x \cdot \log y + \color{blue}{\left(z \cdot \log 1.0 - \left(1.0 \cdot \left(z \cdot y\right) + 0.5 \cdot \left(z \cdot {y}^2\right)\right)\right)}\right) - t\]
  4. Applied simplify 0.2

    \[\leadsto \color{blue}{\left(\log 1.0 \cdot z - \left(z \cdot y\right) \cdot \left(1.0 + 0.5 \cdot y\right)\right) - \left(t - \log y \cdot x\right)}\]
  5. Removed slow pow expressions

Runtime

Time bar (total: 1.4m) Debug log

Please include this information when filing a bug report:

herbie --seed '#(2997442986 2322140460 2767214904 1133602409 1340772208 2511920086)'
(FPCore (x y z t)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, B"

  :target
  (- (* (- z) (+ (+ (* 0.5 (sqr y)) y) (* (/ 1/3 (* 1.0 (* 1.0 1.0))) (* y (* y y))))) (- t (* x (log y))))

  (- (+ (* x (log y)) (* z (log (- 1.0 y)))) t))