Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Landru! Guide us! -- A Beta 3-oid, "The Return of the Archons", stardate 3157.4


tech / sci.electronics.design / Re: How to calculate pi

SubjectAuthor
* How to calculate piPhil Allison
+* Re: How to calculate piPiglet
|+* Re: How to calculate pibitrex
||`* Re: How to calculate piTom Del Rosso
|| `* Re: How to calculate piTom Del Rosso
||  +- Re: How to calculate piTom Del Rosso
||  `- Re: How to calculate pibitrex
|`* Re: How to calculate piPhil Hobbs
| +* Re: How to calculate pijlarkin
| |+* Re: How to calculate piPhil Hobbs
| ||`* Re: How to calculate piMartin Brown
| || +* Re: How to calculate piJeroen Belleman
| || |`* Re: How to calculate piMartin Brown
| || | `* Re: How to calculate pibitrex
| || |  `* Re: How to calculate piMartin Brown
| || |   `- Re: How to calculate pibitrex
| || `* Re: How to calculate piJoe Gwinn
| ||  +- Re: How to calculate piDon Y
| ||  +- Re: How to calculate piPhil Hobbs
| ||  `* Re: How to calculate piMartin Brown
| ||   +* Re: How to calculate piPhil Hobbs
| ||   |`* Re: How to calculate piMartin Brown
| ||   | `* Re: How to calculate piPhil Hobbs
| ||   |  `- Re: How to calculate piMartin Brown
| ||   +* Re: How to calculate pijlarkin
| ||   |`* Re: How to calculate piClifford Heath
| ||   | +- Re: How to calculate piJohn Larkin
| ||   | `* Re: How to calculate piJoe Gwinn
| ||   |  +* Re: How to calculate piMartin Brown
| ||   |  |+* Re: How to calculate pijlarkin
| ||   |  ||`* Re: How to calculate piMartin Brown
| ||   |  || `* Re: How to calculate piPhil Hobbs
| ||   |  ||  `- Re: How to calculate piMartin Brown
| ||   |  |+- Re: How to calculate piDon Y
| ||   |  |`* Re: How to calculate piJoe Gwinn
| ||   |  | `- Re: How to calculate piMartin Brown
| ||   |  `- Re: How to calculate piClifford Heath
| ||   `- Re: How to calculate piJoe Gwinn
| |`* Re: How to calculate piTom Del Rosso
| | `* Re: How to calculate piClive Arthur
| |  `* Re: How to calculate pibitrex
| |   `* Re: How to calculate piTom Del Rosso
| |    `- Re: How to calculate pibitrex
| `* Re: How to calculate pidcaster@krl.org
|  +- Re: How to calculate piJohn S
|  `- Re: How to calculate pijlarkin
+* Re: How to calculate piFred Bloggs
|+- Re: How to calculate piAnthony William Sloman
|+* Re: How to calculate piPhil Allison
||+* Re: How to calculate piFred Bloggs
|||+* Re: How to calculate pibitrex
||||`* Re: How to calculate piFred Bloggs
|||| `- Re: How to calculate pibitrex
|||`- Re: How to calculate piPhil Allison
||`- Re: How to calculate piJeff Layman
|`* Re: How to calculate pijlarkin
| `* Re: How to calculate piFred Bloggs
|  +* Re: How to calculate piMartin Brown
|  |`* Re: How to calculate pijlarkin
|  | +* Re: How to calculate piMike
|  | |`* Re: How to calculate pijlarkin
|  | | `* Re: How to calculate piGerhard Hoffmann
|  | |  `- Re: How to calculate piGerhard Hoffmann
|  | `- Re: How to calculate piMartin Brown
|  `- Re: How to calculate pijlarkin
`- Re: How to calculate piClifford Heath

Pages:123
Re: How to calculate pi

<uompeg10d1o2a99ct1s2qe04a16prt2cfn@4ax.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=67452&group=sci.electronics.design#67452

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail
NNTP-Posting-Date: Mon, 12 Jul 2021 19:20:10 -0500
From: jlar...@highland_atwork_technology.com (John Larkin)
Newsgroups: sci.electronics.design
Subject: Re: How to calculate pi
Date: Mon, 12 Jul 2021 17:20:10 -0700
Organization: Highland Tech
Reply-To: xx@yy.com
Message-ID: <uompeg10d1o2a99ct1s2qe04a16prt2cfn@4ax.com>
References: <470e7495-cee6-4b95-a162-fb1d707070aan@googlegroups.com> <scc14g$e2b$1@dont-email.me> <ec60a1b3-b666-4daa-5528-bb72f7aa62cc@electrooptical.net> <6m0keg581q3u3qd0ulrcqpjr8gsje144o2@4ax.com> <02be3d5b-a039-84b0-8fe6-7e928e235715@electrooptical.net> <sce86l$q9v$1@gioia.aioe.org> <235megddg2uld3qikbp0755lhva8so64i5@4ax.com> <scgs0p$1aqh$1@gioia.aioe.org> <94poegdcr5s55d1kr6qja3ban40t0pt2fi@4ax.com> <1691309f3961cbbb$1$1356503$70dd7a6b@news.thecubenet.com>
X-Newsreader: Forte Agent 3.1/32.783
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Lines: 73
X-Trace: sv3-saKtccmQs7TUBozAprU0UQZaWoiFoQqapWmlmvUbqs3l26/Rt7d4aQTOVZicao+WPl46JRMnB5T4u2J!P9l36Wx+QteJyaa+i0NHnmyfoadO5H94fWgB8G1hw2iev4uarlLsKASmF39uR1AC8dCLb51jceje!HJkWvw==
X-Complaints-To: www.supernews.com/docs/abuse.html
X-DMCA-Complaints-To: www.supernews.com/docs/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 4649
 by: John Larkin - Tue, 13 Jul 2021 00:20 UTC

On Tue, 13 Jul 2021 09:59:58 +1000, Clifford Heath
<no.spam@please.net> wrote:

>On 13/7/21 1:56 am, jlarkin@highlandsniptechnology.com wrote:
>> On Mon, 12 Jul 2021 08:46:33 +0100, Martin Brown
>> <'''newspam'''@nonad.co.uk> wrote:
>>
>>> On 11/07/2021 16:57, Joe Gwinn wrote:
>>>> On Sun, 11 Jul 2021 08:56:05 +0100, Martin Brown
>>>> <'''newspam'''@nonad.co.uk> wrote:
>>>>
>>>>> On 10/07/2021 21:38, Phil Hobbs wrote:
>>>>>> jlarkin@highlandsniptechnology.com wrote:
>>>
>>>>>>> We're doing a timing project now and sometimes switch between cycles
>>>>>>> and radians, to about 1 PPB resolution.
>>>>>>
>>>>>> Sure, plus frequency synthesis and all sorts of DSP things.  (I only
>>>>>> ever memorized pi to REAL*8 accuracy---for higher precision it's
>>>>>> 4*ridiculous_precision_atan(1.).) ;)
>>>>>
>>>>> 6*ridiculous_precision_asin(0.5) converges a lot faster.
>>>>>
>>>>> These days it isn't such a problem since hardware support for floating
>>>>> point is much better. Some older implementations struggled with atan(1).
>>>>>
>>>>> My supervisor used to use 4*atan(1) until someone pointed out to him
>>>>> that was the most difficult to converge point of the atan function.
>>>>> Some older FORTRAN compilers did not get it right to full precision!
>>>>
>>>> Later DEC VAX hardware implemented 128-bit floats in hardware.
>>>
>>> That seems more than a bit overkill - no wonder they got into trouble.
>>>
>>> I can count on the fingers of one hand the times when I have actually
>>> *needed* to use quad precision (mostly for checking a double precision
>>> algorithm) and most physics problems can be solved in single precision.
>>> You seldom have 6 meaningful significant digits in real experimental
>>> data (although mass spectrometry is one place where you sometimes do).
>>
>> We need double floats to do some numeric-ratio frequency synthesizer
>> math.
>
>I thought I needed 64-bit division to calculate frequency delta words
>for the AD9959 DDS chip, but wound up implementing reciprocal division.
>If done correctly, you get better than PPB accuracy using only a
>32x32->64 multiply:
>
><https://github.com/cjheath/AD9959/blob/b3ee0b91c5be7d626a8bf3aeb5a605870ed8ac4b/AD9959.h#L251-L256>
>
><https://github.com/cjheath/AD9959/blob/b3ee0b91c5be7d626a8bf3aeb5a605870ed8ac4b/AD9959.h#L282>
>
>Yes, I know, Arduino, urk. But that's what was called-for in this case.
>
>Even the little AVR can do "64-bit division" in about 70us using this
>method.
>
>> Number theory, primes and relative primes and common divisor sorts of
>> stuff, pop up now and then. The people who make frequency synth chips
>> obviously have code to drive them (as in eval kits) but won't reveal
>> it. PITA.
>
>Indeed. One wonders what business they think they're in.
>
>Clifford Heath.

We had to grunt out the math for the LMX2571 synthesizer chip. It's a
matter of finding the best N/M to scale the clock to the target
frequency, with a bunch of other divisors somewhere, and some rules
about selecting VCOs and spurs and stuff.

Once it's working, it's very good.

Re: How to calculate pi

<scjgd5$1nfr$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=67471&group=sci.electronics.design#67471

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!usenet.goja.nl.eu.org!aioe.org!kTL2l0jWzcGX0osJwUWcTw.user.gioia.aioe.org.POSTED!not-for-mail
From: '''newsp...@nonad.co.uk (Martin Brown)
Newsgroups: sci.electronics.design
Subject: Re: How to calculate pi
Date: Tue, 13 Jul 2021 08:46:45 +0100
Organization: Aioe.org NNTP Server
Lines: 55
Message-ID: <scjgd5$1nfr$1@gioia.aioe.org>
References: <470e7495-cee6-4b95-a162-fb1d707070aan@googlegroups.com>
<scc14g$e2b$1@dont-email.me>
<ec60a1b3-b666-4daa-5528-bb72f7aa62cc@electrooptical.net>
<6m0keg581q3u3qd0ulrcqpjr8gsje144o2@4ax.com>
<02be3d5b-a039-84b0-8fe6-7e928e235715@electrooptical.net>
<sce86l$q9v$1@gioia.aioe.org> <235megddg2uld3qikbp0755lhva8so64i5@4ax.com>
<scgs0p$1aqh$1@gioia.aioe.org>
<8b5f687f-ccf7-00ef-cfd1-1f26926c5268@electrooptical.net>
<sci28h$1i39$2@gioia.aioe.org>
<10331c17-9dc3-f63e-868a-5e50f04e5900@electrooptical.net>
NNTP-Posting-Host: kTL2l0jWzcGX0osJwUWcTw.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: Martin Brown - Tue, 13 Jul 2021 07:46 UTC

On 12/07/2021 20:49, Phil Hobbs wrote:
> Martin Brown wrote:
>> On 12/07/2021 14:38, Phil Hobbs wrote:
>>> Martin Brown wrote:
>>>> On 11/07/2021 16:57, Joe Gwinn wrote:
>>>>
>>>>> Mathematica handles arbitrary precision quite well.  See the N[]
>>>>> operator.
>>>>
>>>> I prefer Maxima through the wxMaxima GUI since it is free.
>>>>
>>>> It isn't quite as powerful as Mathematica but it can still do the
>>>> job if used carefully. It is easy to end up with mismatched brackets
>>>> but apart from that it is fine and you really can't beat the price!
>>>>
>>>
>>> I've been wanting to switch from my current 20-year-old copy of
>>> Mathcad to something like Maxima running in a Jupyter notebook, but
>>> there's no supported way to do that at the moment.
>>
>> Mathcad - now that is a blast from the past! Does it still work on Win7?
>> More of a scratchpad but pretty good for trying out engineering ideas.
>
> It's still sold by PTC, I think.  Mine is version 2001i, which is Win32,
> so it works fine on Win 7 and under Wine in Linux.  (You do need a few
> native DLLs for Wine.)
>
>> I found Maxima with the GUI much less difficult to get to grips with
>> than the text interface even though it was less powerful that way.
>> I'm using the Windows port but Linux and Mac iOS is also supported.
>
> I mostly use Mathcad for what I call 'photon budgets', which are
> actually first-principles feasibility calculations for instruments or
> measurement schemes in general.  If you don't do the theory, there's no
> way of knowing how good your gizmo _could_ be, so you have no idea how
> well you're doing.
>
> I need to be able to make nice printed documents with a lot of
> properly-formatted text and plots to send to clients.  Mathcad is nice
> that way because they can all be 'live' for me, but few of my clients
> use it, so they get the PDFs.

If what you have now will do what you want well enough then I would
recommend sticking with it until you run into something that forces a
change to solve a problem. The learning curve to make full use of Maxima
is pretty steep and it does have some rough edges here and there.

I only jumped ship because I had a horrible expression that I needed to
differentiate and it defied my existing tools and all manual efforts.
Maxima got it and could solve the resulting quartic to a closed form. -
incredibly ugly messy expression but to my surprise it could do it.

--
Regards,
Martin Brown

Re: How to calculate pi

<scjirp$qop$2@gioia.aioe.org>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=67477&group=sci.electronics.design#67477

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!aioe.org!kTL2l0jWzcGX0osJwUWcTw.user.gioia.aioe.org.POSTED!not-for-mail
From: '''newsp...@nonad.co.uk (Martin Brown)
Newsgroups: sci.electronics.design
Subject: Re: How to calculate pi
Date: Tue, 13 Jul 2021 09:28:41 +0100
Organization: Aioe.org NNTP Server
Lines: 30
Message-ID: <scjirp$qop$2@gioia.aioe.org>
References: <470e7495-cee6-4b95-a162-fb1d707070aan@googlegroups.com>
<scc14g$e2b$1@dont-email.me>
<ec60a1b3-b666-4daa-5528-bb72f7aa62cc@electrooptical.net>
<6m0keg581q3u3qd0ulrcqpjr8gsje144o2@4ax.com>
<02be3d5b-a039-84b0-8fe6-7e928e235715@electrooptical.net>
<sce86l$q9v$1@gioia.aioe.org> <sceqd3$1ol5$1@gioia.aioe.org>
<scgr5v$uug$1@gioia.aioe.org> <dE0HI.18191$VU3.1660@fx46.iad>
NNTP-Posting-Host: kTL2l0jWzcGX0osJwUWcTw.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: Martin Brown - Tue, 13 Jul 2021 08:28 UTC

On 12/07/2021 20:22, bitrex wrote:
> On 7/12/2021 3:32 AM, Martin Brown wrote:
>> On 11/07/2021 14:06, Jeroen Belleman wrote:
>>> On 2021-07-11 09:56, Martin Brown wrote:

>>>> We were allowed pi^2 = g in physics calculations at university.
>>>
>>> The trouble with that is that it makes no physical sense. It's
>>> a coincidence, and not even a very accurate one. It's numerology.
>>>
>>> <https://xkcd.com/1047/>
>>
>> Oh yes, but at that level it is allowable. Physics undergraduates by
>> that stage know perfectly well that it is a coincidence. Not a good
>> idea to use that crude an approximation in a practical exam though!
>>
>> We were also allowed seconds in a year = pi x 10^7 in theory papers.
>>
>> Which isn't in your teacher trolling table and is good to 0.5% or so.
>
> G = 1, c = 1, h_bar = 1, k = 1, Q_e = whatever.

I was reading a paper not that long ago with pi = 1

It was most confusing...

--
Regards,
Martin Brown

Re: How to calculate pi

<sck8di$6bt$1@dont-email.me>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=67491&group=sci.electronics.design#67491

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: fizzbint...@that-google-mail-domain.com (Tom Del Rosso)
Newsgroups: sci.electronics.design
Subject: Re: How to calculate pi
Date: Tue, 13 Jul 2021 10:36:33 -0400
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <sck8di$6bt$1@dont-email.me>
References: <470e7495-cee6-4b95-a162-fb1d707070aan@googlegroups.com> <scc14g$e2b$1@dont-email.me> <ec60a1b3-b666-4daa-5528-bb72f7aa62cc@electrooptical.net> <6m0keg581q3u3qd0ulrcqpjr8gsje144o2@4ax.com> <scd0it$oau$1@dont-email.me> <scd5da$nu0$1@dont-email.me> <X0rGI.176$_fgb.83@fx01.iad>
Injection-Date: Tue, 13 Jul 2021 14:36:34 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="40ab372e0f497cfe667e16bc2e89bc6f";
logging-data="6525"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/22bd2HNjbBHru7mPQMaEGQLQvNidPWd8="
Cancel-Lock: sha1:IhrSwnuYkdErOlMC+y+3rcyZNR4=
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
X-RFC2646: Format=Flowed; Response
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-Priority: 3
X-MSMail-Priority: Normal
 by: Tom Del Rosso - Tue, 13 Jul 2021 14:36 UTC

bitrex wrote:
>
> Everything about the history of your life is written in the digits of
> pi! And all the alternate histories too. And every other irrational
> number. And a library that contains everything, contains nothing :(

Although it's possible that some sequences never occur.

It's interesting to note that sequences do repeat but, even if the
sequence is a gogolplex long, the next digit will be different each
time.

Maybe the latter disproves the former.

--
Defund the Thought Police

Re: How to calculate pi

<gicreg10466dtv74r8bs53n13cpgv8f2lc@4ax.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=67506&group=sci.electronics.design#67506

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!buffer1.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Tue, 13 Jul 2021 10:36:19 -0500
From: joegw...@comcast.net (Joe Gwinn)
Newsgroups: sci.electronics.design
Subject: Re: How to calculate pi
Date: Tue, 13 Jul 2021 11:36:19 -0400
Message-ID: <gicreg10466dtv74r8bs53n13cpgv8f2lc@4ax.com>
References: <470e7495-cee6-4b95-a162-fb1d707070aan@googlegroups.com> <scc14g$e2b$1@dont-email.me> <ec60a1b3-b666-4daa-5528-bb72f7aa62cc@electrooptical.net> <6m0keg581q3u3qd0ulrcqpjr8gsje144o2@4ax.com> <02be3d5b-a039-84b0-8fe6-7e928e235715@electrooptical.net> <sce86l$q9v$1@gioia.aioe.org> <235megddg2uld3qikbp0755lhva8so64i5@4ax.com> <scgs0p$1aqh$1@gioia.aioe.org> <94poegdcr5s55d1kr6qja3ban40t0pt2fi@4ax.com> <1691309f3961cbbb$1$1356503$70dd7a6b@news.thecubenet.com>
User-Agent: ForteAgent/8.00.32.1272
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Lines: 64
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-3JAdCwSA4juXKYxRGBvaJ/yavrD06TcQSJ/OcThgPnRvtRTvKFwf/E0GEBBgsWWaG6ajSZWx3EgSYKZ!JhqjmVSw5SZJFwkGCAQUn/obVTJq86rzpKDcuAPKAFtNp0FQsgh2L2fHF68KfwYgoPmGAqA=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 4212
 by: Joe Gwinn - Tue, 13 Jul 2021 15:36 UTC

On Tue, 13 Jul 2021 09:59:58 +1000, Clifford Heath
<no.spam@please.net> wrote:

>On 13/7/21 1:56 am, jlarkin@highlandsniptechnology.com wrote:
>> On Mon, 12 Jul 2021 08:46:33 +0100, Martin Brown
>> <'''newspam'''@nonad.co.uk> wrote:
>>
>>> On 11/07/2021 16:57, Joe Gwinn wrote:
>>>> On Sun, 11 Jul 2021 08:56:05 +0100, Martin Brown
>>>> <'''newspam'''@nonad.co.uk> wrote:
>>>>
>>>>> On 10/07/2021 21:38, Phil Hobbs wrote:
>>>>>> jlarkin@highlandsniptechnology.com wrote:
>>>
>>>>>>> We're doing a timing project now and sometimes switch between cycles
>>>>>>> and radians, to about 1 PPB resolution.
>>>>>>
>>>>>> Sure, plus frequency synthesis and all sorts of DSP things.  (I only
>>>>>> ever memorized pi to REAL*8 accuracy---for higher precision it's
>>>>>> 4*ridiculous_precision_atan(1.).) ;)
>>>>>
>>>>> 6*ridiculous_precision_asin(0.5) converges a lot faster.
>>>>>
>>>>> These days it isn't such a problem since hardware support for floating
>>>>> point is much better. Some older implementations struggled with atan(1).
>>>>>
>>>>> My supervisor used to use 4*atan(1) until someone pointed out to him
>>>>> that was the most difficult to converge point of the atan function.
>>>>> Some older FORTRAN compilers did not get it right to full precision!
>>>>
>>>> Later DEC VAX hardware implemented 128-bit floats in hardware.
>>>
>>> That seems more than a bit overkill - no wonder they got into trouble.
>>>
>>> I can count on the fingers of one hand the times when I have actually
>>> *needed* to use quad precision (mostly for checking a double precision
>>> algorithm) and most physics problems can be solved in single precision.
>>> You seldom have 6 meaningful significant digits in real experimental
>>> data (although mass spectrometry is one place where you sometimes do).
>>
>> We need double floats to do some numeric-ratio frequency synthesizer
>> math.
>
>I thought I needed 64-bit division to calculate frequency delta words
>for the AD9959 DDS chip, but wound up implementing reciprocal division.
>If done correctly, you get better than PPB accuracy using only a
>32x32->64 multiply:
>
><https://github.com/cjheath/AD9959/blob/b3ee0b91c5be7d626a8bf3aeb5a605870ed8ac4b/AD9959.h#L251-L256>
>
><https://github.com/cjheath/AD9959/blob/b3ee0b91c5be7d626a8bf3aeb5a605870ed8ac4b/AD9959.h#L282>
>
>Yes, I know, Arduino, urk. But that's what was called-for in this case.
>
>Even the little AVR can do "64-bit division" in about 70us using this
>method.

This would be integer division, not IEEE floating-point (which can do
integer arithmetic only to 52 bits)..

Most modern instruction set architectures support multi precision
integer arithmetic in (assembly code) software.

Joe Gwinn

Re: How to calculate pi

<sckcjp$1fni$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=67508&group=sci.electronics.design#67508

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!aioe.org!kTL2l0jWzcGX0osJwUWcTw.user.gioia.aioe.org.POSTED!not-for-mail
From: '''newsp...@nonad.co.uk (Martin Brown)
Newsgroups: sci.electronics.design
Subject: Re: How to calculate pi
Date: Tue, 13 Jul 2021 16:48:09 +0100
Organization: Aioe.org NNTP Server
Lines: 23
Message-ID: <sckcjp$1fni$1@gioia.aioe.org>
References: <470e7495-cee6-4b95-a162-fb1d707070aan@googlegroups.com>
<scc14g$e2b$1@dont-email.me>
<ec60a1b3-b666-4daa-5528-bb72f7aa62cc@electrooptical.net>
<6m0keg581q3u3qd0ulrcqpjr8gsje144o2@4ax.com>
<02be3d5b-a039-84b0-8fe6-7e928e235715@electrooptical.net>
<sce86l$q9v$1@gioia.aioe.org> <235megddg2uld3qikbp0755lhva8so64i5@4ax.com>
<scgs0p$1aqh$1@gioia.aioe.org> <94poegdcr5s55d1kr6qja3ban40t0pt2fi@4ax.com>
<1691309f3961cbbb$1$1356503$70dd7a6b@news.thecubenet.com>
<gicreg10466dtv74r8bs53n13cpgv8f2lc@4ax.com>
NNTP-Posting-Host: kTL2l0jWzcGX0osJwUWcTw.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: Martin Brown - Tue, 13 Jul 2021 15:48 UTC

On 13/07/2021 16:36, Joe Gwinn wrote:

> This would be integer division, not IEEE floating-point (which can do
> integer arithmetic only to 52 bits)..

Depends really. The most common x87 implementation can do a 64 bit
mantissa and 16 bit exponent in hardware but MS C/C++ no longer supports
it and makes a hash of consistent rounding to 53 bits for good measure.

I haven't tried it but I expect the chip can handle 64 bit integer loads
and arithmetic perfectly well but the compiler will only let you store a
53 bit mantissa and 11 bit exponent result (unless you knobble it).

ISTR MSC v6.0 was the last with proper long double support included.

> Most modern instruction set architectures support multi precision
> integer arithmetic in (assembly code) software.

High precision integer arithmetic isn't all that hard.

--
Regards,
Martin Brown

Re: How to calculate pi

<k8gregp2524fh7s5i996ggs1212jitul2b@4ax.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=67513&group=sci.electronics.design#67513

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail
NNTP-Posting-Date: Tue, 13 Jul 2021 11:38:51 -0500
From: jlar...@highlandsniptechnology.com
Newsgroups: sci.electronics.design
Subject: Re: How to calculate pi
Date: Tue, 13 Jul 2021 09:38:52 -0700
Message-ID: <k8gregp2524fh7s5i996ggs1212jitul2b@4ax.com>
References: <scc14g$e2b$1@dont-email.me> <ec60a1b3-b666-4daa-5528-bb72f7aa62cc@electrooptical.net> <6m0keg581q3u3qd0ulrcqpjr8gsje144o2@4ax.com> <02be3d5b-a039-84b0-8fe6-7e928e235715@electrooptical.net> <sce86l$q9v$1@gioia.aioe.org> <235megddg2uld3qikbp0755lhva8so64i5@4ax.com> <scgs0p$1aqh$1@gioia.aioe.org> <94poegdcr5s55d1kr6qja3ban40t0pt2fi@4ax.com> <1691309f3961cbbb$1$1356503$70dd7a6b@news.thecubenet.com> <gicreg10466dtv74r8bs53n13cpgv8f2lc@4ax.com> <sckcjp$1fni$1@gioia.aioe.org>
X-Newsreader: Forte Agent 3.1/32.783
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 37
X-Trace: sv3-VAAJ9aF1li+haYZxIZMe+8fM0dZcc/dPijPMwivvJMPXLR48K0X3/M2A3Z8Z8BPqockS6KO8Nat0M7w!gWs1YI0V8R0KgzCLGs4H9XGNp1O1dF3rvC0EG4KAhxjjJ3AStUiAZkYDF8TRcpO/Rvhu55kqGanD!MlIjNQ==
X-Complaints-To: www.supernews.com/docs/abuse.html
X-DMCA-Complaints-To: www.supernews.com/docs/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 2659
 by: jlar...@highlandsniptechnology.com - Tue, 13 Jul 2021 16:38 UTC

On Tue, 13 Jul 2021 16:48:09 +0100, Martin Brown
<'''newspam'''@nonad.co.uk> wrote:

>On 13/07/2021 16:36, Joe Gwinn wrote:
>
>> This would be integer division, not IEEE floating-point (which can do
>> integer arithmetic only to 52 bits)..
>
>Depends really. The most common x87 implementation can do a 64 bit
>mantissa and 16 bit exponent in hardware but MS C/C++ no longer supports
>it and makes a hash of consistent rounding to 53 bits for good measure.
>
>I haven't tried it but I expect the chip can handle 64 bit integer loads
>and arithmetic perfectly well but the compiler will only let you store a
>53 bit mantissa and 11 bit exponent result (unless you knobble it).
>
>ISTR MSC v6.0 was the last with proper long double support included.
>
>> Most modern instruction set architectures support multi precision
>> integer arithmetic in (assembly code) software.
>
>High precision integer arithmetic isn't all that hard.

PowerBasic allows quad integer and extended float (10 byte) variables.

We've used that when c was not good enough, or too slow.

--

John Larkin Highland Technology, Inc

The best designs are necessarily accidental.

Re: How to calculate pi

<sckfj6$21t$1@dont-email.me>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=67514&group=sci.electronics.design#67514

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: blockedo...@foo.invalid (Don Y)
Newsgroups: sci.electronics.design
Subject: Re: How to calculate pi
Date: Tue, 13 Jul 2021 09:38:49 -0700
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <sckfj6$21t$1@dont-email.me>
References: <470e7495-cee6-4b95-a162-fb1d707070aan@googlegroups.com>
<scc14g$e2b$1@dont-email.me>
<ec60a1b3-b666-4daa-5528-bb72f7aa62cc@electrooptical.net>
<6m0keg581q3u3qd0ulrcqpjr8gsje144o2@4ax.com>
<02be3d5b-a039-84b0-8fe6-7e928e235715@electrooptical.net>
<sce86l$q9v$1@gioia.aioe.org> <235megddg2uld3qikbp0755lhva8so64i5@4ax.com>
<scgs0p$1aqh$1@gioia.aioe.org> <94poegdcr5s55d1kr6qja3ban40t0pt2fi@4ax.com>
<1691309f3961cbbb$1$1356503$70dd7a6b@news.thecubenet.com>
<gicreg10466dtv74r8bs53n13cpgv8f2lc@4ax.com> <sckcjp$1fni$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 13 Jul 2021 16:39:02 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="708bd42b87a3fff090d1c50e4553cb79";
logging-data="2109"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19X/8keoL0wGbB+AzTICK+S"
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101
Thunderbird/52.1.1
Cancel-Lock: sha1:lV037RhyaXxy23H2LGbQRaSZtS0=
In-Reply-To: <sckcjp$1fni$1@gioia.aioe.org>
Content-Language: en-US
 by: Don Y - Tue, 13 Jul 2021 16:38 UTC

On 7/13/2021 8:48 AM, Martin Brown wrote:
>> Most modern instruction set architectures support multi precision
>> integer arithmetic in (assembly code) software.
>
> High precision integer arithmetic isn't all that hard.

No -- and need not be implemented in ASM.

But, it is considerably slower. And, things like transcendental
functions get *really* expensive (as there is no hardware assist).

OTOH, you often don't need that sort of range/precision for
run-of-the-mill calculations.

Re: How to calculate pi

<UqjHI.2944$_fgb.705@fx01.iad>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=67516&group=sci.electronics.design#67516

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!aioe.org!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx01.iad.POSTED!not-for-mail
Subject: Re: How to calculate pi
Newsgroups: sci.electronics.design
References: <470e7495-cee6-4b95-a162-fb1d707070aan@googlegroups.com>
<scc14g$e2b$1@dont-email.me>
<ec60a1b3-b666-4daa-5528-bb72f7aa62cc@electrooptical.net>
<6m0keg581q3u3qd0ulrcqpjr8gsje144o2@4ax.com>
<02be3d5b-a039-84b0-8fe6-7e928e235715@electrooptical.net>
<sce86l$q9v$1@gioia.aioe.org> <sceqd3$1ol5$1@gioia.aioe.org>
<scgr5v$uug$1@gioia.aioe.org> <dE0HI.18191$VU3.1660@fx46.iad>
<scjirp$qop$2@gioia.aioe.org>
From: use...@example.net (bitrex)
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
MIME-Version: 1.0
In-Reply-To: <scjirp$qop$2@gioia.aioe.org>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Lines: 48
Message-ID: <UqjHI.2944$_fgb.705@fx01.iad>
X-Complaints-To: abuse@frugalusenet.com
NNTP-Posting-Date: Tue, 13 Jul 2021 16:45:40 UTC
Organization: frugalusenet - www.frugalusenet.com
Date: Tue, 13 Jul 2021 12:45:40 -0400
X-Received-Bytes: 3015
 by: bitrex - Tue, 13 Jul 2021 16:45 UTC

On 7/13/2021 4:28 AM, Martin Brown wrote:
> On 12/07/2021 20:22, bitrex wrote:
>> On 7/12/2021 3:32 AM, Martin Brown wrote:
>>> On 11/07/2021 14:06, Jeroen Belleman wrote:
>>>> On 2021-07-11 09:56, Martin Brown wrote:
>
>>>>> We were allowed pi^2 = g in physics calculations at university.
>>>>
>>>> The trouble with that is that it makes no physical sense. It's
>>>> a coincidence, and not even a very accurate one. It's numerology.
>>>>
>>>> <https://xkcd.com/1047/>
>>>
>>> Oh yes, but at that level it is allowable. Physics undergraduates by
>>> that stage know perfectly well that it is a coincidence. Not a good
>>> idea to use that crude an approximation in a practical exam though!
>>>
>>> We were also allowed seconds in a year = pi x 10^7 in theory papers.
>>>
>>> Which isn't in your teacher trolling table and is good to 0.5% or so.
>>
>> G = 1, c = 1, h_bar = 1, k = 1, Q_e = whatever.
>
> I was reading a paper not that long ago with pi = 1
>
> It was most confusing...
>
>

>

Roundabout way of showing pi is a constant, an n-ball in an
n-dimensional Euclidean space is a set of points equidistant from a
central point. A circle is a 2-ball. Without assuming pi is a constant
you can derive a recurrence relation:

<https://en.wikipedia.org/wiki/Volume_of_an_n-ball#The_one-dimension_recursion_formula>

and use the functional equation for the gamma function to derive an
expression for the volume of an n-ball, and take the factor of
gamma(1/2) to be some unknown constant.

Then pi is defined by the value of gamma(1/2) needing to be sqrt(pi),
the unique constant such that the volume of the n-ball V_n(R) is always
maximal with respect to its surface area for all permutations of n, R
from the set of reals (Euler-Lagrange equations.)

I think...

Re: How to calculate pi

<sckm3t$7lv$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=67523&group=sci.electronics.design#67523

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!aioe.org!kTL2l0jWzcGX0osJwUWcTw.user.gioia.aioe.org.POSTED!not-for-mail
From: '''newsp...@nonad.co.uk (Martin Brown)
Newsgroups: sci.electronics.design
Subject: Re: How to calculate pi
Date: Tue, 13 Jul 2021 19:30:21 +0100
Organization: Aioe.org NNTP Server
Lines: 34
Message-ID: <sckm3t$7lv$1@gioia.aioe.org>
References: <scc14g$e2b$1@dont-email.me>
<ec60a1b3-b666-4daa-5528-bb72f7aa62cc@electrooptical.net>
<6m0keg581q3u3qd0ulrcqpjr8gsje144o2@4ax.com>
<02be3d5b-a039-84b0-8fe6-7e928e235715@electrooptical.net>
<sce86l$q9v$1@gioia.aioe.org> <235megddg2uld3qikbp0755lhva8so64i5@4ax.com>
<scgs0p$1aqh$1@gioia.aioe.org> <94poegdcr5s55d1kr6qja3ban40t0pt2fi@4ax.com>
<1691309f3961cbbb$1$1356503$70dd7a6b@news.thecubenet.com>
<gicreg10466dtv74r8bs53n13cpgv8f2lc@4ax.com> <sckcjp$1fni$1@gioia.aioe.org>
<k8gregp2524fh7s5i996ggs1212jitul2b@4ax.com>
NNTP-Posting-Host: kTL2l0jWzcGX0osJwUWcTw.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: Martin Brown - Tue, 13 Jul 2021 18:30 UTC

On 13/07/2021 17:38, jlarkin@highlandsniptechnology.com wrote:
> On Tue, 13 Jul 2021 16:48:09 +0100, Martin Brown
> <'''newspam'''@nonad.co.uk> wrote:
>
>> On 13/07/2021 16:36, Joe Gwinn wrote:
>>
>>> This would be integer division, not IEEE floating-point (which can do
>>> integer arithmetic only to 52 bits)..
>>
>> Depends really. The most common x87 implementation can do a 64 bit
>> mantissa and 16 bit exponent in hardware but MS C/C++ no longer supports
>> it and makes a hash of consistent rounding to 53 bits for good measure.
>>
>> I haven't tried it but I expect the chip can handle 64 bit integer loads
>> and arithmetic perfectly well but the compiler will only let you store a
>> 53 bit mantissa and 11 bit exponent result (unless you knobble it).
>>
>> ISTR MSC v6.0 was the last with proper long double support included.
>>
>>> Most modern instruction set architectures support multi precision
>>> integer arithmetic in (assembly code) software.
>>
>> High precision integer arithmetic isn't all that hard.
>
> PowerBasic allows quad integer and extended float (10 byte) variables.
>
> We've used that when c was not good enough, or too slow.

GCC can do quad FP precision OK. It is the MickeySoft compiler that has
had its extended floating point support almost completely hobbled.

--
Regards,
Martin Brown

Re: How to calculate pi

<98ce5ce4-ad0b-61c6-2f56-a9cd35b5eb1e@electrooptical.net>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=67525&group=sci.electronics.design#67525

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: pcdhSpam...@electrooptical.net (Phil Hobbs)
Newsgroups: sci.electronics.design
Subject: Re: How to calculate pi
Date: Tue, 13 Jul 2021 14:59:44 -0400
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <98ce5ce4-ad0b-61c6-2f56-a9cd35b5eb1e@electrooptical.net>
References: <scc14g$e2b$1@dont-email.me>
<ec60a1b3-b666-4daa-5528-bb72f7aa62cc@electrooptical.net>
<6m0keg581q3u3qd0ulrcqpjr8gsje144o2@4ax.com>
<02be3d5b-a039-84b0-8fe6-7e928e235715@electrooptical.net>
<sce86l$q9v$1@gioia.aioe.org> <235megddg2uld3qikbp0755lhva8so64i5@4ax.com>
<scgs0p$1aqh$1@gioia.aioe.org> <94poegdcr5s55d1kr6qja3ban40t0pt2fi@4ax.com>
<1691309f3961cbbb$1$1356503$70dd7a6b@news.thecubenet.com>
<gicreg10466dtv74r8bs53n13cpgv8f2lc@4ax.com> <sckcjp$1fni$1@gioia.aioe.org>
<k8gregp2524fh7s5i996ggs1212jitul2b@4ax.com> <sckm3t$7lv$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: reader02.eternal-september.org; posting-host="478fe0507596d35f925734608a129518";
logging-data="19095"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/copYh0kE+qhJYpEoQjsvw"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
Thunderbird/60.0
Cancel-Lock: sha1:sjZLz3quAh+CUXjvepbNVHpAeqA=
In-Reply-To: <sckm3t$7lv$1@gioia.aioe.org>
 by: Phil Hobbs - Tue, 13 Jul 2021 18:59 UTC

Martin Brown wrote:
> On 13/07/2021 17:38, jlarkin@highlandsniptechnology.com wrote:
>> On Tue, 13 Jul 2021 16:48:09 +0100, Martin Brown
>> <'''newspam'''@nonad.co.uk> wrote:
>>
>>> On 13/07/2021 16:36, Joe Gwinn wrote:
>>>
>>>> This would be integer division, not IEEE floating-point (which can do
>>>> integer arithmetic only to 52 bits)..
>>>
>>> Depends really. The most common x87 implementation can do a 64 bit
>>> mantissa and 16 bit exponent in hardware but MS C/C++ no longer supports
>>> it and makes a hash of consistent rounding to 53 bits for good measure.
>>>
>>> I haven't tried it but I expect the chip can handle 64 bit integer loads
>>> and arithmetic perfectly well but the compiler will only let you store a
>>> 53 bit mantissa and 11 bit exponent result (unless you knobble it).
>>>
>>> ISTR MSC v6.0 was the last with proper long double support included.
>>>
>>>> Most modern instruction set architectures support multi precision
>>>> integer arithmetic in (assembly code) software.
>>>
>>> High precision integer arithmetic isn't all that hard.
>>
>> PowerBasic allows quad integer and extended float (10 byte) variables.
>>
>> We've used that when c was not good enough, or too slow.
>
> GCC can do quad FP precision OK. It is the MickeySoft compiler that has
> had its extended floating point support almost completely hobbled.
>

BITD the Intel C++ compiler could do that too, and plugged into Visual
Studio.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC / Hobbs ElectroOptics
Optics, Electro-optics, Photonics, Analog Electronics
Briarcliff Manor NY 10510

http://electrooptical.net
http://hobbs-eo.com

Re: How to calculate pi

<f_lHI.3809$7k7.393@fx11.iad>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=67531&group=sci.electronics.design#67531

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!fdc2.netnews.com!news-out.netnews.com!news.alt.net!fdc3.netnews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx11.iad.POSTED!not-for-mail
Subject: Re: How to calculate pi
Newsgroups: sci.electronics.design
References: <470e7495-cee6-4b95-a162-fb1d707070aan@googlegroups.com>
<scc14g$e2b$1@dont-email.me>
<ec60a1b3-b666-4daa-5528-bb72f7aa62cc@electrooptical.net>
<6m0keg581q3u3qd0ulrcqpjr8gsje144o2@4ax.com> <scd0it$oau$1@dont-email.me>
<scd5da$nu0$1@dont-email.me> <X0rGI.176$_fgb.83@fx01.iad>
<sck8di$6bt$1@dont-email.me>
From: use...@example.net (bitrex)
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
MIME-Version: 1.0
In-Reply-To: <sck8di$6bt$1@dont-email.me>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Lines: 21
Message-ID: <f_lHI.3809$7k7.393@fx11.iad>
X-Complaints-To: abuse@frugalusenet.com
NNTP-Posting-Date: Tue, 13 Jul 2021 19:39:55 UTC
Organization: frugalusenet - www.frugalusenet.com
Date: Tue, 13 Jul 2021 15:39:54 -0400
X-Received-Bytes: 1833
 by: bitrex - Tue, 13 Jul 2021 19:39 UTC

On 7/13/2021 10:36 AM, Tom Del Rosso wrote:
> bitrex wrote:
>>
>> Everything about the history of your life is written in the digits of
>> pi! And all the alternate histories too. And every other irrational
>> number. And a library that contains everything, contains nothing :(
>
> Although it's possible that some sequences never occur.

Yes, I should've said _almost_ every irrational number, you can
construct irrational numbers that are non-terminating non-repeating that
don't contain any particular sequence by design.

> It's interesting to note that sequences do repeat but, even if the
> sequence is a gogolplex long, the next digit will be different each
> time.
>
> Maybe the latter disproves the former.
>
>

Re: How to calculate pi

<sbtregtetslee6km1vijkqh6tbsghjgel1@4ax.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=67534&group=sci.electronics.design#67534

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Tue, 13 Jul 2021 15:35:31 -0500
From: joegw...@comcast.net (Joe Gwinn)
Newsgroups: sci.electronics.design
Subject: Re: How to calculate pi
Date: Tue, 13 Jul 2021 16:35:31 -0400
Message-ID: <sbtregtetslee6km1vijkqh6tbsghjgel1@4ax.com>
References: <scc14g$e2b$1@dont-email.me> <ec60a1b3-b666-4daa-5528-bb72f7aa62cc@electrooptical.net> <6m0keg581q3u3qd0ulrcqpjr8gsje144o2@4ax.com> <02be3d5b-a039-84b0-8fe6-7e928e235715@electrooptical.net> <sce86l$q9v$1@gioia.aioe.org> <235megddg2uld3qikbp0755lhva8so64i5@4ax.com> <scgs0p$1aqh$1@gioia.aioe.org> <94poegdcr5s55d1kr6qja3ban40t0pt2fi@4ax.com> <1691309f3961cbbb$1$1356503$70dd7a6b@news.thecubenet.com> <gicreg10466dtv74r8bs53n13cpgv8f2lc@4ax.com> <sckcjp$1fni$1@gioia.aioe.org>
User-Agent: ForteAgent/8.00.32.1272
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 48
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-tuXaqfXaqsHkdUqNapQxwLka+W+B1OrAN7HXdM+e+mxz6kdCsoFBz8a6da+V8gzjofD1kguMSbzDBhE!okG7yBU/6J1/sYbvHjA8CkruJjW55nu6Rz8IwqGjR3uC/PlPDIq6sT8dnERp1DsFuZP9JXM=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 3266
 by: Joe Gwinn - Tue, 13 Jul 2021 20:35 UTC

On Tue, 13 Jul 2021 16:48:09 +0100, Martin Brown
<'''newspam'''@nonad.co.uk> wrote:

>On 13/07/2021 16:36, Joe Gwinn wrote:
>
>> This would be integer division, not IEEE floating-point (which can do
>> integer arithmetic only to 52 bits).
>
>Depends really. The most common x87 implementation can do a 64 bit
>mantissa and 16 bit exponent in hardware but MS C/C++ no longer supports
>it and makes a hash of consistent rounding to 53 bits for good measure.

MS is famous for such things. The standard answer is Gnu C/C++.

In many realtime systems, the 64-bit floats are generated directly
from a template, by writing the mantissa directly into a pre-formed
64-bit float This can be done in assembly or in C using bitwise
parallel logic operators.

I recall a famous story from the 1990s, when Microsoft was building
their own versions of standard UNIX tools. There was a meeting where
MS was presenting their Korn shell, and the presenter got into an
argument with a middle-aged guy about the required behavior. The
audience soon started to titter.

Turned out that they were trying to tell David Korn how the Korn Shell
ought to work - they had no idea who that guy was. A classic
Microsoft Moment (TM).

>I haven't tried it but I expect the chip can handle 64 bit integer loads
>and arithmetic perfectly well but the compiler will only let you store a
>53 bit mantissa and 11 bit exponent result (unless you knobble it).
>
>ISTR MSC v6.0 was the last with proper long double support included.

The MS-proof alternative is Gnu C/C++ under Linux.

>> Most modern instruction set architectures support multi precision
>> integer arithmetic in (assembly code) software.
>
>High precision integer arithmetic isn't all that hard.

Agree.

Joe Gwinn

Re: How to calculate pi

<16917efcffeb1f95$1$2262039$72dd786b@news.thecubenet.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=67541&group=sci.electronics.design#67541

  copy link   Newsgroups: sci.electronics.design
Subject: Re: How to calculate pi
Newsgroups: sci.electronics.design
References: <470e7495-cee6-4b95-a162-fb1d707070aan@googlegroups.com> <scc14g$e2b$1@dont-email.me> <ec60a1b3-b666-4daa-5528-bb72f7aa62cc@electrooptical.net> <6m0keg581q3u3qd0ulrcqpjr8gsje144o2@4ax.com> <02be3d5b-a039-84b0-8fe6-7e928e235715@electrooptical.net> <sce86l$q9v$1@gioia.aioe.org> <235megddg2uld3qikbp0755lhva8so64i5@4ax.com> <scgs0p$1aqh$1@gioia.aioe.org> <94poegdcr5s55d1kr6qja3ban40t0pt2fi@4ax.com> <1691309f3961cbbb$1$1356503$70dd7a6b@news.thecubenet.com> <gicreg10466dtv74r8bs53n13cpgv8f2lc@4ax.com>
From: no.s...@please.net (Clifford Heath)
Date: Wed, 14 Jul 2021 09:56:02 +1000
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1
MIME-Version: 1.0
In-Reply-To: <gicreg10466dtv74r8bs53n13cpgv8f2lc@4ax.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Message-ID: <16917efcffeb1f95$1$2262039$72dd786b@news.thecubenet.com>
Lines: 73
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!2a07:8080:119:fe::43.MISMATCH!news.thecubenet.com!not-for-mail
NNTP-Posting-Date: Tue, 13 Jul 2021 23:56:05 +0000
X-Received-Bytes: 4228
Organization: theCubeNet - www.thecubenet.com
X-Complaints-To: abuse@thecubenet.com
 by: Clifford Heath - Tue, 13 Jul 2021 23:56 UTC

On 14/7/21 1:36 am, Joe Gwinn wrote:
> On Tue, 13 Jul 2021 09:59:58 +1000, Clifford Heath
> <no.spam@please.net> wrote:
>
>> On 13/7/21 1:56 am, jlarkin@highlandsniptechnology.com wrote:
>>> On Mon, 12 Jul 2021 08:46:33 +0100, Martin Brown
>>> <'''newspam'''@nonad.co.uk> wrote:
>>>
>>>> On 11/07/2021 16:57, Joe Gwinn wrote:
>>>>> On Sun, 11 Jul 2021 08:56:05 +0100, Martin Brown
>>>>> <'''newspam'''@nonad.co.uk> wrote:
>>>>>
>>>>>> On 10/07/2021 21:38, Phil Hobbs wrote:
>>>>>>> jlarkin@highlandsniptechnology.com wrote:
>>>>
>>>>>>>> We're doing a timing project now and sometimes switch between cycles
>>>>>>>> and radians, to about 1 PPB resolution.
>>>>>>>
>>>>>>> Sure, plus frequency synthesis and all sorts of DSP things.  (I only
>>>>>>> ever memorized pi to REAL*8 accuracy---for higher precision it's
>>>>>>> 4*ridiculous_precision_atan(1.).) ;)
>>>>>>
>>>>>> 6*ridiculous_precision_asin(0.5) converges a lot faster.
>>>>>>
>>>>>> These days it isn't such a problem since hardware support for floating
>>>>>> point is much better. Some older implementations struggled with atan(1).
>>>>>>
>>>>>> My supervisor used to use 4*atan(1) until someone pointed out to him
>>>>>> that was the most difficult to converge point of the atan function.
>>>>>> Some older FORTRAN compilers did not get it right to full precision!
>>>>>
>>>>> Later DEC VAX hardware implemented 128-bit floats in hardware.
>>>>
>>>> That seems more than a bit overkill - no wonder they got into trouble.
>>>>
>>>> I can count on the fingers of one hand the times when I have actually
>>>> *needed* to use quad precision (mostly for checking a double precision
>>>> algorithm) and most physics problems can be solved in single precision.
>>>> You seldom have 6 meaningful significant digits in real experimental
>>>> data (although mass spectrometry is one place where you sometimes do).
>>>
>>> We need double floats to do some numeric-ratio frequency synthesizer
>>> math.
>>
>> I thought I needed 64-bit division to calculate frequency delta words
>> for the AD9959 DDS chip, but wound up implementing reciprocal division.
>> If done correctly, you get better than PPB accuracy using only a
>> 32x32->64 multiply:
>>
>> <https://github.com/cjheath/AD9959/blob/b3ee0b91c5be7d626a8bf3aeb5a605870ed8ac4b/AD9959.h#L251-L256>
>>
>> <https://github.com/cjheath/AD9959/blob/b3ee0b91c5be7d626a8bf3aeb5a605870ed8ac4b/AD9959.h#L282>
>>
>> Yes, I know, Arduino, urk. But that's what was called-for in this case.
>>
>> Even the little AVR can do "64-bit division" in about 70us using this
>> method.
>
> This would be integer division, not IEEE floating-point (which can do
> integer arithmetic only to 52 bits)..

Yes, of course. My point is if you have 64 bit integers and can apply
scaling (effectively making fixed-point math) then you don't need FP.

> Most modern instruction set architectures support multi precision
> integer arithmetic in (assembly code) software.

The gcc libraries for AVR have hand-coded full 64-bit support in ASM,
but it's still just a 16-bit chip and long division isn't very quick.
Reciprocal multiplication is much quicker, and in my example didn't need
64x64, just 32x32.

CH

Re: How to calculate pi

<scm8rn$1343$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=67553&group=sci.electronics.design#67553

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!aioe.org!kTL2l0jWzcGX0osJwUWcTw.user.gioia.aioe.org.POSTED!not-for-mail
From: '''newsp...@nonad.co.uk (Martin Brown)
Newsgroups: sci.electronics.design
Subject: Re: How to calculate pi
Date: Wed, 14 Jul 2021 09:56:23 +0100
Organization: Aioe.org NNTP Server
Lines: 49
Message-ID: <scm8rn$1343$1@gioia.aioe.org>
References: <scc14g$e2b$1@dont-email.me>
<ec60a1b3-b666-4daa-5528-bb72f7aa62cc@electrooptical.net>
<6m0keg581q3u3qd0ulrcqpjr8gsje144o2@4ax.com>
<02be3d5b-a039-84b0-8fe6-7e928e235715@electrooptical.net>
<sce86l$q9v$1@gioia.aioe.org> <235megddg2uld3qikbp0755lhva8so64i5@4ax.com>
<scgs0p$1aqh$1@gioia.aioe.org> <94poegdcr5s55d1kr6qja3ban40t0pt2fi@4ax.com>
<1691309f3961cbbb$1$1356503$70dd7a6b@news.thecubenet.com>
<gicreg10466dtv74r8bs53n13cpgv8f2lc@4ax.com> <sckcjp$1fni$1@gioia.aioe.org>
<k8gregp2524fh7s5i996ggs1212jitul2b@4ax.com> <sckm3t$7lv$1@gioia.aioe.org>
<98ce5ce4-ad0b-61c6-2f56-a9cd35b5eb1e@electrooptical.net>
NNTP-Posting-Host: kTL2l0jWzcGX0osJwUWcTw.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: Martin Brown - Wed, 14 Jul 2021 08:56 UTC

On 13/07/2021 19:59, Phil Hobbs wrote:
> Martin Brown wrote:
>> On 13/07/2021 17:38, jlarkin@highlandsniptechnology.com wrote:
>>> On Tue, 13 Jul 2021 16:48:09 +0100, Martin Brown
>>> <'''newspam'''@nonad.co.uk> wrote:
>>>
>>>> On 13/07/2021 16:36, Joe Gwinn wrote:
>>>>
>>>>> This would be integer division, not IEEE floating-point (which can do
>>>>> integer arithmetic only to 52 bits)..
>>>>
>>>> Depends really. The most common x87 implementation can do a 64 bit
>>>> mantissa and 16 bit exponent in hardware but MS C/C++ no longer
>>>> supports
>>>> it and makes a hash of consistent rounding to 53 bits for good measure.
>>>>
>>>> I haven't tried it but I expect the chip can handle 64 bit integer
>>>> loads
>>>> and arithmetic perfectly well but the compiler will only let you
>>>> store a
>>>> 53 bit mantissa and 11 bit exponent result (unless you knobble it).
>>>>
>>>> ISTR MSC v6.0 was the last with proper long double support included.
>>>>
>>>>> Most modern instruction set architectures support multi precision
>>>>> integer arithmetic in (assembly code) software.
>>>>
>>>> High precision integer arithmetic isn't all that hard.
>>>
>>> PowerBasic allows quad integer and extended float (10 byte) variables.
>>>
>>> We've used that when c was not good enough, or too slow.
>>
>> GCC can do quad FP precision OK. It is the MickeySoft compiler that
>> has had its extended floating point support almost completely hobbled.
>>
>
> BITD the Intel C++ compiler could do that too, and plugged into Visual
> Studio.

It still can but only if you are running Win10 *and* have a state of the
art graphics card otherwise it point blank refuses to install at all.
Their online cloud service is even less user friendly.

GCC/GFORTRAN was easily path of least resistance (and free).

--
Regards,
Martin Brown

Re: How to calculate pi

<scm90j$1343$2@gioia.aioe.org>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=67554&group=sci.electronics.design#67554

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!aioe.org!kTL2l0jWzcGX0osJwUWcTw.user.gioia.aioe.org.POSTED!not-for-mail
From: '''newsp...@nonad.co.uk (Martin Brown)
Newsgroups: sci.electronics.design
Subject: Re: How to calculate pi
Date: Wed, 14 Jul 2021 09:58:58 +0100
Organization: Aioe.org NNTP Server
Lines: 45
Message-ID: <scm90j$1343$2@gioia.aioe.org>
References: <scc14g$e2b$1@dont-email.me>
<ec60a1b3-b666-4daa-5528-bb72f7aa62cc@electrooptical.net>
<6m0keg581q3u3qd0ulrcqpjr8gsje144o2@4ax.com>
<02be3d5b-a039-84b0-8fe6-7e928e235715@electrooptical.net>
<sce86l$q9v$1@gioia.aioe.org> <235megddg2uld3qikbp0755lhva8so64i5@4ax.com>
<scgs0p$1aqh$1@gioia.aioe.org> <94poegdcr5s55d1kr6qja3ban40t0pt2fi@4ax.com>
<1691309f3961cbbb$1$1356503$70dd7a6b@news.thecubenet.com>
<gicreg10466dtv74r8bs53n13cpgv8f2lc@4ax.com> <sckcjp$1fni$1@gioia.aioe.org>
<sbtregtetslee6km1vijkqh6tbsghjgel1@4ax.com>
NNTP-Posting-Host: kTL2l0jWzcGX0osJwUWcTw.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: Martin Brown - Wed, 14 Jul 2021 08:58 UTC

On 13/07/2021 21:35, Joe Gwinn wrote:
> On Tue, 13 Jul 2021 16:48:09 +0100, Martin Brown
> <'''newspam'''@nonad.co.uk> wrote:
>
>> On 13/07/2021 16:36, Joe Gwinn wrote:
>>
>>> This would be integer division, not IEEE floating-point (which can do
>>> integer arithmetic only to 52 bits).
>>
>> Depends really. The most common x87 implementation can do a 64 bit
>> mantissa and 16 bit exponent in hardware but MS C/C++ no longer supports
>> it and makes a hash of consistent rounding to 53 bits for good measure.
>
> MS is famous for such things. The standard answer is Gnu C/C++.

It works well enough. However, many of my clients require that it also
works on Mickeysoft because they use that compiler (don't ask me why!).

> I recall a famous story from the 1990s, when Microsoft was building
> their own versions of standard UNIX tools. There was a meeting where
> MS was presenting their Korn shell, and the presenter got into an
> argument with a middle-aged guy about the required behavior. The
> audience soon started to titter.
>
> Turned out that they were trying to tell David Korn how the Korn Shell
> ought to work - they had no idea who that guy was. A classic
> Microsoft Moment (TM).

*Wonderful* and entirely believable too!

>> I haven't tried it but I expect the chip can handle 64 bit integer loads
>> and arithmetic perfectly well but the compiler will only let you store a
>> 53 bit mantissa and 11 bit exponent result (unless you knobble it).
>>
>> ISTR MSC v6.0 was the last with proper long double support included.
>
> The MS-proof alternative is Gnu C/C++ under Linux.

I'm using it under Win7 via MinGW_G64 which works well enough.

Code still has to work correctly on both compilers...

--
Regards,
Martin Brown

Pages:123
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor