[Cfp-interest] precision modifier
Jim Thomas
jaswthomas at sbcglobal.net
Mon Aug 27 19:20:07 PDT 2012
How about the following revision to the proposed text for 7.21.6.1 paragraph 8:
…
If the precision is present (in the conversion specification) and at least as large as the precision p (5.2.4.2.2) of the decimal floating type, the conversion is as if the precision were missing. If the precision is present and less than the precision p of the decimal floating type, the conversion first rounds the input, in the type, according to the current rounding direction for decimal floating-point operations, to the number of digits specified by the precision, then converts the result as if the precision were missing.
…
To illustrate the effects of a precision specification, the sequence:
...
-Jim
On Aug 27, 2012, at 4:58 PM, Jim Thomas wrote:
>
> On Aug 27, 2012, at 8:48 AM, Fred J. Tydeman wrote:
>
>> C11 has in 7.21.6.` The fprintf function,
>> "length modifier" and "precision", but no "precision modifier".
>>
>> The DFP document has "precision modifier". To match C11, I
>> believe that should be changed to just "precision".
>
> I agree that "precision modifier" should be changed. It came from the decimal FP TR, where it was used to distinguish the precision in the conversion specification from the precision of the decimal floating type - both "precisions" appear in the same sentences. I'll try "precision specification" (which does appear in C11) or "precision in the conversion specification" or "conversion-specification precision" or some such.
>
> -Jim
>
>>
>> ---
>> Fred J. Tydeman Tydeman Consulting
>> tydeman at tybor.com Testing, numerics, programming
>> +1 (775) 287-5904 Vice-chair of PL22.11 (ANSI "C")
>> Sample C99+FPCE tests: http://www.tybor.com
>> Savers sleep well, investors eat well, spenders work forever.
>>
>> _______________________________________________
>> Cfp-interest mailing list
>> Cfp-interest at oakapple.net
>> http://mailman.oakapple.net/mailman/listinfo/cfp-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20120827/28216ffa/attachment-0001.html
More information about the Cfp-interest
mailing list