stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov (JIRA)" <j...@apache.org>
Subject [jira] Created: (STDCXX-899) [MSVC] pow (double (x), double (int (y))) and pow (double (x), int (y)) returns sometimes the different results on 64-bit MSVC
Date Tue, 29 Apr 2008 17:59:56 GMT
[MSVC] pow (double (x), double (int (y))) and pow (double (x), int (y)) returns sometimes the
different results on 64-bit MSVC
------------------------------------------------------------------------------------------------------------------------------

                 Key: STDCXX-899
                 URL: https://issues.apache.org/jira/browse/STDCXX-899
             Project: C++ Standard Library
          Issue Type: Bug
          Components: External
         Environment: 64-bit MSVC
            Reporter: Farid Zaripov
            Priority: Minor


The 26.c.math test fails on 64-bit MSVC with the following assertions:

{noformat}
# 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
{noformat}

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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message