fix printer reduced form order

This commit is contained in:
hugogogo
2026-05-15 00:16:35 +02:00
parent aa78af4e0f
commit 7e16bb5b6f
7 changed files with 52 additions and 46 deletions

View File

@@ -16,6 +16,21 @@ bool is_nearly_equal_zero(double num)
return true;
}
const s_polynom *get_term_of_power(const s_polynom *polynom, int power)
{
int i;
i = 0;
while (polynom[i].sign != TERM_SIGN_END)
{
if (polynom[i].exponent == power)
break;
i++;
}
return &polynom[i];
}
bool has_decimal_part(double num)
{
return (!is_nearly_equal(num, (int)num));