Math Expression in Modar

  • For achieving better scripts interpreting performance, Modar only supports some math functions in assignment statement, in the condition expression in if statement and while statement. Here is the full list of math operators and functions available in Modar

  • Operators

    +

    Addition

    -

    Subtraction

    *

    Multiplication

    /

    Division

    %

    Modulo


  • Functions

    Pow(x,y)

    Power

    Atan2(x,y)

    arctangent function with two arguments

    Abs(x)

    Absolute value

    Sqrt(x)

    square root

    Exp(x)

    Exponential

    Log(x)

    natural logarithm, base is

    Sin(x)

    Sine

    Cos(x)

    Cosine

    Rand(x)

    return a random real in range [0,x] (generated by Modar internal random number generator

    Randsys(x)

    return a random real in range [0,x] ( generated by system random generator)

    Acos(x)

    Arccosine

    Asin(x)

    Arcsine

    Floor(x)

    Floor

    Erfc(x)

    Complementary Error function

    Erf(x)

    Error function







 


  Contact us

  Phone: 400-660-8656
  Email: support@beemd.org

 

       我们长期和北京市计算中心合作提供计算培训服务,承接托管计算业务,如有需求请随时联系我们。