you should be able to influence the value of the Gconvert macro by supplying a value on the ./Configure command line
Excellent!! Following your suggested possible candidates, I found that the configure arg -Dd_Gconvert='sprintf((b),"%.*g",(n),(x))' seems to be doing the trick with perl-5.33.2.
sh Configure -des -Duse64bitall -Dprefix=/home/sisyphus/perl-5.33.2-d
+-Uversiononly -Dusedevel -Dd_Gconvert='sprintf((b),"%.*g",(n),(x))' &
+& make
.....
Everything is up to date. Type 'make test' to run test suite.
$ ./perl -I./lib -le 'printf "%.54g\n", 0.3;'
0.299999999999999988897769753748434595763683319091796875
sisyphus@sisyphus5-desktop:~/comp/perl-5.33.2$ ./perl -I./lib -le 'pri
+ntf "%.254g\n", 1.7e+251;'
1700000000000000056638039423376108468948472250210191793353461791741809
+721595401553113821670191901996837100770654163405637701161634938299172
+691569638797131996693245937962742921605027934132599151410492365393458
+53734303029546817799537579060533492478640128
I haven't run make test yet. It's getting late, so I'll leave that until the morning.
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.
|