delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/01/06/19:48:09

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-TCPREMOTEIP: 63.119.35.194
X-Authenticated-UID: jpd AT noqsi DOT com
Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\))
Subject: Re: [geda-user] Re: some more geometry module tweaks (sorry, wall of text)
X-Pgp-Agent: GPGMail 2.5.2
From: John Doty <jpd AT noqsi DOT com>
In-Reply-To: <CAC4O8c97TUwyxV44kt7UhLrnTBVxZjPR1H-T9r6RgLuQeGbQyw@mail.gmail.com>
Date: Wed, 6 Jan 2016 19:47:56 -0500
Message-Id: <8985B557-CC87-48A0-A745-298A501945F0@noqsi.com>
References: <CAC4O8c-n4cHWum2MUzgDw=NLuKPK395xp_F24cSyoXhnADRskw AT mail DOT gmail DOT com> <alpine DOT DEB DOT 2 DOT 00 DOT 1512230503390 DOT 9035 AT igor2priv> <CAC4O8c8A271d5unQWRV=PoaEsJECgZt33Wy16uCnK6D+4LCzww AT mail DOT gmail DOT com> <alpine DOT DEB DOT 2 DOT 00 DOT 1512260402081 DOT 9035 AT igor2priv> <CAC4O8c-49Fn191KT-p0hXi1jXW=OeTSaNUh11pLmBQYHeGtyoA AT mail DOT gmail DOT com> <alpine DOT DEB DOT 2 DOT 00 DOT 1512310512510 DOT 9035 AT igor2priv> <CAC4O8c8Or1FS=x18C7Zv5uu+dUOXX2My4K+njsoufNeotm_CBQ AT mail DOT gmail DOT com> <alpine DOT DEB DOT 2 DOT 00 DOT 1601060519350 DOT 9035 AT igor2priv> <CAC4O8c97TUwyxV44kt7UhLrnTBVxZjPR1H-T9r6RgLuQeGbQyw AT mail DOT gmail DOT com>
To: geda-user AT delorie DOT com
X-Mailer: Apple Mail (2.1878.6)
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

--Apple-Mail=_BAE2E6B6-C4E2-45DC-A548-454C4984C9C2
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_D6B152C3-A5F2-402E-8ABA-B3F13C882AC9"


--Apple-Mail=_D6B152C3-A5F2-402E-8ABA-B3F13C882AC9
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=windows-1252


On Jan 6, 2016, at 7:29 PM, Britton Kerin (britton DOT kerin AT gmail DOT com) [via =
geda-user AT delorie DOT com] <geda-user AT delorie DOT com> wrote:

> Yeah DJ hinted at this as well.  My knee-jerk reaction is to use an =
even winder type for the internal floating point representation.  Short =
of arbitrary precision there's no way to support arbitrary intermediate =
results, but if you can count bye ones all the way to a squared value =
that would seem to cover all the simple geometrical calculations we're =
interested in.  Things like hypot() help, but I admit I don't fully =
understand exactly how much.  They certainly keep the numbers smaller =
and thereby prevent overflow, but I don't fully understand the =
consequences for intermediate results outside the range where the float =
can represent all integers.

This particular calculation is numerically stable, even if written as =
sqrt(x*x+y*y). It can=92t generally be perfect, but it=92s not the kind =
of thing that sends numerical analysts into cold sweats.

John Doty              Noqsi Aerospace, Ltd.
http://www.noqsi.com/
jpd AT noqsi DOT com



--Apple-Mail=_D6B152C3-A5F2-402E-8ABA-B3F13C882AC9
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=windows-1252

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
charset=3Dwindows-1252"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;"><br><div><div>On Jan 6, 2016, at 7:29 PM, Britton =
Kerin (<a =
href=3D"mailto:britton DOT kerin AT gmail DOT com">britton DOT kerin AT gmail DOT com</a>) =
[via <a href=3D"mailto:geda-user AT delorie DOT com">geda-user AT delorie DOT com</a>] =
&lt;<a href=3D"mailto:geda-user AT delorie DOT com">geda-user AT delorie DOT com</a>&gt;=
 wrote:</div><br class=3D"Apple-interchange-newline"><blockquote =
type=3D"cite"><div style=3D"font-family: Helvetica; font-size: 12px; =
font-style: normal; font-variant: normal; font-weight: normal; =
letter-spacing: normal; line-height: normal; orphans: auto; text-align: =
start; text-indent: 0px; text-transform: none; white-space: normal; =
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Yeah =
DJ hinted at this as well.&nbsp; My knee-jerk reaction is to use an even =
winder type for the internal floating point representation.&nbsp; Short =
of arbitrary precision there's no way to support arbitrary intermediate =
results, but if you can count bye ones all the way to a squared value =
that would seem to cover all the simple geometrical calculations we're =
interested in.&nbsp; Things like hypot() help, but I admit I don't fully =
understand exactly how much.&nbsp; They certainly keep the numbers =
smaller and thereby prevent overflow, but I don't fully understand the =
consequences for intermediate results outside the range where the float =
can represent all integers.</div></blockquote><div><br></div>This =
particular calculation is numerically stable, even if written as =
sqrt(x*x+y*y). It can=92t generally be perfect, but it=92s not the kind =
of thing that sends numerical analysts into cold sweats.</div><br><div =
apple-content-edited=3D"true">
<span class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant: normal; font-weight: =
normal; letter-spacing: normal; line-height: normal; text-align: auto; =
-khtml-text-decorations-in-effect: none; text-indent: 0px; =
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; "><p style=3D"margin: =
0.0px 0.0px 0.0px 0.0px"><font face=3D"Helvetica" size=3D"3" =
style=3D"font: 12.0px Helvetica">John Doty<span =
class=3D"Apple-converted-space">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span =
class=3D"Apple-converted-space">&nbsp;</span><span =
class=3D"Apple-converted-tab">&nbsp; &nbsp;<span =
class=3D"Apple-converted-space">&nbsp;</span></span></span>Noqsi =
Aerospace, Ltd.</font></p><p style=3D"margin: 0.0px 0.0px 0.0px =
0.0px"><a href=3D"http://www.noqsi.com/">http://www.noqsi.com/</a></p><p =
style=3D"margin: 0.0px 0.0px 0.0px 0.0px"><font face=3D"Helvetica" =
size=3D"3" style=3D"font: 12.0px Helvetica"><a =
href=3D"mailto:jpd AT noqsi DOT com">jpd AT noqsi DOT com</a></font></p><br =
class=3D"Apple-interchange-newline"></span>
</div>
<br></body></html>=

--Apple-Mail=_D6B152C3-A5F2-402E-8ABA-B3F13C882AC9--

--Apple-Mail=_BAE2E6B6-C4E2-45DC-A548-454C4984C9C2
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJWjbW9AAoJEF1Aj/0UKykRaVsP/jzeQt6xwyX86QzgzWXbZ7ga
CMc/8zZDxWOPwbErqJLkZ7xER4WKkkJj0eL8+2GH/9OFnbS+eeJJ13mL5ko0Cf1E
3KJzgbkypbSRkFgE71eaidEk3GooI2KK8l7t80uGppQXhuX1CEFDGReSQgiZXOCN
IPHQuI0pejsdvnIYQz7XulpqCK0BWjqYoYJ7CdLXGTz5nzurLGVDqxpxxcY1VBw7
XOJa9+PCfi3Sr0wxfa1r3FSSHdjUhAGA2arjWTuhry/adnqiU5Z9Fp+G+uCM5poz
vDVI2MQjwPlQzeOp5I8vJlANi8CyhQ6bjXdnQ8BDNrmnj3mMi54yzlm0k7HoaoPf
q4a8bzwXAEuUzQWuFVO4ZQ8aTvWLcJL3PlpCrvHBEufXx34U3MqgcbHh2IeGs+za
+m4IYU7NO56RUctKtRgEQPR7+zpvmwwkVV0n3ZkEx1XR24WD7WhvhpwyWyMRbibr
o77qJyjvSAPGizdffavg+/8PBOrKTxQrECdG3iOfelMLh+Av6/4/UujSu1y7lmlp
vdMolMSOPjqeCxL1v4GLkhTyWAiX8vRFC5lAq0id0mE0lEr42YhPpcrlcjo5t1s1
me5sRY245pXPzFty6PUJqc8CjWqCSBp9gKK8fX2YbZDoPMS4tmG7OT7N3S080wdZ
winP1oS4wcMzUhVt3laT
=HBZ/
-----END PGP SIGNATURE-----

--Apple-Mail=_BAE2E6B6-C4E2-45DC-A548-454C4984C9C2--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019