A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.w3schools.com/python/ref_math_lgamma.asp below:

Website Navigation


Python math.lgamma() Method

Python math.lgamma() Method

❮ Math Methods

Example

Find the log gamma value of different numbers:

# Import math Library

import math

# Return the log gamma value of different numbers

print (math.lgamma(7))

print (math.lgamma(-4.2))

Try it Yourself » Definition and Usage

The math.lgamma() method returns the natural logarithm gamma value of a number.

Tip: We can find also find the log gamma value by using the math.gamma() method to find the gamma value, and then use the math.log() method to calculate the log of that value.

Tip: The gamma value is equal to factorial(x-1).

Syntax Parameter Values Parameter Description x Required. The number to find the log gamma value of. If the number is a negative integer, it returns a ValueError. If it is not a number, it returns a TypeError. Technical Details Return Value: A float value, representing the log gamma value of a number Python Version: 3.2

❮ Math Methods

Track your progress - it's free!


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4