파이썬 math.lgamma() 메서드
예시
다른 숫자의 로그 감마 값 찾기:
# Import math Library
import math
# Return the log gamma value of
different numbers
print (math.lgamma(7))
print (math.lgamma(-4.2))
정의 및 사용
이 math.lgamma()
메서드는 숫자의 자연 로그 감마 값을 반환합니다.
팁:math.gamma()
감마 값 을 찾는 방법을 사용하여 로그 감마 값 을 찾은 다음 math.log()
해당 값의 로그를 계산하는 방법을 사용할 수도 있습니다.
팁: 감마 값은 factorial(x-1)과 같습니다.
통사론
math.lgamma(x)
매개변수 값
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. |
기술적 세부 사항
반환 값: | float 숫자의 로그 감마 값을 나타내는 값 |
---|---|
파이썬 버전: | 3.2 |