Modulo Notation: Is There a More Efficient Way to Represent Modular Functions?

  • Context: Undergrad 
  • Thread starter Thread starter Chrono G. Xay
  • Start date Start date
  • Tags Tags
    Mathematics Notation
Click For Summary
SUMMARY

The discussion centers on the efficiency of representing modular functions using logarithmic notation, specifically suggesting a format where the modulus appears as a subscript after "mod". While this approach could enhance clarity in certain programming contexts, it faces opposition from mathematicians who regard modulo as an operator rather than a function. The conversation highlights the general-purpose method for modulo in programming languages, where the first argument is the number and the second is the base, emphasizing the potential confusion with existing mathematical notation.

PREREQUISITES
  • Understanding of modular arithmetic and its applications
  • Familiarity with programming languages and their syntax for modulo operations
  • Basic knowledge of logarithmic functions and their notation
  • Awareness of mathematical notation conventions, including subscripts
NEXT STEPS
  • Research the implementation of modulo operations in various programming languages
  • Explore the mathematical principles behind modular arithmetic
  • Investigate alternative notations for mathematical functions and their implications
  • Learn about the differences between mathematical operators and functions in programming
USEFUL FOR

Mathematicians, software developers, and educators interested in the representation of mathematical functions and the implications of notation in programming languages.

Chrono G. Xay
Messages
91
Reaction score
3
Would it not be more efficient to write modular functions using the text formatting of logarithms? The modulus would be in subscript after "mod", and the expression to be used would be written after...

Ex. modnf(x)
 
Mathematics news on Phys.org
just move the number in an array and you can address the single digits; the comfort depends on the programming language you use
 
While I think you could use this notation, however mathematicians view modulo as an operator and not a function. Also subscripts in mathematics are used for coordinate indexing or row/column indexing and your notation would be confusing in those situations.

Programming languages tend to define a general purpose method for modulo where the first argument is the number and the second is the base for the modulo operation. Even in log10 some programming languages use log() for base 10 and ln() for natural logs.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
11
Views
12K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 36 ·
2
Replies
36
Views
6K
  • · Replies 4 ·
Replies
4
Views
3K