Hello,
I have a working program in C++ that I am trying to rewrite in PERL. The program involves a division of two large integers with the result containing a predetermined number of decimal digits to the right of the dot. I have found several working examples of setting a fixed precision from the command line, such as:
perl -Mbignum=p,-50 -le 'print sqrt(20)'
This example also works with a division such as ... 'print 1/3'.
However, I have been unable to find any example of how to set the precision of division to a value assigned to a variable such as $n inside a PERL program.
Help will be appreciated.
zakad