One test in data.cc crashes Octave 3.1.51
John W. Eaton
jwe at bevo.che.wisc.edu
Thu Aug 21 17:49:10 CDT 2008
On 21-Aug-2008, Thomas Treichl wrote:
| Thanks for the example program, I think we are getting closer. Now I can see (if
| I interpret this correctly) that the log function on my system cannot handle the
| complex type?! This would really be a bad thing
Sorry, that was a mistake on my part. Try the following instead. It
should at least compile...
#include <iostream>
#include <cmath>
#include <complex>
int
main (void)
{
double inf = 1.0 / 0.0;
std::complex<double> foo
= std::log (std::complex<double> (0, inf)) / std::log (2);
std::cout << foo << std::endl;
return 0;
}
jwe
More information about the Bug-octave
mailing list