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

Inconsistent Output in JSONata for Java Version 1.5.8 for Mathematical Functions and Formatting #318

Open
Sloyee opened this issue Sep 2, 2024 · 0 comments

Comments

@Sloyee
Copy link

Sloyee commented Sep 2, 2024

We have identified discrepancies in the output values generated by JSONata for Java Version 1.5.8, particularly when using mathematical functions such as $power and $sqrt. For example, applying the $power function on the value 21.67 with an exponent of 2 yields 469.5889000000001 instead of the expected 469.5889. Similar inconsistencies are observed with other mathematical functions like $sqrt.

Additionally, the $formatNumber function does not behave as described in the documentation. An example provided in the documentation is $formatNumber(0.14, "###pm", {"per-mille": "pm"}) => "140pm". However, this does not work unless the "pm" is replaced with "p".

These issues may lead to inaccuracies in data processing and unexpected behavior in applications relying on this version of JSONata.

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

No branches or pull requests

1 participant