/
Marg-S
/
MyMathLibraryC
Обзор
Документация
Войти
/
Marg-S
/
MyMathLibraryC
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
my_fmod.c
13 строк
334 B
rodolphu
Add source files
30 мар 2024, 11:58
30 мар 2024, 11:58
1044726
Код
Авторство
О чём код?
#include "my_math.h" long double my_fmod(double x, double y) { long double fmod_result = my_NAN; if ((my_is_inf(y) || my_is_inf_minus(y)) && !my_is_inf(x)) { fmod_result = x; } else if (y != 0 && !my_is_inf(x) && !my_is_NAN(x) && !my_is_NAN(y)) { fmod_result = x - y * (long long)(x / y); } return fmod_result; }