Average Error: 0.9 → 0.9
Time: 8.6s
Precision: 64
Internal Precision: 320
\[\frac{e^{a}}{e^{a} + e^{b}}\]
\[\log_* (1 + (e^{\frac{e^{a}}{e^{a} + e^{b}}} - 1)^*)\]

Error

Bits error versus a

Bits error versus b

Target

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

Derivation

  1. Initial program 0.9

    \[\frac{e^{a}}{e^{a} + e^{b}}\]
  2. Using strategy rm
  3. Applied log1p-expm1-u0.9

    \[\leadsto \color{blue}{\log_* (1 + (e^{\frac{e^{a}}{e^{a} + e^{b}}} - 1)^*)}\]

Runtime

Time bar (total: 8.6s)Debug logProfile

herbie shell --seed '#(1072107073 2127697367 3936270018 2300570620 2134894798 4023771849)' +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))))