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

Wrong calculations with Carets as Exponent #159

Open
benjaminrupp opened this issue Jul 12, 2024 · 4 comments
Open

Wrong calculations with Carets as Exponent #159

benjaminrupp opened this issue Jul 12, 2024 · 4 comments
Assignees

Comments

@benjaminrupp
Copy link

Hi,

I have a problem with carets is an expression.
I am using the flag UseCaretForExponent = true.

10^3 = 1000 like expected but
0.466*10^3 is not 466 like expected but 101.1946.

This is quite an issue for us, because this is not expected.

Thanks

Benjamin

@JonathanMagnan JonathanMagnan self-assigned this Jul 12, 2024
@JonathanMagnan
Copy link
Member

Hello @benjaminrupp ,

Thank you for reporting. I can confirm that we have this issue.

The 0.466*10^^3 will work correctly (2 caret), but indeed, using it with only 1 caret leads to this issue.

We will look at it.

Best Regards,

Jon

@JonathanMagnan
Copy link
Member

Hello @benjaminrupp ,

Just to let you know that a fix has been merged and will be available on July 23

Best Regards,

Jon

@benjaminrupp
Copy link
Author

benjaminrupp commented Jul 15, 2024

Thanks. This is great

@JonathanMagnan
Copy link
Member

Hello @benjaminrupp ,

The v6.1.8 has been released.

Let us know if everything is working as expected.

For your information, in C# Eval Expression, we use a right-associativity in case of multiple caret such as a^b^c. You can see a good comparison of which language use this one or the expected result here: https://codeplea.com/exponentiation-associativity-options

Best Regards,

Jon

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

No branches or pull requests

2 participants