Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.034 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'debugging': 0.07; 'subject:Question': 0.07; 'subject:using': 0.09; 'python': 0.11; 'bug': 0.12; 'garbage': 0.16; 'link,': 0.16; 'lurking': 0.16; 'segfault': 0.16; 'soap,': 0.16; 'subject:python': 0.16; 'sat,': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'code.': 0.18; 'looked': 0.18; 'feb': 0.22; 'otherwise,': 0.22; 'pages,': 0.22; 'directory.': 0.24; 'instance,': 0.24; 'issue,': 0.24; "shouldn't": 0.24; 'cheers,': 0.24; "haven't": 0.24; 'sort': 0.25; "i've": 0.25; '15,': 0.26; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'chris': 0.29; 'statement': 0.30; 'code': 0.31; 'url:wiki': 0.31; 'decimal': 0.31; 'occurs': 0.31; 'subject:numbers': 0.31; 'there.': 0.32; 'probably': 0.32; 'skip:c 30': 0.32; 'run': 0.32; 'url:non-standard http port': 0.33; "i'd": 0.34; 'received:66': 0.35; 'something': 0.35; 'but': 0.35; 'there': 0.35; 'really': 0.36; 'possible': 0.36; 'url:org': 0.36; 'list.': 0.37; 'to:addr :python-list': 0.38; 'pm,': 0.38; 'anything': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'worry': 0.60; 'received:unknown': 0.61; 'hope': 0.61; 'john': 0.61; 'first': 0.61; 'complete': 0.62; 'header:Message-Id:1': 0.63; 'charset:windows-1256': 0.64; 'url:cgi-bin': 0.65; 'between': 0.67; 'notice:': 0.67; 'upper': 0.74; 'received:204': 0.75; '100': 0.79; 'boxes': 0.91; 'probe': 0.91; 'technique': 0.93 X-Spam-Status: No, score=1.6 required=5.0 X-Spam-Level: + From: Gene Heskett To: python-list@python.org Subject: Re: Question on using FP numbers in python 2 Date: Fri, 14 Feb 2014 23:46:17 -0500 References: <201402142225.59647.gheskett@wdtv.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1256" Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 42 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1392439582 news.xs4all.nl 2829 [2001:888:2000:d::a6]:47966 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:66366 On Friday 14 February 2014 23:37:53 Chris Angelico did opine: > On Sat, Feb 15, 2014 at 2:25 PM, Gene Heskett wrote: > > Is there something I can search for and fix in some python code that > > is giving me bogus answers that get good only when there is a valid > > digit to the left of the decimal point? > > Interesting. I'd look for anything that mixes very large and very > small numbers, first off. Otherwise, just follow the standard > debugging technique of stripping code out of your program and seeing > if the problem's still there. Continue until you have the barest > minimum, and hope hope hope that it's a Bohr bug and not a Heisenbug! > > If it really is a floating point issue, you probably don't have to > worry about, for instance, a segfault that happens when a garbage > collection run occurs between this statement and that statement... > yes, I've had to deal with that sort of thing! (Turned out to be a > refcount bug in C code. When the gc ran, something got disposed of > that shouldn't have.) > > ChrisA It is the top utility in this page of linuxcnc code generators: I looked at it, just enough to understand I haven't learned a thing in 2 years of lurking on this list. I see Big John has a bug note, and its possible this might be related. You can get it at the upper link, or there is a copy on my pages, under Genes-os9-stf/LCNC directory. Cheers, Gene -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) Genes Web page NOTICE: Will pay 100 USD for an HP-4815A defective but complete probe assembly.