From: Ethan A M. <me...@uw...> - 2020-10-10 02:30:31
|
Since splitting off the stable branch for version 5.4 a year ago, I have been working on new directions for development. One of these is the expansion of support for complex functions and in particular for complex special functions. These are generally incomplete or altogether missing in other packages, so it is an area where gnuplot can fill a gap. This work is now merged into the main git repository. Demos for some of the additions are in the on-line collection: http:/gnuplot.info/demo_5.5/ You can exercise them interactively in a new demo load 'special_functions.dem' Here is a summary from the documentation. The full manual contains additional information about the implementations with references. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% This version of gnuplot provides a larger set of complex-valued functions and updated versions of functions that were present in earlier versions. * Updated incomplete gamma function with improved domain and precision. Complex arguments accepted. * Updated incomplete beta function with improved domain and precision. * New function for the inverse incomplete gamma function. * New function for the inverse incomplete beta function. * New complex function LambertW(z,k) returns the kth branch of multivalued function W_k(z). Note that the older function lambertw(x) = real(LambertW( real(z), 0 )). * New complex function lnGamma(z). Note that existing function lgamma(x) = real(lnGamma(real(z)). * Synchrotron function F(x). * acosh(z) domain extended to cover negative real axis. * asin(z) asinh(z) improved precision for complex arguments. * Complex function conj(z) returns the complex conjugate of z. * Predefined variable I = sqrt(-1) = {0,1} for convenience. Additional special functions are supported if a suitable external library is found at build time. * Complex Bessel functions Iν(z), Jν(z), Kν(z), Yν(z) of order ν (real) with complex argument z. * Complex Hankel functions H1ν(z), H2ν(z) of order ν with complex z. * Complex Airy functions Ai(z), Bi(z). * Complex exponential integral of order n. * Fresnel integrals C(x) and S(x). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% There is room for further development. Please add comments and suggestions! - Existing built-in functions, old and new, are inconsistent about how they return very large values (floating overflow) Some return VERYLARGE (system-dependent but generally 9.e+307) Some return NaN Some return +Inf It would be nice to agree on a uniform convention and on how to handle it while plotting. - Support for complex igamma(z) in the domain real(z) < 0 - Support for complex elliptic integrals - Modify "fit" to automatically handle complex-valued functions - Support is dependent on external libraries found during configuration (libcerf libopenspecfun libamos). Many linux distros have packages for libcerf and libopenspecfun. I don't know how available they are for Windows or OSX. Much of the code in these libraries originally came from netlib and could be included in the gnuplot repository if we wanted to do so. Ethan |