[Cfp-interest] freestanding

Stephen Canon scanon at apple.com
Mon Feb 27 09:47:56 PST 2012


On Feb 27, 2012, at 11:45 AM, Jim Thomas <jaswthomas at sbcglobal.net> wrote:

> If we define strfromf as equivalent to a call to snprintf, then if double values are printed as 0x1.XXXXXXXXXXXXXpEEEE (as they probably are) then float values will necessarily be printed as 0x1.XXXXXYpEEE (or 0x1.XXXXXY0000000pEEE). I don't see this as a major objection. The specification of the strfrom functions is clearly derived from snprintf, which is most obvious in the format argument.

I agree; this would be acceptable.

I don't think we need to have strfromf.  C programmers are quite used to using double formatters for float values at this point.  It's in the reserved namespace, so it can easily be added at some future point if appropriate.  If someone felt very strongly that there should be a float %a format of the form 0xX.XXXXXpEEE, and wanted to take on the task of defining everything for strfromf, I wouldn't object to it's inclusion, but it seems like a whole lot of change for very little benefit.

- Steve


More information about the Cfp-interest mailing list