Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

std::remquo purpose and usage?

What is the purpose of the std::remquo function? What is an example of when you would use it instead of the regular std::remainder function?

like image 587
Andrew Tomazos Avatar asked Dec 07 '22 13:12

Andrew Tomazos


1 Answers

remquo first appeared in C99 before being in C++ and here is what the C99 rationale says about it:

The remquo functions are intended for implementing argument reductions which can exploit a few low-order bits of the quotient. Note that x may be so large in magnitude relative to y that an exact representation of the quotient is not practical.

like image 147
ouah Avatar answered Dec 09 '22 13:12

ouah