Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
64-bit MSVC
-
Incorrect Behavior
Description
The 26.c.math test fails on 64-bit MSVC with the following assertions:
# ASSERTION (S7) (4 lines): # TEXT: std::pow (-9.0, -8) = 2.32306e-08 # CLAUSE: lib.c.math # LINE: 226 # ASSERTION (S7) (4 lines): # TEXT: std::pow (-9.0L, -8) = 2.32306e-08 # CLAUSE: lib.c.math # LINE: 240 # ASSERTION (S7) (4 lines): # TEXT: std::pow (-9.0, -3) = -0.00137174, std::pow (-9.0, -3.0) = -0.00137174 # CLAUSE: lib.c.math # LINE: 226 # ASSERTION (S7) (4 lines): # TEXT: std::pow (-9.0L, -3) = -0.00137174, std::pow (-9.0L, -3.0L) = -0.00137174 # CLAUSE: lib.c.math # LINE: 240 # ASSERTION (S7) (4 lines): # TEXT: std::pow (-6.0, -9) = -9.9229e-08 # CLAUSE: lib.c.math # LINE: 226 # ASSERTION (S7) (4 lines): # TEXT: std::pow (-6.0L, -9) = -9.9229e-08 # CLAUSE: lib.c.math # LINE: 240 # ASSERTION (S7) (4 lines): # TEXT: std::pow (-6.0, -6) = 2.14335e-05 # CLAUSE: lib.c.math # LINE: 226 # ASSERTION (S7) (4 lines): # TEXT: std::pow (-6.0L, -6) = 2.14335e-05 # CLAUSE: lib.c.math # LINE: 240 # ASSERTION (S7) (4 lines): # TEXT: std::pow (-3.0, -9) = -5.08053e-05 # CLAUSE: lib.c.math # LINE: 226 # ASSERTION (S7) (4 lines): # TEXT: std::pow (-3.0L, -9) = -5.08053e-05 # CLAUSE: lib.c.math # LINE: 240 # ASSERTION (S7) (4 lines): # TEXT: std::pow (-3.0, -6) = 0.00137174, std::pow (-3.0, -6.0) = 0.00137174 # CLAUSE: lib.c.math # LINE: 226 # ASSERTION (S7) (4 lines): # TEXT: std::pow (-3.0L, -6) = 0.00137174, std::pow (-3.0L, -6.0L) = 0.00137174 # CLAUSE: lib.c.math # LINE: 240 # ASSERTION (S7) (4 lines): # TEXT: std::pow (3.0, -9) = 5.08053e-05 # CLAUSE: lib.c.math # LINE: 226 # ASSERTION (S7) (4 lines): # TEXT: std::pow (3.0L, -9) = 5.08053e-05 # CLAUSE: lib.c.math # LINE: 240 # ASSERTION (S7) (4 lines): # TEXT: std::pow (3.0, -6) = 0.00137174, std::pow (3.0, -6.0) = 0.00137174 # CLAUSE: lib.c.math # LINE: 226 # ASSERTION (S7) (4 lines): # TEXT: std::pow (3.0L, -6) = 0.00137174, std::pow (3.0L, -6.0L) = 0.00137174 # CLAUSE: lib.c.math # LINE: 240 # ASSERTION (S7) (4 lines): # TEXT: std::pow (6.0, -9) = 9.9229e-08 # CLAUSE: lib.c.math # LINE: 226 # ASSERTION (S7) (4 lines): # TEXT: std::pow (6.0L, -9) = 9.9229e-08 # CLAUSE: lib.c.math # LINE: 240 # ASSERTION (S7) (4 lines): # TEXT: std::pow (6.0, -6) = 2.14335e-05 # CLAUSE: lib.c.math # LINE: 226 # ASSERTION (S7) (4 lines): # TEXT: std::pow (6.0L, -6) = 2.14335e-05 # CLAUSE: lib.c.math # LINE: 240 # ASSERTION (S7) (4 lines): # TEXT: std::pow (9.0, -8) = 2.32306e-08 # CLAUSE: lib.c.math # LINE: 226 # ASSERTION (S7) (4 lines): # TEXT: std::pow (9.0L, -8) = 2.32306e-08 # CLAUSE: lib.c.math # LINE: 240 # ASSERTION (S7) (4 lines): # TEXT: std::pow (9.0, -3) = 0.00137174, std::pow (9.0, -3.0) = 0.00137174 # CLAUSE: lib.c.math # LINE: 226 # ASSERTION (S7) (4 lines): # TEXT: std::pow (9.0L, -3) = 0.00137174, std::pow (9.0L, -3.0L) = 0.00137174 # CLAUSE: lib.c.math # LINE: 240
The printed resulting values are the same, but actually they differs in one/two least significant digits.
Since the problem in MSVC CRT, I suppose that the only way to get rid of these asserts is convert them to rw_warn() when _RWSTD_STRICT_ANSI is not #defined.