概述
一、符号与绝对值
Function | Description |
---|---|
abs(x) | a positive value with the magnitude of x |
abs2(x) | the squared magnitude of x |
sign(x) | indicates the sign of x , returning -1, 0, or +1 |
signbit(x) | indicates whether the sign bit is on (true) or off (false) |
copysign(x,y) | a value with the magnitude of x and the sign of y |
flipsign(x,y) | a value with the magnitude of x and the sign of x*y |
二、幂、对数、根
Function | Description |
---|---|
sqrt(x) , √x | square root of x |
cbrt(x) , ∛x | cube root of x |
hypot(x,y) | hypotenuse of right-angled triangle with other sides of length x and y |
exp(x) | natural exponential function at x |
expm1(x) | accurate exp(x)-1 for x near zero |
ldexp(x,n) | x*2^n computed efficiently for integer values of n |
log(x) | natural logarithm of x |
log(b,x) | base b logarithm of x |
log2(x) | base 2 logarithm of x |
log10(x) | base 10 logarithm of x |
log1p(x) | accurate log(1+x) for x near zero |
exponent(x) | binary exponent of x |
significand(x) | binary significand (a.k.a. mantissa) of a floating-point number x |
三、三角函数
sin cos tan cot sec csc
sinh cosh tanh coth sech csch
asin acos atan acot asec acsc
asinh acosh atanh acoth asech acsch
sinc cosc
为了使用度数而不是弧度来计算三角函数,请在函数后缀d。 例如,sind(x)计算x的正弦值,其中x以度数指定。 具有度数变体的三角函数的完整列表为:
sind cosd tand cotd secd cscd
asind acosd atand acotd asecd acscd
最后
以上就是平淡蜡烛为你收集整理的Julia之初体验(四)简单函数的全部内容,希望文章能够帮你解决Julia之初体验(四)简单函数所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复