This is boggling my mind.   The square root of 100 seconds is 10 seconds The square root of 100000 milliseconds is approximately 316.23 milliseconds 10 seconds does not approximately equal 316.23 milliseconds   Do I have a fundamental problem with my unit conversions or my ability to punch numbers on a calculator, or am I just not thinking through the problem with the right mindset?  The reasoning behind the question is that I made an incorrect prediction for the run time of an algorithm after I reduced its complexity. Previously, the algorithm had n operations and ran for 100 seconds, where n is the size of the input. Now, my algorithm has sqrt(n) operations. I predicted that the algorithm would run in 10 seconds, and was surprised when it ran in 0.375 seconds.   Note: For answering purposes, assume that the overhead time associated with running my program is negligible compared to the variable time it takes to run my algorithm. In other words, assume that the run-time is almost entirely dependent on the size of n, for any n of sufficient size.
121265
$(\mathbf60\times\mathbf60)$ Seconds = $3600$ Seconds or $60$ Minutes  while  $(1\times 1)$ Minute = 1 Minute  What am I missing? and sorry about formatting i am new here on math network
41748
Possible Duplicate:          The square root of a number squared is equal to the absolute value of that number. Why is $\sqrt{x^2} = |x|$? Why not just $x$? Please give me a reason and also help me prove it.
95746
I read somewhere once that the modulus operator is inefficient on small embedded devices like 8 bit micro-controllers that do not have integer division instruction. Perhaps someone can confirm this but I thought the difference is 5-10 time slower than with an integer division operation.  Is there another way to do this other than keeping a counter variable and manually overflowing to 0 at the mod point?  const int FIZZ = 6; for(int x = 0; x &lt; MAXCOUNT; x++) {     if(!(x % FIZZ)) print("Fizz\n"); // slow on some systems }   vs:  The way I am currently doing it:  const int FIZZ = 6; int fizzcount = 1; for(int x = 1; x &lt; MAXCOUNT; x++) {     if(fizzcount &gt;= FIZZ)      {         print("Fizz\n");         fizzcount = 0;     } }
42887
$$ \left\lfloor\frac{1}{\sqrt{1}} + \frac{1}{\sqrt{2}} +\dots+ \frac{1}{\sqrt{100}}\right\rfloor =\,? $$   I rationalized the denominator and then I think I should somehow group the numbers, but i don't know how.  Thanks in advance!
91309
I am writing a little library with some prime number related methods. As I've done the groundwork (aka working methods) and now I'm looking for some optimization.  Ofcourse the internet is an excellent place to do so. I've, however, stumbled upon a rounding problem and I was wondering how to solve this.  In the loop I use to test a number for it's primality it's more efficient to search until sqrt(n) instead of n/2 or even n - 1. But due to rounding problems some number get skipped and thus some primes are skipped! For example, the 10000th prime should be: 104729, but the 'optimized' version ends up with: 103811.  Some code (it's open for more optimization, I know, but I can handle only one thing at a time):  /// &lt;summary&gt; /// Method for testing the primality of a number e.g.: return IsPrime(29); /// History: /// 1. Initial version, most basic form of testing: m smaller then n -1 /// 2. Implemented m smaller then sqrt(n), optimization due to prime factoring /// &lt;/summary&gt; /// &lt;param name="test"&gt;Number to be tested on primality&lt;/param&gt; /// &lt;returns&gt;True if the number is prime, false otherwise&lt;/returns&gt; public static bool IsPrime(int test) {     // 0 and 1 are not prime numbers     if (test == 0 || test == 1) return false;      // 2 and 3 are prime numbers     if (test == 2) return true;      // all even numbers, save 2, are not prime     if (test % 2 == 0) return false;      double squared = Math.Sqrt(test);     int flooredAndSquared = Convert.ToInt32(Math.Floor(squared));      // start with 5, make increments of 2, even numbers do not need to be tested     for (int idx = 3; idx &lt; flooredAndSquared; idx++)     {         if (test % idx == 0)         {             return false;         }     }     return true; }   I know the squared part fails me (or I fail), tried Math.Ceiling as well, with about the same results.
80740
Using 5000-digit precision in PARI/GP, I discovered that the fractional part of $(\sqrt{2}+\sqrt{3})^{2008}$ is extremely small, less than $10^{-999}$.  Is there a simple explanation for this fact ?  This looks like a Pisot number issue (similar questions have already been studied on MSE, see for example ), but it’s a more complicated situation.   Related :
6893
this is something that came up when working with one of my students today and it has been bothering me since.  It is more of a maths question than a pedagogical question so i figured i would ask here instead of MESE.  Why is $\sqrt{-1} = i$ and not $\sqrt{-1}=\pm i$?  With positive numbers the square root function always returns both a positive and negative number, is it different for negative numbers?
70367
I spent 3 hours trying to write a command to format a time (duration) expressed as a floating number (in seconds) in a nice form as follows:  if the time is &lt; 60 write as a float with 3 decimals (i.e. milliseconds)  else let h,m,s be the hours, minutes and seconds corresponding to the time      if h=0 then write as m:ss (ss always with 2 digits, m can have only 1)      else write h:mm:ss (mm and ss with 2 digits, h can have only 1)   So 1.25678 gives 1.256, 125.35 gives 2:05, 18249 (which equals to 5*3600+4*60+9) gives 5:04:09.  I tried several packages for the comparison/formatting. No success. Can someone help me ? Thanks !
113800
I'm little puzzled with square roots basics which says that square root of a squared number is absolute value of that number. I was in a impression that it would have both positive and negative roots.For example  The Basic says: $\sqrt{2^2} = |2| = 2$  While I think that: $\sqrt{2^2} = \sqrt{4} = 2$ or $-2$.
11931
I need to calculate the SQRT of  $x$ to $y$ decimal places. I'm dealing with $128$-bit precision, giving a limit of $28$ decimal places. Obviously, if $\,y &gt; 28$, the , which I'm currently using, becomes futile, as it simply doesn't offer $y$ decimal places.  My question to you is, can I calculate the Square Root digit-by-digit? For example, calculating the $n$-th digit, assuming I already have digit $\,n - 1$. I'm well aware this may be impossible, as I've not found any such method through Google yet, just checking here before I give up in search of arbitrary precision methods.
62499
I Have a string that is equal to a date, represented as the number of milliseconds since the Unix epoch.  I am trying to output it into d-m-Y.  The string I was given was "1227643821310", and I am told that the result should be equal to 2-12-2008, but I keep getting a result of 25-11-2008  My code is as follows:  $mil = 1227643821310; $seconds = $mil / 1000; echo date("d-m-Y", $seconds);   Any ideas as to why this might be?
8931
Many years ago,  I noticed that $987654321/123456789 = 8.0000000729\ldots$.  I sent it in to Martin Gardner at Scientific American and he published it in his column!!!  My life has gone downhill since then:)  My questions are:   Why is this so? What happens beyond the "$729$"? What happens in bases other than $10$?
106305
It is straight forward to show that $\sqrt[n]{n!} &lt; n$ from:   $2 &gt; \sqrt{2}$ $\frac{n+1}{n} &gt; \frac{\sqrt[n+1]{n+1}}{\sqrt[n]{n}}$ since $\frac{n+1}{\sqrt[n+1]{n+1}} &gt; \frac{n}{\sqrt[n]{n}}$    Is this the best that can be done?  Is it possible to find a better upper bound for $\sqrt[n]{n!}$
40496
What's the thing with $\sqrt{-1} = i$? Do they really teach this in the US? It makes very little sense, because $-i$ is also a square root of $-1$, and the choice of which root to label as $i$ is arbitrary. So saying $\sqrt{-1} = i$ is plainly false!  So why do people say $\sqrt{-1} = i$? Is this how it's taught in the US?
47975
I love using time to find out how long a command took to execute but when dealing with commands that execute sub-commands internally (and provide output that allows you to tell when each of those sub-commands start running) it would be really great to be able to tell after what number of seconds (or milliseconds) a specific sub-command started running.  When I say sub-command, really the only way to distinguish these from the outside is anything printed to standard out.  Really this seems like it should be an option to time.
24796
Which of the numbers $99^{100}$ &amp; $100^{99}$ is the larger? Solve without using logarithms.
50304
Last year in Pre-Algebra we learned about square roots. I was taught then that $\sqrt{64}=8$ and $\sqrt{100}=10$, which I understood and accepted. I was also taught that $\pm\sqrt{64} = 8,-8$ because both of those numbers squared is 64, which I also get. But this year, with a new school and teacher in a different state, our teacher is telling us that: $\sqrt{64}=8,-8$ and $\pm\sqrt{64}$ also is $8,-8$. The way to get the positive root of something is: $+\sqrt{64}=8$ And these seem to contradict each other. I was always taught that a regular square root returned a positive number and only a positive number, but now my teacher is saying a regular square root gives two numbers, and considering the square root of a number $n$ is defined as $y^2=n$ I see where he is coming from. Upon researching this Wikipedia says:  For example, $4$ and $−4$ are square roots of $16$ because $4^{2} = (−4)^{2} = 16$  And Wolfram MathWorld says:  Note that any positive real number has two square roots, one positive and one negative. For example, the square roots of $9$ are $-3$ and $+3$  But on the other side, Wolfram Alpha, when given &quot;The square root of 9&quot; gives only 3.  So, which is right? Is $\sqrt{64}$ considered $8$? or is it $8,-8$?