|
From: Per W. <pw...@ia...> - 2003-12-13 10:17:51
|
It's the reverse. There are a number of mathematical operations available on complex that doesn't make sense with int. pow, cos, sin, sqrt, tan, polar, ... sin and cos returns a result in the -1..1 range. An integer can only store, -1,0,1 which obvisoulsy means you can only process the angles 0, 90, 180, 270. A complex number is by mathematical definition a superset of a floating point number, containing a real and an imaginary part (each a floating point number) so obviously you can't use two integers. /Per W On Sat, 13 Dec 2003, Mohamed Iqbal wrote: > > > Some of the matematical operations are not meaningful if you can't > > represent a fractional value. > > > > /Per W > > > can you give examples for that. which basic operations make sense with > int but not with complex<int>? > > Mohammed > > > > > On Thu, 11 Dec 2003, Mohamed Iqbal wrote: > > > > > 26.2/2: The effect of instantiating the template complex for any type > other > > > than float, double or long double is unspecified. > > > > > > Does anybody know the reason for that? > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: IBM Linux Tutorials. > > > Become an expert in LINUX or just sharpen your skills. Sign up for > IBM's > > > Free Linux Tutorials. Learn everything from the bash shell to sys > admin. > > > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > > > _______________________________________________ > > > Dev-cpp-users mailing list > > > Dev...@li... > > > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign up for IBM's > Free Linux Tutorials. Learn everything from the bash shell to sys admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |