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

pass-comparison_tolerance_for_floating_point_negative_high_number_lower_bound should fail #354

Open
I-Sokolov opened this issue Oct 1, 2024 · 2 comments
Labels
please contribute A PR is welcome for this issue. Please target the `development` branch. tests
Milestone

Comments

@I-Sokolov
Copy link
Contributor

-1000000.
#10=IFCPROPERTYSINGLEVALUE('Foo',$,IFCREAL(-1000001.0000010000),$);
x == v ⇒ (v - abs(v) × ϵ - ϵ) < x < (v + abs(v) × ϵ + ϵ) with a tolerance value being: ϵ = 1.0e⁻⁶

-1000001.000001 < -1000001.000001 is false, so simpleValue != nominalValue

@atomczak atomczak added tests please contribute A PR is welcome for this issue. Please target the `development` branch. labels Nov 6, 2024
@atomczak atomczak added this to the 1.0 milestone Nov 6, 2024
@giuseppeverduciALMA
Copy link
Contributor

There are other test cases failing for the same reason. I am attaching an Excel file with a simulation of the tolerance calculation for all test cases, including an indication of which ones pass and which ones fail

ToleranceIssue354.xlsx

@I-Sokolov
Copy link
Contributor Author

There are other test cases failing for the same reason. I am attaching an Excel file...

As I remember I found other tests very tidy but fits the definition above, could you double check?

My biggest concert the definition is not symmetric, in some cases x==v but v!=x.
Please check your direction

And maybe buildingSMART team should rethink the definition, asymmetric equality is very strange thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
please contribute A PR is welcome for this issue. Please target the `development` branch. tests
Projects
None yet
Development

No branches or pull requests

3 participants