URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [p991.C] - Rev 414
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do assemble }
// prms-id: 991
class Complex {
public:
double re;
double im;
Complex(double r,double i) : re(r), im(i) {}
};
Complex cos(const Complex&);
extern "C" double cos (double); // not the same as the above
extern "C" double cosh (double);
extern "C" double sin (double);
extern "C" double sinh (double);
Complex cos(const Complex& arg) {
double nr = cos(arg.re)*cosh(arg.im);
double ni = -sin(arg.re)*sinh(arg.im);
return Complex(nr,ni);
}
Go to most recent revision | Compare with Previous | Blame | View Log