[LLVMbugs] [Bug 19820] New: division by std::complex<double> wrong when its module is small

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed May 21 14:51:56 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=19820

            Bug ID: 19820
           Summary: division by std::complex<double> wrong when its module
                    is small
           Product: clang
           Version: 3.4
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mferrero at imap-mail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The following code does not produce the correct answer. It should be
(1.e+162,0) and instead one gets (inf,-nan)

#include <iostream>
#include <complex>

int main() {
  std::complex<double> c(1.e-162,0);
  std::cout << 1.0/c << std::endl;
  return 0;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140521/b5fdfda0/attachment.html>


More information about the llvm-bugs mailing list