기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.
다음 표에는 JSON 표현식 언어와 함께 사용할 수 있는 산술 표현식이 나와 있습니다.
Operation | 표현식 | 입력 | 출력 |
---|---|---|---|
Addition | ["+", operand1, operand2] |
{ sum: ["+", 2, 4] } |
{ sum: 6 } |
뺄셈 | ["-", operand1, operand2] |
{ difference: ["-", 10, 3] } |
{ difference: 7 } |
곱셈 | ["*", operand1, operand2] |
{ product: ["*", 5, 6] } |
{ product: 30 } |
나눗셈 | ["/", operand1, operand2] |
{ quotient: ["/", 20, 4] } |
{ quotient: 5 } |
모듈로 | ["%", operand1, operand2] |
{ remainder: ["%", 15, 4] } |
{ remainder: 3 } |
지수화 | ["**", base, exponent] |
{ power: ["**", 2, 3] } |
{ power: 8 } |
절대값 | ["abs", operand] |
{ absolute: ["abs", -5] } |
{ absolute: 5 } |
Square Root(제곱 근) | ["sqrt", operand] |
{ sqroot: ["sqrt", 16] } |
{ sqroot: 4 } |
로그(기본 10) | ["log10", operand] |
{ log: ["log10", 100] } |
{ log: 2 } |
자연 로그 | ["ln", operand] |
{ ln: ["ln", Math.E] } |
{ ln: 1 } |
라운드 | ["round", operand] |
{ rounded: ["round", 3.7] } |
{ rounded: 4 } |
바닥 | ["floor", operand] |
{ floor: ["floor", 3.7] } |
{ floor: 3 } |
천장 | ["ceil", operand] |
{ ceiling: ["ceil", 3.2] } |
{ ceiling: 4 } |
사인 | ["sin", operand] |
{ sine: ["sin", 0] } |
{ sine: 0 } |
코사인 | ["cos", operand] |
{ cosine: ["cos", 0] } |
{ cosine: 1 } |
접선 | ["tan", operand] |
{ tangent: ["tan", Math.PI] } |
{ tangent: 0 } |