[cmath.syn] (original) (raw)

28 Numerics library [numerics]

28.7 Mathematical functions for floating-point types [c.math]

28.7.1 Header synopsis [cmath.syn]

[Note 1:

Several functions have additional overloads in this document, but they have the same behavior as in the C standard library.

— _end note_]

For each function with at least one parameter of type floating-point-type, the implementation provides an overload for each cv-unqualified floating-point type ([basic.fundamental]) where all uses of floating-point-type in the function signature are replaced with that floating-point type.

For each function with at least one parameter of type _floating-point-type_other than abs, the implementation also provides additional overloads sufficient to ensure that, if every argument corresponding to a floating-point-type parameter has arithmetic type, then every such argument is effectively cast to the floating-point type with the greatest floating-point conversion rank and greatest floating-point conversion subrank among the types of all such arguments, where arguments of integer type are considered to have the same floating-point conversion rank as double.

If no such floating-point type with the greatest rank and subrank exists, then overload resolution does not result in a usable candidate ([over.match.general]) from the overloads provided by the implementation.

An invocation of nexttoward is ill-formed if the argument corresponding to the floating-point-type parameter has extended floating-point type.

See also: ISO/IEC 9899:2018, 7.12