Appropriate graphic symbol for log()?

  • Context: High School 
  • Thread starter Thread starter Twinbee
  • Start date Start date
  • Tags Tags
    Graphic Log Symbol
Click For Summary
SUMMARY

The discussion centers on the need for a more intuitive operator for logarithmic functions in programming languages, particularly for a calculator application. Users currently rely on notations like LogBase10(1000) or ln for natural logarithms, which can be cumbersome. Suggestions for a new operator include using symbols available on US/UK keyboards, such as ¬, `, or an arrow symbol. The conversation highlights the lack of a standardized notation for logarithms compared to exponentiation, emphasizing the potential for a unified operator that simplifies notation.

PREREQUISITES
  • Understanding of logarithmic functions and their notations
  • Familiarity with programming languages and their syntax for mathematical operations
  • Knowledge of Unicode characters and their applications in programming
  • Basic principles of calculator design and user interface considerations
NEXT STEPS
  • Research Unicode symbols suitable for mathematical operations
  • Explore existing programming languages' approaches to logarithmic functions
  • Investigate user interface design principles for calculator applications
  • Learn about mathematical notation conventions in programming
USEFUL FOR

Mathematicians, software developers, UI/UX designers, and anyone involved in creating or improving calculator applications.

Twinbee
Messages
116
Reaction score
0
In the computer world at least, the symbol ^ is often used for exponentiation.

I was just wondering if log has had anything in the multitude of languages out there. It would be nice to see an operator such as "1000¬10=3" instead of writing LogBase10(1000)=3 which is more ugly. I'm writing a calculator, so I'd include the new symbol in that.

If such a symbol hasn't been already used, I'd be grateful for suggestions, especially ones which are already on US/UK keyboards (maybe one of these: ¬ ` ¦ | \ @ ~ )
 
Last edited:
Mathematics news on Phys.org
The usual notation is "ln" for natural log and "log" for base 10. Other bases are usually written using a subscript.
 
Yes I realize that, but the arbitrary-base log function is kind of the opposite of the power operator. You wouldn't necessarily want numbers 10 or e as the default base when using exponentiation. If people were forced to forego the general x^y and instead only allowed to use pow(4) or exp(4) to mean 10^4 or e^4 respectively, there'd be lots of complaints.

Likewise, instead of only having ln, log and logbase, with all the initial confusion and kludgy notation all that provides, why not just (also) have a single operator which unifies them all as described in my first post?
 
Last edited:
The latex code for a superscript is ^. The latex code for a subscript is _. It would seem to me that this is the closest thing to a character representing subscript. The problem is that underscore is used much more generally in programming. There is also the problem that no character by itself really lends itself to the same type of notation.

3^4 works well because there is only one character needed, between the exponent and base.
log_3 81 isn't as nice. Here the word log serves as the operator, and the underscore only serves to designate the base.

I suppose you could do a similar thing as exponents and use only a single character between the numbers. I don't really like this though as it is too ambiguous.

3_81 is wrong because 81 isn't a subscript.
81_3 is wrong because it is in the wrong order.

It's probably no coincidence that there is no real convention for logs.
 
Thanks, I overlooked the underscore!

Since we're creating a new operator so to speak, previous notation rules for log() can be suspended for now. Therefore, I'm not sure which order is better:

10_100 =2 (closer to old notation)
100_10 =2 (perhaps more consistent generally, feels like divide almost)

An arrow down would be nice for the symbol (the user would press underscore, but the editor would come up with an arrow). Potential unicode characters include:

U+02C5 ˅ Modifier Letter Down Arrowhead
U+1D5B ᵛ Modifier Letter Small V
U+2227 ∨ Logical OR (don't want to use this, as I need OR in the calc)

My only reservation is that any of the above look pretty close to a logical OR, apart from being smaller. Of course, ¬ is also taken (logical not), so maybe I should choose a different unicode symbol (I'll keep underscore for what the user actually presses though - nice one).
 
Last edited:

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 43 ·
2
Replies
43
Views
6K
Replies
3
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 14 ·
Replies
14
Views
23K
  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 29 ·
Replies
29
Views
4K