Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: sprintf rounding convention

by Joost (Canon)
on Oct 30, 2009 at 23:01 UTC ( [id://804233]=note: print w/replies, xml ) Need Help??


in reply to Re^2: sprintf rounding convention
in thread sprintf rounding convention

Hmm... Then I think the sprintf documentation is incorrect, or possibly just confusing: (emphasis mine)
Perl does its own "sprintf" formatting--it emulates the C function "sprintf", but it doesn't use it (except for floating- point numbers, and even then only the standard modifiers are allowed). As a result, any non-standard extensions in your local "sprintf" are not available from Perl.

Replies are listed 'Best First'.
Re^4: sprintf rounding convention
by merlyn (Sage) on Oct 31, 2009 at 00:31 UTC
    And what's incorrect about that? Perl prefers the "nearest even round" operation, as I recall, but otherwise should work the same as your local sprintf.

    -- Randal L. Schwartz, Perl hacker

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2024-03-28 12:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found