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

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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

In reply to Re^2: Influencing the Gconvert macro by syphilis
in thread Influencing the Gconvert macro by syphilis

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • 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.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2024-03-29 09:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found