Jump to content

Talk:Arithmetic/Complex: Difference between revisions

Undo revision 14160 by IanOsgood (Talk) sorry, overwrote a previous answer!
No edit summary
(Undo revision 14160 by IanOsgood (Talk) sorry, overwrote a previous answer!)
Line 4:
:I did some looking; there are complex built-in types in the C99 standard, with defined implicit casts up and down to the other numeric primitives. --[[User:IanOsgood|IanOsgood]] 10:36, 11 March 2008 (MDT)
::How could an implicit cast from a complex type to a floating point or integer type result in a valid value? Simple integers and floats cannot represent both the real and imaginary parts of the complex number.--[[User:Waldorf|Waldorf]] 17:36, 11 March 2008 (MDT)
:::The Samecode wayexample (int)1.5only isn'tuses valid.conversions from Areal down-casttypes wouldto stripcomplex thetypes; imaginarybut part.complex Implicittypes up-castscan arebe theconverted theto morereal usefultypes caseby anyway,discarding allowingthe scalar/compleximaginary arithmeticpart. --[[User:IanOsgoodSpoon!|IanOsgoodSpoon!]] 1018:5721, 1211 March 2008 (MDT)
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.