Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Center > Breakroom (General: Any Topic)
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Breakroom (General: Any Topic) Here's the place to talk about anything and everything. What's discussed is up to you!

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-08-2008, 08:26 AM
kgun's Avatar
WebProWorld 1,000+ Club
 

Join Date: May 2005
Location: Norway
Posts: 5,402
kgun RepRank 3kgun RepRank 3kgun RepRank 3
Default How precise is a computer?

The question in the heading can be divided in two.
1. How precise is a n-bit's computer?
2. How precise can you make software (simulations) to run on a computer?

I thought of the first question when I formulated this thread, but you are free to discuss the second. The heading of the thread could also be: "Pure math and computers, be careful."

An example:
The area of a circle is:

2 x Pi x radius x radius.

So the SQRT of the area is:

radius x SQRT(2 x Pi).

That is analytically (in pure math) there is no problem "squaring the circle."

Take a square with side lenght:

radius x SQRT(2 x Pi).

The square has area: 2 x Pi x radius x radius = The area of the circle Q.E.D.

But you are not able to square the circle on a computer, since you are not able to compute Pi, since Pi is a trancendental number.

Note:
Most mathematical functions implemented in comuter software, are not pure mathematical functions. Most often functions like the logarithmic function are represented with the first few Taylor series terms of the function, and that is as imprecise as saying that:

Pi = 3.14. It is not!

Related link:

http://www.sciencedaily.com/releases/2007/06/070614104042.htm

Conclusion: Pure math and computers, be careful.

Last edited by kgun : 03-08-2008 at 08:39 AM.
Reply With Quote
  #2 (permalink)  
Old 03-08-2008, 11:49 AM
cw1865's Avatar
WebProWorld Veteran
 

Join Date: Oct 2007
Location: Reside in Riverdale, NJ
Posts: 835
cw1865 RepRank 2
Default Re: How precise is a computer?

Check out the normal distribution. There is no integral for the function! This one I remember quite clearly. For purposes of approximating the area under the curve by and large you rely on prepared tables. But they show you how they got the tables to begin with, essentially taking small rectangles and computing the area (which of course has an inherent error associated with it!) - nevertheless the professor demonstrated that at some point the computer, in an attempt for GREATER accuracy, lost the ability to calculate it (because the rectangle became SOOOO SMALL that the computer was returning an area of 0 for that particular rectangle); hence the computer would add 0 to the cumulative area and of course 0 is a terrible approximation of the area under the curve.....

Cool function, I am sure that you would like it....

Yes, PI, that crazy non-decimal number! The only way is to have a numerical system itself based on PI (which humans wouldn't like of course)
__________________
Reply With Quote
  #3 (permalink)  
Old 03-08-2008, 02:40 PM
WebProWorld Veteran
 

Join Date: Jul 2004
Posts: 983
activeco RepRank 2
Default Re: How precise is a computer?

Quote:
Originally Posted by kgun View Post
How precise can you make software (simulations) to run on a computer?
In the first place it depends on programming language and it's computing precision, which is often an arbitrary function.
In theory (and practice) you can work with numbers as big as your computer's memory plus hard disk size combined.

Arbitrary-precision arithmetic provides much slower computing than regular default precision, but if one really needs an extreme precision, it is possible to achieve it.
Whenever I need more precision for my small projects and ideas, I usually use Rexx (regina) language where I can define the precision with "NUMERIC DIGITS=" built-in function.
__________________
This ad space could be yours. Contact us for affordable rates! ; )

Last edited by activeco : 03-08-2008 at 02:51 PM.
Reply With Quote
  #4 (permalink)  
Old 03-08-2008, 03:39 PM
WebProWorld Pro
 

Join Date: Dec 2007
Location: Brussels, Belgium
Posts: 126
Jean-Luc RepRank 1
Default Re: How precise is a computer?

Quote:
Originally Posted by kgun View Post
The area of a circle is:

2 x Pi x radius x radius.
Other mathematicians claim that the area of the circle is Pi x radius x radius....

Jean-Luc
__________________
Checking redirects is now as easy as 1 2 3, even if you are not a HTTP-header guru !
AWStats Support: installation assistance, add-on's, extra sections, dedicated forum,...
Reply With Quote
  #5 (permalink)  
Old 03-08-2008, 05:25 PM
kgun's Avatar
WebProWorld 1,000+ Club
 

Join Date: May 2005
Location: Norway
Posts: 5,402
kgun RepRank 3kgun RepRank 3kgun RepRank 3
Default Re: How precise is a computer?

Quote:
Originally Posted by Jean-Luc View Post
Other mathematicians claim that the area of the circle is Pi x radius x radius....

Jean-Luc
One rep point since you discovered that. I was away from the computer visiting my daughter and reckognised the error some hours ago.

And, I am not a mathematician.

The precision of an n bit computer is (1/2)^n.

That means that the precision of a 32 bit computer is (1/2)^32

Last edited by kgun : 03-08-2008 at 05:30 PM.
Reply With Quote
  #6 (permalink)  
Old 03-08-2008, 06:08 PM
kgun's Avatar
WebProWorld 1,000+ Club
 

Join Date: May 2005
Location: Norway
Posts: 5,402
kgun RepRank 3kgun RepRank 3kgun RepRank 3
Default Re: How precise is a computer?

Quote:
Originally Posted by cw1865 View Post
Check out the normal distribution.
The Normal distribution is well behaved since the first and second order moments exist, that is the mean and the variance is finite.

But the Cauchy distribution that can seemingly fit the Normal distribution perfectly has an infinite variance. The tails of the Cauchy distribution is too heavy. The kurtosis is too high.

Last edited by kgun : 03-08-2008 at 06:12 PM.
Reply With Quote
Reply

  WebProWorld > Center > Breakroom (General: Any Topic)


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting a new computer cutiger95 Breakroom (General: Any Topic) 1 04-12-2007 11:06 AM
MSN: More precise, more powerful? Tim MSN Search Discussion Forum 5 06-20-2006 08:10 PM
PHP - Get Computer Name DarrenPWS Web Programming Discussion Forum 3 05-25-2006 06:21 AM
Any one know how to get pop up ads off my computer loseriam WebProWorld: Guidelines/Announcements/Suggestions 3 09-16-2004 05:54 AM
Sex Of A Computer matauri Breakroom (General: Any Topic) 53 01-23-2004 06:39 AM


Search Engine Optimization by vBSEO 3.2.0