Average Error: 0.1 → 0.1
Time: 29.8s
Precision: 64
$\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(0.5 \cdot a\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(0.5 \cdot a\right)\right), Z \cdot \sin \left(\frac{a}{2}\right)\right)\right)
double f(double X, double a, double Y, double Z) {
double r377699 = X;
double r377700 = a;
double r377701 = 2.0;
double r377702 = r377700 / r377701;
double r377703 = sin(r377702);
double r377704 = r377699 * r377703;
double r377705 = Y;
double r377706 = r377705 * r377703;
double r377707 = hypot(r377704, r377706);
double r377708 = Z;
double r377709 = r377708 * r377703;
double r377710 = hypot(r377707, r377709);
double r377711 = asin(r377710);
return r377711;
}


double f(double X, double a, double Y, double Z) {
double r377712 = X;
double r377713 = a;
double r377714 = 2.0;
double r377715 = r377713 / r377714;
double r377716 = sin(r377715);
double r377717 = r377712 * r377716;
double r377718 = Y;
double r377719 = 0.5;
double r377720 = r377719 * r377713;
double r377721 = sin(r377720);
double r377722 = r377718 * r377721;
double r377723 = hypot(r377717, r377722);
double r377724 = Z;
double r377725 = r377724 * r377716;
double r377726 = hypot(r377723, r377725);
double r377727 = asin(r377726);
return r377727;
}



Try it out

Results

 In Out
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. Taylor expanded around inf 0.1

$\leadsto \sin^{-1} \left(\mathsf{hypot}\left(\mathsf{hypot}\left(X \cdot \sin \left(\frac{a}{2}\right), \color{blue}{Y \cdot \sin \left(0.5 \cdot a\right)}\right), Z \cdot \sin \left(\frac{a}{2}\right)\right)\right)$
3. 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(0.5 \cdot a\right)\right), Z \cdot \sin \left(\frac{a}{2}\right)\right)\right)$

Reproduce

herbie shell --seed 1
(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))) (* Y (sin (/ a 2)))) (* Z (sin (/ a 2))))))