Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Phasers locked on target, Captain.


devel / comp.lang.lisp / Re: recursion is silly

SubjectAuthor
* recursion is sillynone
+* Re: recursion is sillyLIT
|+* Re: recursion is sillyJulieta Shem
||+* Re: recursion is sillyLIT
|||`- Re: recursion is sillyJulieta Shem
||+- Re: recursion is sillyLIT
||+* Re: recursion is sillyJoerg Mertens
|||`- Re: recursion is sillyJulieta Shem
||`- Re: recursion is sillynone
|`* Re: recursion is sillyGeorge Neuner
| +* Re: recursion is sillyKaz Kylheku
| |`* Re: recursion is sillyGeorge Neuner
| | `* Re: recursion is sillyKaz Kylheku
| |  +* Re: recursion is sillyPaul Rubin
| |  |+* Re: recursion is sillyJulieta Shem
| |  ||`* Re: recursion is sillyPaul Rubin
| |  || `* Re: recursion is sillyJulieta Shem
| |  ||  `* Re: recursion is sillyPaul Rubin
| |  ||   `- These jumps are enjoyable (was: recursion is silly)Axel Reichert
| |  |+* Re: recursion is sillyAnton Ertl
| |  ||`* Re: recursion is sillynone
| |  || `- Re: recursion is sillyAnton Ertl
| |  |`- Re: recursion is sillynone
| |  +- Re: recursion is sillyGeorge Neuner
| |  `* Re: recursion is sillynone
| |   `* Re: recursion is sillyPaul Rubin
| |    `* Re: recursion is sillynone
| |     +* Re: recursion is sillymhx
| |     |+* Re: recursion is sillyKaz Kylheku
| |     ||+* Re: recursion is sillyKaz Kylheku
| |     |||`- Re: recursion is sillynone
| |     ||`* Re: recursion is sillynone
| |     || `* Re: recursion is sillyKaz Kylheku
| |     ||  `* Re: recursion is sillymhx
| |     ||   `* Re: recursion is sillyKaz Kylheku
| |     ||    +* Re: recursion is sillyLawrence D'Oliveiro
| |     ||    |`* Re: recursion is sillyKaz Kylheku
| |     ||    | `- Re: recursion is sillyKaz Kylheku
| |     ||    `* Re: recursion is sillymhx
| |     ||     `- Re: recursion is sillyAnton Ertl
| |     |`- Re: recursion is sillyPaul Rubin
| |     `* Re: recursion is sillyPaul Rubin
| |      `- Re: recursion is sillynone
| +- Re: recursion is sillynone
| `* Re: recursion is sillydxf
|  `- Re: recursion is sillyGeorge Neuner
+- Re: recursion is sillyJulieta Shem
+* Re: recursion is sillyPaul Rubin
|`* Re: recursion is sillyPaul Rubin
| `* Re: recursion is sillyPaul Rubin
|  +* Re: recursion is sillymhx
|  |+- Re: recursion is sillyPaul Rubin
|  |+* Re: recursion is sillyPaul Rubin
|  ||`* Re: recursion is sillynone
|  || +* Re: recursion is sillyPaul Rubin
|  || |+- Re: recursion is sillynone
|  || |`- Re: recursion is sillynone
|  || `* Re: recursion is sillymhx
|  ||  +- Re: recursion is sillynone
|  ||  `* Re: recursion is sillynone
|  ||   `* Re: recursion is sillyPaul Rubin
|  ||    `* Re: recursion is sillynone
|  ||     `* Re: recursion is sillyPaul Rubin
|  ||      `- Re: recursion is sillyLawrence D'Oliveiro
|  |`- Re: recursion is sillynone
|  `- Re: recursion is sillynone
+- Re: recursion is sillyminforth
`* Re: recursion is sillyLawrence D'Oliveiro
 `* Re: recursion is sillyJulieta Shem
  +* Re: recursion is sillyLawrence D'Oliveiro
  |`* Re: recursion is sillyJulieta Shem
  | `* Re: recursion is sillyLawrence D'Oliveiro
  |  `* Re: recursion is sillyJulieta Shem
  |   `* Re: recursion is sillyLawrence D'Oliveiro
  |    `* Re: recursion is sillyJulieta Shem
  |     `* Re: goto is sillyLawrence D'Oliveiro
  |      `- Re: goto is sillyKaz Kylheku
  `- Re: recursion is sillyPaul Rubin

Pages:1234
Re: recursion is silly

<20240105143712.517@kylheku.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17761&group=comp.lang.lisp#17761

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-6894@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.lisp
Subject: Re: recursion is silly
Date: Fri, 5 Jan 2024 22:38:46 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <20240105143712.517@kylheku.com>
References: <nnd$6660ae2b$78615640@f2c7e8d01681877c>
<nnd$4b6f18cf$1a843abd@36af38f06eabba0f>
<62ce04af2582b47ac60b4a504694156f@news.novabbs.com>
<20240104101004.858@kylheku.com> <nnd$7561b49c$43c6a88e@a8960ed47cc85118>
<20240105104414.216@kylheku.com>
<44ad19ee75efa3982019aea1a6fc0b8f@news.novabbs.com>
<20240105131349.9@kylheku.com> <un9tr9$9uq6$2@dont-email.me>
<20240105140957.434@kylheku.com>
Injection-Date: Fri, 5 Jan 2024 22:38:46 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="624dae6c469856f06c49a782a2b1407e";
logging-data="338841"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/LoPMKzT1ZrFWK4ZCOzV0MCQLGH+/FqyI="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:JT/ZY5yjdeEE7vXjyVjQ+lxOP38=
 by: Kaz Kylheku - Fri, 5 Jan 2024 22:38 UTC

On 2024-01-05, Kaz Kylheku <433-929-6894@kylheku.com> wrote:
> Puzzle:
>
> Could we use this information somehow to neatly build an amplifier whose
> closed-loop gain is the Golden Ratio, using only resistors that have
> integer-valued resistances in Ohms?
>
> I might post this to the Electronics Stack Exchange.

Someone beat me to it, seven years ago:

"How can i make a circuit such that output voltage is reduced by golden
ratio, using feedback"

https://electronics.stackexchange.com/questions/261616/how-can-i-make-a-circuit-such-that-output-voltage-is-reduced-by-golden-ratio-us

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

Re: recursion is silly

<0d86e120a26d7c6a01ce20cb1847d3b2@news.novabbs.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17765&group=comp.lang.lisp#17765

  copy link   Newsgroups: comp.lang.forth comp.lang.lisp
Path: i2pn2.org!.POSTED!not-for-mail
From: mhx@iae.nl (mhx)
Newsgroups: comp.lang.forth,comp.lang.lisp
Subject: Re: recursion is silly
Date: Sat, 6 Jan 2024 09:15:12 +0000
Organization: novaBBS
Message-ID: <0d86e120a26d7c6a01ce20cb1847d3b2@news.novabbs.com>
References: <nnd$6660ae2b$78615640@f2c7e8d01681877c> <nnd$4b6f18cf$1a843abd@36af38f06eabba0f> <62ce04af2582b47ac60b4a504694156f@news.novabbs.com> <20240104101004.858@kylheku.com> <nnd$7561b49c$43c6a88e@a8960ed47cc85118> <20240105104414.216@kylheku.com> <44ad19ee75efa3982019aea1a6fc0b8f@news.novabbs.com> <20240105131349.9@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="2463628"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Rslight-Site: $2y$10$OgSxVSRVk18pePRNkiBbdOXAP9LDlSjymnu1FrWNBLSeCAwbX0AQy
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Posting-User: 463cbf1a76c808942982a163321348c75477c065
 by: mhx - Sat, 6 Jan 2024 09:15 UTC

Kaz Kylheku wrote:

> On 2024-01-05, mhx <mhx@iae.nl> wrote:
>> Kaz Kylheku wrote:
>>
>>> Sometimes, the Fibonacci recurrence is expressed as a matrix
>>> multiplication on a state vector [a b]
>>
>>> [1 1][a] => [a + b]
>>> [1 0][b] [ a ]
>>
>>> a receives the sum of a + b, while b receives the prior value of a.
>>
>>> Raising this matrix to an arbitrary integer power is how we arrive
>>> at the closed form solution.
>>
>> Really nice! I'll keep this general idea in a safe place.

> You don't have to; it's found in textbooks.

It strongly connects to the control engineering approaches I use for
analyzing recurrences in switched electronic systems.

> Using linear algebra techniques found in introductory texts, you can do
> this this:

> n
> [1 1]
> [1 0]

> The details escape me, much like a departing youthful appearance, but
> basically we can factor it into a form

> n
> U X V

> where U, X, V are all 2x2 matrices. The middle one X is special
> in that it is diagonal (consisting of a diagonal trace of eigenvalues).
> A diagonal matrix is easy to exponentiate.

Tricky one to write from scratch :--) I implemented the Pade approximation
(the stablest one) for it when my appearance was still youthful.

> Something like that.

> That gives us that closed form formula for Fibonacci with those
> square roots of five in it.

> Closely relating to the Golden Ratio! Which is (/ (+ 1 (sqrt 5)) 2).
> The ratio of successive values of the Fibonacci numbers approaches
> the golden ratio.

Almost like a party trick. I love to find elegant techniques in
unrelated fields of research that solve (my) practical problems in
unexpected ways.

> 1> (/ (fib 50) (fib 49))
> 1.61803398874989

-marcel

Re: recursion is silly

<2024Jan6.175116@mips.complang.tuwien.ac.at>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17767&group=comp.lang.lisp#17767

  copy link   Newsgroups: comp.lang.forth comp.lang.lisp
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth,comp.lang.lisp
Subject: Re: recursion is silly
Date: Sat, 06 Jan 2024 16:51:16 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 40
Message-ID: <2024Jan6.175116@mips.complang.tuwien.ac.at>
References: <nnd$6660ae2b$78615640@f2c7e8d01681877c> <nnd$4b6f18cf$1a843abd@36af38f06eabba0f> <62ce04af2582b47ac60b4a504694156f@news.novabbs.com> <20240104101004.858@kylheku.com> <nnd$7561b49c$43c6a88e@a8960ed47cc85118> <20240105104414.216@kylheku.com> <44ad19ee75efa3982019aea1a6fc0b8f@news.novabbs.com> <20240105131349.9@kylheku.com> <0d86e120a26d7c6a01ce20cb1847d3b2@news.novabbs.com>
Injection-Info: dont-email.me; posting-host="444defe7ba9ec3dff1c2e1e9c29c85d7";
logging-data="733805"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18jqPykm0535vD4y09eJznG"
Cancel-Lock: sha1:DWLjTtg0Wg4jqPr44he/7ZpIM48=
X-newsreader: xrn 10.11
 by: Anton Ertl - Sat, 6 Jan 2024 16:51 UTC

mhx@iae.nl (mhx) writes:
>Kaz Kylheku wrote:
>> Closely relating to the Golden Ratio! Which is (/ (+ 1 (sqrt 5)) 2).
>> The ratio of successive values of the Fibonacci numbers approaches
>> the golden ratio.
>
>Almost like a party trick. I love to find elegant techniques in
>unrelated fields of research that solve (my) practical problems in
>unexpected ways.

Not sure if you wrote this about the golden ratio, but given the way
the golden ratio phi is defined, I find it unsurprising that

phi = lim(n->inf) fib(n+1)/fib(n)

The definition of the golden ratio is

(a+b)/a = a/b = phi (with a>b>0)

or, as described in <https://en.wikipedia.org/wiki/Golden_ratio>:

| a+b is to a as a is to b

Given that's exactly how Fibonacci numbers are formed, if the sequence
of ratios fib(n+1)/fib(n) converges, the result must be the golden
ratio.

It's equally unsurprising that for the Lucas numbers, which are formed
in the same way, but with different base values (2 and 1 instead of 0
and 1), the limit of L(n+1)/L(n) is also the golden ratio.

Conversely, you can compute the nth Fibonacci number using a closed
formula that involves phi.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2023: https://euro.theforth.net/2023

Pages:1234
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor