-Werror=float-equal is triggered when using !val to complare floting point values
The use of the `-Werror=float-equal` flag, which causes all warnings related to floating-point comparisons `(==` or ` !=`) to be treated as errors. In C and C++ programming, comparing floating-point values directly using equality (e.g., `==` or` !=`) is generally not safe due to the precision issues inherent in floating-point representation.
Looking at the` ulp.c` file, we can see that it is comparing floating-point values with `== `and `!=` directly, which is causing the warnings and errors related to unsafe floating-point comparisons.

关闭于 2025-04-29 0 条评论