Talk:Thiele's interpolation formula: Difference between revisions

From Rosetta Code
Content added Content deleted
(“Can you define triangular arrays?” someone (Tony Hoare?))
(Just provide the table?)
Line 3: Line 3:


I picked 32 rows to the table. Basically "'''from''' 0 '''to''' 1.55 '''by''' 0.05 ..." as 0.05 seems to give the full single precision answer (on an i686 CPU at least). Ideally this size would be calculated from the desired precision, but I don't have a formula for this precision calculation. [[User:NevilleDNZ|NevilleDNZ]] 21:31, 2 October 2010 (UTC)
I picked 32 rows to the table. Basically "'''from''' 0 '''to''' 1.55 '''by''' 0.05 ..." as 0.05 seems to give the full single precision answer (on an i686 CPU at least). Ideally this size would be calculated from the desired precision, but I don't have a formula for this precision calculation. [[User:NevilleDNZ|NevilleDNZ]] 21:31, 2 October 2010 (UTC)
: The task description modification is nice, but would it be terribly problematic to just provide the table? The task seems to have more stages than it really needs. A TSV table would be pretty useful for the purpose, IMHO. --[[User:Short Circuit|Michael Mol]] 22:35, 2 October 2010 (UTC)

=== re:base indices in different dimensions ===
=== re:base indices in different dimensions ===



Revision as of 22:35, 2 October 2010

How many entries should the trig table have? --Michael Mol 14:46, 2 October 2010 (UTC)

I make it 16, with x varying by steps of 0.05 from 0 to 1.55. (Now, if only I could make my version of this work, but that algol68 code is deeply gnarly; does it really have different base indices in different dimensions?!?) –Donal Fellows 16:01, 2 October 2010 (UTC)

I picked 32 rows to the table. Basically "from 0 to 1.55 by 0.05 ..." as 0.05 seems to give the full single precision answer (on an i686 CPU at least). Ideally this size would be calculated from the desired precision, but I don't have a formula for this precision calculation. NevilleDNZ 21:31, 2 October 2010 (UTC)

The task description modification is nice, but would it be terribly problematic to just provide the table? The task seems to have more stages than it really needs. A TSV table would be pretty useful for the purpose, IMHO. --Michael Mol 22:35, 2 October 2010 (UTC)

re:base indices in different dimensions

Yes. Here is a quote from the 1968 Congress: C.H.A. Koster (1993). "The Making of Algol 68" (PDF).

The IFIP 1968 Congress took place that August in Edinburgh, just a few hours drive
away from North Berwick. Van Wijngaarden’s invited lecture on Algol 68 was to me
the high point of the conference, and not only to me. The auditorium was packed,
people were standing on all sides, even in the corridors and outside, in front of the
hall. Van Wijngaarden appeared in the centre, smiling radiantly. “Let me sell you
a language”, he started, and proceeded to outline the ideas behind the language. He
showed some examples. “Can you define triangular arrays?” someone (Tony Hoare?)
interrupted. “Not just triangular, but even elliptical” replied Aad, and showed how.
He carried the listeners with him, from scepsis to enthusiasm. There was a prolonged
applause.

Vehemently discussing, people streamed out of the hall. A small man pushed
through the throng, straight at me. “Conkratulations, your Master hass done it”
said Niklaus Wirth in his inimitable Swiss-German English.

Basically, Algol 68 is agnostic about where an array starts, although the default starting point for both an array and a do ~ od loop is one. Hence - for convenience - in the Hair Commodore's ALGOL 68 code specimen s/he pushes some array base indices to 1 using the [@1] construct.

NevilleDNZ 21:31, 2 October 2010 (UTC)