Average Error: 0.1 → 0.1
Time: 11.1s
Precision: binary64
\[\sin^{-1} \left(\mathsf{hypot}\left(\mathsf{hypot}\left(X \cdot \sin \left(\frac{a}{2}\right), Y \cdot \sin \left(\frac{a}{2}\right)\right), Z \cdot \sin \left(\frac{a}{2}\right)\right)\right)\]
\[\sin^{-1} \left(\mathsf{hypot}\left(\mathsf{hypot}\left(X \cdot \sin \left(\frac{a}{2}\right), Y \cdot \sin \left(\frac{a}{2}\right)\right), Z \cdot \sin \left(\frac{a}{2}\right)\right)\right)\]
\sin^{-1} \left(\mathsf{hypot}\left(\mathsf{hypot}\left(X \cdot \sin \left(\frac{a}{2}\right), Y \cdot \sin \left(\frac{a}{2}\right)\right), Z \cdot \sin \left(\frac{a}{2}\right)\right)\right)
\sin^{-1} \left(\mathsf{hypot}\left(\mathsf{hypot}\left(X \cdot \sin \left(\frac{a}{2}\right), Y \cdot \sin \left(\frac{a}{2}\right)\right), Z \cdot \sin \left(\frac{a}{2}\right)\right)\right)
double code(double X, double a, double Y, double Z) {
	return ((double) asin(((double) hypot(((double) hypot(((double) (X * ((double) sin(((double) (a / 2.0)))))), ((double) (Y * ((double) sin(((double) (a / 2.0)))))))), ((double) (Z * ((double) sin(((double) (a / 2.0))))))))));
}
double code(double X, double a, double Y, double Z) {
	return ((double) asin(((double) hypot(((double) hypot(((double) (X * ((double) sin(((double) (a / 2.0)))))), ((double) (Y * ((double) sin(((double) (a / 2.0)))))))), ((double) (Z * ((double) sin(((double) (a / 2.0))))))))));
}

Error

Bits error versus X

Bits error versus a

Bits error versus Y

Bits error versus Z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[\sin^{-1} \left(\mathsf{hypot}\left(\mathsf{hypot}\left(X \cdot \sin \left(\frac{a}{2}\right), Y \cdot \sin \left(\frac{a}{2}\right)\right), Z \cdot \sin \left(\frac{a}{2}\right)\right)\right)\]
  2. Final simplification0.1

    \[\leadsto \sin^{-1} \left(\mathsf{hypot}\left(\mathsf{hypot}\left(X \cdot \sin \left(\frac{a}{2}\right), Y \cdot \sin \left(\frac{a}{2}\right)\right), Z \cdot \sin \left(\frac{a}{2}\right)\right)\right)\]

Reproduce

herbie shell --seed 2020153 
(FPCore (X a Y Z)
  :name "(asin (hypot (hypot (* X (sin (/ a 2))) (* Y (sin (/ a 2)))) (* Z (sin (/ a 2)))))"
  :precision binary64
  (asin (hypot (hypot (* X (sin (/ a 2.0))) (* Y (sin (/ a 2.0)))) (* Z (sin (/ a 2.0))))))