Average Error: 0.5 → 1.1
Time: 24.4s
Precision: 64
Internal Precision: 128
\[\frac{e^{a}}{e^{a} + e^{b}}\]
\[\frac{\sqrt{e^{a}}}{\sqrt{e^{a} + e^{b}}} \cdot \frac{\sqrt{e^{a}}}{\sqrt{e^{a} + e^{b}}}\]

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.5
Target0.0
Herbie1.1
\[\frac{1}{1 + e^{b - a}}\]

Derivation

  1. Initial program 0.5

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

    \[\leadsto \frac{e^{a}}{e^{a} + e^{b}}\]
  3. Taylor expanded around -inf 0.5

    \[\leadsto \frac{e^{a}}{\color{blue}{e^{b} + e^{a}}}\]
  4. Using strategy rm
  5. Applied add-sqr-sqrt1.1

    \[\leadsto \frac{e^{a}}{\color{blue}{\sqrt{e^{b} + e^{a}} \cdot \sqrt{e^{b} + e^{a}}}}\]
  6. Applied add-sqr-sqrt1.1

    \[\leadsto \frac{\color{blue}{\sqrt{e^{a}} \cdot \sqrt{e^{a}}}}{\sqrt{e^{b} + e^{a}} \cdot \sqrt{e^{b} + e^{a}}}\]
  7. Applied times-frac1.1

    \[\leadsto \color{blue}{\frac{\sqrt{e^{a}}}{\sqrt{e^{b} + e^{a}}} \cdot \frac{\sqrt{e^{a}}}{\sqrt{e^{b} + e^{a}}}}\]
  8. Final simplification1.1

    \[\leadsto \frac{\sqrt{e^{a}}}{\sqrt{e^{a} + e^{b}}} \cdot \frac{\sqrt{e^{a}}}{\sqrt{e^{a} + e^{b}}}\]

Runtime

Time bar (total: 24.4s)Debug logProfile

herbie shell --seed 2018273 
(FPCore (a b)
  :name "Quotient of sum of exps"

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

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