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: <8985B557-CC87-48A0-A745-298A501945F0 AT noqsi DOT com> Date: Wed, 6 Jan 2016 16:04:51 -0900 Message-ID: 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]" To: geda-user AT delorie DOT com Content-Type: multipart/alternative; boundary=047d7b5d3e64cf3aad0528b40e15 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 --047d7b5d3e64cf3aad0528b40e15 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Jan 6, 2016 at 3:47 PM, John Doty 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] 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


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

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

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'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're intere= sted in.=C2=A0 Things like hypot() help, but I admit I don't fully unde= rstand exactly how much.=C2=A0 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 a= ll integers.

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.

Going through and auditing geometry.h for big things they'r= e mostly in hypot() but there are a few others.=C2=A0

<= div style=3D"">Do you know about the sensitivity of these:


Britton

=
--047d7b5d3e64cf3aad0528b40e15--