Average Error: 0.8 → 0.8
Time: 14.8s
Precision: 64
Internal Precision: 576
\[\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

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

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

Derivation

  1. Initial program 0.8

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

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

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

Runtime

Time bar (total: 14.8s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes0.80.80.70.10%
herbie shell --seed 2018274 +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))))