Ruby program to calculate the logarithm gamma of the given number

bookmark

print "Enter Number: ";
num = gets.chomp.to_i;  
 
result = Math.lgamma(num);

print "Result is: ",result;

 


Output:

Enter Number: -25
Result is: [Infinity, 1]