Le 04/02/2013 15:29, Renato Lenzi a écrit :
Hi there. How can i use power operator?
that is:

let x1 = 7;
let x2 = 8;
let mut x3;
x3 = x1 ** x2; ? it seems this doesn't work....

Hi,

AFAIK there is no operator for this, but libcore has a float::pow_with_uint function:

http://static.rust-lang.org/doc/core/float.html#function-pow_with_uint

For a float power, I find traces of a f64::pow function but it’s undocumented…

--
Simon Sapin
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to