पायथन गणित.log1p () विधि
उदाहरण
विभिन्न संख्याओं के लिए लघुगणक(1+संख्या) ज्ञात कीजिए
# Import math Library
import math
# Return the log(1+number) for different numbers
print(math.log1p(2.7183))
print(math.log1p(2))
print(math.log1p(1))
परिभाषा और उपयोग
विधि लॉग (1 + संख्या) लौटाती है, जिसकी गणना इस math.log1p()
तरह से की जाती है कि संख्या का मान शून्य के करीब होने पर भी सटीक हो।
वाक्य - विन्यास
math.log1p(x)
पैरामीटर मान
Parameter | Description |
---|---|
x | Required. Specifies the number to process. If the value is a negative number, it returns a ValueError. If the value is not a number, it returns a TypeError |
टेक्निकल डिटेल
प्रतिलाभ की मात्रा: | 1+ संख्याfloat . के लघुगणक मान का प्रतिनिधित्व करने वाला एक मान |
---|---|
पायथन संस्करण: | 2.6 |