Example #1
0
 /// <summary>
 /// Raises to an aribitrary power. This is both slow (uses Log) and inaccurate. If you need to
 /// raise e^x use exp(). If you need an integer power, use the integer power function Pow(int)
 /// </summary>
 /// <remarks>
 /// Accuracy Note:
 ///    The function is only ever accurate to a maximum of 4 decimal digits
 ///    For every 10x larger (or smaller) the power gets, you lose an additional decimal digit
 ///    If you really need a precise result, do the calculation with an extra 32-bits and round
 ///    
 /// Domain Note:
 ///    This only works for powers of positive real numbers. Negative numbers will fail.
 /// </remarks>
 /// <param name="n1">The number to raise to a power</param>
 /// <param name="power">The power to raise it to</param>
 public static BigFloat Pow(BigFloat n1, BigFloat power)
 {
     BigFloat res = new BigFloat(n1);
     n1.Pow(power);
     return n1;
 }