mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] catan(z)
@ 2024-08-11 14:01 Damian McGuckin
  2024-08-11 20:08 ` Szabolcs Nagy
  0 siblings, 1 reply; 13+ messages in thread
From: Damian McGuckin @ 2024-08-11 14:01 UTC (permalink / raw)
  To: MUSL


In this routine, there are 2 lines of code

     t = 0.5 * atan2(2.0 * x, a);
     w = _redupi(t);

The first computes atan2() which returns a number in the range [-pi,+pi]
which means that t is a number in the range [-pi/2,+pi/2].

As far as I understand, the routine _redupi(t) accepts a argument and
reduces it into the range [-pi, +pi]. Am I mistaken?

If I am not wrong, and 't' is already in the range that _redupi(t) will 
return, then _redupi() just returns its argument (within a rounding 
error). So it seems like a no-op to me.

Can anybody comment?

The routine is originally from Moshier's Cephes library. I have Moshier's 
book but I cannot find any hints there.

Thanks - Damian

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-08-16  8:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-11 14:01 [musl] catan(z) Damian McGuckin
2024-08-11 20:08 ` Szabolcs Nagy
2024-08-12  3:39   ` Damian McGuckin
2024-08-12  3:56     ` Damian McGuckin
2024-08-12  9:00       ` Szabolcs Nagy
2024-08-15  1:16         ` Rich Felker
2024-08-15  2:12           ` Damian McGuckin
2024-08-15 14:28             ` Rich Felker
2024-08-16  7:26               ` Szabolcs Nagy
2024-08-16  8:18               ` Eric Pruitt
2024-08-15 13:18       ` Morten Welinder
2024-08-15 13:44         ` Rich Felker
2024-08-16  1:47           ` Damian McGuckin

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).