Description: work around Boost.multiprecision acos() locking
 Since boost1.62, acos() locks in Screen.C on some architectures when
 delta100 is 0. Single-case this.
Author: Thibaut Paumard
Origin: vendor
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=844490
Forwarded: yes
Last-Update: 2016-11-17
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/lib/Screen.C
+++ b/lib/Screen.C
@@ -561,6 +561,15 @@
 
 #ifdef HAVE_BOOST_MULTIPRECISION_CPP_DEC_FLOAT_HPP
     // using boost multiprecision to avoid information loss in trigonometry
+# ifdef GYOTO_ACOS_LOCKING_WORKAROUND
+    if (delta==0) {
+      spherical_angle_a=abs(alpha);
+      spherical_angle_b=0.;
+    } else if (alpha==0) {
+      spherical_angle_a=abs(delta);
+      spherical_angle_b=((delta >= 0) - (delta < 0))*M_PI*0.5;
+    } else
+# endif
     {
       boost::multiprecision::cpp_dec_float_100
 	alpha100=alpha, delta100=delta, a, b;
