This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.

2847. sin(float) should call sinf(float)

Section: 28.7.1 [cmath.syn] Status: New Submitter: Jens Maurer Opened: 2016-12-15 Last modified: 2020-09-06

Priority: 3

View other active issues in [cmath.syn].

View all other issues in [cmath.syn].

View all issues with New status.

Discussion:

With P0175R1, we now show in [cmath.syn] three overloads for the sin function: One taking a float, one taking a double, and one taking a long double. However, there is no statement that sin(long double) should actually invoke sinl, presumably delivering extra precision.

An implementation like

inline long double sin(long double x)
{ return sinf(x); }

seems to satisfy the "effectively cast" requirement, but is certainly unintentional.

The same issue arises for all math functions inherited from C.

(Source: Editorial issue #1247)

[2017-01-27 Telecon]

Priority 3

Proposed resolution: