Namespaces
Variants
Views
Actions

Talk:cpp/numeric/math/remainder

From cppreference.com

The return value error description

It says "if a range error occurs due to underflow, the correct result is returned." and I'm not sure how to interpret that. The C standard says

"a range error occurs if the mathematical result of the function cannot be represented in an object of the specified type, due to extreme magnitude",

so I would have to read this description as "if the result cannot be returned, it is returned". Aside from that confusion, I don't see any wording about this behaviour, the C standard says

"If the result underflows, the function returns an implementation-defined value whose magnitude is no greater than the smallest normalized positive number in the specified type",

shouldn't we say the result is implementation defined? --Ybab321 (talk) 02:08, 12 June 2024 (PDT)