Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Determining if a rational number terminates

by tobyink (Abbot)
on Nov 29, 2012 at 16:27 UTC ( #1006294=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $_=pop;$_/=2until$_%2;print/(5|^1)$/?Y:N,$/
    
  2. or download this
    $_=pop;for$.(2,5){$_/=$.until$_%$.}print/^1$/?Y:N,$/
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1006294]
help
Chatterbox?
[hippo]: Congrats. I expect the resulting code to be rock solid. :)
[stevieb]: Thanks hippo, as do I, as if it's not, hardware peripherals or sensors could be destroyed (code has to be reliable when dealing with input/output voltages)
[hippo]: Aha - more Pi-based projects?

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (18)
As of 2017-01-20 16:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (176 votes). Check out past polls.