Average Error: 30.1 → 30.1
Time: 4.6s
Precision: binary64
\[\log \left(1 + e^{\log y - \log x}\right)\]
\[\log \left(1 + e^{\log y - \log x}\right)\]
\log \left(1 + e^{\log y - \log x}\right)
\log \left(1 + e^{\log y - \log x}\right)
double code(double y, double x) {
	return ((double) log(((double) (1.0 + ((double) exp(((double) (((double) log(y)) - ((double) log(x))))))))));
}
double code(double y, double x) {
	return ((double) log(((double) (1.0 + ((double) exp(((double) (((double) log(y)) - ((double) log(x))))))))));
}

Error

Bits error versus y

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 30.1

    \[\log \left(1 + e^{\log y - \log x}\right)\]
  2. Final simplification30.1

    \[\leadsto \log \left(1 + e^{\log y - \log x}\right)\]

Reproduce

herbie shell --seed 2020153 
(FPCore (y x)
  :name "(log (+ 1 (exp (- (log y) (log x)))))"
  :precision binary64
  (log (+ 1.0 (exp (- (log y) (log x))))))