in reply to Re^2: PDL datatype
in thread PDL datatype
And when it is stringifying, as you asked it to do, it uses the values of those. The above is the current (2.080) values, but those have been the same since 2.002 back in 1999. However, printf's g format treats the precision (the number after the ".", here 8) like so:$PDL::floatformat = "%7g"; # Default print format for long numbers $PDL::doubleformat = "%10.8g";
The precision specifies the number of significant digits.50137.686 has 8 significant digits. To change this behaviour, just assign a different value to e.g. $PDL::doubleformat.
The way I checked the above was my usual technique: use git log -p -w and text-search for a relevant string, here "floatformat".
|
|---|