Arith RaisedTo
Aus ExpeccoWiki
Inhaltsverzeichnis |
Schema
Operation
Raises x to the n'th power.
Automatic Type Conversion
Both the x and the n input can be arbitrary Numbers. The output is integral, if the inputs are.
Uses
RaisedTo can be used to compute powers of an x. With an n-input 0 < n < 1, a root is computed. "x.raisedTo(0.5)" is equivalent to "x.sqrt()".
Examples
10.raisedTo(10) generates 10000000000.
10.raisedTo(-10) generates (1 / 10000000000) (a Fraction).
10.raisedTo(0.5) generates 3.16228 (the square root of 10 as a Float).
10.raisedTo( (1/3) ) generates 2.15443 (the cubic root of 10 as a Float).
Revisions
This block is in the Standard Library since 1.7.
Back to Standard Library.
Previous: Arith [ Square Root ]
Next: Arith [ Ln ]
