简体   繁体   English

如何得到一个数的双平方根

[英]How do I get the double Square root of a number

I need to get a double square root of a number but my codes won't work:我需要得到一个数字的双平方根,但我的代码不起作用:

function doubleSquareRootOf(num) {
  return num * num * num;
}

var output = doubleSquareRootOf(121);
console.log(output); // --> it must return 22 but its displaying 1771561

Any idea?任何的想法?

尝试 sqrt * 2 而不是 num

return Math.sqrt(num)*2;

math.sqrt(math.sqrt(number)) -> 这是一个数字的双平方根

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何广场数的数字? - How do I square a number's digits? 如何让MongoDB将数字识别为double? - How do I get MongoDB to recognize a number as a double? 如何在我的JavaScript / HTML计算器中添加平方根? - How do I add square root to my JavaScript/HTML calculator? 如何将方括号内的数字与正则表达式匹配 - How do I match a number inside square brackets with regex 我可以在广场内获得号码吗? - Can I get number inside square? 我可以将字符串转换为使用Javascript在HTML中浮动并获得平方根吗? - Can I convert a string to float in HTML with Javascript and get Square Root? 仅当在平方根符号后按下数字(按钮)时才开平方 - Square Root only if a number (button) is pressed after the square root symbol 使用`.every`数组方法如何编写一个函数来确定数组中的每个数字是否都是平方数? - Using the `.every` array method how do I write a function that determines whether every number in an array is a square number? 我想更改随数字移动的 object 的形状,例如矩形、三角形、正方形。 怎么做? - I want to change the shapes of object moving with number, For EXAMPLE rectangle,triangle,square. HOW TO DO THAT? 如何在方表中找到一个数字所属的一组数字的索引? - How do I find the index of the group of numbers a number belongs to in a square table?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM