Mail Archives: geda-user/2016/01/06/20:35:25
--Apple-Mail=_91F8A648-923D-4689-910E-6DA8C5AE031B
Content-Type: multipart/alternative;
boundary="Apple-Mail=_F98C1D00-843A-4C92-95D5-CC0160BCA3AC"
--Apple-Mail=_F98C1D00-843A-4C92-95D5-CC0160BCA3AC
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=windows-1252
On Jan 6, 2016, at 8:04 PM, Britton Kerin (britton DOT kerin AT gmail DOT com) [via =
geda-user AT delorie DOT com] <geda-user AT delorie DOT com> wrote:
>=20
>=20
> On Wed, Jan 6, 2016 at 3:47 PM, John Doty <jpd AT noqsi DOT com> wrote:
>=20
> 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:
>=20
>> 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.
>=20
> 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.
>=20
> Going through and auditing geometry.h for big things they're mostly in =
hypot() but there are a few others.
>=20
> Do you know about the sensitivity of these:
>=20
> http://mathworld.wolfram.com/Circle-LineIntersection.html
> http://mathworld.wolfram.com/Circle-CircleIntersection.html
>=20
It depends on what you want to know. If you are asking if there is an =
intersection, things are not terribly tricky. If you want to know the =
points of intersection, it=92s sensitive to how you formulate the =
calculation. A generalization of =
http://www.solipsys.co.uk/cgi-bin/sews.py?NumericallyStableSolutionForTheQ=
uadraticEquation
> Britton
>=20
John Doty Noqsi Aerospace, Ltd.
http://www.noqsi.com/
jpd AT noqsi DOT com
--Apple-Mail=_F98C1D00-843A-4C92-95D5-CC0160BCA3AC
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 8:04 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>] =
<<a href=3D"mailto:geda-user AT delorie DOT com">geda-user AT delorie DOT com</a>>=
wrote:</div><br class=3D"Apple-interchange-newline"><blockquote =
type=3D"cite"><div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div =
class=3D"gmail_quote">On Wed, Jan 6, 2016 at 3:47 PM, John Doty <span =
dir=3D"ltr"><<a href=3D"mailto:jpd AT noqsi DOT com" =
target=3D"_blank">jpd AT noqsi DOT com</a>></span> wrote:<br><blockquote =
class=3D"gmail_quote" style=3D"margin:0px 0px 0px =
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left=
-style:solid;padding-left:1ex"><div =
style=3D"word-wrap:break-word"><br><div><div>On Jan 6, 2016, at 7:29 PM, =
Britton Kerin (<a href=3D"mailto:britton DOT kerin AT gmail DOT com" =
target=3D"_blank">britton DOT kerin AT gmail DOT com</a>) [via <a =
href=3D"mailto:geda-user AT delorie DOT com" =
target=3D"_blank">geda-user AT delorie DOT com</a>] <<a =
href=3D"mailto:geda-user AT delorie DOT com" =
target=3D"_blank">geda-user AT delorie DOT com</a>> =
wrote:</div><br><blockquote type=3D"cite"><div =
style=3D"font-family:Helvetica;font-size:12px;font-style:normal;font-varia=
nt:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text=
-align:start;text-indent:0px;text-transform:none;white-space:normal;word-s=
pacing:0px">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.</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></div></blockquote><div><br></div><div style=3D"">Going =
through and auditing geometry.h for big things they're mostly in hypot() =
but there are a few others. </div><div><br></div><div style=3D"">Do =
you know about the sensitivity of these:</div><div =
style=3D""><br></div><div> <a =
href=3D"http://mathworld.wolfram.com/Circle-LineIntersection.html">http://=
mathworld.wolfram.com/Circle-LineIntersection.html</a></div></div></div></=
div></blockquote><blockquote type=3D"cite"><div dir=3D"ltr"><div =
class=3D"gmail_extra"><div class=3D"gmail_quote"><div> <a =
href=3D"http://mathworld.wolfram.com/Circle-CircleIntersection.html">http:=
//mathworld.wolfram.com/Circle-CircleIntersection.html</a><br></div><div><=
br></div></div></div></div></blockquote><div><br></div>It depends on =
what you want to know. If you are asking if there is an intersection, =
things are not terribly tricky. If you want to know the points of =
intersection, it=92s sensitive to how you formulate the calculation. A =
generalization of <a =
href=3D"http://www.solipsys.co.uk/cgi-bin/sews.py?NumericallyStableSolutio=
nForTheQuadraticEquation">http://www.solipsys.co.uk/cgi-bin/sews.py?Numeri=
callyStableSolutionForTheQuadraticEquation</a></div><div><br><blockquote =
type=3D"cite"><div dir=3D"ltr"><div class=3D"gmail_extra"><div =
class=3D"gmail_quote"><div =
style=3D"">Britton</div><div><br></div></div></div></div>
</blockquote></div><br><div apple-content-edited=3D"true">
<span class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-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"> =
<span class=3D"Apple-converted-space"> </span><span =
class=3D"Apple-converted-tab"> <span =
class=3D"Apple-converted-space"> </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=_F98C1D00-843A-4C92-95D5-CC0160BCA3AC--
--Apple-Mail=_91F8A648-923D-4689-910E-6DA8C5AE031B
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
iQIcBAEBCgAGBQJWjcDBAAoJEF1Aj/0UKykRQiYP/ROGoAKfIPdsZiudcC4cFadf
p+imAzNkGVzCYbLoOPMJsN/m2RmoNogLnSjQL6OeF6BMBGYpTyveSuPm3cFsidmF
vSrRFTGYp4PQlGwBs5xIHS+LXKOXaIPEj8LCXdGWUIYUP9+CXtSxOFKYCHDelvFB
paGRghj7bKdvWoOEYlURFznORX+NQk6NKiLytRbtWM2YFGmU7swU2n6OQ8ZAd4EA
2kWtNwxsn77/LlUJiciyEhLIEgbkdyb79n3xZOS2A6A6ZCNoIPyHUriyhR8lq/fH
FZpsvxlCTneRsXbhjgWKy/IE/2A3uj3JmPgXqx20sG8cRSow0IMNtEDPpW/kLEob
7EmUHiadG/Xdk/dcxkBaZKyvWBAefh0rNh6NGD8t5cBalRZih1v9jEc/vkwGByHl
cXfphIhto1pykSnjH6xgzpnPrcwXOkYqD2yuoGzUiQOmEIvBs46BNBzGmHIioESj
SpqVOQ+d1d1u6o6frLn5pUPfJO0YQDQbBCrXlxLl7zrK4eleucJJWH4/x1oOfOZ8
F5l3jj9hB2rusziQ1a+MAOy/8ezwi9pUeMjv8AHN12LYzC3t3uVnA/L3tGvbv28j
/5LEO3zYz9hJ5bnBAJGA/sni9uHb+WZuVwsH14msVRcs20XrBE7j2qWUWMIg/g8Z
ProCwrQvP8HDkiiW/k5u
=OExd
-----END PGP SIGNATURE-----
--Apple-Mail=_91F8A648-923D-4689-910E-6DA8C5AE031B--
- Raw text -