Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: TANGENT = %.17g formatting (Re^8:int() function)

by syphilis (Bishop)
on Oct 26, 2020 at 23:57 UTC ( #11123193=note: print w/replies, xml ) Need Help??


in reply to TANGENT = %.17g formatting (Re^8:int() function)
in thread int() function

%g a floating-point number, in %e or %f notation

The full piece of documentation is:
%e a floating-point number, in scientific notation %f a floating-point number, in fixed decimal notation %g a floating-point number, in %e or %f notation
I think the last of those 3 is just shorthand for:
%g a floating-point number, in scientific notation or fixed decima +l notation
Note that "%.*g" will give you scientific notation and "%*g" will give you fixed decimal notation (ie fixed to 6 digits of precision).
I think it's just meant to provide a quick indication of what "%g" formatting does, for anyone who is unfamiliar with it.
Those are the only excuses I can come up with ;-)

Cheers,
Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11123193]
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 2020-11-23 15:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?