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

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

Serving Software Downloads in 976 Categories, Downloaded 29.646.604 Times

Mpmath 0.17

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

Mpmath

Report Broken Link
Printer Friendly Version


Product Homepage
Download (16 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
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  
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  
Science  -  Filter Wiz Lite 1.21
Active filter design software for lowpass, highpass, bandpass and bandstop electronic filters using resistors, capacitors and op amps. Provides Butterworth, Chebyshev, Elliptic and Bessel Approximations to order 10, with a variety of circuit choices.
4.67 MB  
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  
Scientific and Engineering  -  NumExp 0.14.1
NumExp is a family of open-source applications for numerical computation.It is based on a server with the NumExp core functionalities. This server comunicates with potencial clients using a simple Corba interface.
 
NEW DOWNLOADS IN MACINTOSH SOFTWARE, PROGRAMMING
Macintosh Software  -  MacX Free DVD to MP4 Converter for Mac 4.2.3
MacX Free DVD to MP4 Converter for Mac is an innovative yet free DVD to MP4 ripper software for Mac users without any functional limitation or watermark. It is able to convert DVDs including copy protected DVD movies to MP4, FLV, MP3 music on Mac...
36.23 MB  
Macintosh Software  -  MacX DVD Ripper Mac Free Edition 4.2.3
MacX DVD Ripper Mac Free Edition is the best free DVD ripper for Mac that can fulfill any of your DVD backup and ripping demands for free. It allows you to rip homemade and protected DVDs to MOV, MP4, M4V, etc for playing on iPhone, iPod, iPad,...
35.88 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  
Macintosh Software  -  MacX QuickTime Video Converter Free 4.1.9
MacX QuickTime Video Converter Free Edition is the best program designed for Mac users to free convert almost all HD videos and SD videos to QuickTime accepted formats on Mac with first rate quality.The input file formats covered by this powerful...
23.11 MB  
Macintosh Software  -  MacX Free Apple TV Video Converter 4.1.9
MacX Free Apple TV Video Converter is a 100% free video to Apple TV converter software which enables you to free convert most popular videos like AVCHD, MKV, M2TS, AVI, MPEG, WMV, FLV etc to Apple TV compatible format like MP4 format on Mac OS. In...
22.89 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