Skip to content

When evaluate simple expression with only one variable, nan is returned over 150 #85

@Sercurio

Description

@Sercurio

I've tried to evaluate the expression "t" and print the result side by side with the t variable.

double t=0;
te_expr *expr;
int err;

void loop(){
  te_variable vars[] = {"t", &t};
  te_expr *expr = te_compile("t", vars, 1, &err);
  
  Serial.print(te_eval(expr));
  Serial.print("  |  ");
  Serial.print(t);
  Serial.println();
  t++;
}

t is on the right and evaluate t is on the left
144.00 | 144.00
145.00 | 145.00
146.00 | 146.00
147.00 | 147.00
148.00 | 148.00
149.00 | 149.00
nan | 150.00
nan | 151.00
nan | 152.00

We can saw that over 150 returned result is t.

What is the problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions