C#: The console is outputting infinite (∞)

Viewed 359

I'm using Visual Studio 2015 on Windows 10, I'm still a new coder, I've just started to learn C#, and while I was in the process, I discovered the Math class and was just having fun with it, till the console outputted: " ∞ "

It's a Console Application

Here's the code:

var k = Math.Sqrt((Math.Pow(Math.Exp(5), Math.E)));
var l = Math.Sqrt((Math.Pow(Math.PI, Math.E)));
Console.WriteLine("number 1 : " + k);
Console.WriteLine("number 2 : " + l);
Console.ReadKey();
var subject = Math.Pow(Math.Sqrt((Math.Pow(Math.PI, Math.E))), Math.Sqrt((Math.Pow(Math.Exp(5), Math.E))));
Console.WriteLine(k + " ^ " + l + " = " + subject);
Console.ReadKey();
//output  :
/*number 1 : 893.998923601492
 number 2 : 4.73910938029088
 893.998923601492 ^ 4.73910938029088 = ∞*/

Why is this happening? using normal calculator the result is: 96985953901866.7

1 Answers
Related