octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #55538] logspace BIST tests fail when Octave b


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #55538] logspace BIST tests fail when Octave built with LLVM libc++
Date: Mon, 21 Jan 2019 12:50:05 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

Follow-up Comment #1, bug #55538 (project octave):

I can confirm that this bug is entirely within the LLVM libc++ standard
library.

The following C++ program reflects a relevant piece of what Octave is doing in
the failing test:


#include <complex>
#include <limits>
#include <iostream>

int
main (int argc, char *argv[])
{
  std::complex<double> x {std::numeric_limits<double>::infinity (), 1.0};
  std::complex<double> y = std::pow (10.0, x);
  std::cout << y << std::endl;
}


This program prints '(-inf,inf)' as expected, except when compiled with the
LLVM C++ library:


address@hidden:~/src$ g++ -o x x.cc && ./x
(-inf,inf)
address@hidden:~/src$ clang++ -stdlib=libstdc++ -o x x.cc && ./x
(-inf,inf)
address@hidden:~/src$ clang++ -stdlib=libc++ -o x x.cc && ./x
(inf,-nan)


Does anyone know if this result is dictated by the C++ standard? If so, is
there already an open LLVM bug report that we can link to?

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55538>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]