Boost logo

Boost Users :

Subject: [Boost-users] [Format] How to format floating point values
From: Michael Powell (mwpowellhtx_at_[hidden])
Date: 2019-01-19 21:32:06


Hello,

How do I format floating point values, either double or float? I want
to specify things like the precision during the formatting, i.e. how
many digits to include in the fractional digits, and so forth.

Currently, I am using this, for instance:

General: "%1$g"
Fixed: "%1$f"
Scientific: "%1$e" or "%1$E" (depending on whether lower or upper
case, respectively)

Thanks!

Best regards,

Michael Powell


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net