Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Influencing the Gconvert macro

by syphilis (Archbishop)
on Sep 30, 2020 at 13:37 UTC ( #11122368=note: print w/replies, xml ) Need Help??


in reply to Re: Influencing the Gconvert macro
in thread Influencing the Gconvert macro

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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2022-05-17 11:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (65 votes). Check out past polls.

    Notices?