Skip to content

Instantly share code, notes, and snippets.

View christofelfferich's full-sized avatar
🏝️

Christof Elfferich christofelfferich

🏝️
View GitHub Profile
@bellbind
bellbind / zeta.js
Last active January 20, 2021 17:35
[javascript]complex arith and Riemann zeta function implementations
// Complex type
var Complex = function (real, imag) {
if (real instanceof Complex) return real;
imag = imag || 0;
return Object.freeze(Object.create(Complex.prototype, {
real: {value: real, enumerable: true},
imag: {value: imag, enumerable: true},
}));
};
Complex.fromPolar = function (r, theta) {