5 ms·
How to count to a zillion without falling off the end of the number line
- btilly 17y agoThere is a solution to this problem which lets you have your cake and eat it to. Continued fractions give you a representation of real numbers that turns into a compact exact representation of all possible fractions. (If you've got a lazy language, like Haskell, you can compactly represent many real numbers as well.) Doing arithmetic with them is tricky, but possible. If you're interested, http://perl.plover.com/yak/cftalk/ http://perl.plover.com/yak/cftalk/ has all of the necessary details, including a sample implementation as a program in C. I've never heard of anyone using that number system for serious work, but I'd be curious how well that would work out.