JavaScript的基础计算库
计算方法 | 方法名 | 别名 |
---|---|---|
加法 | addition | jiafa,jia |
减法 | subtraction | jianfa,jian |
乘法 | multiplication | chengfa,cheng |
除法 | division | chufa,chu |
科学计数法 | scientificNotationToString | / |
// 全量引入
import soeasymath from "soeasymath"
// 按需引入
import { subtraction } from "soeasymath"
import { addition } from "soeasymath"
console.log(addition(0.1,0.2,0.3....))
import { subtraction } from "soeasymath"
console.log(subtraction(0.1,0.2,0.3....))
import { multiplication } from "soeasymath"
console.log(multiplication(0.1,0.2,0.3....))
import { division } from "soeasymath"
console.log(division(0.1,0.2,0.3....))
import { jiafa } from "soeasymath"
console.log(jiafa(0.1,0.2,0.3....))
import { scientificNotationToString } from "soeasymath"
console.log(scientificNotationToString(0.000000000000001))