From: Todd V. <tve...@ex...> - 2000-05-20 16:01:39
|
You are getting this error because BZ_HAVE_COMPLEX_MATH is #undef'ed in <blitz/config.h>. This is because compiler/compmath.cpp fails to compile with gcc. The gcc library is missing log10, tan and tanh for complex numbers as required by the standard. You may be able to work around this by manually #def'ing BZ_HAVE_COMPLEX_MATH in <blitz/config.h>. Cheers, Todd Andrew Docherty wrote: > > Hello, > > I am having problems compiling a program where I take the sine of a > complex array. > > The program I used is: > > 35: Array<complex<double>,1> A(32); > 36: real(A)=tensor::i; > 37: imag(A)=0; > 38: A=sin(A); > > I recieve the error message at the end of this message. I don't know > if sin can take complex vectors, or whether there is some other problem. > > Any help would be greatly appreciated. > > Andrew Docherty > > gxx -Id:/djgpp/blitz-gcc -ftemplate-depth-30 -c ./arrayparse.cpp > d:/djgpp/blitz-gcc/blitz/mathfunc.h: In function `static double > blitz::_bz_sin<complex<double> >::apply(complex<double>)': > d:/djgpp/blitz-gcc/blitz/array/expr.h:538: instantiated from > `blitz::_bz_ArrayExprUnaryOp<blitz::FastArrayIterator<complex<double>,1>,blitz::_bz_sin<complex<double> > > >::operator ()<1>(const blitz::TinyVector<int,1> &)' > d:/djgpp/blitz-gcc/blitz/array/expr.h:159: instantiated from > `blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprUnaryOp<blitz::FastArrayIterator<complex<double>,1>,blitz::_bz_sin<complex<double> > > > >::operator ()<1>(const blitz::TinyVector<int,1> &)' > d:/djgpp/blitz-gcc/blitz/array/eval.cc:677: instantiated from > `blitz::Array<complex<double>,1>::evaluateWithIndexTraversal1<blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprUnaryOp<blitz::FastArrayIterator<complex<double>,1>,blitz::_bz_sin<complex<double> > > > >, blitz::_bz_update<complex<double>,double> > >(blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprUnaryOp<blitz::FastArrayIterator<complex<double>,1>,blitz::_bz_sin<complex<double> > > > >, blitz::_bz_update<complex<double>,double>)' > d:/djgpp/blitz-gcc/blitz/array/eval.cc:180: instantiated from > `blitz::Array<complex<double>,1>::evaluate<blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprUnaryOp<blitz::FastArrayIterator<complex<double>,1>,blitz::_bz_sin<complex<double> > > > >, blitz::_bz_update<complex<double>,double> > >(blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprUnaryOp<blitz::FastArrayIterator<complex<double>,1>,blitz::_bz_sin<complex<double> > > > >, blitz::_bz_update<complex<double>,double>)' > d:/djgpp/blitz-gcc/blitz/array/ops.cc:33: instantiated from > `blitz::Array<complex<double>,1>::operator > =<blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprUnaryOp<blitz::FastArrayIterator<complex<double>,1>,blitz::_bz_sin<complex<double> > > > > >(const > blitz::ETBase<blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprUnaryOp<blitz::FastArrayIterator<complex<double>,1>,blitz::_bz_sin<complex<double> > > > > > &)' > ./arrayparse.cpp:38: instantiated from here > d:/djgpp/blitz-gcc/blitz/mathfunc.h:2027: `class complex<double>' used > where a floating point value was expected > d:/djgpp/blitz-gcc/blitz/mathfunc.h:2027: aggregate value used where a > float was expected > d:/djgpp/blitz-gcc/blitz/array/eval.cc: In method `class > blitz::Array<complex<double>,1> & > blitz::Array<complex<double>,1>::evaluateWithIndexTraversal1<blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprUnaryOp<blitz::FastArrayIterator<complex<double>,1>,blitz::_bz_sin<complex<double> > > > >, blitz::_bz_update<complex<double>,double> > >(blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprUnaryOp<blitz::FastArrayIterator<complex<double>,1>,blitz::_bz_sin<complex<double> > > > >, blitz::_bz_update<complex<double>,double>)': > d:/djgpp/blitz-gcc/blitz/array/eval.cc:180: instantiated from > `blitz::Array<complex<double>,1>::evaluate<blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprUnaryOp<blitz::FastArrayIterator<complex<double>,1>,blitz::_bz_sin<complex<double> > > > >, blitz::_bz_update<complex<double>,double> > >(blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprUnaryOp<blitz::FastArrayIterator<complex<double>,1>,blitz::_bz_sin<complex<double> > > > >, blitz::_bz_update<complex<double>,double>)' > d:/djgpp/blitz-gcc/blitz/array/ops.cc:33: instantiated from > `blitz::Array<complex<double>,1>::operator > =<blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprUnaryOp<blitz::FastArrayIterator<complex<double>,1>,blitz::_bz_sin<complex<double> > > > > >(const > blitz::ETBase<blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprUnaryOp<blitz::FastArrayIterator<complex<double>,1>,blitz::_bz_sin<complex<double> > > > > > &)' > ./arrayparse.cpp:38: instantiated from here > d:/djgpp/blitz-gcc/blitz/array/eval.cc:677: no matching function for call > to `blitz::_bz_update<complex<double>,double>::update (complex<double> &, > complex<double>)' > d:/djgpp/blitz-gcc/blitz/update.h:69: candidates are: static void > blitz::_bz_update<complex<double>,double>::update(complex<double> &, > double) > make.exe: *** [arrayparse.o] Error 1 > > --------------------- blitz-support list -------------------------------- > * To subscribe/unsubscribe: use the handy web form at > http://oonumerics.org/blitz/lists.html > > -- Todd Veldhuizen tve...@ac... Indiana Univ. Comp. Sci. http://extreme.indiana.edu/~tveldhui/ --------------------- blitz-support list -------------------------------- * To subscribe/unsubscribe: use the handy web form at http://oonumerics.org/blitz/lists.html |