Average Error: 15.5 → 15.5
Time: 2.4s
Precision: binary64
\[\log \left(e^{a} + e^{b}\right) - a\]
\[\log \left(e^{a} + e^{b}\right) - a\]
\log \left(e^{a} + e^{b}\right) - a
\log \left(e^{a} + e^{b}\right) - a
double code(double a, double b) {
	return ((double) (((double) log(((double) (((double) exp(a)) + ((double) exp(b)))))) - a));
}
double code(double a, double b) {
	return ((double) (((double) log(((double) (((double) exp(a)) + ((double) exp(b)))))) - a));
}

Error

Bits error versus a

Bits error versus b

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 15.5

    \[\log \left(e^{a} + e^{b}\right) - a\]
  2. Final simplification15.5

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

Reproduce

herbie shell --seed 2020152 
(FPCore (a b)
  :name "(- (log (+ (exp a) (exp b))) a)"
  :precision binary64
  (- (log (+ (exp a) (exp b))) a))