当前位置:网站首页>JS summary of math functions in math objects
JS summary of math functions in math objects
2022-06-11 02:16:00 【KjPrime】
Math Summary of objects
- The absolute value (abs)
- PI(π)
- square root (√)
- Maximum ( You can take the maximum value of multiple numbers max)
- minimum value ( You can take the minimum value of multiple numbers min)
- Exponentiation (pow)
- Take random values ( Greater than 0 Less than 1, Include 0 barring 1 random)
- take 32 The number of leading zeros in a binary number (clz32)
- Natural number (e)
- Symbolic function (sign)
- Take the floating-point function
- Integral function
- Exponential function
- power function
- Trigonometric functions ( Of the following methods x, In radians )
- Logarithmic function
- reference
The absolute value (abs)
Math.abs(x)
PI(π)
Math.PI(x)
square root (√)
Math.sqrt(x)
Maximum ( You can take the maximum value of multiple numbers max)
Math.max(...x)
minimum value ( You can take the minimum value of multiple numbers min)
Math.min(...x)
Exponentiation (pow)
Math.pow(x, y)
Take random values ( Greater than 0 Less than 1, Include 0 barring 1 random)
Math.random()
take 32 The number of leading zeros in a binary number (clz32)
Math.clz32(x) // return x Of 32 The number of leading zeros in a bit binary representation
Natural number (e)
Math.E
Symbolic function (sign)
Math.sign(x) // Greater than 0 return 1; Less than 0 return -1; be equal to 0 return 0
Take the floating-point function
Math.fround(x) // Returns the closest of the numbers (32 Bit single precision ) Floating point table
Integral function
Rounding up ( > x)
Math.ceil(x)
Rounding down ( < x)
Math.floor(x)
Round to the nearest whole
Math.round(x)
integer ( Take the integer part of the number )
Math.trunc(x)
Exponential function
Natural number e Of x Power (exp)
Math.exp(x)
Natural number e Of x The power minus 1(exp - 1)
Math.expm1(x)
power function
Math.pow(x, y) // x Of y Power
square root
√1/2(1/2 The square root of )
Math.SQRT1_2
√2(2 The square root of )
Math.SQRT2
Root of the third power
Math.cbrt(x)
Trigonometric functions ( Of the following methods x, In radians )
Positive trigonometric function
cosine (cos)
Math.cos(x)
sine (sin)
Math.sin(x)
tangent (tan)
Math.tan(x)
Anti trigonometric function
Arccosine (arccos)
Math.acos(x)
Anti sine (arcsin)
Math.asin(x)
Anyway (arcsin)
Math.atan(x)
Hyperbolic trigonometric functions
Hyperbolic cosine
Math.cosh(x)
Hyperbolic sine
Math.sinh(x)
Hyperbolic tangent
Math.tanh(x)
Hyperbolic inverse trigonometric function
Hyperbolic arccosine
Math.acosh(x)
Hyperbolic anti sine
Math.asinh(x)
Hyperbolic arctangent
Math.atanh(x)
Logarithmic function
2 Bottom (log2)
Math.log2(x)
log2(e)
Math.LOG2E
Natural number e Bottom (ln)
Math.log(x)
1+x The natural logarithm of
Math.log1p(x)
ln2
Math.LN2
ln10
Math.LN10
10 Bottom (log10)
Math.log10(x)
log10(e)
Math.LOG10E
reference
边栏推荐
- Understand the role of before and after Clearfixafter clear floating
- 378. 有序矩阵中第 K 小的元素
- 关于Set集合类你都知道什么?来自《卷Ⅰ》的灵魂提问
- Asemi FET 12n65 parameters, 12n65 specifications, 12n65 features
- Data and electricity course design: circuit of full adder / subtractor
- Record the actual record of my question brushing
- Talk about an annotation implementation interface retry
- Implementing stack with queue
- [untitled]
- Enrichment of core knowledge points of interface automation to add points to the interview
猜你喜欢

20n10-asemi medium and small power MOS transistor 20n10

Enrichment of core knowledge points of interface automation to add points to the interview
![[music] playing blue and white porcelain based on MATLAB [including Matlab source code 1873]](/img/cf/63b04080867e93ab2e00e2e21b37df.jpg)
[music] playing blue and white porcelain based on MATLAB [including Matlab source code 1873]

Secret

SAP SMARTFORMS换页打印自动判断

浅析直播间海量聊天消息的架构设计难点

【并行与分布式系统】Cache学习

---Arrange numbers---

Analysis of common ADB commands

JS Part 5
随机推荐
Programming implementation: input any English month, and output its corresponding Chinese prompt after looking up the month table. Abbreviations can also be found.
Switch case uses enumeration classes to compare
Return function of different return values
[traffic sign recognition] Based on Matlab GUI YCbCr feature extraction +bp neural network traffic sign recognition [including Matlab source code 1869]
Within one month, the broadcasting volume has increased by 9million, and station B has three traffic growth passwords!
[Qt] Erreur: qapplication: No such file or directory Solution
Introduction and practice of QT tcp/udp network protocol (II) UDP communication
Blue Bridge Cup: the sixth preliminary round - "temperature recorder"
Shell learning tutorial (super detailed and complete)
Binary tree sequence traversal
14:00面试,14:08就出来了 ,问的实在是太...
InfoQ geek media's 15th anniversary solicitation | in depth analysis of container runtime Technology
Ortele has obtained three rounds of financing nine months after its establishment, and hard discount stores have found new ways to grow?
Secret
How to change the administrator's Avatar in win11? Win11 method of changing administrator image
技术分享| 快对讲,全球对讲
[untitled]
The interviewer of Tencent said that who knows the internal module index principle and performance optimization idea of MySQL architecture?
The largest kth element in the array
Introduction and practice of QT tcp/udp network protocol (I) TCP communication