arctanh vs. artanh

340 views
Skip to first unread message

a.simpl...@gmail.com

unread,
Mar 22, 2022, 7:57:38 PM3/22/22
to sage-devel
Hi all,

Sage has built-in inverses of hyperbolic functions
arcsinh,
arccosh,
arctanh,
arccoth,
arcsech,
arccsch.

But according to wikipedia,
the initial should be ar- that stands for area.
Perhaps for educational purpose we should use the correct name?

Best,
Hsin-Po

Samuel Lelievre

unread,
Mar 23, 2022, 4:54:16 AM3/23/22
to sage-devel
Note that Sage also provides aliases with `a-`
(the display is still with `arc-`):
```
sage: asinh, acosh, atanh, acoth, asech, acsch
(arcsinh, arccosh, arctanh, arccoth, arcsech, arccsch)
```

kcrisman

unread,
Mar 23, 2022, 6:54:34 AM3/23/22
to sage-devel
In terms of the missions statement, apparently we aren't the only ones, so consistency might be more important in any case: https://reference.wolfram.com/language/ref/ArcTanh.html

Note e.g. sympy uses atanh as the "ordinary": https://docs.sympy.org/latest/modules/functions/elementary.html#atanh

Martin R

unread,
Mar 23, 2022, 7:19:37 AM3/23/22
to sage-devel
I'd be in favor of the change (keeping arc- as an alias, of course).  It is not a good experience to explain in the course how the function is defined, and then see sage print it wrong.

Nathan Dunfield

unread,
Mar 23, 2022, 9:57:26 AM3/23/22
to sage-devel
Mathematica, Maple, and numpy all use "arctanh"; MATLAB uses "atanh".  It's "arctanh" in the NIST Digital Library of Mathematical Functions as well:

https://dlmf.nist.gov/4.37

It is the case that "ar-" prefix is the current ISO standard, and per the Wikipedia talk page the "ar-" prefix is more common in the non-English literature, but I'm not aware of any computer algebra system that uses it.  So I would not support changing away from "arc-" as the default.

Best wishes,

Nathan

Dima Pasechnik

unread,
Mar 23, 2022, 12:02:54 PM3/23/22
to sage-devel


On Wed, 23 Mar 2022, 13:57 Nathan Dunfield, <nat...@dunfield.info> wrote:
Mathematica, Maple, and numpy all use "arctanh"; MATLAB uses "atanh". 

atanh, etc., i.e. just "a-"-prefix is well in line with the tradition of Fortran libraries,
as well as C libm's.


It's "arctanh" in the NIST Digital Library of Mathematical Functions as well:

https://dlmf.nist.gov/4.37

It is the case that "ar-" prefix is the current ISO standard, and per the Wikipedia talk page the "ar-" prefix is more common in the non-English literature, but I'm not aware of any computer algebra system that uses it.  So I would not support changing away from "arc-" as the default.

Best wishes,

Nathan

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/947becfa-9b63-4973-b046-1e9e20fb8c63n%40googlegroups.com.

Martin R

unread,
Mar 24, 2022, 8:58:17 AM3/24/22
to sage-devel
fricas also uses atanh (and yes, I agree that the a- prefix would be better than arc- and ar-)

Adarsh Kishore

unread,
Mar 30, 2022, 4:12:57 AM3/30/22
to sage-devel
I would suggest keeping all three 'a-', 'ar-', 'arc-' as aliases for the same function (we could keep the 'a-' as the default as it is the shortest to type). This is because I have seen all three versions being used across Computer Science and Mathematics, and restricting anyone of them would be equally unfair.
Reply all
Reply to author
Forward
0 new messages