1
0
mirror of https://github.com/golang/go synced 2024-11-11 23:10:23 -07:00

Revert previous change: complexN only converts to complexN.

This was discussed with Ken and Russ.  6g has been changed,
and both compilers now work this way.  This avoids a double
type conversion--first to the float type, then to the complex
type.

R=r
CC=golang-dev, ken2, rsc
https://golang.org/cl/419042
This commit is contained in:
Ian Lance Taylor 2010-03-10 20:38:38 -08:00
parent 2a62195153
commit 11a218444f

View File

@ -3262,7 +3262,7 @@ When converting a floating-point number to an integer, the fraction is discarded
</li> </li>
<li> <li>
A value of complex type may be converted to a different complex type, A value of complex type may be converted to a different complex type,
but there is no conversion from complex to any other type. but there is no conversion between complex and any other type.
<li> <li>
When converting a number to a floating-point or complex type, When converting a number to a floating-point or complex type,
the result value is rounded the result value is rounded