Average Error: 7.8 → 4.7
Time: 12.2s
Precision: 64
Internal Precision: 128
\[\frac{x0}{1 - x1} - x0\]
\[\frac{\log \left(e^{\left(\frac{1}{1 - x1} \cdot x0\right) \cdot \frac{x0}{1 - x1} - x0 \cdot x0}\right)}{x0 + \frac{x0}{1 - x1}}\]

Error

Bits error versus x0

Bits error versus x1

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original7.8
Target0.3
Herbie4.7
\[\frac{x0 \cdot x1}{1 - x1}\]

Derivation

  1. Initial program 7.8

    \[\frac{x0}{1 - x1} - x0\]
  2. Using strategy rm
  3. Applied flip--7.2

    \[\leadsto \color{blue}{\frac{\frac{x0}{1 - x1} \cdot \frac{x0}{1 - x1} - x0 \cdot x0}{\frac{x0}{1 - x1} + x0}}\]
  4. Using strategy rm
  5. Applied div-inv5.6

    \[\leadsto \frac{\color{blue}{\left(x0 \cdot \frac{1}{1 - x1}\right)} \cdot \frac{x0}{1 - x1} - x0 \cdot x0}{\frac{x0}{1 - x1} + x0}\]
  6. Using strategy rm
  7. Applied add-log-exp4.7

    \[\leadsto \frac{\color{blue}{\log \left(e^{\left(x0 \cdot \frac{1}{1 - x1}\right) \cdot \frac{x0}{1 - x1} - x0 \cdot x0}\right)}}{\frac{x0}{1 - x1} + x0}\]
  8. Final simplification4.7

    \[\leadsto \frac{\log \left(e^{\left(\frac{1}{1 - x1} \cdot x0\right) \cdot \frac{x0}{1 - x1} - x0 \cdot x0}\right)}{x0 + \frac{x0}{1 - x1}}\]

Reproduce

herbie shell --seed 2019026 
(FPCore (x0 x1)
  :name "(- (/ x0 (- 1 x1)) x0)"
  :pre (or (and (== x0 1.855) (== x1 0.000209)) (and (== x0 2.985) (== x1 0.0186)))

  :herbie-target
  (/ (* x0 x1) (- 1 x1))

  (- (/ x0 (- 1 x1)) x0))