mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] cacosh.c - Comment needs correction
@ 2024-03-08  4:20 Damian McGuckin
  2024-03-08  4:44 ` [musl] " Damian McGuckin
  0 siblings, 1 reply; 4+ messages in thread
From: Damian McGuckin @ 2024-03-08  4:20 UTC (permalink / raw)
  To: MUSL


The routine produces the correct answer.

However, currently, the comment at the top says

 	/* acosh(z) = i acos(z) */

I believe this is technically wrong;

To reflect the code, it should be changed to something like:

 	/* cacosh(z) = acosh(x +/- i y) = +/- i acos(x + i y) */

Somebody may want to rephrase that, i.e. if the sign of 'y' is positive
then the result is

 	i * cacos(z)

If the sign is negative, then the result is

 	-i * cacos(z)

I could always be wrong - Damian

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

end of thread, other threads:[~2024-03-09 21:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-08  4:20 [musl] cacosh.c - Comment needs correction Damian McGuckin
2024-03-08  4:44 ` [musl] " Damian McGuckin
2024-03-09 20:23   ` Szabolcs Nagy
2024-03-09 21:56     ` 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).