Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re (tilly) 2: Continued Fractions

by tilly (Archbishop)
on Nov 16, 2000 at 22:40 UTC ( #42014=note: print w/replies, xml ) Need Help??


in reply to Re: Continued Fractions
in thread Continued Fractions

First of all as merlyn has pointed out, seeing interactive messages mixed with reading from @ARGV usually is a sign of problems.

Secondly I intentionally didn't make it pipeable. The point of this script is to let people figure out how it works, and then run it interactively (adding debug messages if you want) to give people a sense of how well it works. Any programmer should be able to figure out how to hit control-C. *shrug*

Before making it pipeable what I would do is add some logic to cut off at a sufficiently good approximation rather than trying to display the approximation process to the user. My not doing so is my way of saying that this code is not meant to be particularly useful in a pipeline. I didn't do that here because the entire point is education, not production. That is, rather than give a useful answer, it shows you the successive steps towards one.

In fact I probably would never make this pipeable. Instead it would go into a module, and you would use that module in your programs.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://42014]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2017-12-12 12:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (332 votes). Check out past polls.

    Notices?