■ 현재-ing/ㅡPython
데이터사이언스 #A002
with seok
2023. 5. 8. 22:49
Built-in Functions
https://docs.python.org/3/library/functions.html
Built-in Functions
The Python interpreter has a number of functions and types built into it that are always available. They are listed here in alphabetical order.,,,, Built-in Functions,,, A, abs(), aiter(), all(), a...
docs.python.org
https://docs.python.org/3/library/math.html
math — Mathematical functions
This module provides access to the mathematical functions defined by the C standard. These functions cannot be used with complex numbers; use the functions of the same name from the cmath module if...
docs.python.org
Python float 표현의 제약점 - 너무 크면 inf, - 너무 작으면 0 - 정밀도는 15~16자리 - 산술계산 결과 정보의 손실 |
2e306 * 10 2e306 * 100 import math math.isinf(2e306 * 100) |
파이썬에서 2e306 * 10의 결과는 유한한 숫자이지만 2e306 * 100의 결과는 무한한 숫자이다. 이는 파이썬에서 표현 가능한 최대 유한 부동 소수점 숫자가 약 1.8e308이기 때문이며, 이보다 큰 숫자는 양의 무한대로 표현된다. |
2e-322 / 10 2e-322 / 100 |
2e-322 / 10의 결과는 유한한 숫자이지만 2e-322 / 100의 결과는 0이다. 이는 파이썬에서 표현 가능한 최소 양의 정규화된 부동 소수점 숫자가 약 2.23e-308이기 때문이며, 이보다 작은 숫자는 0으로 표현된다.. |
2 ** 0.5 (2 ** 0.5) * (2 ** 0.5) (2 ** 0.5) * (2 ** 0.5) - 2 |
728x90