I\'m having a problem with C#. To be precise with the Math.pow(). If I try to calculate 15^14 then I get \"29192926025390624\". But if I calculate it with Wolfram Alpha I ge
Math.Pow works on doubles. This implementation with long gets the correct answer:
Func power = null; power = (i, p) => p == 1 ? i : i*power(i, p - 1); Console.WriteLine(power(15, 14));