add is_nearly_equal_zero

This commit is contained in:
hugogogo
2026-05-14 13:56:44 +02:00
parent 201f2fa0ce
commit 31469af23f
9 changed files with 44 additions and 22 deletions

12
src/utils/math.c Normal file
View File

@@ -0,0 +1,12 @@
/* printer.c */
#include "computorv1.h"
bool is_nearly_equal_zero(double num)
{
if (num > DOUBLE_PRECISION)
return false;
if (num < -DOUBLE_PRECISION)
return false;
return true;
}