Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'classes.': 0.05; 'think,': 0.05; 'emulate': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'output': 0.10; 'binary': 0.13; '"computer': 0.16; 'bieber': 0.16; 'declaimed': 0.16; 'email addr:ix.netcom.com': 0.16; 'email name:wlfraed': 0.16; 'from:addr:ix.netcom.com': 0.16; 'from:addr:wlfraed': 0.16; 'from:name:dennis lee bieber': 0.16; 'received:wlfraed': 0.16; 'subject:engineering': 0.16; 'url:netcom': 0.16; 'url:wlfraed': 0.16; 'wulfraed': 0.16; "wouldn't": 0.17; 'community,': 0.19; 'programming': 0.20; 'java': 0.21; 'url:home': 0.21; 'maybe': 0.21; 'input': 0.22; 'figures': 0.23; 'beyond': 0.28; 'bit': 0.28; "i'm": 0.28; 'introductory': 0.29; 'class': 0.29; 'granted,': 0.30; 'precision': 0.30; 'subject:?': 0.31; 'scientific': 0.32; 'tue,': 0.32; 'initial': 0.32; 'it.': 0.33; 'header:X-Complaints- To:1': 0.34; 'lee': 0.34; 'rather': 0.34; 'integer': 0.34; 'numbers.': 0.34; 'operations': 0.35; 'to:addr:python-list': 0.35; 'received:org': 0.36; 'issue': 0.37; 'but': 0.37; 'machine': 0.37; 'charset:us-ascii': 0.37; 'using': 0.37; 'received:76': 0.37; 'somewhat': 0.38; 'could': 0.38; 'some': 0.38; 'should': 0.38; 'point': 0.40; 'might': 0.40; 'to:addr:python.org': 0.40; 'your': 0.61; 'results': 0.64; 'exceed': 0.64; 'dennis': 0.73; 'learned': 0.73; '-0500,': 0.84; 'calvin': 0.84; 'experienced,': 0.84; 'stunned': 0.84; 'contrast': 0.91; 'subject:long': 0.93; 'surprise': 0.97 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: are int, float, long, double, side-effects of computer engineering? Date: Tue, 06 Mar 2012 21:51:46 -0500 Organization: > Bestiaria Support Staff < References: <5aaded58-af09-41dc-9afd-56d7b7ced239@d7g2000pbl.googlegroups.com> <4F5681A6.9090707@calvinkim.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-76-249-27-134.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 3.3/32.846 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1331088717 news.xs4all.nl 6926 [2001:888:2000:d::a6]:55910 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:21300 On Tue, 06 Mar 2012 16:29:10 -0500, Calvin Kim declaimed the following in gmane.comp.python.general: > I can see your point. But that's not simply true. In my case and many > others, such issue was addressed during first week of introductory > programming classes. I was naively thought "computer = precision" and I > was stunned to find out the inaccuracy of computer calculations. > > But as you experienced, I also stumble upon some people (specially Java > only programmers) who were not aware of it. > It wouldn't surprise me to find out that modern CompSci degrees don't even discuss machine representation of numbers. In contrast I recall having an assignment, in my assembly class I think, to emulate the floating point operations using integer operations and bit manipulation. Somewhat fun as the Sigma-6 used a rather unusual "exponent" (base-16... a normalized binary mantissa could have up to three 0-bits) > Maybe it's because I'm not in scientific community, that I learned to > live with such side-effects. Because 99.99% of computer users and And, as I learned "science", results should not exceed the precision of the input -- if the input (physical measurements) only had 5 significant figures, any output beyond 5 significant figures was noise. Granted, some of the internal number crunching might need double-precision (orbital position propagation, say), but the printed results would only be to the level of the initial measurements. -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/