파이썬 튜토리얼

파이썬 홈 파이썬 소개 파이썬 시작하기 파이썬 구문 파이썬 주석 파이썬 변수 파이썬 데이터 유형 파이썬 숫자 파이썬 캐스팅 파이썬 문자열 파이썬 부울 파이썬 연산자 파이썬 목록 파이썬 튜플 파이썬 세트 파이썬 사전 파이썬 If...Else 파이썬 while 루프 Python For 루프 파이썬 함수 파이썬 람다 파이썬 배열 파이썬 클래스/객체 파이썬 상속 파이썬 반복자 파이썬 범위 파이썬 모듈 파이썬 날짜 파이썬 수학 파이썬 JSON 파이썬 정규식 파이썬 PIP 파이썬 시도...제외 파이썬 사용자 입력 파이썬 문자열 포맷

파일 처리

파이썬 파일 처리 파이썬 읽기 파일 Python 파일 작성/작성 파이썬 파일 삭제

파이썬 모듈

넘파이 튜토리얼 팬더 연습 사이피 튜토리얼

파이썬 Matplotlib

Matplotlib 소개 Matplotlib 시작하기 Matplotlib 파이플로트 Matplotlib 플로팅 Matplotlib 마커 Matplotlib 라인 Matplotlib 레이블 Matplotlib 그리드 Matplotlib 서브플롯 Matplotlib 분산 Matplotlib 바 Matplotlib 히스토그램 Matplotlib 파이 차트

기계 학습

시작하기 평균 중앙값 모드 표준 편차 백분위수 데이터 배포 정규 데이터 분포 산포도 선형 회귀 다항식 회귀 다중 회귀 규모 훈련/시험 의사결정나무

파이썬 MySQL

MySQL 시작하기 MySQL 데이터베이스 생성 MySQL 테이블 생성 MySQL 삽입 MySQL 선택 MySQL 어디 MySQL 주문 기준 MySQL 삭제 MySQL 삭제 테이블 MySQL 업데이트 MySQL 제한 MySQL 조인

파이썬 몽고DB

몽고DB 시작하기 MongoDB 데이터베이스 생성 MongoDB 컬렉션 생성 몽고DB 삽입 몽고DB 찾기 몽고DB 쿼리 몽고DB 정렬 몽고DB 삭제 MongoDB 드롭 컬렉션 몽고DB 업데이트 몽고DB 제한

파이썬 참조

파이썬 개요 파이썬 내장 함수 파이썬 문자열 메서드 파이썬 목록 메서드 파이썬 사전 메서드 파이썬 튜플 메서드 파이썬 세트 메소드 파이썬 파일 메서드 파이썬 키워드 파이썬 예외 파이썬 용어집

모듈 참조

랜덤 모듈 요청 모듈 통계 모듈 수학 모듈 cMath 모듈

파이썬 사용법

목록 중복 제거 문자열 반전 두 개의 숫자 더하기

파이썬 예제

파이썬 예제 파이썬 컴파일러 파이썬 연습 파이썬 퀴즈 파이썬 인증서

파이썬 cmath 모듈


파이썬 cmath 모듈

Python에는 복소수에 대한 수학 작업에 사용할 수 있는 내장 모듈이 있습니다.

이 모듈의 메소드는 int, floatcomplex숫자를 허용합니다. __complex__()또는 __float__()메서드 가 있는 Python 개체도 허용합니다 .

이 모듈의 메서드는 거의 항상 복소수를 반환합니다. 반환값을 실수로 표현할 수 있는 경우 반환값은 허수부가 0입니다.

cmath모듈에는 일련의 메서드와 상수가 있습니다 .


cMath 방법

Method Description
cmath.acos(x) Returns the arc cosine value of x
cmath.acosh(x) Returns the hyperbolic arc cosine of x
cmath.asin(x) Returns the arc sine of x
cmath.asinh(x) Returns the hyperbolic arc sine of x
cmath.atan(x) Returns the arc tangent value of x
cmath.atanh(x) Returns the hyperbolic arctangent value of x
cmath.cos(x) Returns the cosine of x
cmath.cosh(x) Returns the hyperbolic cosine of x
cmath.exp(x) Returns the value of Ex, where E is Euler's number (approximately 2.718281...), and x is the number passed to it
cmath.isclose() Checks whether two values are close, or not
cmath.isfinite(x) Checks whether x is a finite number
cmath.isinf(x) Check whether x is a positive or negative infinty
cmath.isnan(x) Checks whether x is NaN (not a number)
cmath.log(x[, base]) Returns the logarithm of x to the base
cmath.log10(x) Returns the base-10 logarithm of x
cmath.phase() Return the phase of a complex number
cmath.polar() Convert a complex number to polar coordinates
cmath.rect() Convert polar coordinates to rectangular form
cmath.sin(x) Returns the sine of x
cmath.sinh(x) Returns the hyperbolic sine of x
cmath.sqrt(x) Returns the square root of x
cmath.tan(x) Returns the tangent of x
cmath.tanh(x) Returns the hyperbolic tangent of x

cMath 상수

Constant Description
cmath.e Returns Euler's number (2.7182...)
cmath.inf Returns a floating-point positive infinity value
cmath.infj Returns a complex infinity value
cmath.nan Returns floating-point NaN (Not a Number) value
cmath.nanj Returns coplext NaN (Not a Number) value
cmath.pi Returns PI (3.1415...)
cmath.tau Returns tau (6.2831...)