e011790f96
fixed some solvers
Vinzent Steinberg
2008-10-06 15:15:53 +00:00
ebe8a76e24
fix precision in findroot: set tol a bit bigger than eps; convert starting points to mpmath numbers
Fredrik Johansson
2008-10-05 18:46:30 +00:00
5d1cb1653f
findroot: use proper eps for tol when using float or complex
Vinzent Steinberg
2008-10-05 18:10:30 +00:00
004151f845
added many solvers
Vinzent Steinberg
2008-10-05 18:02:56 +00:00
7f3d09fc57
slightly less than full color saturation in cplot is more pleasing to the eye, i think
Fredrik Johansson
2008-10-05 16:41:24 +00:00
1ba4b91552
use interval notation (or mpi instances) for all functions performing summation, quadrature or similar things over intervals. fixed quad to use the syntax quad(f, ...)
Fredrik Johansson
2008-10-05 16:38:59 +00:00
4af6a1ddb4
update the manydigits demo script
Fredrik Johansson
2008-10-04 16:48:55 +00:00
d6dbfc2bbc
move pslq and related functions to a standalone file
Fredrik Johansson
2008-10-04 16:07:31 +00:00
30f96bd6c1
moved all function wrappers to a new module functions.py
Fredrik Johansson
2008-10-04 15:41:10 +00:00
34884dd05d
fix pidigits demo script
Fredrik Johansson
2008-10-04 14:37:27 +00:00
4cb88df705
cleanup and reorganize code for mathematical constants
Fredrik Johansson
2008-10-04 14:31:56 +00:00
2087bcbf56
Optimized Glaisher's constant. Computation to 3000 dps is now about 4x faster.
Fredrik Johansson
2008-10-04 13:02:57 +00:00
c804271d20
Streamlined the implementation of Khinchin's constant. With previous improvements to Bernoulli number computation, and with gmpy, the example on the mpmath web site for computing 6000 digits takes 4 minutes instead of 8 hours.
Fredrik Johansson
2008-10-04 12:36:39 +00:00
d9c6d7319f
attempting some cleanup for hypergeometric functions: moved computational code to a separate module. also improved accuracy of erfc for ridiculously large arguments
Fredrik Johansson
2008-10-04 11:29:56 +00:00
c6b85949a3
Added a function mpf_perturb, to simplify code that needs to calculate x + O(x^2) or x + O(x^3) with directed rounding for small x. Using this for (so far) exp, log, sin, cos, sinh, cosh, atan. This fixed bugs in exp, sinh, cosh for which tests have been written.
Fredrik Johansson
2008-10-03 12:00:37 +00:00
5e45936c16
Implemented Taylor series + caching for atan, giving speedups around 3-4x and up to 10x. Also rewrote Newton algorithm for atan to use fixed-point operations. The caching is currently done up to a huge precision; maybe with more precise precision management in atan_newton, this limit could be reduced. Also optimized log_taylor a bit.
Fredrik Johansson
2008-10-01 20:43:26 +00:00
1291d6a656
it's know possible to run python runtests.py from another directory
Vinzent Steinberg
2008-09-30 19:41:54 +00:00
ed5941724d
Changed test_matrices so it does not define test_matrix_numpy if numpy is not there.
Mario Pernici
2008-09-30 16:09:05 +00:00
3819c16c9d
make sure log_newton takes advantage of exp_series2, giving a ~2x speedup at huge precision (> 10000 digits) when gmpy is used. log should now have the same asymptotic speed as exp, rather than being slightly slower
Fredrik Johansson
2008-09-30 15:28:34 +00:00
c8c0e7f8ba
use Taylor series with caching to compute log at low-to-moderate precision (~< 50-100 digits, depending on whether python or gmpy is used). together with some other streamlining, this leads to log becoming around twice as fast (!)
Fredrik Johansson
2008-09-30 14:52:00 +00:00
8bcd8c13ba
fix sign of mpf_zeta_int(0)
Fredrik Johansson
2008-09-29 13:53:24 +00:00
5a06834027
improve cos/sin speed. they are still slightly (but now only slightly) slower than before the refactoring into reduce_angle/calc_cos_sin; not sure why
Fredrik Johansson
2008-09-27 20:33:44 +00:00
0886c0791c
split the bloated lib.py into libmpf.py and libelefun.py
Fredrik Johansson
2008-09-27 19:28:50 +00:00
957a444db0
more consistent and explicit naming scheme for lib functions: most mpf functions prefixed with mpf_* instead f*
Fredrik Johansson
2008-09-27 18:49:55 +00:00
124d202ee6
allow runtests.py to run only certain tests
Vinzent Steinberg
2008-09-26 20:46:24 +00:00
1dc0b2a5fc
make sure quadrature weights on [-1, 1] are fully symmetric
Fredrik Johansson
2008-09-26 14:03:45 +00:00
b86bb68ad9
arange: removed an old commented debug line and corrected docstring (still no optimal, but at least more correct)
Vinzent Steinberg
2008-09-26 13:57:49 +00:00
a7476077b0
there already is a sign function, defined in mptypes.py
Fredrik Johansson
2008-09-26 12:55:58 +00:00
94b8af1782
slightly different angle reduction strategy for computing cos/sin. implemented interval trigonometric functions (intervals crossing quadrants are not yet supported in all cases)
Fredrik Johansson
2008-09-26 12:47:05 +00:00
5c744b8740
better support for linear complex equation systems
Vinzent Steinberg
2008-09-26 08:50:12 +00:00
df78f23cac
fixed a force_type check
Vinzent Steinberg
2008-09-24 10:31:48 +00:00
06eecc9272
Started cleaning up mptypes, especially mpf methods. Using code generation to make maintenance easier without sacrificing performance. Sped up some mixed-type operations by handling them directly in mpf arithmetic methods, resulting in a total ~5% speed improvements for the tests.
Fredrik Johansson
2008-09-23 21:41:41 +00:00
ae9bc70505
refactoring related to types and precision management
Fredrik Johansson
2008-09-20 16:41:03 +00:00
244d0b61a2
Implemented basic linear algebra, '-local' flag for runtests.py
Vinzent Steinberg
2008-09-13 11:50:20 +00:00
522300fb68
placeholder implementation of stieltjes constants
Fredrik Johansson
2008-09-07 12:02:41 +00:00
b282c6bdf9
put back maxlevel option for quadrature
Fredrik Johansson
2008-09-07 11:47:15 +00:00
c891ebc81a
functions requiring a final division (tan, cosh, sinh, tanh) require higher precision to produce correct rounding
Fredrik Johansson
2008-09-07 11:46:41 +00:00
ba4184db1e
docstring cleanup
Fredrik Johansson
2008-09-07 11:44:12 +00:00
e7a470045f
permit ylimits and saving to file as options to plot()
Fredrik Johansson
2008-09-05 12:57:13 +00:00