Follow-up Comment #1, bug #45746 (project gsl): So gsl_sf_angle_restrict_symm_err_e is basically equivalent to e_rem_pio2. As you can see in that file, this technique only works until about x ~ 2^18 * M_PI (~823549.6645, so smaller than you think). Past that, you need to implement Payne-Hanek reduction (which is the entirety of k_rem_pio2), which is somewhat of a royal payne.
http://stackoverflow.com/questions/30463616/payne-hanek-algorithm-implementation-in-c is a pretty comprehensive reference. I might throw something together myself later if I have time. There's really no other alternative other than that or the current implementation, which is "return very invalid results for large values of fabs(x)", sadly. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?45746> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
