Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equality depends on input type in 3.1.0 #417

Closed
agronick opened this issue Dec 27, 2023 · 0 comments · Fixed by #421
Closed

Equality depends on input type in 3.1.0 #417

agronick opened this issue Dec 27, 2023 · 0 comments · Fixed by #421

Comments

@agronick
Copy link

I upgraded to EvalEx:3.1.0. In 3.0.5 this works correctly. I have an expression that looks like

IF(a == 70, "P", IF(a == 60, "N", a))

This is a user inputted string to convert 70 to P for park and 60 to N for neutral. Otherwise show the gear as a number.

On 3.1.0 I get the following results:

expression.with("a", 70).evaluate().value

Returns P

expression.with("a", 70.0).evaluate().value

Return 7E+1

On 3.0.5 both 70 (int) and 70.0 (double) return P which is correct. This appears to be a regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant