Average Error: 22.1 → 22.1
Time: 2.2s
Precision: binary64
\[\log \left(1 + y\right) - y \cdot x\]
\[\log \left(1 + y\right) - y \cdot x\]
\log \left(1 + y\right) - y \cdot x
\log \left(1 + y\right) - y \cdot x
double code(double y, double x) {
	return ((double) (((double) log(((double) (1.0 + y)))) - ((double) (y * x))));
}
double code(double y, double x) {
	return ((double) (((double) log(((double) (1.0 + y)))) - ((double) (y * 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 22.1

    \[\log \left(1 + y\right) - y \cdot x\]
  2. Final simplification22.1

    \[\leadsto \log \left(1 + y\right) - y \cdot x\]

Reproduce

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