Average Error: 52.8 → 52.8
Time: 6.9s
Precision: binary64
\[{\left(\sin \left(x + y\right)\right)}^{2} - {\left(\sin \left(x - y\right)\right)}^{2}\]
\[{\left(\sin \left(x + y\right)\right)}^{2} - {\left(\sin \left(x - y\right)\right)}^{2}\]
{\left(\sin \left(x + y\right)\right)}^{2} - {\left(\sin \left(x - y\right)\right)}^{2}
{\left(\sin \left(x + y\right)\right)}^{2} - {\left(\sin \left(x - y\right)\right)}^{2}
double code(double x, double y) {
	return ((double) (((double) pow(((double) sin(((double) (x + y)))), 2.0)) - ((double) pow(((double) sin(((double) (x - y)))), 2.0))));
}
double code(double x, double y) {
	return ((double) (((double) pow(((double) sin(((double) (x + y)))), 2.0)) - ((double) pow(((double) sin(((double) (x - y)))), 2.0))));
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 52.8

    \[{\left(\sin \left(x + y\right)\right)}^{2} - {\left(\sin \left(x - y\right)\right)}^{2}\]
  2. Final simplification52.8

    \[\leadsto {\left(\sin \left(x + y\right)\right)}^{2} - {\left(\sin \left(x - y\right)\right)}^{2}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (x y)
  :name "(- (pow (sin (+ x y)) 2) (pow (sin (- x y)) 2))"
  :precision binary64
  (- (pow (sin (+ x y)) 2.0) (pow (sin (- x y)) 2.0)))