Title
<cmath> requirements missing C float and long double versions
Status
nad
Section
[c.math]
Submitter
Judy Ward

Created on 2000-12-30.00:00:00 last changed 164 months ago

Messages

Date: 2010-10-21.18:28:33

Rationale:

The C90 standard, as amended, already permits (but does not require) these functions, and the C++ standard incorporates the C90 standard by reference. C99 is not an issue, because it is never referred to by the C++ standard.

Date: 2010-10-21.18:28:33

Proposed resolution:

Add these Functions to Table 80, section 26.5 and to Table 99, section C.2:

    acosf asinf atanf atan2f ceilf cosf coshf 
    expf fabsf floorf fmodf frexpf ldexpf 
    logf log10f modff powf sinf sinhf sqrtf 
    tanf tanhf 
    acosl asinl atanl atan2l ceill cosl coshl 
    expl fabsl floorl fmodl frexpl ldexpl 
    logl log10l modfl powl sinl sinhl sqrtl 
    tanl tanhl

There should probably be a note saying that these functions are optional and, if supplied, should match the description in the 1999 version of the C standard. In the next round of C++ standardization they can then become mandatory.

Date: 2000-12-30.00:00:00

In ISO/IEC 9899:1990 Programming Languages C we find the following concerning <math.h>:

7.13.4 Mathematics <math.h>
The names of all existing functions declared in the <math.h> header, suffixed with f or l, are reserved respectively for corresponding functions with float and long double arguments are return values.

For example, floatĀ sinf(float) is reserved.

In the C99 standard, <math.h> must contain declarations for these functions.

So, is it acceptable for an implementor to add these prototypes to the C++ versions of the math headers? Are they required?

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg2124
2010-10-21 18:28:33adminsetmessages: + msg2123
2000-12-30 00:00:00admincreate