Average Error: 35.0 → 35.0
Time: 9.4s
Precision: binary64
\[\frac{\left(d \cdot d\right) \cdot \left(theta - \sin theta\right)}{\left(8 \cdot \sin \left(\frac{theta}{2}\right)\right) \cdot \sin \left(\frac{theta}{2}\right)}\]
\[\frac{\left(d \cdot d\right) \cdot \left(theta - \sin theta\right)}{\left(8 \cdot \sin \left(\frac{theta}{2}\right)\right) \cdot \sin \left(\frac{theta}{2}\right)}\]
\frac{\left(d \cdot d\right) \cdot \left(theta - \sin theta\right)}{\left(8 \cdot \sin \left(\frac{theta}{2}\right)\right) \cdot \sin \left(\frac{theta}{2}\right)}
\frac{\left(d \cdot d\right) \cdot \left(theta - \sin theta\right)}{\left(8 \cdot \sin \left(\frac{theta}{2}\right)\right) \cdot \sin \left(\frac{theta}{2}\right)}
double code(double d, double theta) {
	return ((double) (((double) (((double) (d * d)) * ((double) (theta - ((double) sin(theta)))))) / ((double) (((double) (8.0 * ((double) sin(((double) (theta / 2.0)))))) * ((double) sin(((double) (theta / 2.0))))))));
}
double code(double d, double theta) {
	return ((double) (((double) (((double) (d * d)) * ((double) (theta - ((double) sin(theta)))))) / ((double) (((double) (8.0 * ((double) sin(((double) (theta / 2.0)))))) * ((double) sin(((double) (theta / 2.0))))))));
}

Error

Bits error versus d

Bits error versus theta

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 35.0

    \[\frac{\left(d \cdot d\right) \cdot \left(theta - \sin theta\right)}{\left(8 \cdot \sin \left(\frac{theta}{2}\right)\right) \cdot \sin \left(\frac{theta}{2}\right)}\]
  2. Final simplification35.0

    \[\leadsto \frac{\left(d \cdot d\right) \cdot \left(theta - \sin theta\right)}{\left(8 \cdot \sin \left(\frac{theta}{2}\right)\right) \cdot \sin \left(\frac{theta}{2}\right)}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (d theta)
  :name "(/ (* (* d d) (- theta (sin theta))) (* (* 8 (sin (/ theta 2))) (sin (/ theta 2))))"
  :precision binary64
  (/ (* (* d d) (- theta (sin theta))) (* (* 8.0 (sin (/ theta 2.0))) (sin (/ theta 2.0)))))