using double everywhere

This commit is contained in:
hugogogo
2026-05-01 10:42:45 +02:00
parent 2eeed8580f
commit 7519b8e615
7 changed files with 78 additions and 133 deletions

View File

@@ -18,25 +18,14 @@ typedef enum
TERM_MINUS, // -
} term_sign;
typedef enum
{
TYPE_INT, // "123"
TYPE_DOUBLE, // "123.456"
} coefficient_type;
typedef struct
{
term_position position;
term_sign sign;
coefficient_type coefficient_type;
union
{
int coefficient_int;
double coefficient_double;
};
double coefficient;
int exponent;
} term;
int parse(token *tokens, term *terms);
int parse(token *tokens, term *terms, int terms_count_max);
#endif