Average Error: 15.5 → 0.4
Time: 6.2s
Precision: binary64
\[\]
\[\]
double code(double r, double a, double b) {
	return ((double) (r * ((double) (((double) sin(b)) / ((double) cos(((double) (a + b))))))));
}
double code(double r, double a, double b) {
	return ((double) (r / ((double) (((double) (((double) cos(a)) / ((double) tan(b)))) - ((double) sin(a))))));
}

Error

Bits error versus r

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

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

    \[\leadsto \]
  4. Using strategy rm
  5. Applied associate-*r/0.4

    \[\leadsto \]
  6. Simplified0.4

    \[\leadsto \]
  7. Taylor expanded around inf 0.4

    \[\leadsto \]
  8. Simplified0.4

    \[\leadsto \]
  9. Using strategy rm
  10. Applied quot-tan0.4

    \[\leadsto \]
  11. Final simplification0.4

    \[\leadsto \]

Reproduce

herbie shell --seed 2020190 
(FPCore (r a b)
  :name "rsin B"
  :precision binary64
  (* r (/ (sin b) (cos (+ a b)))))