Why Do Computers Suck at Math?

I’d say that 0.333… does not equal 1/3. Its an approximation.

I’d say that 0.333… does not equal 1/3. Its an approximation.

Well, it’s not like it’s an opinion. Either it does or it doesn’t. And, it does. Again, by the definition of decimal representation. Look up this definition if you don’t believe me.

I don’t know why they don’t accept 0.999… = 1, but there is a more intuitive reason why 1/3 = 0.333…; just try dividing 1 by 3 using long division.

But still, it’s a leap to get from the finite iterative process of long division to an infinitely long number. I’d say that most people who are hazy on any of these facts simply don’t understand what decimal notation even means.

I’d say that 0.333… does not equal 1/3. Its an approximation.

So what is the margin of error?

Wow, that is like WAY cool!

RT
www.whos-watching.net.tc

But still, it’s a leap to get from the finite iterative process of long division to an infinitely long number.

But I think that if you work through the long division process, it should be obvious that you are going to be dividing 10 by 3 with ramainder 1 for ever.

I mean if it’s a finite process you would have to assume something is going to change to put an end to it.

But I think that if you work through the long division process, it should be obvious that you are going to be dividing 10 by 3 with ramainder 1 for ever.

You’re right, but once people are able to accept the idea that a decimal number is actually the limit of some sequence (whether or not the sequence contains the limit), then you’ve already won them. Most people seem to have trouble getting that far.

You simply need computers to represent 0.999…(recurring) differently that 0.999999999999999999999999 (full stop). That could be done via metadata, for example, or an extended bit field, a digital equivalent of having a bar over the digit in human readable terms. Of course, once you start down this road, you’ll end up with an operating system, or at least a libm, that resembles Mathematica more than anything else (which may or may not be a good thing depending on your sensibilities).

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim o1 As Double = 399999999999999
Dim o2 As Double = 399999999999998

MsgBox(String.Format({0}-{1}={2}, o1, o2, o1 - o2))
'' 399999999999999-399999999999998=1

End Sub

VB.NET wins.

RPGLE on the IBM AS/400 says it equals 1…Seems like Windows and Microsoft doesn’t think anyone will calculate numbers that large…hmmmm

d Result s 16 0
/free
Result = 399999999999999 - 399999999999998 ;
dsply result;
*inlr=*on;
return;

No, the gravitational constant is known to much more than 4 significant figures - 14, I believe.

Listen.

Anyone who says that .(9) is not 1 is mistaken or ignorant.

There is no mathematical question.

.(9) doesn’t approach 1. Numbers don’t approach. Variables do. Take some rudimentary calculus.

.(9) IS 1. They are IDENTICAL in the real numbers.

Take it from a mathematician.

This is a perfect example of where discrete representations fail where true analog would have no problem.

Just a thought :).

This really pisses me off. Why do you put your faith in the WRONG answer (yes, it is WRONG) when you have no logic to back it up?

I feel that we should teach middle-school teachers that .(9) = 1 and explain why so that an 8th grader would understand. Then there wouldn’t be this retarded farce.

http://mathforum.org/dr.math/faq/faq.0.9999.html

My XP machine running Office 2007 got the calculator and Excel problems right. I don’t know what you’re doing wrong buddy.

You mean you didn’t know IEEE representations???

It’s not a math problem, or even a generic computer issue. It is a developer issue. The floating point format was developed for compact storage and fast processing on x87-type coprocessors when power was scarce and memory was too.

The only legitimate way to perform any kind of business computation these days is to get rid of that encoding, realize that computers are a few million times more powerful now than they were then, and use ways to pack data that do not produce computational artifacts. Like the BCD encoding, for example. Which existed way before the x87 coprocessors.

0.9 (periodic) is equal to 1. That is mathematic and has nothign to do with cmputers. another representation is 9/9, and the difference between 0.999999999999999999999999999…9 to 1 is infinitisimal low. So both numbers are the same by math, not conventions (had a discussion with a dr in math phys a while ago about this topic :wink: )

wow. i didn’t know computer will make mistakes.

type bc -l in a shell… problem solved :wink: