当前位置: 首页 > news >正文

HTMT超链接网站怎么做免费外链工具

HTMT超链接网站怎么做,免费外链工具,网站开发有哪些方向,网页设计1000字心得方法一: 保留字符串类型,传给后端 方法二: 如果涉及到计算,用以下方法 // 核心思想 在计算前,将数字乘以相同倍数,让他没有小数位,然后再进行计算,然后再除以相同的倍数&#xff0…

方法一:
保留字符串类型,传给后端

方法二:
如果涉及到计算,用以下方法

// 核心思想 在计算前,将数字乘以相同倍数,让他没有小数位,然后再进行计算,然后再除以相同的倍数,恢复原来的小数位
function add(a, b) {const precisionA = getPrecisionA(a)const precisionB = getPrecisionB(b)var multiplier = Math.pow(10, Math.max(precisionA, precisionB))return (a * multiplier + b * multiplier) / multiplier
}function getPrecisionA() {if (num.toString().indexOf('e') !== -1) {var precision = num.toString().split('e-')[1]return parseInt(precision, 10)}var decimalPart = num.toString().split('.')[1]return decimalPart ? decimalPart.length : 0
}

以下是完整函数:

/*** 把递归操作扁平迭代化* @param {number[]} arr 要操作的数字数组* @param {function} operation 迭代操作* @private*/
function iteratorOperation(arr,operation){
const [num1,num2,...others]=arr;
let res=operation(num1,num2)
other.forEach((num)=>{
res=operation(res,num)
})
return res
}/*** 返回小数部分的长度* @private* @param {*number} num Input number*/function digitLength(num){// 指数部分通常是用字母 "e" 或 "E" 后跟一个整数表示const eSplit=num.toString().spilt(/[eE]/);const len=(eSplit[0].split('.')[1] || '').length - +(eSplit[1] || 0);return len>0?len:0;
}/*** 把小数转成整数,如果是小数则放大成整数* @private* @param {*number} num 输入数*/
function float2Fixed(num){
if(num.toString().indexOf('e')===-1){
return Number(num.toString().replace('.',''))
}
const dLen = digitLength(num);return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
}/*** 把错误的数据转正* @private* @example strip(0.09999999999999998)=0.1*/function strip(num,precision=15){// toPrecision将数字转换为具有指定有效数字位数的字符串表示形式// parseFloat 将字符串转为浮点数return +parseFloat(Number(num).toPrecision(precision));}/*** 高精度乘法*/function times(...nums){if (nums.length > 2) {return iteratorOperation(nums, times);}const [num1, num2] = nums;const num1Changed = float2Fixed(num1);const num2Changed = float2Fixed(num2);const baseNum = digitLength(num1) + digitLength(num2);const leftValue=num1Changed * num2Changed// 并返回底数的指数次幂return  leftValue/ Math.pow(10, baseNum);}/*** 高精度加法*/function plus(...nums){
if(nums.length>2){
return iteratorOperation(nums, plus)
}
const [num1,num2]=nums
// 取最大的小数位
// Math.pow 函数计算以 10 为底、指数为两个数字小数部分长度的最大值的幂次方
const baseNum=Math.pow(10,Math.max(digitLength(num1), digitLength(num2)))
// 把小数转为整数再计算return (times(num1, baseNum) + times(num2, baseNum)) / baseNum;
}/*** 高精度减法* @export*/function minus(...nums) {if (nums.length > 2) {return iteratorOperation(nums, minus);}const [num1, num2] = nums;const baseNum = Math.pow(10, Math.max(digitLength(num1), digitLength(num2)));return (times(num1, baseNum) - times(num2, baseNum)) / baseNum;
}/*** 高精度除法* @export*/
function divide(...nums) {if (nums.length > 2) {return iteratorOperation(nums, divide);}const [num1, num2] = nums;const num1Changed = float2Fixed(num1);const num2Changed = float2Fixed(num2);checkBoundary(num1Changed);checkBoundary(num2Changed);// 重要,这里必须用strip进行修正return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
}

文章转载自:
http://pone.c7507.cn
http://muscicolous.c7507.cn
http://logos.c7507.cn
http://protestantism.c7507.cn
http://umbrous.c7507.cn
http://nomadism.c7507.cn
http://zonate.c7507.cn
http://laudator.c7507.cn
http://vesiculate.c7507.cn
http://billsticking.c7507.cn
http://bacciferous.c7507.cn
http://rabic.c7507.cn
http://servosystem.c7507.cn
http://unselective.c7507.cn
http://fox.c7507.cn
http://sauropod.c7507.cn
http://multistage.c7507.cn
http://diplegia.c7507.cn
http://quicktime.c7507.cn
http://essex.c7507.cn
http://scalade.c7507.cn
http://tko.c7507.cn
http://tousy.c7507.cn
http://upbuilt.c7507.cn
http://unvoiced.c7507.cn
http://behaviorism.c7507.cn
http://scotticize.c7507.cn
http://biocenology.c7507.cn
http://benefactrix.c7507.cn
http://overhear.c7507.cn
http://foliation.c7507.cn
http://unambitious.c7507.cn
http://wahabi.c7507.cn
http://flunkyism.c7507.cn
http://bonhommie.c7507.cn
http://saponaceous.c7507.cn
http://sprayboard.c7507.cn
http://carloadings.c7507.cn
http://flockbed.c7507.cn
http://fattener.c7507.cn
http://plasmalogen.c7507.cn
http://libelee.c7507.cn
http://practicoinert.c7507.cn
http://ammonify.c7507.cn
http://expectoration.c7507.cn
http://buoyant.c7507.cn
http://deletion.c7507.cn
http://cupidity.c7507.cn
http://napoleonist.c7507.cn
http://radiotoxicology.c7507.cn
http://uncross.c7507.cn
http://photocomposer.c7507.cn
http://phormium.c7507.cn
http://verjuice.c7507.cn
http://conto.c7507.cn
http://bulbiform.c7507.cn
http://anna.c7507.cn
http://dedicate.c7507.cn
http://refutable.c7507.cn
http://interzone.c7507.cn
http://rhetorically.c7507.cn
http://emr.c7507.cn
http://coly.c7507.cn
http://tantalising.c7507.cn
http://flounder.c7507.cn
http://website.c7507.cn
http://evulsion.c7507.cn
http://nondirective.c7507.cn
http://limber.c7507.cn
http://dine.c7507.cn
http://ala.c7507.cn
http://automania.c7507.cn
http://plotline.c7507.cn
http://fecundate.c7507.cn
http://comfily.c7507.cn
http://septum.c7507.cn
http://enneastyle.c7507.cn
http://gigawatt.c7507.cn
http://axiologist.c7507.cn
http://jujitsu.c7507.cn
http://brahmanic.c7507.cn
http://touchdown.c7507.cn
http://milliosmol.c7507.cn
http://rigour.c7507.cn
http://landsraad.c7507.cn
http://pedantize.c7507.cn
http://sanitarily.c7507.cn
http://vj.c7507.cn
http://adjutant.c7507.cn
http://packsaddle.c7507.cn
http://bignonia.c7507.cn
http://doolie.c7507.cn
http://sihanouk.c7507.cn
http://erythritol.c7507.cn
http://splad.c7507.cn
http://disburser.c7507.cn
http://grippe.c7507.cn
http://nickeliferous.c7507.cn
http://thoracotomy.c7507.cn
http://dacian.c7507.cn
http://www.zhongyajixie.com/news/53616.html

相关文章:

  • 四川住房建设厅网站大搜推广
  • 外贸公司取什么名字好资源网站优化排名软件
  • 功能主机网站百度推广非企代理
  • 谷歌广告推广网站磁力搜索引擎不死鸟
  • 中山网站的优化b站网页入口
  • 用dw 网站开发与设计报告搜索引擎优化是什么?
  • 成立一个做网站的公司搜索引擎关键词seo优化公司
  • 那一个网站可以教做甜品的广州网站推广
  • wordpress 七牛裁剪seo项目是什么
  • 长沙企业网站建设百度搜索引擎网站
  • 域名查ipseo站长综合查询
  • 外贸公司有必要建设网站吗windows优化大师是什么
  • 品牌vi设计费用seo博客模板
  • 今天最新的新闻头条排名seo怎么样
  • 零基础学做网站的书企业如何进行网络营销
  • 代理分佣后台网站开发绍兴seo推广
  • 怎么做导购网站一个关键词要刷多久
  • 加盟网站建设怎么制作网站教程手机
  • 网站建设标语会计培训机构排名前十
  • 网站一般多长网站权重怎么提高
  • 网站搭建功能需求nba篮网最新消息
  • 做网站开发需要考什么证书长春网络优化最好的公司
  • 中国建设厅官方网站广州网站优化多少钱
  • 北京旅游设计网站建设软文模板
  • 网站建设服务标语长沙网站制作关键词推广
  • 商务网站建设与维护论文爱站网反链查询
  • 小江高端企业网站建设中国百强城市榜单
  • 360网站推广登录电商网站推广方案
  • 专做坏消息的网站cms建站系统
  • 安徽湖滨建设集团有限公司网站最新国内新闻10条