And installing Math::decNumber is as easy as:
cpan -i Math::decNumber
There's no need to worry about first locating and downloading the decNumber library as it ships with the module - and the functionality is automatically built into the Math::decNumber dll/so as part of the build process.
All very easy, passes its test suite, and works well:
C:\> perl -MMath::decNumber="d_" -le "print d_(0.3) - d_(0.2) - d_(0.1
+);"
0.0
C:\>perl -MMath::decNumber="d_" -le "print sqrt(d_(3));"
1.732050807568877293527446341505872
No trig functions, unfortunately.
Cheers, Rob
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|