Average Error: 33.5 → 33.5
Time: 2.7s
Precision: binary64
\[\sqrt{\left(\left(x \cdot x\right) \cdot \cos t\right) \cdot \cos t + \left(\left(y \cdot y\right) \cdot \sin t\right) \cdot \sin t}\]
\[\sqrt{\left(\left(x \cdot x\right) \cdot \cos t\right) \cdot \cos t + \left(\left(y \cdot y\right) \cdot \sin t\right) \cdot \sin t}\]
\sqrt{\left(\left(x \cdot x\right) \cdot \cos t\right) \cdot \cos t + \left(\left(y \cdot y\right) \cdot \sin t\right) \cdot \sin t}
\sqrt{\left(\left(x \cdot x\right) \cdot \cos t\right) \cdot \cos t + \left(\left(y \cdot y\right) \cdot \sin t\right) \cdot \sin t}
double code(double x, double t, double y) {
	return ((double) sqrt(((double) (((double) (((double) (((double) (x * x)) * ((double) cos(t)))) * ((double) cos(t)))) + ((double) (((double) (((double) (y * y)) * ((double) sin(t)))) * ((double) sin(t))))))));
}
double code(double x, double t, double y) {
	return ((double) sqrt(((double) (((double) (((double) (((double) (x * x)) * ((double) cos(t)))) * ((double) cos(t)))) + ((double) (((double) (((double) (y * y)) * ((double) sin(t)))) * ((double) sin(t))))))));
}

Error

Bits error versus x

Bits error versus t

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 33.5

    \[\sqrt{\left(\left(x \cdot x\right) \cdot \cos t\right) \cdot \cos t + \left(\left(y \cdot y\right) \cdot \sin t\right) \cdot \sin t}\]
  2. Final simplification33.5

    \[\leadsto \sqrt{\left(\left(x \cdot x\right) \cdot \cos t\right) \cdot \cos t + \left(\left(y \cdot y\right) \cdot \sin t\right) \cdot \sin t}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (x t y)
  :name "(sqrt (+ (* (* (* x x) (cos t)) (cos t)) (* (* (* y y) (sin t)) (sin t))))"
  :precision binary64
  (sqrt (+ (* (* (* x x) (cos t)) (cos t)) (* (* (* y y) (sin t)) (sin t)))))