
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!

Mathematics Notation Question

  1. Nov 5, 2015 #1
    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)
  2. jcsd
  3. Nov 5, 2015 #2


    User Avatar
    2017 Award

    Staff: Mentor

    just move the number in an array and you can address the single digits; the comfort depends on the programming language you use
  4. Nov 5, 2015 #3


    Staff: Mentor

    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.