About 50 results
Open links in new tab
  1. What's the fastest way to square a number in JavaScript?

    function squareIt(number) { return Math.pow(number,2); } function squareIt(number) { return number * number; } Or some other method that I don't know about. I'm not looking for a golfed answer, but the …

  2. Have I implemented the Square function correctly? - Stack Overflow

    Jul 29, 2018 · I decided to write a simple program to square a number using functions. I get the desired output, however I would like to know if I have implemented it correctly?

  3. python - Squaring all elements in a list - Stack Overflow

    I am told to Write a function, square(a), that takes an array, a, of numbers and returns an array containing each of the values of a squared. At first, I had def square(a): for i in a: prin...

  4. Square each number in an array in javascript - Stack Overflow

    I'm trying to square each number in an array and my original code didn't work. I looked up another way to do it, but I'd like to know WHY the original code didn't work. Original code: function(ar...

  5. Writing your own square root function - Stack Overflow

    Oct 26, 2009 · 82 How do you write your own function for finding the most accurate square root of an integer? After googling it, I found this (archived from its original link), but first, I didn't get it …

  6. How is the square root function implemented? [closed]

    Feb 4, 2016 · N-R uses calculus and does a better job of predicting the result. After you've got a few bits of accuracy in the square root, it converges very rapidly. See Wikipedia Newton's Method — …

  7. Root mean square of a function in python - Stack Overflow

    Dec 4, 2016 · I want to calculate root mean square of a function in Python. My function is in a simple form like y = f(x). x and y are arrays. I tried Numpy and Scipy Docs and couldn't find anything.

  8. What is the C++ function to raise a number to a power?

    That standard library function pow has several drawbacks: relatively slow not compatible with physical quantities libraries like mp-units not exact not very readable not adapted to integers. In nearly all …

  9. Making a square() function without x*x in C++ - Stack Overflow

    Mar 23, 2016 · Implement square () without using the multiplication operator; that is, do the x*x by repeated addition (start a variable result at 0 and add x to it x times). Then run some version of “the …

  10. scikit learn - Is there a library function for Root mean square error ...

    Jun 20, 2013 · What is RMSE? Also known as MSE, RMD, or RMS. What problem does it solve? If you understand RMSE: (Root mean squared error), MSE: (Mean Squared Error) RMD (Root mean …