Submitter:CFP group
Submission Date: 2021-05-03
Document: WG14 N2715
Title: N2715: cr_ prefix
Reference Documents:WG14 N2596, CFP 1906, 1967
Summary: The list of correctly rounded functions (functions with a prefix of cr_) may be easy to overlook as new math functions get added to C.
For example, cr_sqrt, cr_cbrt, cr_lgamma, cr_tgamma, cr_erf, and cr_erfc should be in that list.
The good solution is to reserve the cr_ prefix for correctly rounded math functions. The poor solution is to add to the existing list of cr_ functions.
These page numbers are for N2596.
Proposed solution
Reserve cr_ as a prefix.
Change 7.31.8 Mathematics <math.h> paragraph 4 from
The function names
cr_acosh cr_acospi cr_acos cr_asinh cr_asinpi cr_asin cr_atan2pi cr_atan2 cr_atanh cr_atanpi cr_atan cr_compoundn cr_cosh cr_cospi cr_cos cr_exp10m1 cr_exp10 cr_exp2m1 cr_exp2 cr_expm1 cr_exp cr_hypot cr_log10p1 cr_log10 cr_log1p cr_log2p1 cr_log2 cr_logp1 cr_log cr_pown cr_powr cr_pow cr_rootn cr_rsqrt cr_sinh cr_sinpi cr_sin cr_tanh cr_tanpi cr_tan
and the same names suffixed with f, l, d32, d64, or d128 are potentially reserved identifiers and may be added to the declarations in <math.h> header.
to
The function namesFunction names that begin with cr_ are
cr_acosh cr_acospi cr_acos cr_asinh cr_asinpi cr_asin cr_atan2pi cr_atan2 cr_atanh cr_atanpi cr_atan cr_compoundn cr_cosh cr_cospi cr_cos cr_exp10m1 cr_exp10 cr_exp2m1 cr_exp2 cr_expm1 cr_exp cr_hypot cr_log10p1 cr_log10 cr_log1p cr_log2p1 cr_log2 cr_logp1 cr_log cr_pown cr_powr cr_pow cr_rootn cr_rsqrt cr_sinh cr_sinpi cr_sin cr_tanh cr_tanpi cr_tan
and the same names suffixed with f, l, d32, d64, or d128potentiallyreserved identifiers and may be added to the declarations in <math.h> header.
Remove the "cr_*" entries on printed page 514 in J.6.2 Particular identifiers or keywords.