in reply to Golf: overtone calculator
just quickly,
Here's a slightly shorter version that still compiles under strict and warnings. i only have tested it under the single test case above, if it fails others please provide them and i'll try to correct it. Anyway, this weighs in at 66 characters:
jynxsub Harmonics ($$) { #23456789_123456789_123456789_123456789_123456789_123456789_123456789_ for$a(1..pop){$_{sprintf'%.3f',$_[0]*$a/$_}++for 1..$a}sort keys%_ }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Golf: overtone calculator
by Django (Pilgrim) on Sep 01, 2002 at 23:18 UTC | |
by jynx (Priest) on Sep 02, 2002 at 01:37 UTC | |
by Aristotle (Chancellor) on Sep 02, 2002 at 02:07 UTC | |
by Django (Pilgrim) on Sep 02, 2002 at 06:43 UTC |
In Section
Meditations