Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.165.799 Times

Mpmath 0.17

Company: Fredrik Johansson
Date Added: August 19, 2013  |  Visits: 370

Mpmath

Report Broken Link
Printer Friendly Version


Product Homepage
Download (41 downloads)



mpmath is a replacement for Python's float/complex types and math/cmath modules with unlimited precision and exponent sizes. The mpmath software is written entirely in Python without any external dependencies and hence runs almost anywhere, without the need for compilation.<br /><br />To install, unpack the mpmath archive and run<br /><br />python setup.py install<br /><br />Documentation and usage:<br /><br />Import mpmath with<br /><br />from mpmath import *<br /><br />This provides the classes mpf and mpc which work analogously to Python's float and complex types:<br /><br />>>> mpf(2) / mpf(3)<br />mpf('0.66666666666666663')<br /><br />>>> mpc(0, -1)<br />mpc(real='0', imag='-1')<br /><br />>>> mpf(-0.6) ** mpf(-0.2)<br />mpc(real='0.89603999408558288', imag='-0.65101116249684809')<br /><br />For prettier output (that also hides small rounding errors), use print or str():<br /><br />>>> print mpf(2) / mpf(3)<br />0.666666666666667<br /><br />>>> print mpc(1+2j)**0.5<br />(1.27201964951407 + 0.786151377757423j)<br /><br />The precision is controlled by the properties mpf.prec (number of bits) and mpf.dps (number of decimals). These properties are linked, so changing one automatically updates the other to match. Setting prec or dps changes the precision at which all operations are carried out and the number of digits to display when printing numbers. The default is<br />prec=53 and dps=15, the same as Python floats.<br /><br />>>> mpf.dps = 30<br />>>> mpf(2) / mpf(3)<br />mpf('0.66666666666666666666666666666663')<br />>>> print _<br />0.666666666666666666666666666667<br />>>> mpf.dps = 15 # restore to default<br /><br />You can create mpfs and mpcs from Python numbers, or combine mpfs and mpcs with Python numbers in arithmetic operations, but be aware that regular Python floats only have finite precision. To initialize an mpf with a full-precision value, use a string:<br /><br />>>> mpf(0.1)<br />mpf('0.10000000000000001') # same accuracy as float<br />>>> mpf.dps = 50<br />>>> mpf(0.1)<br />mpf('0.1000000000000000055511151231257827021181583404541016') # junk<br /><br />>>> mpf('0.1')<br />mpf('0.1000000000000000000000000000000000000000000000000001') # ok<br /><br />The following standard functions are available and support both real and complex arguments:<br /><br />sqrt, exp, log, power, cos, sin, tan, cosh, sinh, tanh,<br />acos, asin, atan, acosh, asinh, atanh<br /><br />Example:<br /><br />>>> mpf.dps = 15<br />>>> print cos(1)<br />0.540302305868140<br />>>> mpf.dps = 50<br />>>> print cos(1)<br />0.54030230586813971740093660744297660373231042061792<br /><br />Some less-common functions are also available: gamma (gamma function), factorial, erf (error function), lower_gamma/upper_gamma (incomplete gamma function) and zeta (Riemann zeta function).<br /><br />Finally, the convenience functions hypot and atan2 are available (defined for real numbers only).<br /><br />The constants pi, e, and cgamma (Euler's constant) are available as special objects that behave like mpfs but whose values automatically adjust to the precision.<br /><br />>>> mpf.dps = 15<br />>>> print pi<br />3.14159265358979<br />>>> mpf.dps = 50<br />>>> print pi<br />3.1415926535897932384626433832795028841971693993751<br /><br />>>> mpf.dps = 15<br />>>> e**(-pi*1j)<br />mpc(real='-1', imag='-1.2289836075083701E-16')<br />>>> mpf.dps = 50<br />>>> e**(-pi*1j)<br />mpc(real='-1', imag='1.0106 [...] E-51')<br /><br />Directed rounding is partially implemented. For example, this computes and verifies a 15-digit approximation interval for pi:<br /><br />>>> mpf.dps = 15<br />>>> mpf.round_down(); pi1 = +pi<br />>>> mpf.round_up(); pi2 = +pi<br />>>> pi1<br />mpf('3.1415926535897931')<br />>>> pi2<br />mpf('3.1415926535897936')<br />>>> mpf.dps = 30<br />>>> pi1 < pi < pi2<br />True

Requirements: No special requirements
Platforms: Mac, Mac OSX
Keyword: Bernoulli Bessel Carlsen Chebyshev Clausen Computation Coulomb Euler Exact Forms Hankel Jacobi Kelvin Large Legendre Polylogarithms Polynomials Stieltjes Struve Whittaker
Users rating: 0/10

License: Freeware Size: 460.8 KB
USER REVIEWS
More Reviews or Write Review


MPMATH RELATED
Science  -  Computation Job Management 0.6
Computation Job Management (jobman in short) is a program that calls executables according to a given program flow. Each executable is run in a separate process. It is useful when a project needs to carry out a series of calculations that are...
143.36 KB  
E-Mail Tools  -  Chebyshev 0.02
Chebyshev application allows someone to set up a spam filtering email forwarding service. Chebyshev is an engine for an email forwarding service similar to those "bitdiddle@alum.college.edu" email forwarding services that some schools provide....
14.34 KB  
Multimedia & Graphics  -  CARDboard Illustrative Aid to Computation 1.0.0.0
CARDboard Illustrative Aid to Computation, or Cardiac, for short was designed as a learning aid in order to teach high school students how computers work. The kit consisted of an instruction manual and a die-cut cardboard "computer". The...
 
Development Tools  -  Euler angles to Quaternion Conversion (for six basic sequence of rotations) 1.0
Euler Angles To Quaternion Conversion for six basic sequence of rotations around X(Roll),Y(Pitch) and Z(Yaw) axis.Allowed Sequences: xyz, xzy, yxz, yzx, zxy, zyx.
10 KB  
Communication  -  Computation of Im[G(s)]=0 1.0
IMAGGS(NUM,DEN) Computation of Im[G(s)]=0 of a LTI system with transfer function defined by its NUM, DEN coefficients.Examples used are form "Computation of Stabilizing PI and PID Controllers" by Nusret Tan, Ibrahim Kaya and Dereck P....
10 KB  
Development Tools  -  Euler angle, DCM, Quaternion, and Euler Vector Conversion/Teaching GUI 1.0
This is an instructional GUI to be used for learning how Euler angles, DCMs, quaternions, and Euler vector parameters relate in the rotation of cartesian frames (A to B). Can also be used to convert between all 4 values, however see below for a...
10 KB  
Development Tools  -  DCM from Euler angles 1.0
Computes Direction Cosine Matrix from Euler angles (in radians) for six basic sequence of rotations around X(Roll),Y(Pitch) and Z(Yaw) axis.Allowed rotations sequences:xyz, xzy, yxz, yzx, zxy, zyxORrpy, ryp, pry, pyr, yrp,...
10 KB  
Mathematics  -  Khi 3 3.2
Math, financials, stats, combinative, dates, y=f(x), series, units and calendars conversions, geometry, pi, Fourier, Taylor, Gamma, Bessel, Bernoulli, Fisher, prime numbers, fractionations, equations, electricity, chemistry, molar masses,...
7.63 MB  
Graphics Viewers  -  Euler Math Toolbox 12.8
The Euler Mathematical Toolbox is a software written and maintained by R. Grothmann, associate professor of mathematics at the University of Eichstatt. Euler can also produce graphics and save the graphics in various formats, among them PNG and...
66.6 MB  
Science  -  Darwin: Evolutionary Computation in Java 2.3.01
Darwin 2: Java Framework for Evolutionary Computation (genetic algorithm, GA). A true framework with out-of-the-box functionality and extensibility of all classes. Interface-based pattern with dependency-injection to configure components.
509.41 KB  
NEW DOWNLOADS IN MACINTOSH SOFTWARE, PROGRAMMING
Macintosh Software  -  EasyEDA PCB Designer for MacOS 2.0.0
EasyEDA, a great web based EDA(Electronics Design Automation) tool, online PCB tool, online PCB software for electronics engineers, educators, students, makers and enthusiasts. Theres no need to install any software. Just open EasyEDA in any...
34.4 MB  
Macintosh Software  -  VideoSolo Video to GIF Converter (Mac) 1.0.12
How to make a GIF? VideoSolo Free Video to GIF Converter for Mac supports all popular video files including MP4, AVI, MOV, WMV, FLV, M4V, etc. You can easily turn MP4/AVI/MOV/WMV/FLV/M4V to GIF animation on Mac and share your GIFs with your...
46.51 MB  
Macintosh Software  -  VideoSolo Free Video Converter (Mac) 1.0.18
VideoSolo Free Video Converter for Mac is a fast, powerful and easy-to-master video converter. Its main purpose is to convert video files from one format into another. It is able to convert video and audio files in 300+ formats on Mac for totally...
75.29 MB  
Macintosh Software  -  ManyCam for Mac 6
ManyCam is a free Webcam software and a screen recorder for anyone to use. Several feature enhancements are included within ManyCam to produce a professional quality live video production. It can connect a desktop, smartphone, tablet and live...
90.49 MB  
Macintosh Software  -  MacX Free Rip DVD to QuickTime for Mac 4.1.9
MacX Free Rip DVD to QuickTime for Mac is totally free yet versatile DVD to QuickTime ripper software for Mac users to free rip both normal and copy-protected DVDs to QuickTime MOV, MP4 on Mac with excellent image quality. Besides the powerful...
36.3 MB  
Programming  -  MacX Free iMovie Video Converter 4.1.8
MacX Free iMovie Video Converter is a professional free iMovie video converter for Mac that can convert any SD and HD videos such as M2TS, MKV, AVI, WMV, FLV, VOB, 3GP and more to iMovie accepted video formats MOV & MP4 for importing to iMovie...
22.92 MB  
Programming  -  SwapList 0.1 Alpha
Java list implementation that swaps list items to a disk file in order to avoid out-of-memory error.
10.24 KB  
Programming  -  Mano 1.05 Beta
Mano is a makeFile navigator containing a tree grouping the targets.
20.48 KB  
Programming  -  Workhorse 1.2
Workhorse automates tedious file transfer and deletion tasks. Just tell it when or how often you want it to run, fill in the details, and let it do it's job! Do you know Applescript? Use Workhorse to run your scripts at a given time or interval....
225.28 KB  
Programming  -  PLT Scheme (formerly DrScheme) Darwin (PPC) 4.2
PLT Scheme is an interactive, integrated, graphical programming environment for the Scheme, MzScheme, and MrEd programming languages. PLT Scheme provides source highlighting for syntax and run-time errors, support for multiple language...
38.27 MB