# Aliases for logarithm and exponentials

**URL:** https://chapel.discourse.group/t/aliases-for-logarithm-and-exponentials/41729
**Category:** Users
**Created:** [March 23, 2025, 4:41am UTC](https://chapel.discourse.group/t/aliases-for-logarithm-and-exponentials/41729 "2025-03-23T04:41:34Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![damianmoz](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/damianmoz/32/319_2.png) [@damianmoz](https://chapel.discourse.group/u/damianmoz)
#### Post date: [March 23, 2025, 4:41am UTC](https://chapel.discourse.group/t/aliases-for-logarithm-and-exponentials/41729/1 "2025-03-23T04:41:34Z")

</div>

At some stage in the future I would expect that some people might like to see **ln** (x) be allowed as an alias for **log** (x), the latin name whch has persisted to this day.

The former name is the abbreviation for logarithmus naturalis, there also being functions **lg** (x) and **lb** (x) for logarithmus generalis and logarithmus binarius for **log10** (x) and **log2** (x). Similarly there are functions **pn** (x), **pg** (x) and **pb** (x) which are equivalent antilogarithm or exponential routines where that **p** is potentia. There are all in an ISO standard. If you are European, you have probably seen these commonly in textbooks.

This would only affect the _Math_ module's namespace. Unless there is some disapproval, I would like to put a placeholder in Github to consider this in 2026. or later. For now, it is just a distraction from far more significant issues. That said, addressing it is trivial.

---

<div class="post-metadata">

### Author: ![nelsonluisdias](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/nelsonluisdias/32/691_2.png) [@nelsonluisdias](https://chapel.discourse.group/u/nelsonluisdias)
#### Post date: [March 24, 2025, 12:27pm UTC](https://chapel.discourse.group/t/aliases-for-logarithm-and-exponentials/41729/2 "2025-03-24T12:27:17Z")

</div>

Hi Damian: there is already a ln function in Math, and it appears to do exactly the same as log.

Regards

Nelson

---

<div class="post-metadata">

### Author: ![damianmoz](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/damianmoz/32/319_2.png) [@damianmoz](https://chapel.discourse.group/u/damianmoz)
#### Post date: [March 24, 2025, 2:46pm UTC](https://chapel.discourse.group/t/aliases-for-logarithm-and-exponentials/41729/3 "2025-03-24T14:46:58Z")

</div>

Thanks Nelson

Anyway, I will see if people object for the others to be included.

---

<div class="post-metadata">

### Author: ![bradcray](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/bradcray/32/72_2.png) [@bradcray](https://chapel.discourse.group/u/bradcray)
#### Post date: [March 24, 2025, 5:02pm UTC](https://chapel.discourse.group/t/aliases-for-logarithm-and-exponentials/41729/4 "2025-03-24T17:02:12Z")

</div>

Hi Damian —

In my computer science courses, I'm fairly certain that `lg()` was used as a shorthand for `log_2`, and in the past I've advocated for supporting this in our modules without realizing it might mean `log_10` in other communities. [This website](https://en.wiktionary.org/wiki/lg) seems to confirm both perspectives, suggesting that it may introduce more potential for confusion than clarity if added to the standard Math module (of course, other modules might choose to define it one way or the other).

-Brad

---

<div class="post-metadata">

### Author: ![damianmoz](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/damianmoz/32/319_2.png) [@damianmoz](https://chapel.discourse.group/u/damianmoz)
#### Post date: [March 24, 2025, 11:03pm UTC](https://chapel.discourse.group/t/aliases-for-logarithm-and-exponentials/41729/5 "2025-03-24T23:03:59Z")

</div>

Scary. Food for thought, I will think about it a bit more. Background below.

logarithmus generalis = **lg** = genaral logarithm = log to base 10

logarithmus binarius = **lb** = binary logarithm = log to base 2

logarihmus naturalis = **ln** = natural logarithm = ......

The names and abbreviations have been around for over 100 years as far as I can tell. Any textbook using an abbreviation of **lg** for a binary logarithm is plain wrong. Probably a case of some English speaking author who got lazy. No wonder students learn the wrong thing. The ISO-80000-2 standard only codified a precise and long standing and rigorous practice.

Scary stuff. No wonder young students and pick up bad habits which they then carry with them until their 50s and even beyond.

---

<div class="post-metadata">

### Author: ![damianmoz](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/damianmoz/32/319_2.png) [@damianmoz](https://chapel.discourse.group/u/damianmoz)
#### Post date: [March 24, 2025, 11:21pm UTC](https://chapel.discourse.group/t/aliases-for-logarithm-and-exponentials/41729/6 "2025-03-24T23:21:35Z")

</div>

Guilty of the same crime.

The IEEE 754 abbreviates the base of its floating point as **b** and thereafter refers to it that way. Interestingly, it is the mathematical concept of a _radix_. Exactly when _radix_ became known as the base is not in any of my grey cells. Radix has been around for 2000+ years. Long before the English word base.

In all my own algebra, I use **b** as the abbreviation for the exponent bias although I try and note the hijacking.

Naughty Damian.
