Windows calculator is giving wrong answer
The answer of sqrt(4) - 2 is 0 or -4. But if you type this in windows standard calculator that is giving "-1.068281969439142e-19" as the answer. If you use windows scientific calculator its saying that "-8.1648465955514287168521180122928e-39" is the answer. This is not only for sqrt(4). If you try this in Windows XP & Windows 7... same problem. I did not cheked pre windows XP o/s. What is the reason???-Yoganathan- Lecturer, WinSYS Networks (PVT) LTD, Sri Lanka. www.winsysnetworks.net
May 28th, 2011 12:42pm

The reason is the mathematical algorithm that is used for calculation. It is not a Microsoft Calculator problem. e-19 or e-39 is negligible and can be considered equal to 0. So, the result is not wrong. The answer of sqrt(4) - 2 is 0 or -4 Why it is -4? This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. Microsoft Student Partner Microsoft Certified Professional Microsoft Certified Systems Administrator: Security Microsoft Certified Systems Engineer: Security Microsoft Certified Technology Specialist: Windows Server 2008 Active Directory, Configuration Microsoft Certified Technology Specialist: Windows Server 2008 Network Infrastructure, Configuration Microsoft Certified Technology Specialist: Windows Server 2008 Applications Infrastructure, Configuration
Free Windows Admin Tool Kit Click here and download it now
May 28th, 2011 12:54pm

The reason is the mathematical algorithm that is used for calculation. It is not a Microsoft Calculator problem. e-19 or e-39 is negligible and can be considered equal to 0. So, the result is not wrong. The answer of sqrt(4) - 2 is 0 or -4 Why it is -4? : )
May 28th, 2011 1:38pm

sqrt(4)= (+2) or (-2) => sqrt(4) -2 = (+2)-2 or (-2) -2 => = 0 or -4 but "windows" mathematical algorithm is saying that, sqrt(4) is approximately equal to -1 or -8. -Yoganathan- Lecturer, WinSYS Networks (PVT) LTD, Sri Lanka. www.winsysnetworks.net
Free Windows Admin Tool Kit Click here and download it now
May 28th, 2011 1:47pm

but if we ignored that complex number (-2), then sqrt(4) -2= 0. but windows calc is giving different answer. And standard calc & scientific calc giving to different wrong answer. Use microsoft search engine "Bing" & type " sqrt(4) -2", then the answer is 0. -Yoganathan- Lecturer, WinSYS Networks (PVT) LTD, Sri Lanka. www.winsysnetworks.net
May 28th, 2011 1:53pm

It was three years ago since my last mathematical course that I had. As I remember, the output of sqrt should never be negative. Anyway, the output is not -1 ot -8 as it is -1.068281969439142e-19 and -8.1648465955514287168521180122928e-3. AFAIK, that means -1.068281969439142 x 10(-19) and -8.1648465955514287168521180122928 x 10(-39) which can be considered as equal to 0. The output is not wrong as this is due to the used algorithm (Fogot its name). The answer is not the same as the scientific one gives more precision. This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. Microsoft Student Partner Microsoft Certified Professional Microsoft Certified Systems Administrator: Security Microsoft Certified Systems Engineer: Security Microsoft Certified Technology Specialist: Windows Server 2008 Active Directory, Configuration Microsoft Certified Technology Specialist: Windows Server 2008 Network Infrastructure, Configuration Microsoft Certified Technology Specialist: Windows Server 2008 Applications Infrastructure, Configuration
Free Windows Admin Tool Kit Click here and download it now
May 28th, 2011 2:09pm

Spell it out, friend. (-2) x (-2) = +4 And the elementary charge (of a proton) is 1.602176487(40)×10−19 C is only insignificant sometimes.
May 28th, 2011 2:09pm

Spell it out, friend. (-2) x (-2) = +4 And the elementary charge (of a proton) is 1.602176487(40)×10−19 C is only insignificant sometimes. (-2) x (-2) = +4, yes but AFAIK the output of sqrt should be positive. And the elementary charge (of a proton) is 1.602176487(40)×10−19 C is only insignificant sometimes. That depends of where it is used. Like I said, that is not a problem with Windows Calculator as this is a problem with the used algorithm. For protons, please give me an example where calculation using CALC will give a wrong output. This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. Microsoft Student Partner Microsoft Certified Professional Microsoft Certified Systems Administrator: Security Microsoft Certified Systems Engineer: Security Microsoft Certified Technology Specialist: Windows Server 2008 Active Directory, Configuration Microsoft Certified Technology Specialist: Windows Server 2008 Network Infrastructure, Configuration Microsoft Certified Technology Specialist: Windows Server 2008 Applications Infrastructure, Configuration
Free Windows Admin Tool Kit Click here and download it now
May 28th, 2011 2:16pm

May 28th, 2011 2:23pm

Hello derosnec, this is another thing as here you are dealing will complex numbers. Will be back soon. This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. Microsoft Student Partner Microsoft Certified Professional Microsoft Certified Systems Administrator: Security Microsoft Certified Systems Engineer: Security Microsoft Certified Technology Specialist: Windows Server 2008 Active Directory, Configuration Microsoft Certified Technology Specialist: Windows Server 2008 Network Infrastructure, Configuration Microsoft Certified Technology Specialist: Windows Server 2008 Applications Infrastructure, Configuration
Free Windows Admin Tool Kit Click here and download it now
May 28th, 2011 2:33pm

Perfectly normal as the input of sqrt should never be negative. This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. Microsoft Student Partner Microsoft Certified Professional Microsoft Certified Systems Administrator: Security Microsoft Certified Systems Engineer: Security Microsoft Certified Technology Specialist: Windows Server 2008 Active Directory, Configuration Microsoft Certified Technology Specialist: Windows Server 2008 Network Infrastructure, Configuration Microsoft Certified Technology Specialist: Windows Server 2008 Applications Infrastructure, Configuration
May 28th, 2011 2:34pm

I apologize for teasing you Mr X. But it's funny.
Free Windows Admin Tool Kit Click here and download it now
May 28th, 2011 2:35pm

Thanks Mr. X for quick respose. but the problem is if you check the answer for sqrt(4) = 2 & it saying 2-2 = 0. But sqrt(4) - 2 =???? for this its giving that answer. but Bing search engine is straightly saying that equal to 0. Still I confused. Thanks again. If you have a correct suggestion put it here. But the Non windows calculator is saying 0. -Yoganathan- Lecturer, WinSYS Networks (PVT) LTD, Sri Lanka. www.winsysnetworks.net
May 28th, 2011 2:51pm

That's because it's keeping track of the original input. It's the difference between an INTEGER and a FLOAT. I think Bill Gates' Runtime Basic was able to achieve that uncommonly sophisticated precision too, back ca 1975. ; )
Free Windows Admin Tool Kit Click here and download it now
May 28th, 2011 3:02pm

Thanks Mr. X for quick respose. but the problem is if you check the answer for sqrt(4) = 2 & it saying 2-2 = 0. But sqrt(4) - 2 =???? for this its giving that answer. but Bing search engine is straightly saying that equal to 0. Still I confused. Thanks again. If you have a correct suggestion put it here. But the Non windows calculator is saying 0. -Yoganathan- Lecturer, WinSYS Networks (PVT) LTD, Sri Lanka. www.winsysnetworks.net The result is considered as 0. Like I said previously, -1.068281969439142 x 10(-19) and -8.1648465955514287168521180122928 x 10(-39) can be considered as equal to 0. This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. Microsoft Student Partner Microsoft Certified Professional Microsoft Certified Systems Administrator: Security Microsoft Certified Systems Engineer: Security Microsoft Certified Technology Specialist: Windows Server 2008 Active Directory, Configuration Microsoft Certified Technology Specialist: Windows Server 2008 Network Infrastructure, Configuration Microsoft Certified Technology Specialist: Windows Server 2008 Applications Infrastructure, Configuration
May 28th, 2011 3:33pm

However,
Free Windows Admin Tool Kit Click here and download it now
May 28th, 2011 4:07pm

How much is the square root of zero, Mr X?
May 28th, 2011 7:31pm

How much is the square root of zero, Mr X? It is not valid as the input is a negative value that is close to 0. This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. Microsoft Student Partner Microsoft Certified Professional Microsoft Certified Systems Administrator: Security Microsoft Certified Systems Engineer: Security Microsoft Certified Technology Specialist: Windows Server 2008 Active Directory, Configuration Microsoft Certified Technology Specialist: Windows Server 2008 Network Infrastructure, Configuration Microsoft Certified Technology Specialist: Windows Server 2008 Applications Infrastructure, Configuration
Free Windows Admin Tool Kit Click here and download it now
May 28th, 2011 9:15pm

I see you are avoiding the previous post which illustrates (2-2)≠0. This one you did decide to respond to is just the next level √(2-2). See what happens when you neglect it, Mr X? It says Invalid input. Must I quote you, Mr X? You said: e-19 or e-39 is negligible and can be considered equal to 0 In your very first post here. Make up your mind.
May 29th, 2011 4:01am

I see you are avoiding the previous post which illustrates (2-2)≠0. This one you did decide to respond to is just the next step √(2-2). See what happens? It says Invalid input. Must I quote you, Mr X? You said: e-19 or e-39 is negligible and can be considered equal to 0 In your very first post here. Now you're saying it can't be neglected. Make up your mind. It is these kinds of miniscule rounding errors that lead to embarrassments like this 99% problem. When you post things here that try to excuse it, you are only helping to perpetuate it, Mr X.
Free Windows Admin Tool Kit Click here and download it now
May 29th, 2011 4:01am

I see you are avoiding the previous post which illustrates (2-2)≠0. This one you did decide to respond to is just the next step √(2-2). See what happens when you neglect it, Mr X? It says Invalid input. Must I quote you, Mr X? You said: e-19 or e-39 is negligible and can be considered equal to 0 In your very first post here. Make up your mind. It is these kinds of miniscule rounding errors that lead to embarrassments like this 99% problem. When you post things here to try and defend it, you are only helping to perpetuate it, Mr X.
May 29th, 2011 4:08am

I see you are avoiding the previous post which illustrates (2-2)≠0. This one you did decide to respond to is just the next step √(2-2). See what happens? It says Invalid input. Must I quote you, Mr X? You said: e-19 or e-39 is negligible and can be considered equal to 0 In your very first post here. Now you're saying it can't be neglected. Make up your mind. It is these kinds of miniscule rounding errors that lead to embarrassments like this 99% problem. When you post things here that try to excuse it, you are only helping to perpetuate it, Mr X. It can be considered as a 0 but for CALC it is a small negative number that is negative. try sqrt(abs(sqrt(4)-2)) This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. Microsoft Student Partner Microsoft Certified Professional Microsoft Certified Systems Administrator: Security Microsoft Certified Systems Engineer: Security Microsoft Certified Technology Specialist: Windows Server 2008 Active Directory, Configuration Microsoft Certified Technology Specialist: Windows Server 2008 Network Infrastructure, Configuration Microsoft Certified Technology Specialist: Windows Server 2008 Applications Infrastructure, Configuration
Free Windows Admin Tool Kit Click here and download it now
May 29th, 2011 8:44am

try sqrt(abs(sqrt(4)-2)) It's a good thing we have you here to give us that arcane workaround for that negligable roundout error that's not a bug. Why not just sqrt(0) instead? And what do you think about (2-2)≠0 illustrated above? And what do you think is the source of the 99% problem? And what do you think of this, which appeared just now. Maybe it's the effect of something negligable too. It sure looks negligable. Practically invisible. Maybe it's negative? Maybe it's a complex number? It's not really even there at all. Ignore it. It means zero. Trust me. It's negligable. Perfect.
May 29th, 2011 11:08am

Not to commit a double entendre, but the spelling is negligible. Whether something is negligible is determined by context. A error less than 10E-38 isn't too bad for 2. It would be unnacceptable for Planck's Constant (6.63E-34 Js).
Free Windows Admin Tool Kit Click here and download it now
May 29th, 2011 2:39pm

"Perfectly normal as the input of sqrt should never be negative." And thus we wave goodbye to to entire field of higher math know as imaginary numbers, but what the heck? Renee
May 29th, 2011 6:10pm

Jeez, my misspelling is so humiliating. I can't believe I did that. In full bold. : ) Unnacceptable. Thanks bobkn for demonstrating how totally distracting it is. Yes, we get distracted by it. That's really the essence of the issue here. It's a total distraction to see -8.1648465955514287168521180122928e-39 Especially when it's wrong anyway. Now that I'm revisiting my artwork here, that void js alert box made me wonder. How well would javascript handle it? The math function is Math.sqrt(). So, we'd want to evaluate the expression Math.sqrt(4)-2 and check if it gives the nice clean integer 0, or that 30+ digit negligible eyesore. Type this into your browser Address Bar and see what happens: javascript:var y=Math.sqrt(4)-2, text='sqrt(4)-2 = '; alert( text+y ); Perfect.
Free Windows Admin Tool Kit Click here and download it now
May 29th, 2011 11:30pm

Jeez, my misspelling is so humiliating. I can't believe I did that. In full bold. : ) But actually, thanks bobkn for demonstrating how totally distracting it is. Yes, we get distracted by it. That's really the essence of the issue here. It's a total distraction to see -8.1648465955514287168521180122928e-39 And its wrong anyway. Now that I'm revisiting my artwork here, that void js alert box made me wonder. How well would javascript handle it? The math function is Math.sqrt(). So, we'd want to evaluate the expression Math.sqrt(4)-2 and check if it gives the nice clean integer 0, or that 30+ digit negligible eyesore. Type this into your browser Address Bar and see what happens: javascript:var y=Math.sqrt(4)-2, text='sqrt(4)-2 = '; alert( text+y ); Perfect.
May 29th, 2011 11:32pm

Is this problem will continue in windows 8? or In windows 8 also Microsoft will continue the wrong algorithm for windows calculator!!-Yoganathan- Lecturer, WinSYS Networks (PVT) LTD, Sri Lanka. www.winsysnetworks.net
Free Windows Admin Tool Kit Click here and download it now
June 4th, 2011 9:03pm

Visitor to the Natural History Museum: Tell me, how old is that dinosaur? NHM Assistant: Sixty-five million and twenty three years and two months, sir. Visitor: Gosh, how do you know that? NMHA: I've been working here since April 1988, and I was told it was 65 million years old then. Noel
June 5th, 2011 3:08am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics