We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,174 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

vulnerability

guys i just read a vulnerability in the calculator of windows. vulnerability is like this:


*) open calculator

*) type 4 and then take its square

*) then minus two from the result

shocked....

answer should be 0 but it shows a different answer..

please help me on this.

3
Contributors
2
Replies
1 Day
Discussion Span
1 Year Ago
Last Updated
3
Views
Question
Answered
hackit
Light Poster
31 posts since Sep 2011
Reputation Points: 7
Solved Threads: 0
Skill Endorsements: 0

I suppose you are taking course in computer security? Correct me if I am wrong. So what do you want us to help you with?

jingda
Industrious Poster
4,702 posts since Mar 2011
Reputation Points: 182
Solved Threads: 146
Skill Endorsements: 1

First of all when you take the square of 4 you get 16. I presume you meant square root. I would imagine that the algorithm used to find the square root results in 2 plus a very very small fraction which is not shown because it is so much smaller than 2. When you subtract 2 from that you are just left with the fractional part which is, at least on my computer, around -8 times 10 to the -39th power which is damn close to zero.

One of the first demonstrations I had on how computers do math was back in 1971 when it was shown that 1/3 + 1/3 + 1/3 was actually slightly less than one according to the computer.

Reverend Jim
Carpe per diem
Moderator
3,605 posts since Aug 2010
Reputation Points: 561
Solved Threads: 449
Skill Endorsements: 32
Question Answered as of 1 Year Ago by jingda and Reverend Jim

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0722 seconds using 2.68MB