📄 mmath.mal
字号:
#line 29 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/mmath.mx"module mmath;command acos(x:flt):flt address MATHunary_ACOSflt;command acos(x:dbl):dbl address MATHunary_ACOSdblcomment "The acos(x) function calculates the arc cosine of x, that is the value whose cosine is x. The value is returned in radians and is mathematically defined to be between 0 and PI (inclusive).";command asin(x:flt) :flt address MATHunary_ASINflt;command asin(x:dbl) :dbl address MATHunary_ASINdblcomment "The asin(x) function calculates the arc sine of x, that is the value whose sine is x. The value is returned in radians and is mathematically defined to be between -PI/20 and -PI/2 (inclusive).";command atan(x:flt) :flt address MATHunary_ATANflt;command atan(x:dbl) :dbl address MATHunary_ATANdblcomment "The atan(x) function calculates the arc tangent of x, that is the value whose tangent is x. The value is returned in radians and is mathematically defined to be between -PI/2 and PI/2 (inclusive).";command atan2(x:flt,y:flt):flt address MATHbinary_ATAN2flt;command atan2(x:dbl,y:dbl):dbl address MATHbinary_ATAN2dblcomment "The atan2(x,y) function calculates the arc tangent of the two variables x and y. It is similar to calculating the arc tangent of y / x, except that the signs of both arguments are used to determine the quadrant of the result. The value is returned in radians and is mathematically defined to be between -PI/2 and PI/2 (inclusive).";command cos(x:flt) :flt address MATHunary_COSflt;command cos(x:dbl) :dbl address MATHunary_COSdblcomment "The cos(x) function returns the cosine of x, where x is given in radians. The return value is between -1 and 1.";command sin(x:flt) :flt address MATHunary_SINflt;command sin(x:dbl) :dbl address MATHunary_SINdblcomment "The sin(x) function returns the cosine of x, where x is given in radians. The return value is between -1 and 1.";command tan(x:flt) :flt address MATHunary_TANflt;command tan(x:dbl) :dbl address MATHunary_TANdblcomment "The tan(x) function returns the tangent of x, where x is given in radians";command cosh(x:flt) :flt address MATHunary_COSHflt;command cosh(x:dbl) :dbl address MATHunary_COSHdblcomment "The cosh() function returns the hyperbolic cosine of x, which is defined mathematically as (exp(x) + exp(-x)) / 2.";command sinh(x:flt) :flt address MATHunary_SINHflt;command sinh(x:dbl) :dbl address MATHunary_SINHdblcomment "The sinh() function returns the hyperbolic sine of x, which is defined mathematically as (exp(x) - exp(-x)) / 2.";command tanh(x:flt) :flt address MATHunary_TANHflt;command tanh(x:dbl) :dbl address MATHunary_TANHdblcomment "The tanh() function returns the hyperbolic tangent of x, which is defined mathematically as sinh(x) / cosh(x).";command exp(x:flt) :flt address MATHunary_EXPflt;command exp(x:dbl) :dbl address MATHunary_EXPdblcomment "The exp(x) function returns the value of e (the base of natural logarithms) raised to the power of x.";command log(x:flt) :flt address MATHunary_LOGflt;command log(x:dbl) :dbl address MATHunary_LOGdblcomment "The log(x) function returns the natural logarithm of x.";command log10(x:flt) :flt address MATHunary_LOG10flt;command log10(x:dbl) :dbl address MATHunary_LOG10dblcomment "The log10(x) function returns the base-10 logarithm of x.";command pow(x:flt,y:flt) :flt address MATHbinary_POWflt;command pow(x:dbl,y:dbl) :dbl address MATHbinary_POWdblcomment "The pow(x,y) function returns the value of x raised to the power of y.";command sqrt(y:flt) :flt address MATHunary_SQRTflt;command sqrt(y:dbl) :dbl address MATHunary_SQRTdblcomment "The sqrt(x) function returns the non-negative square root of x.";command ceil(y:flt) :flt address MATHunary_CEILflt;command ceil(y:dbl) :dbl address MATHunary_CEILdblcomment "The ceil(x) function rounds x upwards to the nearest integer.";command fabs(y:dbl) :dbl address MATHunary_FABSdblcomment "The fabs(x) function returns the absolute value of the floating-point number x.";command floor(y:flt) :flt address MATHunary_FLOORflt;command floor(y:dbl) :dbl address MATHunary_FLOORdblcomment "The floor(x) function rounds x downwards to the nearest integer.";command fmod(y:flt,x:flt) :flt address MATHbinary_FMODflt;command fmod(y:dbl,x:dbl) :dbl address MATHbinary_FMODdblcomment "The fmod(x,y) function computes the remainder of dividing x by y. The return value is x - n * y, where n is the quotient of x / y, rounded towards zero to an integer.";command round(x:flt,y:int) :flt address MATHbinary_ROUNDflt;command round(x:dbl,y:int) :dbl address MATHbinary_ROUNDdblcomment "The round(n, m) returns n rounded to m places to the right of the decimal point; if m is omitted, to 0 places. m can be negative to round off digits left of the decimal point. m must be an integer.";command isnan(d:dbl) :bit address math_unary_ISNANcomment "The isnan(x) function returns true if x is 'not-a-number' (NaN), and false otherwise.";command isinf(d:dbl) :int address math_unary_ISINFcomment "The isinf(x) function returns -1 if x represents negative infinity, 1 if x represents positive infinity, and 0 otherwise.";command finite(d:dbl) :bit address math_unary_FINITEcomment "The finite(x) function returns true if x is neither infinite nor a 'not-a-number' (NaN) value, and false otherwise.";#line 193 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/mmath.mx"command rand () :int address MATHrandintcomment "return a random number";command srand(seed:int) :void address MATHsrandintcomment "initialize the rand() function with a seed";function mmath.pi():dbl; pi := 3.14159265358979323846:dbl; return pi;end pi;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -