Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^4: Determining if a rational number terminates

by tobyink (Abbot)
on Dec 03, 2012 at 07:37 UTC ( #1006809=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Determining if a rational number terminates
in thread Determining if a rational number terminates

Actually, if you fix up the whitespace and rename the functions:

  • _ => highest_common_factor
  • __ => canonical_fraction

... it's not too bad.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'


Comment on Re^4: Determining if a rational number terminates
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2015-07-31 01:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls