Skip to content

Cpx2 (class)

vmathmachine edited this page Jul 13, 2022 · 2 revisions

Cpx2 is a static subclass of the Cpx class.

Cpx2 is like Cpx, containing a bunch of static methods which act on their parameters, rather than an instance that comes before it with a dot in between. However, unlike Cpx, which contains elementary functions, Cpx2 is for special functions, such as the gamma function, the error function, the Riemann zeta function, elliptic integrals, etc.

As of right now, the only special functions implemented are the gamma function and related functions.

To read my official documentation on the fields and methods in Cpx2, please see the reference javadocs included with the Complex Number Library. You can access these by opening Processing, then at the top of the window, click Help -> Libraries Reference -> Complex Numbers (assuming you have the Complex Number Library downloaded). Then, from there, press the link to "Cpx2". You do not need an internet connection for this to work. :) Alternatively, if you want to access them manually, you can simply go into your Processing sketchbook folder, then open libraries -> ComplexNumberLibrary -> reference -> complexnumbers -> Cpx2.html.

Fields

Bernoulli is an array of the Bernoulli numbers, each stored as doubles. In certain situations, it might be useful to define the Bernoulli number B₁ to be +0.5 or -0.5. In this library, we define Bernoulli[1] to be +0.5. It should be noted that all elements with odd indices (except 1) are 0, that's just how the Bernoulli numbers work. These numbers can be very useful for several algorithms.

Methods

Gamma and Related Functions

To see in depth detail on the Gamma function and related functions, see this page. It's pretty advanced math, but if there's anything you think I ought to clarify, please email me at mathmachine4@gmail.com.

Error Function and Related Functions

To be added in update 1.1.0.

Riemann Zeta Function and Related Functions

To be added in update 1.2.0.

Probably will not be reliable enough to search for counter-examples to the Riemann Hypothesis.

Clone this wiki locally