Title
sin(float) should call sinf(float)
Status
new
Section
[cmath.syn]
Submitter
Jens Maurer

Created on 2016-12-15.00:00:00 last changed 88 months ago

Messages

Date: 2017-01-27.00:00:00

[ 2017-01-27 Telecon ]

Priority 3

Date: 2016-12-15.00:00:00

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)

History
Date User Action Args
2017-01-30 15:36:02adminsetmessages: + msg8823
2016-12-15 00:00:00admincreate