Boost logo

Boost :

From: Jan Langer (jan_at_[hidden])
Date: 2003-12-13 20:16:50


Mohamed Iqbal wrote:
>>can you give examples for that. which basic operations make sense with
>>int but not with complex<int>?
>
> It's the reverse. There is 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.

ok. i get your point. i think i didnt think about the difference between
a complex number and a point in a two-dimensional space, which isnt
always the same concept.
jan

-- 
jan langer ... jan_at_[hidden]
"pi ist genau drei"

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk