Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: sub as mathematical function

by vr (Curate)
on Sep 04, 2019 at 21:04 UTC ( #11105630=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    ~$ perl -E 'say 4 if    0.8333333333333333 < 5/6'
    4
    ~$ perl -E 'say int 6 * 0.8333333333333333'
    5
    
  2. or download this
    ~$ perl -MData::Float=nextdown -E '$n=100; for(1..$n){say if $_-1 != i
    +nt $n*nextdown $_/$n}'
    5
    ...
    81
    92
    93
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2021-04-14 01:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?