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.mzph.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 …