fix polynomial to accept any exponents

This commit is contained in:
hugogogo
2026-05-04 22:14:12 +02:00
parent bc48f52c2c
commit 7f06d505d1
7 changed files with 86 additions and 61 deletions

View File

@@ -90,14 +90,7 @@ int parse(s_token *tokens, s_term *terms, int terms_count_max);
* REDUCE.C
*/
typedef struct
{
double a;
double b;
double c;
} s_polynom;
void reduce(s_term *terms, s_polynom *polynom);
void reduce(s_term *terms, double *polynom);
/** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* UTILS/ERRORS.C
@@ -136,7 +129,8 @@ const char *term_sign_to_str(e_term_sign sign);
extern char *input_g_err;
extern s_token *tokens_g_err;
extern s_term *terms_g_err;
extern s_polynom *polynom_g_err;
extern double *polynom_g_err;
extern int polynom_len_g_err;
extern bool debug_mode;
#endif