[cfe-dev] [RFC] implementation of _Float16

Martin J. O'Riordan via cfe-dev cfe-dev at lists.llvm.org
Fri Jun 16 06:36:56 PDT 2017


Perhaps it would require a new equivalent FP contract for ‘SFLT_EVAL_METHOD’ since ‘FLT_EVAL_METHOD’ specifically applies to ‘float’.  These are the kind of details that would need to be thoroughly specified before such a thing could be considered for inclusion in any future Standard.  Not a simple task :)

 

From: Hubert Tong [mailto:hubert.reinterpretcast at gmail.com] 
Sent: 16 June 2017 14:10



Of course, there is the inconsistency that ‘short float’ is not promoted to ‘double’ to perform arithmetic which is at variance with how ‘float’ is handled (though I do promote it to ‘double’ for passing as an argument to variadic functions such as ‘printf’).

My understanding is that `float' arithmetic operations do not necessarily occur in the range and precision of `double'. In particular, the usual arithmetic conversions admit `float' as a result. My guess is that FLT_EVAL_METHOD would be a factor to consider for consistency.



 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170616/c027adc7/attachment.html>


More information about the cfe-dev mailing list