Average Error: 13.5 → 0.2
Time: 25.7s
Precision: binary64
\[\]
\[\]
\[\]
double code(double x, double y, double z, double a) {
	return ((double) (x + ((double) (((double) tan(((double) (y + z)))) - ((double) tan(a))))));
}
double code(double x, double y, double z, double a) {
	return ((double) (x + ((double) (((double) (((double) (((double) (((double) tan(y)) + ((double) tan(z)))) / ((double) (1.0 - ((double) pow(((double) (((double) tan(y)) * ((double) tan(z)))), 3.0)))))) * ((double) (1.0 + ((double) (((double) (((double) tan(y)) * ((double) tan(z)))) + ((double) (((double) (((double) tan(y)) * ((double) tan(z)))) * ((double) (((double) tan(y)) * ((double) tan(z)))))))))))) - ((double) tan(a))))));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 13.5

    \[\]
  2. Using strategy rm
  3. Applied tan-sum0.2

    \[\leadsto \]
  4. Using strategy rm
  5. Applied flip3--0.2

    \[\leadsto \]
  6. Applied associate-/r/0.2

    \[\leadsto \]
  7. Simplified0.2

    \[\leadsto \]
  8. Final simplification0.2

    \[\leadsto \]

Reproduce

herbie shell --seed 2020191 
(FPCore (x y z a)
  :name "tan-example"
  :precision binary64
  :pre (and (or (== x 0.0) (<= 0.5884142 x 505.5909)) (or (<= -1.796658e+308 y -9.425585e-310) (<= 1.284938e-309 y 1.7512240000000001e+308)) (or (<= -1.7767070000000002e+308 z -8.599796e-310) (<= 3.293145e-311 z 1.725154e+308)) (or (<= -1.796658e+308 a -9.425585e-310) (<= 1.284938e-309 a 1.7512240000000001e+308)))
  (+ x (- (tan (+ y z)) (tan a))))