2009/12/4 Ed <[email protected]>: > x_empty_dragon wrote: >> >> python? > > >>>> 2+2^(1/2) > 4 >>>> 2+2.0^(1.0/2) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > TypeError: unsupported operand type(s) for ^: 'float' and 'float' >>>> 0x16+0b10 > File "<stdin>", line 1 > 0x16+0b10 > ^ > SyntaxError: invalid syntax
^ is the bitwise XOR operator. For exponentiation, use **. 2+2.0**(1.0/2) 3.4142135623730949 > > > -- > To UNSUBSCRIBE, email to [email protected] > with a subject of "unsubscribe". Trouble? Contact > [email protected] > > -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

