Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Golf: overtone calculator

by Django (Pilgrim)
on Sep 01, 2002 at 23:18 UTC ( #194485=note: print w/ replies, xml ) Need Help??


in reply to Re: Golf: overtone calculator
in thread Golf: overtone calculator

Impressing inner loop, but your sort will fail with $_[1] > 10, because it sorts lexically.

~Django
"Why don't we ever challenge the spherical earth theory?"


Comment on Re: Re: Golf: overtone calculator
Re: Re: Re: Golf: overtone calculator
by jynx (Priest) on Sep 02, 2002 at 01:37 UTC

    Does this fix the problem? (at 72 chars):
    sub Harmonics ($$) { #23456789_123456789_123456789_123456789_123456789_123456789_123456789_ +12 for$a(1..pop){$_{sprintf'%.3f',$_[0]*$a/$_}++for 1..$a}sort{$a-$b}keys +%_ }
    jynx
      I'm outta votes right now, but kudos for the $a-$b bit. D'oh..

      Makeshifts last the longest.

      Does this fix the problem?

      Yepp, not only working, but kicking out my sort too!

      ~Django
      "Why don't we ever challenge the spherical earth theory?"

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://194485]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2014-04-20 22:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (488 votes), past polls