Average Error: 0.4 → 0.3
Time: 3.3s
Precision: binary64
\[\]
\[\]
\[\]
double code(double a, double b, double c, double d, double e) {
	return ((double) (((double) (((double) (((double) (e + d)) + c)) + b)) + a));
}
double code(double a, double b, double c, double d, double e) {
	return ((double) (e + ((double) (d + ((double) exp(((double) log(((double) (c + ((double) (b + a))))))))))));
}

Error

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus d

Bits error versus e

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.4
Target0.2
Herbie0.3
\[\]

Derivation

  1. Initial program 0.4

    \[\]
  2. Simplified0.2

    \[\leadsto \]
  3. Using strategy rm
  4. Applied add-exp-log0.3

    \[\leadsto \]
  5. Final simplification0.3

    \[\leadsto \]

Reproduce

herbie shell --seed 2020192 
(FPCore (a b c d e)
  :name "Expression 1, p15"
  :precision binary64
  :pre (<= 1.0 a 2.0 b 4.0 c 8.0 d 16.0 e 32.0)

  :herbie-target
  (+ (+ d (+ c (+ a b))) e)

  (+ (+ (+ (+ e d) c) b) a))