python cmath模塊_cmath模塊-PYTHON

這是一個float型的常數

>>> cmath.e

2.718281828459045

>>> type(cmath.e)

文檔

>>> import cmath

>>> help(cmath)

Help on module cmath:

NAME

cmath

FILE

/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cmath.so

MODULE DOCS

http://docs.python.org/library/cmath Go

DESCRIPTION

This module is always available. It provides access to mathematical

functions for complex numbers.

FUNCTIONS

acos(...)

acos(x)

Return the arc cosine of x.

acosh(...)

acosh(x)

Return the inverse hyperbolic cosine of x.

asin(...)

asin(x)

Return the arc sine of x.

asinh(...)

asinh(x)

Return the inverse hyperbolic sine of x.

atan(...)

atan(x)

Return the arc tangent of x.

atanh(...)

atanh(x)

Return the inverse hyperbolic tangent of x.

cos(...)

cos(x)

Return the cosine of x.

cosh(...)

cosh(x)

Return the hyperbolic cosine of x.

exp(...)

exp(x)

Return the exponential value e**x.

isinf(...)

isinf(z) -> bool

Checks if the real or imaginary part of z is infinite.

isnan(...)

isnan(z) -> bool

Checks if the real or imaginary part of z not a number (NaN)

log(...)

log(x[, base]) -> the logarithm of x to the given base.

If the base not specified, returns the natural logarithm (base e) of x.

log10(...)

log10(x)

Return the base-10 logarithm of x.

phase(...)

phase(z) -> float

Return argument, also known as the phase angle, of a complex.

polar(...)

polar(z) -> r: float, phi: float

Convert a complex from rectangular coordinates to polar coordinates. r is

the distance from 0 and phi the phase angle.

rect(...)

rect(r, phi) -> z: complex

Convert from polar coordinates to rectangular coordinates.

sin(...)

sin(x)

Return the sine of x.

sinh(...)

sinh(x)

Return the hyperbolic sine of x.

sqrt(...)

sqrt(x)

Return the square root of x.

tan(...)

tan(x)

Return the tangent of x.

tanh(...)

tanh(x)

Return the hyperbolic tangent of x.

DATA

e = 2.718281828459045

pi = 3.141592653589793

>>>

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/453990.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/453990.shtml
英文地址,請注明出處:http://en.pswp.cn/news/453990.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Python 第三方模塊之 pdfkit

pdfkit,把 HTMLCSS 格式的文件轉換成 PDF 格式文檔的一個工具。 其實,pdfkit 是 html 轉成 pdf 工具包 wkhtmltopdf 的 Python 封裝。所以,首先安裝 wkhtmltopdf 。 一般情況下,wkhtmltopdf需要手動安裝,網站是 https…

LNMP環境添加第三方模塊

一.在LNMP環境下添加memcache模塊 1.安裝依賴庫(libevent) [rootnode1 ~]# tar xvf libevent-2.0.21-stable.tar.gz [rootnode1 ~]# cd libevent-2.0.21-stable [rootnode1 libevent-2.0.21-stable]# ./configure --prefix/usr/local/libevent [rootnode1 libevent-2.0.21-sta…

學生成績管理系統-程序維護

托管平臺地址:https://gitee.com/lucess/StudentMarkManage.git 小組名稱:干翻沈師 程序運行方法: 1、后臺服務:進入項目文件夾執行 python TeamProject.py runsercer 0.0.0.0:5050 2、前臺服務:進入./WEB-INFO/TeamProjectWeb 文件夾執行 ya…

改需求

轉載于:https://www.cnblogs.com/gw2010/p/7856484.html

架構師一般做到多少歲_軟件測試可以做到多大歲數?

做這個行業也幾年了,經常聽到有人問,軟件測試這個行業能干到多少歲,當然里邊包含想要進入這個行業的和已經在這個行業里邊發展的!基本上軟件測試可以分為三條職業發展路線:技術路線、管理路線、產品路線!目…

Python 第三方模塊之 MySQL數據庫連接模塊 PyMySQL

PyMySQL的安裝 pip install PyMySQL python連接數據庫 import pymysqlconn pymysql.connect(hostlocalhost, userroot, password"root",databasedb, port3306, # 數字3306charsetutf8, # 不是utf-8autocommitTrue # autocommitTrue 讓每次提交都去調用…

初學Spring Boot

1.Spring Boot注解 (1)SpringBootApplication開啟了Spring的組件掃描和Spring Boot的自動配置,實際上,SpringBootApplication是將三個注解組合在了一起,這三個注解分別是 SpringBootConfiguration,ComponentScan,Ena…

15條常用的視頻音頻編輯腳本命令(mencoder/ffmpeg等)

可以把它當快速簡易參考看,主要的功能有: 視頻格式轉換音頻格式轉換切割視頻及音頻連接兩段視頻視頻音頻同步將圖像系列轉換成視頻 這里是百鬼丸以前收集的一部分命令行視頻音頻編輯腳本命令,一直在自己的記事本里隨時用,現在…

python rowcount_PyQt(Python+Qt)學習隨筆:QTableWidget的currentItem、rowCount、columnCount等部件狀態屬性訪問方法...

老猿將QTableWidget表格部件中反映部件當前情況的一些方法歸類為部件狀態訪問方法,包括部件的行數、列數、當前項、當前行、當前列等屬性訪問方法。1、行數rowCountQTableWidget的rowCount屬性保存表格部件中的行數,在QTableWidget創建時如果沒有指定行數…

Python 內置模塊之 random

常用API import random# 隨機小數 print(random.random()) # 大于0且小于1之間的小數。0< n<1.0 print(random.uniform(1,3)) # 大于1小于3的小數# 隨機整數 print(random.randint(1,5)) # 大于等于1且小于等于5之間的整數#從指定范圍內&#xff0c;按指定基…

微信jssdk遇到的一些問題匯總

1.用戶手動去觸發的接口可以直接調用比如wx.startRecord(); 但是寫在頁面加載完成里就無效&#xff0c;需要寫在 wx.ready(function(){wx.startRecord(); }); 才會有效。 2.h5 的audio標簽只支持ogg,mp3,wav格式的音頻&#xff0c;微信jssdk錄制的是amr格式的語音文件&#xf…

mongodb簡單的增刪改查

數據庫操作&#xff1a; show dbs;#查看數據庫use test;#如果沒有就創建一個db;#查看當前數據庫db.dropDatabase();#刪除數據庫 數據操作&#xff1a;show collections&#xff1b;#查看集合創建集合、插入&#xff1a;create collection;#創建集合db.student.insert({"na…

ffmpeg-0.8 開源編碼解碼庫從linux下移植到windows vs2005

最新 ffmpeg-0.8 開源編碼解碼庫&#xff0c;從linux下移植到windows vs2005&#xff0c;全部開源。需要 Intel C Compile 和 開源的SDL庫支持&#xff0c;由于 Intel C Compile支持C99語法&#xff0c;所以源代碼改動很小很小。主要的修改1&#xff1a;添加了linux中有而windo…

python3.5.2使用教程_Python3.5.2-初級教程.docx

Python3.5.2-初級教程Python 初級教程Release:3.5.2引言Python 是一門簡單易學且功能強大的編程語言。它擁有高效的高級數據結構&#xff0c;并且能夠用簡單而又高效的方式進行面向對象編程。Python 優雅的語法和動態類型&#xff0c;再結合它的解釋性&#xff0c;使其在大多數…

Flask 離線腳本

1. 在 __init__.py中創建db對象from flask_sqlalchemy import SQLAlchemy# 包含了SQLAlchemy相關的所有操作db SQLAlchemy()2. 在 __init__.py中create_app函數中讓將app傳入到db中def create_app():app Flask(__name__)app.config.from_object(settings.DevelopmentConfig)f…

day13 迭代器和生成器

一、上節回顧和作業講解&#xff1a; 1、如果這個網頁沒有被爬取過就真的去訪問這個網頁&#xff0c;否則就返回之前訪問的時候緩存文件中的內容 &#xff08;重要的例子&#xff09; from urllib.request import urlopen def wrapper(func):def inner(*args, **kwargs):with o…

Centos7.0 搭建Zabbix環境

實驗環境&#xff1a;Centos7.0IP:192.168.47.140關閉iptables及setenforce導入源 rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm安裝zabbix包安裝完成安裝mysql源wget http://repo.mysql.com/mysql-community-release-el7-5…

用線性插值算法實現圖像縮放

用線性插值算法實現圖像縮放 猛禽[Mental Studio](個人專欄)(BLOG) http://mental.mentsu.com 在Windows中做過圖像方面程序的人應該都知道Windows的GDI有一個API函數&#xff1a;StretchBlt&#xff0c;對應在VCL中是TCanvas類的StretchDraw方法。它可以很簡單地實現圖像的縮放…

蒙特卡洛分析 pmp_PMP基礎名詞介紹 | 59. 實施定量風險分析

點擊上方藍字關注我們你好&#xff0c;這是“兔子研習社”為管理新手推出的“PMP基礎名詞介紹”系列內容。如果你正打算轉到管理崗位&#xff0c;或者想要學習國際通行的項目管理知識&#xff0c;那恭喜你&#xff0c;這里滿滿的干貨會讓你不虛此行。實施定量風險分析是就已識別…

深度學習案例之基于 CNN 的 MNIST 手寫數字識別

一、模型結構 本文只涉及利用Tensorflow實現CNN的手寫數字識別,CNN的內容請參考:卷積神經網絡(CNN) MNIST數據集的格式與數據預處理代碼input_data.py的講解請參考 :Tutorial (2) 二、實驗代碼 # -*- coding:utf-8 -*- """Time : Author: Feng LepengFile …