https://docs.vultr.com/cpp/standard-library/cmath/remainder

cpp remainder std::remainder() is a C++ function from the <cmath> library that calculates the IEEE remainder of two numbers. It returns the remainder of numerator ÷ denominator, but the result is the closest to zero, meaning it can be negative.

Syntax:
cpp
Copy
Edit
#include <cmath>

double remainder(double numerator, double denominator);
float remainder(float numerator, float denominator);
long double remainder(long double numerator, long double denominator);
numerator → The dividend (number to be divided).
denominator → The divisor (number to divide by).
Returns: The remainder of numerator ÷ denominator, closest to zero

istockphoto-629285904-612x612.jpg