Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: just the average code

by jdalbec (Deacon)
on Jan 20, 2006 at 02:41 UTC ( [id://524390]=note: print w/replies, xml ) Need Help??


in reply to just the average code

If you don't care about the final \0, you can golf the for loop to print chr for m/(..)/g. How did you discover 307, 1189, and 6823?

Replies are listed 'Best First'.
Re^2: just the average code
by mk. (Friar) on Jan 22, 2006 at 17:40 UTC
    thank you, hadn't thought of that!
    =)

    for the numbers, they were actually (kinda) randomly chosen: i needed 7, 4, 6, 5, 8 and 2, and somehow i realized sin of 307 would fit; then i just searched for any arctangents that would possibly have the sequence 17253098 - and found!
    perl -e 'for ($x=0;$x<10000;$x++){for ($y=0;$y<10000;$y++){print "($x,$y) >>". atan2($x,$y)."\n" if atan2($x,$y)=~/17253098/}}'

    that took me about two minutes while i was at work doing nothing, so i guess they were well spent.


    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    grrr.... argh!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-25 08:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found