[Cfp-interest 3091] Fwd: Confusion about fromfp specification

Jim Thomas jaswthomas at sbcglobal.net
Mon Apr 8 10:00:23 PDT 2024


The issue below from Aaron Ballman is Issue 21 in C26D.

I agree with Rajan that Aaron's interpretation is correct and we should propose a change along the lines he suggests.

The problem was introduced when we made a change to accommodate types without NaN.

- Jim Thomas

> Begin forwarded message:
> 
> From: Rajan Bhakta <rbhakta at us.ibm.com>
> Subject: FW: Confusion about fromfp specification
> Date: March 19, 2024 at 1:20:03 PM PDT
> To: Jim Thomas <jaswthomas at sbcglobal.net>
> 
> Hi Jim,
>  
> I believe Aaron is right here and the “if available” should not be a part of the parenthetical. I plan on replying to him with the affirmative, but before I do, do you recall why we have it the way we do?
>  
> Regards,
> 
> Rajan Bhakta
> z/OS XL C/C++ Compiler Technical Architect
> ISO C Standards Representative (Canada, USA), INCITS/C Chair
> C/C++ Compiler Development
> rbhakta at us.ibm.com <mailto:rbhakta at us.ibm.com>
>  
> IBM
>  
>  
> From: Aaron Ballman <aaron at aaronballman.com <mailto:aaron at aaronballman.com>>
> Date: Tuesday, March 19, 2024 at 1:18 PM
> To: Rajan Bhakta <rbhakta at us.ibm.com <mailto:rbhakta at us.ibm.com>>
> Subject: [EXTERNAL] Confusion about fromfp specification
> 
> Hey Rajan! I'd like to make sure I'm interpreting the tea leaves the
> proper way for 7.12.9.10p2. The confusion comes from this bit:
> 
> Otherwise, if width is zero or x does not round to an integer within
> the range, the functions return a NaN (of the type of the x argument,
> if available), else the value of x, and a domain error occurs.
> 
> Are the parentheses slightly wrong there? I think the only way I can
> make sense of this is as-if it were written:
> 
> Otherwise, if width is zero or x does not round to an integer within the range
>   * the functions return a NaN (of the type of the x argument), if available,
>   * else the value of x,
> and a domain error occurs.
> 
> Is that a correct interpretation? If so, should the parens move to not
> include "if available"?
> 
> Thanks!
> 
> ~Aaron

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20240408/ec3a0d2d/attachment.htm>


More information about the Cfp-interest mailing list