X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=IJxGpEHmLmyNWf1TCERcSBSF36ypAu4WtpUt3SmmFgM=; b=M9kcQ/tA0BzESIqOdGZavFojnDdkLXZBL5fAXAY6EPI3idyGcviVtNr2uKriRBTbWf b4Tod3RL6ImSTA/6sC6jMVTUrw+e0I89lRSSFKKnblhKcPC+zg9npoLMdRusU9simzJb M3Sg/pHSXtZyLdezMAi8PbqK/FutC59g0CMoauIs1vqQfvf284/OrexEcVTvx3uKhstg evTlWU758fjfMJyt5S0o2zHDg1CkxAp8KpGm8Q7bLBbdDF2THS122aIsZ12q0A1/GZoA VWT2mDfyAV4ahosni2DJNkMnFc0hVVjDmNHtTx5paICRB75LEpseZ1X4JjBX0S/yD0ZY sJPA== X-Received: by 10.194.221.4 with SMTP id qa4mr2246444wjc.145.1442265561608; Mon, 14 Sep 2015 14:19:21 -0700 (PDT) Date: Mon, 14 Sep 2015 23:19:16 +0200 From: "Nicklas Karlsson (nicklas DOT karlsson17 AT gmail DOT com) [via geda-user AT delorie DOT com]" To: geda-user AT delorie DOT com Subject: Re: [geda-user] Apollon Message-Id: <20150914231916.e7114b46b8863378d85e1272@gmail.com> In-Reply-To: <074A28AA-547E-4B71-8D81-30D2CB1B74F3@noqsi.com> References: <20150913140631 DOT 1da1b78d AT jive DOT levalinux DOT org> <201509131529 DOT t8DFTUVS022118 AT envy DOT delorie DOT com> <20150914175929 DOT 22829 DOT qmail AT stuge DOT se> <074A28AA-547E-4B71-8D81-30D2CB1B74F3 AT noqsi DOT com> X-Mailer: Sylpheed 3.5.0beta1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Yes I know about these issues with floating point. I use to work with measurement for real world data and these measurements are not exactly accurate anyway. I also do book keeping and there numbers must add up exactly. These issues should probably only matter if current number is used to calculate next number instead of using an absolute value. For example if an object is rotated with angular transformation of current coordinates over and over again. > > On Sep 14, 2015, at 11:59 AM, Peter Stuge (peter AT stuge DOT se) [via geda-user AT delorie DOT com] wrote: > > > DJ Delorie wrote: > >> "Angular data is stored in signed integer," > >> > >> Not floating point? > > > > I disagree very strongly with floating point, but using a fixed-size > > decimal is an important improvement! > > The trouble is that common computer numerics do not actually obey the same rules as mathematical numbers. > > In floating point, you may not assume (a+b)+c==a+(b+c). > > In fixed point this is OK, as long as overflow is modular. But in fixed point, you may still not assume that (a/b)*b==a (floating point does this more accurately, but not perfectly). > > Rational numbers fix these problems. (a+b)+c==a+(b+c), and (a/b)*b==a, always. Technically, the rationals are closed under addition, subtraction, multiplication, and division. Fixed and floating point numbers are not. > > As for speed, rational computation is indeed slower than floating point, typically about 30x for matrix arithmetic in Mathematica. Smart design might use rationals to keep track of reference points for the purpose of rigorously determining what touches or overlaps with what. For rendering on a grid, use fixed or floating point. The rationals that fall on your grid are a set of measure zero, anyway. > > > > > > >> Given location is nanometers, you should have an equally precise > >> unit for other measurements. > > > > Yes! And floating point isn't always so precise. > > > > > > //Peter > > > > John Doty Noqsi Aerospace, Ltd. > http://www.noqsi.com/ > jpd AT noqsi DOT com > > >