Average Error: 0.7 → 0.6
Time: 19.4s
Precision: 64
Internal Precision: 128
\[\frac{e^{a}}{e^{a} + e^{b}}\]
\[e^{a - \sqrt[3]{\log \left(e^{a} + e^{b}\right) \cdot \left(\log \left(e^{a} + e^{b}\right) \cdot \log \left(e^{a} + e^{b}\right)\right)}}\]

Error

Bits error versus a

Bits error versus b

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.7
Target0.0
Herbie0.6
\[\frac{1}{1 + e^{b - a}}\]

Derivation

  1. Initial program 0.7

    \[\frac{e^{a}}{e^{a} + e^{b}}\]
  2. Initial simplification0.7

    \[\leadsto \frac{e^{a}}{e^{a} + e^{b}}\]
  3. Using strategy rm
  4. Applied add-exp-log0.7

    \[\leadsto \frac{e^{a}}{\color{blue}{e^{\log \left(e^{a} + e^{b}\right)}}}\]
  5. Applied div-exp0.5

    \[\leadsto \color{blue}{e^{a - \log \left(e^{a} + e^{b}\right)}}\]
  6. Using strategy rm
  7. Applied add-cbrt-cube0.6

    \[\leadsto e^{a - \color{blue}{\sqrt[3]{\left(\log \left(e^{a} + e^{b}\right) \cdot \log \left(e^{a} + e^{b}\right)\right) \cdot \log \left(e^{a} + e^{b}\right)}}}\]
  8. Final simplification0.6

    \[\leadsto e^{a - \sqrt[3]{\log \left(e^{a} + e^{b}\right) \cdot \left(\log \left(e^{a} + e^{b}\right) \cdot \log \left(e^{a} + e^{b}\right)\right)}}\]

Runtime

Time bar (total: 19.4s)Debug logProfile

herbie shell --seed 2018278 +o rules:numerics
(FPCore (a b)
  :name "Quotient of sum of exps"

  :herbie-target
  (/ 1 (+ 1 (exp (- b a))))

  (/ (exp a) (+ (exp a) (exp b))))