Hi,
I thought sqr() and sqrt() works for arrays and native types of int and
doubles. Apparently, this is not the case. They works for array objects.
Bellow, is a test code with notes.
Regards,
J. H. Al-Sadah
//--------------------
#include <blitz/array.h>
#include <iostream>
#include <fstream>
using namespace std;
using namespace blitz;
int main(int argc,char **argv)
{
Array<double,1>
aa(1), bb(1);
aa = 9;
bb = sqr(aa); cout << endl << bb << endl; // works
bb = sqrt(aa); cout
<< endl << bb <<
endl; // works
cout << endl
<< sqrt(5.0) <<
endl; // ok
cout << endl
<< sqrt(5) <<
endl; //
warnning + not working
cout << endl
<< sqr(5.) <<
endl; // not
working
cout << endl
<< sqr(5) <<
endl; //
not working
return 0;
}