www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/01/06/20:05:09

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=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=3VZdM2syGQ0MYHl7hAValLLzOu9k3rQL6YWwAe+QyUs=;
b=pGxzVfa5KYCajLdkX9V7Zh4cCMM1JcuU3KLqgPZ0O+jhCih+0qkSKma66YQTIO0qLN
X9qE37ni8EauUiqX4byFvy0dcku7KgKEp1c+D3KE3YUlQh/kWMJc+QPD2LfK5s6gUAH1
zbhJTox7dq3TXXRhgek/gmj9NsI/uO/McXJkUh7IhjEhHvAaJ/CpKGAI4jshfdO66w3a
SatzTohSdlugNKdAptXc2NegWF+uSK/Qa8dhZ/xM8LsTPBNA/PlhmyewtHnjatFsq7wy
fK09U4UfwafqZAVVmi74+sxA3GQzy4IHS8hOExy3BH9l9bc5Tjv6LfEdmK9Wvb8kNLoT
dSpA==
MIME-Version: 1.0
X-Received: by 10.194.6.98 with SMTP id z2mr109045995wjz.101.1452128691237;
Wed, 06 Jan 2016 17:04:51 -0800 (PST)
In-Reply-To: <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>
<8985B557-CC87-48A0-A745-298A501945F0 AT noqsi DOT com>
Date: Wed, 6 Jan 2016 16:04:51 -0900
Message-ID: <CAC4O8c8_+SwFA1kynZyYAowxNAq0qEv3dJV7FMxZmF9xWceGwQ@mail.gmail.com>
Subject: Re: [geda-user] Re: some more geometry module tweaks (sorry, wall of text)
From: "Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
To: geda-user AT delorie DOT com
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

--047d7b5d3e64cf3aad0528b40e15
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Wed, Jan 6, 2016 at 3:47 PM, John Doty <jpd AT noqsi DOT com> wrote:

>
> 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 tha=
t
> 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 f=
or
> 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=E2=80=99t generally be perfect, but it=E2=80=99s no=
t the kind of
> thing that sends numerical analysts into cold sweats.
>

Going through and auditing geometry.h for big things they're mostly in
hypot() but there are a few others.

Do you know about the sensitivity of these:

  http://mathworld.wolfram.com/Circle-LineIntersection.html
  http://mathworld.wolfram.com/Circle-CircleIntersection.html

Britton

--047d7b5d3e64cf3aad0528b40e15
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Wed, Jan 6, 2016 at 3:47 PM, John Doty <span dir=3D"ltr">&lt;<a href=
=3D"mailto:jpd AT noqsi DOT com" target=3D"_blank">jpd AT noqsi DOT com</a>&gt;</span> wr=
ote:<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.kerin@=
gmail.com" target=3D"_blank">britton DOT kerin AT gmail DOT com</a>) [via <a href=3D"m=
ailto:geda-user AT delorie DOT com" target=3D"_blank">geda-user AT delorie DOT com</a>] &=
lt;<a href=3D"mailto:geda-user AT delorie DOT com" target=3D"_blank">geda-user AT del=
orie.com</a>&gt; wrote:</div><br><blockquote type=3D"cite"><div style=3D"fo=
nt-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;fo=
nt-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;=
text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Ye=
ah DJ hinted at this as well.=C2=A0 My knee-jerk reaction is to use an even=
 winder type for the internal floating point representation.=C2=A0 Short of=
 arbitrary precision there&#39;s no way to support arbitrary intermediate r=
esults, but if you can count bye ones all the way to a squared value that w=
ould seem to cover all the simple geometrical calculations we&#39;re intere=
sted in.=C2=A0 Things like hypot() help, but I admit I don&#39;t fully unde=
rstand exactly how much.=C2=A0 They certainly keep the numbers smaller and =
thereby prevent overflow, but I don&#39;t fully understand the consequences=
 for intermediate results outside the range where the float can represent a=
ll integers.</div></blockquote><div><br></div>This particular calculation i=
s numerically stable, even if written as sqrt(x*x+y*y). It can=E2=80=99t ge=
nerally be perfect, but it=E2=80=99s not the kind of thing that sends numer=
ical analysts into cold sweats.</div></div></blockquote><div><br></div><div=
 style=3D"">Going through and auditing geometry.h for big things they&#39;r=
e mostly in hypot() but there are a few others.=C2=A0</div><div><br></div><=
div style=3D"">Do you know about the sensitivity of these:</div><div style=
=3D""><br></div><div>=C2=A0 <a href=3D"http://mathworld.wolfram.com/Circle-=
LineIntersection.html">http://mathworld.wolfram.com/Circle-LineIntersection=
.html</a></div><div>=C2=A0 <a href=3D"http://mathworld.wolfram.com/Circle-C=
ircleIntersection.html">http://mathworld.wolfram.com/Circle-CircleIntersect=
ion.html</a><br></div><div><br></div><div style=3D"">Britton</div><div><br>=
</div></div></div></div>

--047d7b5d3e64cf3aad0528b40e15--

- Raw text -


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