标签:java ons `` 绝对值 var rip asc script 精度
```javascript
var x = 3;
var y = 1.1;
console.log(x + y);
console.log((x * y));
console.log(((x+y) * (x-y)));
var z = 9;
//开平方
console.log((Math.sqrt(z)));
//abs 绝对值
console.log((Math.abs(y/x)));
//固定精度
var x = 3;
var y =1.1;
var z = x * y;
// toFixed 设置精确小数点后几位
console.log(z.toFixed(2));
var x = 3;
var y = 1;
console.log((x+y).toFixed(10));
标签:java ons `` 绝对值 var rip asc script 精度
原文地址:https://www.cnblogs.com/itxcr/p/11600169.html