Forums: » Register « |  Free Tools |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |

New Free Tools on Dev Shed!

#16
March 14th, 2003, 09:05 AM
 Jason Doucette
jasondoucette.com

Join Date: Feb 2003
Posts: 378
Time spent in forums: 7 h 23 m 8 sec
Reputation Power: 11
I just had an interesting thought on this subject: Even though all numbers in base-10 cannot be represented accurately with a finite number of digits in base-2, all numbers in base-2 can be accurately represented accurately with a finite number of digits in base-10.

This is because 1, 1/2, 1/4, 1/8, etc are shown in base-10 as so:

1
0.5
0.25
0.125
0.0625
0.03125
0.015625
0.0078125
0.00390625
etc.

You will notice that these numbers (and all that follow them) can be represented accurately in base-10. Therefore, any binary number can be represented accurately in base-10, as all binary numbers are just sums of one or more of these numbers (and/or multiples of 1).

 Viewing: Dev Shed Forums > Programming Languages > C Programming > float numbers slightly out