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

Whether the precision of Floating-point arithmetic numbers may cause inaccuracy comparsion. #2042

Open
jiayinhaoran opened this issue Jun 9, 2023 · 1 comment
Labels
is:enhancement Request for adding new feature or enahncing functionality.

Comments

@jiayinhaoran
Copy link

jiayinhaoran commented Jun 9, 2023

image

When I compile code with -Wfloat-equal and find such warning:
warning: comparing floating point with == or != is unsafe [-Wfloat-equal]

'num' is 'long double' type.
Whether the precision of Floating-point arithmetic numbers may cause inaccuracy comparsion.
@michalvasko

@michalvasko
Copy link
Member

Whether the precision of Floating-point arithmetic numbers may cause inaccuracy comparsion.

I suppose it can, do you have a better idea that can be used for any XPath expressions?

@michalvasko michalvasko added the is:enhancement Request for adding new feature or enahncing functionality. label Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:enhancement Request for adding new feature or enahncing functionality.
Projects
None yet
Development

No branches or pull requests

2 participants