Documentation
When the weight of the paperwork equals the weight of the plane, the plane will fly.
This documentation is complete. In the case of incompleteness see the source to complete.
- Array.prototype.push()
- Array.prototype.pop()
- Array.prototype.whichtype()
- Array.prototype.xwhichtype()
- Array.prototype.memset(s)
- Array.prototype.swap(i,j)
- Array.prototype.max()
- Array.prototype.min()
- Array.prototype.forEach(f)
- Array.prototype.indexOf(s)
- Array.prototype.uniqOnCopy()
- Array.prototype.walkOnCopy(f)
- Array.prototype.walk(f)
- Array.prototype.insert(i,element)
- Array.prototype.bytesToNumber(min)
- Array.prototype.everyNth(n,f)
- Array.prototype.sum(f)
- Array.prototype.cumsum()
- Array.prototype.sumCol(n)
- Array.prototype.sumRow(n)
- Array.prototype.product(f)
- Array.prototype.countSingle(s)
- Array.prototype.countAll()
- Array.prototype.monteCarloPi()
- Array.prototype.chisqSingle(df)
- Array.prototype.correlationCoefficient(y)
- Array.prototype.rsquare(y)
- Array.prototype.linearRegression(y)
- Array.prototype.entropy(df)
- Math.polyEval(x,coeff,degree)
- Math.polyOneEval(x,coeff,degree)
- Math.besselj0(x)
- Math.besselj1(x)
- Math.bessely1(x)
- Math.bessely0(x)
- Math.besseljn(n,x)
- Math.besselyn(n,x)
- Math.besseli0(x)
- Math.besseli1(x)
- Math.besselk0(x)
- Math.besselk1(x)
- Math.besseliv(v,x)
- Math.besselkn(nn,x)
- Math.hyperg(a,b,x)
- Math.chbevl(x,coeff,n)
- Math.zetaHur(x,q)
- Math.zetaRieC(x)
- Math.zeta(x)
- Math.laguerre(a,n,x)
- Math.expoInt(x)
- Math.dilog(x)
- Math.bloomfilterDimensions(fault,number)
- Math.catalan(n)
- Math.fresnel(xa)
- Array.prototype.comb(k)
- Array.prototype.perm()
- Array.prototype.subsets()
- Math.partition(n)
- Complex(a,b)
- Complex.prototype.toString(b)
- Number.prototype.toComplex(i)
- String.prototype.toComplex()
- Complex.prototype.isInteger()
- Complex.prototype.isRe()
- Complex.prototype.isIm()
- Complex.prototype.equal(i,tol)
- Complex.prototype.add(i)
- Complex.prototype.sub(i)
- Complex.prototype.mult(i)
- Complex.prototype.divExact(i)
- Complex.prototype.mod(i)
- Complex.prototype.fmod(i)
- Complex.prototype.abs()
- Complex.prototype.conj()
- Complex.prototype.inv()
- Complex.prototype.minus()
- Complex.prototype.sqrt()
- Complex.prototype.log()
- Complex.prototype.exp()
- Complex.prototype.pow(y)
- Complex.prototype.cart2pol()
- Complex.prototype.pol2cart()
- Complex.prototype.sin()
- Complex.prototype.sinh()
- Complex.prototype.cos()
- Complex.prototype.cosh()
- Complex.prototype.tan()
- Complex.prototype.tanh()
- Complex.prototype.asin()
- Complex.prototype.acos()
- Complex.prototype.atan()
- Complex.prototype.cot()
- Complex.prototype.coth()
- Complex.prototype.sec()
- Complex.prototype.sech()
- Complex.prototype.csc()
- Complex.prototype.csch()
- Complex.prototype.asinh()
- Complex.prototype.acosh()
- Complex.prototype.atanh()
- Complex.prototype.acsc()
- Complex.prototype.acsch()
- Complex.prototype.asec()
- Complex.prototype.asech()
- Complex.prototype.acot()
- Complex.prototype.acoth()
- Complex.prototype.arg()
- Complex.prototype.gcd(i)
- Complex.prototype.lcm(i)
- Complex.prototype.max(i)
- Complex.prototype.min(i)
- Complex.prototype.gt(i)
- Complex.prototype.lt(i)
- Complex.prototype.le(i)
- Complex.prototype.ge(i)
- Complex.prototype.isNaN()
- Complex.prototype.div(i)
- Complex.prototype.mult2(i)
- Math.cgamma(a)
- Math.logCgamma(a)
- Math.cincompleteGamma(x,a,l)
- Math.cgammaP(a,x)
- Math.cgammaQ(a,x)
- Math.gamma(a)
- Math.logGamma(a)
- Math.incompleteGamma(x,a)
- Math.incompleteGammaOct(x,a,l)
- Math.gammaP(a,x)
- Math.gammaQ(a,x)
- Math.gammaCDF(x,a,b)
- Math.gammaPDF(x,a,b)
- Math.gammaInv(x,a,b)
- Math.digamma(n)
- Math.cdigamma(n)
- Math.beta(a,b)
- Math.logBeta(a,b)
- Math.regularizedBeta(x,a,b)
- Math.incompleteBeta(x,a,b)
- Math.betaPDF(x,a,b)
- Math.betaCDF(x,a,b)
- Math.betaInv(x,a,b)
- Math.chiSquarePDF(p,df)
- Math.chiSquareCDF(p,df)
- Math.chiSquareInv(p,df)
- Math.chiProb(chisq,df)
- Array.prototype.chisq(df)
- Math.erf(a)
- Math.complErf(a)
- Math.binomialCoefficient(n,k)
- Math.binomialPDF(n,k,p)
- Math.binomialCoefficientLog(n,k)
- Math.binomialPDFLog(n,k,p)
- Math.binomialCDF(n,k,p)
- Math.logNormalPDF(x,logmean,variance)
- Math.logNormalCDF(x,logmean,variance)
- Math.normalPDF(x,mean,variance)
- Math.normalCDF(x,mean,variance)
- Math.normalInv(x,mean,variance)
- Array.prototype.studentize()
- Math.studentPDF(x,df)
- Math.studentCDF(x,df)
- Math.studentInv(x,df)
- Math.logisticPDF(x)
- Math.logisticCDF(x)
- Math.logisticInv(x)
- Math.weibullPDF(x,a,s)
- Math.weibullCDF(x,a,s)
- Math.weibullInv(x,a,s)
- Math.kolsmirCDF(x)
- Math.uniformPDF(x,a,b)
- Math.uniformCDF(x,a,b)
- Math.uniformInv(x,a,b)
- Math.exponentialPDF(x,lambda)
- Math.exponentialCDF(x,lambda)
- Math.exponentialInv(x,lambda)
- Math.cauchyPDF(x,lambda,sigma)
- Math.cauchyCDF(x,lambda,sigma)
- Math.cauchyInv(x,lambda,sigma)
- Math.discretePDF(x,v,p)
- Math.discreteCDF(x,v,p)
- Math.discreteInv(x,v,p)
- Math.empiricalPDF(x,v)
- Math.empiricalCDF(x,v)
- Math.empiricalInv(x,v)
- Math.fPDF(x,m,n)
- Math.fCDF(x,m,n)
- Math.fInv(x,m,n)
- Math.geometricPDF(x,p)
- Math.geometricCDF(x,p)
- Math.geometricInv(x,p)
- Math.hypergeometricPDF(x,m,t,n)
- Math.hypergeometricCDF(x,m,t,n)
- Math.hypergeometricInv(x,m,t,n)
- Math.laplacePDF(x)
- Math.laplaceCDF(x)
- Math.laplaceInv(x)
- Math.pascalPDF(x,n,p)
- Math.pascalCDF(x,n,p)
- Math.pascalInv(x,n,p)
- Math.poissonPDF(x,lambda)
- Math.poissonCDF(x,lambda)
- Math.poissonInv(x,lambda)
- Math.DIELPE
- Math.DIELPTFE
- Math.DIELAIR
- Math.DIELCOCA
- Math.DIELSF6
- Math.capacitorCylinder(inner,outer,len,e)
- Math.cfft(arr,dir)
- Math.integerPart(a)
- Math.fractionalPart(a)
- Math.nint(a)
- Math.triangleAreaHeron(a,b,c)
- Math.triangleAreaSideAngle(a,b,alpha)
- Math.triangleAreaCatheti(a,b)
- Math.triangleAreaHeight(s,h)
- Math.encircledPolygonsSide(angles,side)
- Math.encircledPolygonsRadius(angles,radius)
- Math.encircledPolygonsOutCircum(number,radius)
- Math.encircledPolygonsOutArea(number,radius)
- Math.encircledPolygonsInCircum(number,radius)
- Math.encircledPolygonsInArea(number,radius)
- Math.encircledPolygonsSide(number,radius)
- Math.coneVolume(radius,height)
- Math.coneMantle(radius,side)
- Math.coneArea(radius,side)
- Math.coneSide(radius,height)
- Math.coneHeight(radius,side)
- Math.circleCircumference(radius)
- Math.circleArea(radius)
- Math.circleSecant(radius,alpha)
- Math.circleCircumferencePartial(radius,alpha)
- Math.circleSegmentArea(radius,alpha)
- Math.circleCutArea(radius,alpha)
- Math.circleRingArea(radius_large,radius_small)
- Math.ellipsisAreaAxis(a,b)
- Math.ellipsisAreaDiameter(large,small)
- Math.lameCurveArea(n,a,b)
- Math.lameCurveVolume(x,y,z,n,e)
- Math.sphereVolume(radius)
- Math.sphereArea(radius)
- Math.sphereCircumference(radius)
- Math.sphereCapVolumeFootpoint(radius,height)
- Math.sphereCapVolumeRadius(radius,height)
- Math.torusVolume(radius,distance)
- Math.torusArea(radius,distance)
- Number.prototype.isHappy()
- Heatstore.heatstoreCalcTime(tempuser,tempstoreend,tempstorebegin,coeff,exchanger,capa,masse)
- Heatstore.heatstoreCalcTempuser(time,tempstoreend,tempstorebegin,coeff,exchanger,capa,masse)
- Heatstore.heatstoreCalcTempstoreend(time,tempuser,tempstorebegin,coeff,exchanger,capa,masse)
- Heatstore.heatstoreCalcTempstorebegin(time,tempuser,tempstoreend,coeff,exchanger,capa,masse)
- Heatstore.heatstoreCalcCoeff(time,tempuser,tempstoreend,tempstorebegin,exchanger,capa,masse)
- Heatstore.heatstoreCalcExchanger(time,tempuser,tempstoreend,tempstorebegin,coeff,capa,masse)
- Heatstore.heatstoreCalcCapa(time,tempuser,tempstoreend,tempstorebegin,coeff,exchanger,masse)
- Heatstore.heatstoreCalcMasse(time,tempuser,tempstoreend,tempstorebegin,coeff,exchanger,capa)
- Math.logBarnesG(n)
- Math.logKFunction(n)
- Math.logHyperFactorial(n)
- Math.interrestCompoundFinal(capital,interest,term)
- Math.interrestCompoundInterest(capital,final,term)
- Math.interrestCompoundTerm(capital,final,interest)
- Math.interrestCompoundCapital(final,interest,term)
- Math.levenshtein(s,t)
- Math.levenshtein_weighted(s,t,wins,wsub,wdel)
- Math.lucas(n)
- Math.EPSILON(()
- Math.ONEEPSILON
- Math.MAX_FACTORIAL(()
- Math.AI0
- Math.AI0D
- Math.ARCT12
- Math.ARTIN
- Math.ATANPI
- Math.B1
- Math.BACKH
- Math.BERNST
- Math.BRUN2
- Math.BRUN4
- Math.C2
- Math.C3
- Math.C4
- Math.C5
- Math.C6
- Math.C7
- Math.C8
- Math.C9
- Math.C10
- Math.C11
- Math.C12
- Math.C13
- Math.C14
- Math.C15
- Math.C16
- Math.CAHEN
- Math.CATA
- Math.CHAMP
- Math.CONTFR
- Math.CONWAY
- Math.COPEL
- Math.COS1
- Math.COSH1
- Math.CUBR2
- Math.CUBR3
- Math.DUBRAY
- Math.EM
- Math.EMBTR
- Math.ERDBOR
- Math.EXP1E
- Math.EXPE
- Math.EXPE1EI
- Math.EXPG
- Math.EXPP2
- Math.EXPP4
- Math.EXPPP
- Math.EXPPPE
- Math.FEIGA
- Math.FEIGB
- Math.FEIGC
- Math.FEIGD
- Math.FEIGDA
- Math.FIBOFAC
- Math.FRANS
- Math.FRODA
- Math.GAM13
- Math.GAM14
- Math.GAM16
- Math.GAM23
- Math.GAM34
- Math.GAM56
- Math.GAMCUB
- Math.GAMEXP1
- Math.GAMMA
- Math.GAMSQ
- Math.GELF
- Math.GIBBS
- Math.GKW
- Math.GLAIKINK
- Math.GOLDEN
- Math.GOLOMB
- Math.GROTH
- Math.HADAM
- Math.HAFNER
- Math.HARDHEX
- Math.INVOMEGA
- Math.KHINCH
- Math.KHINTCH
- Math.KINTCH1
- Math.KINTCH10
- Math.KINTCH2
- Math.KINTCH3
- Math.KINTCH4
- Math.KINTCH5
- Math.KINTCH6
- Math.KINTCH7
- Math.KINTCH8
- Math.KINTCH9
- Math.KOMOR
- Math.LANDRAM
- Math.LAPLIM
- Math.LEHMER
- Math.LEMNI
- Math.LENGYEL
- Math.LEVY
- Math.LOG22
- Math.LOG2PI
- Math.LOG3
- Math.LOG3LOG2
- Math.LOG4LOG3
- Math.LOG5
- Math.LOGGAM
- Math.LOGLOG2
- Math.LOGPHI
- Math.LOGPI
- Math.MADEL
- Math.MAGATA
- Math.MEIMER
- Math.NICE
- Math.NIVEN
- Math.OMEGA
- Math.ONE19TH
- Math.ONE9TH
- Math.ONE_PI
- Math.PARIS
- Math.PARK
- Math.PISVIJ
- Math.PI_2
- Math.PI_4
- Math.PLASTIC
- Math.PORTER
- Math.PRIMINV
- Math.RABIT
- Math.RAMSOLD
- Math.RECFIB
- Math.ROBIN
- Math.SALEM
- Math.SIERP
- Math.SIN1
- Math.SINH1
- Math.SQRT10
- Math.SQRT3
- Math.SQRT2PI
- Math.SQRT5
- Math.SQRT7
- Math.SQRTPI
- Math.TRAVEL
- Math.TRIBO
- Math.TWO14
- Math.TWO_PI
- Math.TWO_SQRTPI
- Math.U
- Math.UNIPAR
- Math.VISW
- Math.WEIER
- Math.Z3
- Math.ZETA12
- Math.ZETA2
- Math.ZETA3
- Math.ZETA4
- Math.ZETA5
- Math.ZETA7
- Math.ZETA9
- Math.ZETAD2
- Math.ZETADM1
- Math.AU
- Math.AVOGADRO
- Math.BOLTZMAN
- Math.CANDLM
- Math.CANDTHZ
- Math.CANDTHZV
- Math.DIRAC
- Math.GASCONST
- Math.KGMOLH2O
- Math.LIGHT
- Math.LIGHTYEAR
- Math.MPERM
- Math.NEWTONG
- Math.PARSEC
- Math.PLANCK
- Math.SECYEAR
- Math.STEFBOLTZ
- Math.SUNAMAG
- Math.SUNLUM
- Math.EPERM
- Math.WIENC
- Math.isInteger(x)
- Math.factorial(n)
- Math.doubleFactorial(n)
- Math.logDoubleFactorial(n)
- Math.logarithm(a,base)
- Math.log2(a)
- Math.log10(a)
- Math.loglog(a)
- Math.uniformDeviate(n,rmax)
- Math.uniformDeviateRange(n,rmin,rmax,RAND_MAX)
- Math.factor(n0,max_n_factors)
- Math.gcd(a,b)
- Math.lcm(a,b)
- Math.sign(x)
- Number.prototype.truncate(n)
- Math.truncate(f,n)
- Math.matrixv2m(v)
- Math.isPow2(n)
- Math.isPow10(n)
- Math.isPowE(n)
- Math.nextPow2(n)
- Math.nextPow10(n)
- Math.nextPowE(n)
- Math.nBits(n)
- Math.bitReverse(n)
- Array.prototype.matrixform()
- Array.prototype.matrixlength()
- Array.prototype.matrixrank()
- Array.prototype.matrixplus(m)
- matrixplus(a,m)
- Array.prototype.matrixminus(m)
- matrixminus(a,m)
- Array.prototype.matrixtimes(m)
- matrixtimes(a,m)
- Array.prototype.matrixdet()
- matrixdet(a)
- Array.prototype.matrixtrans()
- matrixtrans(a)
- Array.prototype.matrixadjoint()
- matrixadjoint(a)
- Array.prototype.matrixinv()
- matrixinv(a)
- matrixidentity(size)
- matrixones(size)
- matrixart(col,row,n)
- Array.prototype.matrixregularize(n)
- matrixregularize(a,n)
- Array.prototype.matrixround(n)
- matrixround(a,n)
- Math.kroneckerDelta()
- Array.prototype.matrixrot()
- matrixrot(m)
- Array.prototype.matrixtrace()
- matrixtrace(m)
- Array.prototype.matrixmult(m)
- matrixmult(a,m)
- Array.prototype.matrixpow(n)
- matrixpow(m,n)
- Math.roots2(A,B,C)
- Math.roots3(A,B,C,D)
- Array.prototype.eigenvalue2x2()
- Array.prototype.eigenvalue3x3()
- Matrix.NaM'NaMat'
- Matrix(rows,cols,type)
- String.prototype.parseMatrix()
- Matrix.prototype.equal(m)
- Matrix.prototype.isEmpty()
- Matrix.prototype.form()
- Matrix.prototype.size()
- Matrix.prototype.trans()
- Matrix.prototype.conjTrans()
- Matrix.prototype.rot(conj)
- Matrix.prototype.add(m)
- Matrix.prototype.sub(m)
- Matrix.prototype.mult(m)
- Matrix.prototype.div(m)
- Matrix.prototype.rot90()
- Matrix.prototype.trace()
- Matrix.prototype.det()
- Matrix.prototype.adj()
- Matrix.prototype.inv()
- Complex.prototype.toPrecision(n)
- Complex.prototype.round()
- Complex.prototype.nint()
- pauli()
- Matrix.prototype.copy()
- Matrix.prototype.setZeroAt(limit)
- Array.prototype.setZeroAt(limit,useAbs)
- Array.prototype.equal(a)
- Matrix.prototype.diag()
- Matrix.prototype.LU()
- Matrix.prototype.isNonSingular()
- Matrix.prototype.toPrecision(n)
- Array.prototype.toPrecision(n)
- Math.hypot(a,b)
- Matrix.prototype.QR()
- Matrix.prototype.cond(limit)
- Matrix.prototype.rank(limit)
- Matrix.prototype.rankcond(type,limit)
- Matrix.prototype.svd(svdonly)
- Matrix.prototype.orthess()
- Matrix.prototype.hess()
- Matrix.prototype.eigen()
- Matrix.prototype.Re()
- Matrix.prototype.Im()
- Array.prototype.toMatrix(m)
- Matrix.prototype.isReal()
- Matrix.prototype.isComplex()
- range(a)
- Array.prototype.range()
- harmonMean(a)
- Array.prototype.harmonMean()
- geoMean(a)
- Array.prototype.geoMean()
- squareMean(a)
- Array.prototype.squareMean()
- arithMean(a,f)
- Array.prototype.arithMean(f)
- logArithMean(a)
- Array.prototype.logArithMean()
- powerMean(a,n)
- Array.prototype.powerMean(n)
- Math.arithGeoMeanTwo(a,b)
- arithGeoMean(a)
- Array.prototype.arithGeoMean()
- Math.geoHarmonMeanTwo(a,b)
- geoHarmonMean(a)
- Array.prototype.geoHarmonMean()
- arithHarmonMean(a)
- Array.prototype.arithHarmonMean()
- weightedGeoMean(a,w)
- Array.prototype.weightedGeoMean(w)
- weightedArithMean(a,w)
- Array.prototype.weightedArithMean(w)
- weightedHarmonMean(a,w)
- Array.prototype.weightedHarmonMean(w)
- median(a,f)
- Array.prototype.median(f)
- mode(a)
- Array.prototype.mode()
- variance(a)
- Array.prototype.variance()
- logVariance(a)
- Array.prototype.logVariance()
- coVariance(a,y)
- Array.prototype.coVariance(y)
- standardDev(a)
- Array.prototype.standardDev()
- logStandardDev(a)
- Array.prototype.logStandardDev()
- averageDev(a)
- Array.prototype.averageDev()
- geoStandardDev(a)
- Array.prototype.geoStandardDev()
- Array.prototype.skewness()
- Array.prototype.kurtosis()
- Array.prototype.kurtosisZero()
- Math.pendulumPeriod(length,g)
- Math.pendulumLength(period,g)
- Math.fallingObjectsDistance(time,g)
- Math.fallingObjectsTime(distance,g)
- Math.ballisticalCurve(speed,angle,grav)
- Math.forceGravityTwo(mone,mtwo,distance)
- Math.escapeVelocity(mass,radius)
- Math.accellerationGravity(mass,radius)
- Math.boltzmannSpeed(temp,mass)
- Math.lorenzFactor(speed)
- Math.timeDilation(time,speed)
- Math.lengtContraction(length,speed)
- Math.sumSpeed(one,two)
- Math.massMovingBody(mass,speed)
- Math.redshiftVelocity(redshift)
- Math.redshiftScaling(redshift)
- Math.redshiftDistance(speed,hubble)
- Math.deBroglie(mass,speed)
- Math.compton(mass)
- Math.photonExitWork(f)
- Math.photonEnergy(f)
- Math.photonMass(f)
- Math.photonImpulse(f)
- Math.dopplerMovingSender(freq,speed,direction,maxspeed)
- Math.dopplerMovingReceiver(freq,speed,direction,maxspeed)
- Math.angularFrequency(f)
- Math.bodyWavelength(mass,speed)
- Math.blackBodyRadiation(temp,wlen)
- Math.luminosityStar(temp,radius)
- Math.apparentMagnitude(lum,distance)
- Math.nthFibonacci(n)
- String.prototype.rot13()
- String.prototype.toWordArray()
- String.prototype.toWordArrayASCII()
- String.prototype.wordCount()
- String.prototype.wordCountASCII()
- String.prototype.wordCountUniq()
- String.prototype.wordCountUniqASCII()
- String.prototype.wc()
- String.prototype.wcASCII()
- String.prototype.charFreq()
- Math.schwarzschildRadius(mass)
- Math.wienTemperature(wlen)
- Math.wienWavelength(temp)
- Math.circularVelocitySpeed(mass,distance)
- Math.circularVelocityMass(distance,speed)
- Math.circularVelocityDistance(mass,speed)
- Math.blackHoleEntropy(area)
- Math.stellarPressure(radius_star,radius,density)
- Math.stellarHydroTemperature(mass,mm,radius_star)
- Math.stellarHydroMass(temp,mm,radius_star)
- Math.specificAngularMomentum(mass,semimaj,ecc)
- Math.eccentricity(mass,sam,semimaj)
- Math.gravitationalEnergy(massc,masso,sam)
- Math.gravitationalPotentialEnergy(massc,masso,distance)
- Math.meanMotion(period)
- Math.kineticEnergy(mass,speed)
- Math.totient(n)
- Math.coprime(a,b)
- Matrix.prototype.norm(v)
- Matrix.prototype.col(n)
- Matrix.prototype.row(n)
- Matrix.prototype.sum()
- Matrix.prototype.prod()
- Matrix.prototype.max()
- Matrix.prototype.min()
- Matrix.prototype.abs()
- plotxy2(x,y,size,color)
- Math.plotCircle(radius,center)
- Math.plotLameCurve(n,a,b,center)
- Number.prototype.toRoman(lower)
- String.prototype.toArabic()
- Math.setminus(a,b,s)
- Math.union(a,b)
- Math.intersection(a,b)
- Math.times(a,b)
- Math.timesFunction(a,b,f)
- Hashes.SHA256(input)
- Hashes.SHA256hex(s)
- Hashes.SHA256test()
- Hashes.crc32(data)
- Math.simil(s,t)
- Math.generalPartialHarmon(n,m)
- Math.cgeneralPartialHarmon(n,m)
- Math.partialHarmon(n)
- Math.cpartialHarmon(n)
- Math.bernoulli(x)
- Math.chebychevInteger(x,n)
- Math.chebychevIntegerZero(n,j)
- Math.chebychevIntegerZeroesAll(n)
- Math.pochhammerExact(a,n)
- Math.cpochhammerExact(a,n)
- Math.pochhammer(x,n)
- Math.cpochhammer(x,n)
- Math.logPochhammer(x,n)
- Math.logCpochhammer(x,n)
- Math.economicOrderQuantity(x,B,e,i)
- Array.prototype.studentTest(mean,which)
- Array.prototype.studentTestTwo(y,which)
- Array.prototype.anova()
- Array.prototype.fisherexact()
- Array.prototype.contingencychisq(debug)
- Array.prototype.bartlett()
- Array.prototype.hotelling(m)
- Array.prototype.hotelling2(y)
- Array.prototype.kruskalWallis()
- Array.prototype.ranks()
- Array.prototype.addArray(a)
- Array.prototype.copyVal()
- Array.prototype.signTest(y,alt)
- Array.prototype.varTest(y,alt)
- Array.prototype.welchTest(y,alt)
- Math.stdnormalPDF(x)
- Math.stdnormalCDF(x)
- Math.stdnormalInv(x)
- Math.erfInv(x)
- Math.rad2deg(r)
- Math.deg2rad(d)
- Math.grad2rad(g)
- Math.rad2grad(r)
- Math.deg2grad(d)
- Math.grad2deg(g)
- Math.latLongClassic2Decimal(deg,min,sec,hem)
- Math.decimal2LatLongClassic(deg,dir)
- Math.decimal2LatClassic(deg)
- Math.decimal2LongClassic(deg)
- Math.cartesian2sphereCoord(x,y,z)
- Math.cartesian2sphereUnit(ex,ey,ez,r,t,a)
- Math.cylinder2cartesianCoord(p,a,z)
- Math.cylinder2cartesianUnit(ep,ea,ez,alpha)
- Math.sphere2cartesianCoord(radius,theta,alpha)
- Math.sphere2cartesianUnit(er,et,ea,radius,theta,alpha)
- Math.cylinder2sphereCoord(p,a,z)
- Math.cylinder2sphereUnit(ep,ea,ez,theta)
- Math.sphere2cylinderCoord(radius,theta,alpha)
- Math.sphere2cylinderUnit(er,et,ea,theta)
- Math.cosh(a)
- Math.sinh(a)
- Math.tanh(a)
- Math.coth(a)
- Math.acosh(a)
- Math.asinh(a)
- Math.atanh(a)
- Math.acoth(a)
- Math.cot(a)
- Math.acot(a)
- Math.sec(a)
- Math.csc(a)
- Math.cosec(a)
- Math.sem(a)
- Math.asem(a)
- Math.atan2log(x,y,i)
- Math.atan2(y,x)
- Math.trigHeight(AC,alpha)
- Math.trigDiagonal(CB,alpha)
- Math.trigPythagoras(a,b)
- Math.trigParallaxHeight(a,gamma)
- Math.trigGeometrician(AB,alpha,beta)
- Math.trigSphereAngle(latStart,longStart,latDest,longDest)
- Math.trigSphereDistance(latStart,longStart,latDest,longDest,radius)
- Math.trigSphereDirection(latStart,longStart,latDest,longDest)
- Math.trigSphereDeclination(azimuth,zenitDist,latitude)
- Math.trigSphereLatitude(decOne,zenitOne,azimutOne,
- Math.trigSphereRise(declination,latitude)
- Math.trigSphereSunDial(latitude,hour)
- Math.refraction(alpha,pressure,temperature)
- String.prototype.typeerrors(keyb)
- Math.seriesorder(a)
- Math.fortytwo(s)
- Math.buildSolutionTest(m)
- Math.solvelinear(m,v)
- xtypeof(t)
- String.prototype.csv2array(f)
- Vector(length,value)
- Vector.prototype.size()
- Vector.prototype.abs()
- Vector.prototype.dot(v)
- Vector.prototype.cross(v)
- Vector.prototype.add(v)
- Vector.prototype.sub(v)
- Vector.prototype.mulScalar(n)
- Vector.prototype.divScalar(n)
- Vector.prototype.forEach(f)
- Math.weierstrassRational(p,q)
- Math.logBarnesGReal(z)
- Math.decimal2Rational(a)
- Math.reduceFraction(arr)
- Math.addFractions(a,b)
- Math.subtractFractions(a,b)
- Math.multiplyFractions(a,b)
- Math.divideFractions(a,b)
- Math.polyGamma(n,z)
Array.
push(), missing from older IEs. Concatenates all of its arguments in the given order at the end of the array.
any
any argument given will be concatenated
Returnthe length of the array after concatenating
Since0.0.1
Version0.0.1
Array.
pop(), missing from older IEs. Cuts the last element in the array and returns it.
Returnthe last element of the array
Since0.0.1
Version0.0.1
Tries to find out the type of all elements of the array iff they are all of the same type.
This function compares all elements of the array and only if they are of the same type returns the result of the
typeof
operator. Returnthe type of all elements or undefined.
Since0.0.1
Version0.0.1
Seexwhichtype
Tries to find out the type of all elements of the array iff they are all of the same type.
This function compares all elements of the array and only if they are of the same type returns the result of the
xtypeof
operator. Returnthe type of all elements or undefined.
Since0.0.1
Version0.0.2
Seextypeof
Sets all elements of the array to the specified value.
Port of the function memset(3) as described in ISO/IEC 9899:1999 7.21.6.1 to Javascript.
any
the value that all elements shall take
Returnthe edited array
Since0.0.1
Version0.0.1
Swaps the two elements given in the array.
Uses a temporary memory while swapping, so no dirty tricks are used here.
i
the position of the first value to be swapped
j
the position of the the second value to be swapped
Returnthe edited array
Since0.0.1
Version0.0.1
Finds the largest value in the array.
Does not rely on numerical elements but ignores them. Precautions should be taken by the user (for example with
Array.xwhichtype
). Returnthe largest element in the array or undefined
Since0.0.1
Version0.0.1
Finds the smallest value in the array.
Does not rely on numerical elements but ignores them. Precautions should be taken by the user (for example with
Array.xwhichtype
). Returnthe smallest element in the array or undefined
Since0.0.1
Version0.0.1
Processes every element in the array with a given function.
The given function must take one and only one argument. This is the function from Mozilla/Firefox.
f
a function to edit every element with
Returnthe edited array
Since0.0.1
Version0.0.1
Finds the index in the array of the given element.
s
the element searched for
Returnthe index in the array of the given element or -1
Since0.0.1
Version0.0.1
Eliminates all multiple occurances of elements in the array.
Returnthe edited array
Since0.0.1
Version0.0.1
Processes every element in the array with a given function.
The given function must take one and only one argument. The main difference between this function and
Array.forEach()
is that this function works on a copy of the given array.
f
a function to edit every element with
Returna copy of the edited array
Since0.0.1
Version0.0.1
Processes every element in the array with a given function.
The given function must take one and only one argument. The usefulness of this function is questionable.
f
a function to edit every element with
Returnnothing will be returned by this function
Since0.0.1
Version0.0.1
Insert given element at given place If the place given is a negative number the element will be inserted at the given place, after it otherwise.
i
place to insert the new element
element
the new element to be inserted
Returna copy of the array with the inserted element
Since0.0.1
Version0.0.1
Builds numbers larger than
min
out of an array of numbers {@coden<256}. Padds with zeros if array.length is not congruential
0 mod ceil(ceil(log2(min))/8)
min
minimum value of generated number
Returnan array with the numbers
Since0.0.1
Version0.0.1
Picks every nth element of the array and optionally edits it with a given function.
The function must take one and only one argument.
n
the n in every nth, must be an integer value
f
the function every element picked shall be edited with
Returnthe array with the picked elements or undefined
Since0.0.1
Version0.0.1
Sums up all elements in the array and optionally edits them with a given function.
The function must take one and only one argument. Does not rely on numerical elements but ignores them. Precautions should be taken by the user (for example with
Array.xwhichtype
).
f
the function every element shall be edited with before summing
Returnthe sum
Since0.0.1
Version0.0.1
Calculates the cumulative sum of the elements in the array.
Does not rely on numerical elements but ignores them. Precautions should be taken by the user (for example with
Array.xwhichtype
). Returnthe cumulative sum
Since0.0.1
Version0.0.1
Calculates the sum of given column in the array.
Works only with the numerical values and ignores all other types.
n
the number of the column
Returnthe sum of the column
Since0.0.1
Version0.0.1
Calculates the sum of given row in the array.
Works only with the numerical values and ignores all other types.
n
the number of the row
Returnthe sum of the row
Since0.0.1
Version0.0.1
Calculates the product of all elements of the array and optionally edits them with a given function.
Does not rely on numerical elements but ignores them. Precautions should be taken by the user (for example with
Array.xwhichtype
).
f
the function every element shall be edited with before multiplying
Returnthe product
Since0.0.1
Version0.0.1
Counts the occurances of the given element in the array.
n/a
s
the element to be counted
Returnthe number of occurances
Since0.0.1
Version0.0.1
Counts the occurances of the every element in the array.
It returns an array with subarrays comprising a copy of the element counted and the count of it in that order.
Returnan array with all counts
Since0.0.1
Version0.0.1
Calculates the value of pi with a Monte Carlo method from the elements of the array.
It is shamelessly stolen from John Walker's program named
ent
. Does not rely on numerical elements but ignores them. Precautions should be taken by the user (for example with Array.xwhichtype
). Returnan approximation of pi
Since0.0.1
Version0.0.1
Calculates chi square value of the elements of the array with given degrees of freedom.
This calculates the chi^2 value over a single row---the array. For contingency tables with more than one row use
Array.contingencychisq
. Does not rely on numerical elements but ignores them. Precautions should be taken by the user (for example with Array.xwhichtype
).
df
the degrees of freedom
Returnthe chi square value
Since0.0.1
Version0.0.1
Calculates the correlation coefficient of the array and the given second sample.
If no second sample is given, it calculates the correlation coefficient with itself. Both samples must be of the same length and type. Does not rely on numerical elements but ignores them. Precautions should be taken by the user (for example with
Array.xwhichtype
).
y
an array with the second sample
Returnthe correlation coefficient
Since0.0.1
Version0.0.1
Calculates the r2 of the array and the given second sample.
If no second sample is given, it calculates the r2 with itself. Both samples must be of the same length and type. Does not rely on numerical elements but ignores them. Precautions should be taken by the user (for example with
Array.xwhichtype
).
y
an array with the second sample
Returnthe r2
Since0.0.1
Version0.0.1
Calculates the linear regression of the array and the given second sample.
If no second sample is given, it calculates the linear regression with itself. Both samples must be of the same length and type. Does not rely on numerical elements but ignores them. Precautions should be taken by the user (for example with
Array.xwhichtype
).
y
an array with the second sample
Returnan array with the two values
Since0.0.1
Version0.0.1
Calculates the entropy of the elements in the array with given degrees of freedom.
Does not rely on numerical elements but ignores them. Precautions should be taken by the user (for example with
Array.xwhichtype
).
df
the degrees of freedom
Returnthe entropy
Since0.0.1
Version0.0.1
Evaluates the polynomial of degree
degree
at x
with coefficients in reverse order given in the array coeff
. Ported from the Cephes files included in Grace 5.1.21, who have the permission to distribute it under the GPL. Original copyright of the Cephes Math Library Release 2.3: 1984, 1995 by Stephen L. Moshier.
x
the point at which the polynomial will be evaluated
coeff
an array with the coefficients of the polynomial in reverse order.
degree
the degree of the polynomial
Returnthe result of the numerical evaluation of the polynomial or undefined if
x
is not a number, the degree smaller than zero or if the length of the coefficient array is zero. Since0.0.3
Version0.0.1
LicenseGPL
Evaluates the polynomial of degree
degree
at x
with coefficients in reverse order given in the array coeff
with the coefficients of x set to 1. Ported from the Cephes files included in Grace 5.1.21, who have the permission to distribute it under the GPL. Original copyright of the Cephes Math Library Release 2.3: 1984, 1995 by Stephen L. Moshier.
x
the point at which the polynomial will be evaluated
coeff
an array with the coefficients of the polynomial in reverse order.
degree
the degree of the polynomial
Returnthe result of the numerical evaluation of the polynomial with coefficients of x set to 1 or undefined if
x
is not a number, the degree smaller than zero or if the length of the coefficient array is zero. Since0.0.3
Version0.0.1
LicenseGPL
Calculates the Bessel function of the first kind and of order zero at
x
. Ported from the Cephes files included in Grace 5.1.21, who have the permission to distribute it under the GPL. Original copyright of the Cephes Math Library Release 2.3: 1984, 1995 by Stephen L. Moshier.
x
a real number
Returnthe result of the numerical evaluation of the Bessel function of the first kind and of order zero.
Since0.0.3
Version0.0.1
LicenseGPL
Calculates the Bessel function of the first kind and of order one at
x
. Ported from the Cephes files included in Grace 5.1.21, who have the permission to distribute it under the GPL. Original copyright of the Cephes Math Library Release 2.3: 1984, 1995 by Stephen L. Moshier.
x
a real number
Returnthe result of the numerical evaluation of the Bessel function of the first kind and of order one.
Since0.0.3
Version0.0.1
LicenseGPL
Calculates the Bessel function of the second kind and of order one at
x
. Ported from the Cephes files included in Grace 5.1.21, who have the permission to distribute it under the GPL. Original copyright of the Cephes Math Library Release 2.3: 1984, 1995 by Stephen L. Moshier.
x
a real number
Returnthe result of the numerical evaluation of the Bessel function of the second kind and of order one.
Since0.0.3
Version0.0.1
LicenseGPL
Calculates the Bessel function of the second kind and of order zero at
x
. Ported from the Cephes files included in Grace 5.1.21, who have the permission to distribute it under the GPL. Original copyright of the Cephes Math Library Release 2.3: 1984, 1995 by Stephen L. Moshier.
x
a real number
Returnthe result of the numerical evaluation of the Bessel function of the second kind and of order zero.
Since0.0.3
Version0.0.1
LicenseGPL
Calculates the Bessel function of the first kind and of order
n
at x
. Ported from the Cephes files included in Grace 5.1.21, who have the permission to distribute it under the GPL. Original copyright of the Cephes Math Library Release 2.3: 1984, 1995 by Stephen L. Moshier.
x
a real number
n
an integer, the order of the Bessel function
Returnthe result of the numerical evaluation of the Bessel function of the first kind and of order
n
. Since0.0.3
Version0.0.1
LicenseGPL
Calculates the Bessel function of the second kind and of order
n
at x
. Ported from the Cephes files included in Grace 5.1.21, who have the permission to distribute it under the GPL. Original copyright of the Cephes Math Library Release 2.3: 1984, 1995 by Stephen L. Moshier.
x
a real number
n
an integer, the order of the Bessel function
Returnthe result of the numerical evaluation of the Bessel function of the second kind and of order
n
. Since0.0.3
Version0.0.1
LicenseGPL
Calculates the modified Bessel function of the first kind and of order zero at
x
. Ported from the Cephes files included in Grace 5.1.21, who have the permission to distribute it under the GPL. Original copyright of the Cephes Math Library Release 2.3: 1984, 1995 by Stephen L. Moshier.
x
a real number
Returnthe result of the numerical evaluation of the modified Bessel function of the first kind and of order zero.
Since0.0.3
Version0.0.1
LicenseGPL
Calculates the modified Bessel function of the first kind and of order one at
x
. Ported from the Cephes files included in Grace 5.1.21, who have the permission to distribute it under the GPL. Original copyright of the Cephes Math Library Release 2.3: 1984, 1995 by Stephen L. Moshier.
x
a real number
Returnthe result of the numerical evaluation of the modified Bessel function of the first kind and of order one.
Since0.0.3
Version0.0.1
LicenseGPL
Calculates the modified Bessel function of the third kind and of order zero at
x
. Ported from the Cephes files included in Grace 5.1.21, who have the permission to distribute it under the GPL. Original copyright of the Cephes Math Library Release 2.3: 1984, 1995 by Stephen L. Moshier.
x
a real number
Returnthe result of the numerical evaluation of the modified Bessel function of the third kind and of order zero.
Since0.0.3
Version0.0.1
LicenseGPL
Calculates the modified Bessel function of the third kind and of order one at
x
. Ported from the Cephes files included in Grace 5.1.21, who have the permission to distribute it under the GPL. Original copyright of the Cephes Math Library Release 2.3: 1984, 1995 by Stephen L. Moshier.
x
a real number
Returnthe result of the numerical evaluation of the modified Bessel function of the third kind and of order one.
Since0.0.3
Version0.0.1
LicenseGPL
Calculates the modified Bessel function of the second kind and of noninteger order at
x
. Ported from the Cephes files included in Grace 5.1.21, who have the permission to distribute it under the GPL. Original copyright of the Cephes Math Library Release 2.3: 1984, 1995 by Stephen L. Moshier.
x
a real number
v
a real number, the order
Returnthe result of the numerical evaluation of the modified Bessel function of the second kind and of noninteger order.
Since0.0.3
Version0.0.1
LicenseGPL
Calculates the modified Bessel function of the third kind and of order
n
at x
. Ported from the Cephes files included in Grace 5.1.21, who have the permission to distribute it under the GPL. Original copyright of the Cephes Math Library Release 2.3: 1984, 1995 by Stephen L. Moshier.
x
a real number
n
an integer, the order of the Bessel function
Returnthe result of the numerical evaluation of the modified Bessel function of the third kind and of order
n
. Since0.0.3
Version0.0.1
LicenseGPL
Calculates the confluent hypergeometric function
1F1(a,b;x)
. Ported from the Cephes files included in Grace 5.1.21, who have the permission to distribute it under the GPL. Original copyright of the Cephes Math Library Release 2.3: 1984, 1995 by Stephen L. Moshier.
x
a real number
Returnthe result of the numerical evaluation of the confluent hypergeometric function
Since0.0.3
Version0.0.1
LicenseGPL
Evaluate Chebyshev series.
The variable
n
is not the degree of the polynomial but teh number of the the coefficients! Ported from the Cephes files included in Grace 5.1.21, who have the permission to distribute it under the GPL. Original copyright of the Cephes Math Library Release 2.3: 1984, 1995 by Stephen L. Moshier.
x
a real number
coeff
an array with the coefficients in reverse order
n
the number of coefficients
Returnthe result of the numerical evaluation of the Chebyshev series
Since0.0.3
Version0.0.1
LicenseGPL
Calculates the Hurwitz Zeta function, the Rieman zeta function with two arguments.
. Ported from the Cephes files included in Grace 5.1.21, who have the permission to distribute it under the GPL. Original copyright of the Cephes Math Library Release 2.3: 1984, 1995 by Stephen L. Moshier.
x
a real number greater than 1
q
a real number but not a negative integer or zero
Returnthe result of the numerical evaluation of the Hurwitz zeta function
Since0.0.3
Version0.0.1
LicenseGPL
Calculates the Rieman Zeta function on the real line at
x
. This function is related to the Rieman zeta function by
zeta(x) = zetaRieC(x) + 1
Ported from the Cephes files included in Grace 5.1.21, who have the permission to distribute it under the GPL. Original copyright of the Cephes Math Library Release 2.3: 1984, 1995 by Stephen L. Moshier.
x
a real number between -170.6243 and +127
Returnthe result of the numerical evaluation of the Rieman zeta function
Since0.0.3
Version0.0.1
LicenseGPL
Calculates the Rieman Zeta function on the real line at
x
.
x
a real number between -170.6243 and +127
Returnthe result of the numerical evaluation of the Rieman zeta function
Since0.0.3
Version0.0.1
LicenseGPL
Calculates the generalized Laguerre function.
The generalized Laguerre function Lna is implemented with the confluent hypergeometric function as
Lna = Γ(a+n+1)/(Γ(n+1) Γ(a+1)) 1F1(-n,a+1,x)
Lna = Γ(a+n+1)/(Γ(n+1) Γ(a+1)) 1F1(-n,a+1,x)
a
a real number
n
a real number
x
a real number
Returnthe result of the numerical evaluation of the Rieman zeta function
Since0.0.3
Version0.0.1
LicenseGPL
Calculates the exponential integral at
x
. Ported from the Cephes files included in Grace 5.1.21, who have the permission to distribute it under the GPL. Original copyright of the Cephes Math Library Release 2.3: 1984, 1995 by Stephen L. Moshier.
x
a real number greater than or equal zero
Returnthe result of the numerical evaluation of the exponential integral
Since0.0.3
Version0.0.1
LicenseGPL
Calculates the dilogarithm at
x
. Ported from the Cephes files included in Grace 5.1.21, who have the permission to distribute it under the GPL. Original copyright of the Cephes Math Library Release 2.3: 1984, 1995 by Stephen L. Moshier.
x
a real number greater than or equal zero
Returnthe result of the numerical evaluation of the dilogarithm
Since0.0.3
Version0.0.1
LicenseGPL
Calculates the optimal dimensions of a bloom filter.
The optimal dimensions of a bloom filter are not always optimal. The result of this calculation can be controlled with lower error rates (larger filter) or with a larger number of elements to store (results in a larger filter, too).
fault
the error rate
number
the number of elements to store
Returnan array with the length of the bloomfilter in bits and the number of hashfunctions in that order.
Since0.0.1
Version0.0.1
Calculates the Catalan number
n
. It uses the factorial function for
n < Math.MAX_FACTORIAL/2
and uses the logarithm of the Gamma function rounded to the nearest integer otherwise. Is able to compute C519 on the authors 32-bit machine.
n
the Catalan number to compute
Returnthe Catalan number
n
Since0.0.2
Version0.0.1
Calculates the Fresnel integral at
x
. Ported from the Cephes files included in Grace 5.1.21, who have the permission to distribute it under the GPL. Original copyright of the Cephes Math Library Release 2.3: 1984, 1995 by Stephen L. Moshier.
xa
a real number
Returnthe result of the numerical evaluation of the Fresnel integral in a two element array [S,C] with
S = int0-x sin(pi/2 t^2) dt
and C = int0-x cos(pi/2 t^2) dt
Since0.0.4
Version0.0.1
LicenseGPL
Generate
nCk
combinations. Algorithm by Donald Knuth.
k
length of the combinations
Returnan array with the combinations as subarrays
Since0.0.8
Version0.0.1
Generate
nPk
permutation with n = k
. Algorithm by Edsger Wybe Dijkstra.
Returnan array with the permutations as subarrays
Since0.0.8
Version0.0.1
Generate all subsets.
Algorithm from "Combinatorial Algorithms: Theory and Praxis" by Edward Reingold, Jürg Nievergelt, and Narsingh Deo; Prentice-Hall, 1977.
Returnan array with the subsets as subarrays
Since0.0.8
Version0.0.1
Generate integer partions of positive real integer.
Algorithm by Donald Knuth.
n
a positive real integer
Returnan array with the partitions as subarrays
Since0.0.8
Version0.0.1
The beginning of a complex data type.
A single argument will be taken as a complex number with the imaginary part set to zero. The underlying data structure is just a 2-element array with the real and the imaginary part in that order. If any of the given arguments is not of type
number
that part of the complex type is set to Number.NaN
. If no arguments are given, all values are set to zero.
a
a real number, optional, the real part
b
a real number, optional if real part is given, the imaginary part
Since0.0.5
Version0.0.1
Converts a complex type into a string.
Uses the quite common notation
real sign imaginary'i'
where real
is the value of the real part, sign
is the sign of the imaginary part, imaginary
is the absolute value of the imaginary part and 'i'
is the letter 'i' (latin small letter i, unicode 0x0069)
b
an positive integer, the base of the transform, greater 1 and smaller 37
Returnthe complex type as a string
Since0.0.5
Version0.0.1
Converts a number into a complex type.
i
a real, the optionally imaginary part
Returnthe complex type
Since0.0.5
Version0.0.1
Parses a string into a complex type, the inverse of
Number_toComplex(i)
. This code is quite finical, the string should resemble the output of
Number.toComplex(i)
as close as possible save spaces. Returnthe complex type
Since0.0.5
Version0.0.2
Checks if both parts of the complex number are integer values.
Returntrue if both values are integers and false otherwise
Since0.0.5
Version0.0.1
Checks if the imaginary part is zero.
Returntrue if the imaginary part is zero, false otherwise
Since0.0.5
Version0.0.1
Checks if the real part is zero.
Returntrue if the real part is zero, false otherwise
Since0.0.5
Version0.0.1
Checks if the two given complex numbers are equal.
i
complex number
a
real, an optional value such that
abs(this-i) <= abs(tol)
Returntrue if both numbers are equal, false otherwise
Since0.0.5
Version0.0.2
Calculates the sum of the two given complex numbers.
i
a complex, the second summand
Returnthe sum in a complex data type
Since0.0.5
Version0.0.1
Calculates the difference of the two given complex numbers.
i
a complex, the number to subtract
Returnthe sum in a complex data type
Since0.0.5
Version0.0.1
Calculates the product of the two given complex numbers.
i
a complex, the multiplicant
Returnthe product in a complex data type
Since0.0.5
Version0.0.1
SeeComplex.mult2
Calculates the quotient of the two given complex numbers.
It is about one decimal digit more exact than
Complex.div
but suffers from under- and overflow.
i
a complex, the denominator
Returnthe quotient in a complex data type
Since0.0.5
Version0.0.2
SeeComplex.div
Calculates the remainder of the two given Gaussian integers.
i
an integer complex, the denominator
Returnthe remainder or
Number.NaN
if the arguments are no integers in a complex data type Since0.0.5
Version0.0.1
Calculates the remainder of the two given complex numbers.
i
a complex, the denominator
Returnthe remainder in a complex data type
Since0.0.5
Version0.0.1
Calculates the magnitude of the complex number.
Returna real, the magnitude
Since0.0.5
Version0.0.4
Calculates the conjugate of the complex number.
Returna complex, the conjugate
Since0.0.5
Version0.0.1
Calculates the multiplicative inverse of the complex number.
Returna complex, the inverse
Since0.0.5
Version0.0.2
Calculates the additive inverse of the complex number.
Returna complex, the inverse
Since0.0.5
Version0.0.1
Calculates the square root of the complex number.
Returna complex, the square root
Since0.0.5
Version0.0.2
Calculates the logarithm base e of the complex number.
Algorithm shamelessly stolen from GCC.
Returna complex, the logarithm base e
Since0.0.5
Version0.0.1
LicenseGPL
Calculates the exponential function of the complex number.
Returna complex, the exponential function
Since0.0.5
Version0.0.1
Calculates the complex number to the power of the complex number in
y
. Calculates the complex roots too, but the branch cut is hardcoded. Algorithm shamelessly stolen from GCC.
y
a complex or a real, the exponent
Returna complex, this to the power of
y
Since0.0.5
Version0.0.2
LicenseGPL
Converts a cartesian representation into a polar one.
Returna complex
Since0.0.5
Version0.0.1
Converts a polar representation into a cartesian one.
Returna complex
Since0.0.5
Version0.0.1
Calculates the sinus of the complex number.
Returna complex, the sinus
Since0.0.5
Version0.0.1
Calculates the sinus hyperbolicus of the complex number.
Returna complex, the sinus hyperbolicus
Since0.0.5
Version0.0.1
Calculates the cosine of the complex number.
Returna complex, the cosine
Since0.0.5
Version0.0.1
Calculates the cosinus hyperbolicus of the complex number.
Returna complex, the cosinus hyperbolicus
Since0.0.5
Version0.0.1
Calculates the tangent of the complex number.
Returna complex, the tangent
Since0.0.5
Version0.0.1
Calculates the tangent hyperbolicus of the complex number.
Returna complex, the tangent hyperbolicus
Since0.0.5
Version0.0.1
Calculates the arcus sinus of the complex number.
Returna complex, the arcus sinus
Since0.0.5
Version0.0.1
Calculates the arcus cosinus of the complex number.
Returna complex, the arcus cosinus
Since0.0.5
Version0.0.1
Calculates the arcus tangent of the complex number.
Returna complex, the arcus tangent
Since0.0.5
Version0.0.1
Calculates the co-tangent of the complex number.
Returna complex, the co-tangent
Since0.0.5
Version0.0.1
Calculates the hyperbolic co-tangent of the complex number.
Returna complex, the hyperbolic co-tangent
Since0.0.5
Version0.0.1
Calculates the secant of the complex number.
Returna complex, the secant
Since0.0.5
Version0.0.1
Calculates the hyperbolic secant of the complex number.
Returna complex, the hyperbolic secant
Since0.0.5
Version0.0.1
Calculates the co-secant of the complex number.
Returna complex, the co-secant
Since0.0.5
Version0.0.1
Calculates the hyperbolic co-secant of the complex number.
Returna complex, the hyperbolic co-secant
Since0.0.5
Version0.0.1
Calculates the area sinus hyperbolicus of the complex number.
Returna complex, the area sinus hyperbolicus
Since0.0.5
Version0.0.1
Calculates the area cosinus hyperbolicus of the complex number.
Returna complex, the area cosinus hyperbolicus
Since0.0.5
Version0.0.1
Calculates the area tangent hyperbolicus of the complex number.
Returna complex, the area tangent hyperbolicus
Since0.0.5
Version0.0.1
Calculates the arcus co-secant of the complex number.
Returna complex, the arcus co-secan
Since0.0.5
Version0.0.1
Calculates the area co-secant hyperbolicus of the complex number.
Returna complex, the area co-secan hyperbolicus
Since0.0.5
Version0.0.1
Calculates the arcus secant of the complex number.
Returna complex, the arcus secant
Since0.0.5
Version0.0.1
Calculates the area secant hyperolicus of the complex number.
Returna complex, the area secant hyperolicus
Since0.0.5
Version0.0.1
Calculates the arcus co-tangent of the complex number.
Returna complex, the arcus co-tangent
Since0.0.5
Version0.0.1
Calculates the area co-tangent hyperbolicus of the complex number.
Returna complex, the area co-tangent hyperbolicus
Since0.0.5
Version0.0.1
Calculates the argument function of the complex number.
Returna complex, the argument function
Since0.0.5
Version0.0.1
Calculates the greatest common divisor of the given Gaussian integers.
The same algorithm would work for real values too, but the rounding errors are hard to get around.
i
a complex
Returna complex, the greatest common divisor
Since0.0.5
Version0.0.1
Calculates the least common multiplicator of the given Gaussian integers.
The same algorithm would work for real values too, but the rounding errors are hard to get around.
i
a complex
Returna complex, the least common multiplicator
Since0.0.5
Version0.0.1
Finds the larger value of two complex numbers.
Will cast a number in parameter
i
to a complex data type automatically.
i
a complex or a real number
Returnthe larger complex number
Since0.0.6
Version0.0.2
Finds the smaller value of two complex numbers.
Will cast a number in parameter
i
to a complex data type automatically.
i
a complex or a real number
Returnthe smaller complex number
Since0.0.6
Version0.0.2
Compares two complex numbers a > b.
Will cast a number in parameter
i
to a complex data type automatically.
i
a complex or a real number
Returntrue if a > b, false otherwise
Since0.0.6
Version0.0.2
Compares two complex numbers a < b.
Will cast a number in parameter
i
to a complex data type automatically.
i
a complex or a real number
Returntrue if a < b, false otherwise
Since0.0.6
Version0.0.1
Compares two complex numbers a <= b.
Will cast a number in parameter
i
to a complex data type automatically.
i
a complex or a real number
Returntrue if a <= b, false otherwise
Since0.0.6
Version0.0.1
Compares two complex numbers a >= b.
Will cast a number in parameter
i
to a complex data type automatically.
i
a complex or a real number
Returntrue if a >= b, false otherwise
Since0.0.6
Version0.0.1
Checks if the Complex is not a number.
Checks for the complex
(Number.NaN, Number.NaN)
returned by some functions here. Returntrue if the complex is
NaN
, false otherwise Since0.0.5
Version0.0.1
Calculates the quotient of the two given complex numbers avoiding under- and overflow.
It is a bit less precise (about one decimal digit)than
Complex.div
, so both versions are offered here.
i
a complex, the denominator
Returnthe quotient in a complex data type
Since0.0.7
Version0.0.2
SeeComplex.divExact
Calculates the product of the two given complex numbers Fortran style.
It is a bit faster than
Complex.mult
but more sensible to over- and underflow, so both versions are offered here.
i
a complex, the multiplicator
Returnthe product in a complex data type
Since0.0.7
Version0.0.2
SeeComplex.mult
The gamma function, generalisation of the factorial.
It uses the usual Lanczos' approximation with g=9.
a
a complex number
Returna complex number, the value of the gamma distribution at
a
Since0.0.10
Version0.0.1
The logarithm of the gamma function, generalisation of the factorial.
It uses the usual Lanczos' approximation with g=9.
a
a complex number
Returna complex number, the logarithm of the value of the gamma distribution at
a
Since0.0.10
Version0.0.1
The lower incomplete gamma function for complex arguments.
It uses the brute force approach described at http://www.rskey.org/gamma.htm (scroll to the bottom). It is less precise than the version for real numbers and way slower.
a
a complex number
x
a complex number
l
the number of loops (default is 100)
Returnthe value of the incomplete gamma distribution
a
with upper limit x
Since0.0.10
Version0.0.1
Calculates the regularized gamma function P at
a
for complex arguments. This regularized gamma function is the lower incomplete gamma function lincg(a,x) divided by the gamma function g(a).
a
a complex number
x
a complex number for the upper limit
Returnthe value of the regularized gamma distribution at
a
with upper limit x
Since0.0.10
Version0.0.1
Calculates the regularized gamma function Q at
a
for complex arguments. This regularized gamma function is the upper incomplete gamma function uincg(a,x) divided by the gamma function g(a).
a
a complex number
x
a complex number for the upper limit
Returnthe value of the regularized gamma distribution at
a
with upper limit x
Since0.0.10
Version0.0.1
The gamma function, generalisation of the factorial.
It uses the usual Lanczos' approximation with g=9.
a
a real or complex number
Returnthe value of the gamma distribution at
a
Since0.0.1
Version0.0.2
The logarithm of the gamma function, generalisation of the factorial.
It uses the usual Lanczos' approximation with g=9.
a
a real or complex number
Returnthe logarithm of the value of the gamma distribution at
a
Since0.0.1
Version0.0.2
The lower incomplete gamma function.
It uses Kummer's confluent hypergeometric function
M(a,b;z)
: γ(a,z) = a-1zae-zM(1,a+1,z)
a
a real number greater or equal 0
x
a real number for the upper limit greater or equal 0
l
the number of loops (default is 100)
Returnthe value of the incomplete gamma distribution at
a
with upper limit x
Since0.0.4
Version0.0.1
The lower incomplete gamma function used by Octave.
Octave multiplicates the integral with 1/Γ(a) to keep the numbers small. It uses the brute force approach described at http://www.rskey.org/gamma.htm (scroll to the bottom).
a
a real number greater or equal 0
x
a real number for the upper limit greater or equal 0
l
the number of loops (default is 100)
Returnthe value of the incomplete gamma distribution used by Octave at
a
with upper limit x
Since0.0.1
Version0.0.1
Calculates the regularized gamma function P at
a
. This regularized gamma function is the lower incomplete gamma function lincg(a,x) divided by the gamma function g(a).
a
a real number greater or equal 0
x
a real number for the upper limit greater or equal 0
Returnthe value of the regularized gamma distribution at
a
with upper limit x
Since0.0.1
Version0.0.2
Calculates the regularized gamma function Q at
x
. This regularized gamma function is the upper incomplete gamma function uincg(a,x) divided by the gamma function g(a).
a
a real number greater or equal 0
x
a real number for the upper limit greater or equal 0
Returnthe value of the regularized gamma distribution at
a
with upper limit x
Since0.0.1
Version0.0.2
Calculates the cumulative distribution function of the gamma distribution.
The CDF of the gamma function is the (lower) regularized gamma function.
x
a real number greater or equal 0
a
a real number greater or equal 0 for parameter
a
b
a real number greater or equal 0 for parameter
b
Returnthe value of the cumulative distribution function of the gamma distribution at
x
. Since0.0.1
Version0.0.2
Calculates the probability density function of the gamma distribution.
x
a real number greater or equal 0
a
a real number greater or equal 0 for parameter
a
b
a real number greater or equal 0 for parameter
b
Returnthe value of the probability density function of the gamma distribution at
x
. Since0.0.1
Version0.0.2
Calculates the inverse of the cumulative distribution function of the gamma distribution at
x
with parameter a
and b
. It is a port from the macro octave/2.1.35/m/statistics/distributions/gamma_inv.m original written by Kurt Hornik.
x
a real number greater 0
a
a real number greater 0
a
b real number greater 0
Returnthe quantile (the inverse of the gamma CDF) of the gamma function
LicenseGPL
Calculates the first of the polygamma functions: the digamma function.
Uses the partial harmonic function as the approximation for integer values and an asymptotic expansion otherwise. For complex arguments use
Math.cdigamma(z)
.
n
a real number
Returnthe result of the digamma function at
n
or Number.POSITIVE_INFINITY
if n
is larger than 9.64934076977635e+74 Since0.0.2
Version0.0.2
Calculates the first of the polygamma functions, the digamma function, for complex arguments.
Uses an asymptotic expansion.
n
a complex number
Returnthe result of the digamma function at
n
Since0.0.10
Version0.0.1
Calculates the beta distribution at parameter
a
and b
. Uses the exponent of the logarithmic beta function.
a
a real or complex number
b
a real or complex number
Returnthe result of the beta function. Will return a complex data type if any of
a,b
is of the complex data type Since0.0.1
Version0.0.1
Calculates the logarithm of the beta distribution at parameter
a
and b
. Uses the logarithm of the gamma function.
a
a real or complex number
b
a real or complex number
Returnthe logarithm of the beta function. Will return a complex data type if any of
a,b
is of the complex data type Since0.0.1
Version0.0.1
Calculates the regularized beta distribution with limit
x
with parameter a
and b
. A port from Java code original written by Jaco van Kooten.
a
a real number
b
a real number
Returnthe regularized beta function
Since0.0.1
Version0.0.1
LicenseGPL
Calculates the incomplete beta distribution with limit
x
with parameter a
and b
. A port from Java code original written by Jaco van Kooten.
a
a real number
b
a real number
Returnthe incomplete beta function
Since0.0.1
Version0.0.1
LicenseGPL
Calculates the probability density function of the beta distribution with limit
x
with parameter a
and b
.
a
a real number
b
a real number
Returnthe probability density function of the beta function
Since0.0.1
Version0.0.1
Calculates the cumulative distribution function of the beta distribution with limit
x
with parameter a
and b
.
a
a real number
b
a real number
Returnthe cumulative distribution function of the beta function
Since0.0.1
Version0.0.1
Calculates the inverse of the cumulative distribution function of the beta distribution with limit
x
with parameter a
and b
. A port from octave/2.1.35/m/statistics/distributions/beta_inv.m original written by Kurt Hornik.
a
a real number
b
a real number
Returnthe quantiles (the inverse of the beta CDF) of the beta function
Since0.0.1
Version0.0.1
LicenseGPL
Calculates the probability density function of the χ2 distribution at
p
with df
degrees of freedom.
p
a real number
df
a real number greater than 0;
Returnthe probability density function of the χ2 distribution
Since0.0.1
Version0.0.1
Calculates the cumulative distribution function of the χ2 distribution at
p
with df
degrees of freedom.
p
a real number
df
a real number greater than 0
Returnthe cumulative distribution function of the χ2 distribution
Since0.0.1
Version0.0.2
Calculates the inverse of the cumulative distribution function of the χ2 distribution with probability
p
and df
degrees of freedom.
p
a real number between 0 and 1
df
an integer greater than 0;
Returnthe quantiles (inverse of χ2 CDF) of the χ2 distribution
Since0.0.1
Version0.0.1
Calculates the probability of the χ2 value
chisq
with df
degrees of freedom.
chisq
a real number
df
a real number greater than 0;
Returnthe probability of the χ2 value
Since0.0.1
Version0.0.1
Calculates the χ2 value of the array with
df
degrees of freedom.
df
a real number greater than 0;
Returnthe χ2 value
Since0.0.1
Version0.0.1
Calculates the error function at
a
.
a
a real number
Returnthe error function at
a
. Since0.0.1
Version0.0.2
Calculates the complement of the error function at
a
.
a
a real number
Returnthe complement of the error function at
a
. Since0.0.1
Version0.0.1
Calculates the binomial coefficient.
This code uses the normal factorial function which limits the value of
n
and k
to integers between 0 and ca. 170.
n
an integer greater than 0
k
an integer greater than 0
Returnthe binomial coefficient or
NaN
otherwise Since0.0.1
Version0.0.1
Calculates the probability density function of the binomial distribution.
This code uses the normal factorial function which limits the value of
n
and k
to integers between 0 and ca. 170.
n
an integer greater than 0
k
an integer greater than 0
p
a real number between 0 and 1
Returnthe probability density function of the binomial distribution or
NaN
otherwise Since0.0.1
Version0.0.1
Calculates the logarithm of the binomial coefficient.
This code uses the logarithm of the gamma function.
n
a real number
k
a real number
Returnthe logarithm of the binomial coefficient or
NaN
otherwise Since0.0.1
Version0.0.1
Calculates the logarithm of the probability density function of the binomial distribution.
This code uses the logarithm of the gamma function.
n
a real number
k
a real number
p
a real number between 0 and 1
Returnthe logarithm of the probability density function of the binomial distribution or
NaN
otherwise Since0.0.1
Version0.0.1
Calculates the cumulative distribution function of the binomial distribution.
n
a real number
k
a real number
p
a real number between 0 and 1
Returnthe cumulative distribution function of the binomial distribution or
NaN
otherwise Since0.0.1
Version0.0.1
Calculates the probability density function of the logarithmic normal distribution at
x
. This code is a port from the macro octave/2.1.35/m/statistics/distributions/lognormal_pdf.m original
x
a real number greater than 0
logmean
a real number greater than 0
variance
a real number greater than 0
Returnthe probability density function of the logarithmic normal distribution or
NaN
otherwise Since0.0.1
Version0.0.1
Calculates the cumulative distribution function of the logarithmic normal distribution at
x
. This code is a port from the macro octave/2.1.35/m/statistics/distributions/lognormal_cdf.m original
x
a real number greater than 0
logmean
a real number greater than 0
variance
a real number greater than 0
Returnthe cumulative distribution function of the logarithmic normal distribution or
NaN
otherwise Since0.0.1
Version0.0.1
Calculates the probability density function of the normal distribution at
x
. This code is a port from the macro octave/2.1.35/m/statistics/distributions/normal_pdf.m original written by Kurt Hornik.
x
a real number greater than 0
mean
a real number greater than 0
variance
a real number greater than 0
Returnthe probability density function of the normal distribution or
NaN
otherwise Since0.0.1
Version0.0.1
Calculates the cumulative distribution function of the normal distribution at
x
. This code is a port from the macro octave/2.1.35/m/statistics/distributions/normal_cdf.m original written by Kurt Hornik.
x
a real number greater than 0
mean
a real number greater than 0
variance
a real number greater than 0
Returnthe cumulative distribution function of the normal distribution or
NaN
otherwise Since0.0.1
Version0.0.1
Calculates the inverse of the cumulative distribution function of the normal distribution at
x
. This code is a port from the macro octave/2.1.35/m/statistics/distributions/normal_inv.m original written by Kurt Hornik.
x
a real number greater than 0
mean
a real number greater than 0
variance
a real number greater than 0
Returnthe quantiles (inverse of the normal CDF) of the normal distribution or
NaN
otherwise Since0.0.1
Version0.0.1
Calculates the probability density function of the student distribution at
x
with df
degrees of freedom.
x
a real number
df
a real number greater than 0
Returnthe probability density function of the student distribution or
NaN
otherwise Calculates the cumulative distribution function of the student distribution at
x
with df
degrees of freedom.
x
a real number
df
a real number greater than 0
Returnthe cumulative distribution function of the student distribution or
NaN
otherwise Calculates the inverse of the cumulative distribution function of the student distribution at
x
with df
degrees of freedom.
x
a real number between 0 and 1
df
a real number greater than 0
Returnthe quantiles (inverse of the student CDF) of the student distribution or
NaN
otherwise Calculates the probability density function of the logistic distribution at
x
.
x
a real number
Returnthe probability density function of the logistic distribution
Calculates the cumulative distribution function of the logistic distribution at
x
.
x
a real number
Returnthe cumulative distribution function of the logistic distribution
Calculates the inverse of the cumulative distribution function of the logistic distribution at
x
.
x
a real number
Returnthe quantiles (inverse of the logistic CDF) of the logistic distribution
Calculates the probability density function of the Weibull distribution at
x
with shape a
and scale s
.
x
a real number
a
a real number greater than 0
s
a real number greater than 0
Returnthe probability density function of the logistic distribution or
NaN
otherwise Calculates the cumulative distribution function of weibull distribution at
x
with shape a
and scale s
.
x
a real number
a
a real number greater than 0
s
a real number greater than 0
Returnthe cumulative distribution function of the weibull distribution or
NaN
otherwise Calculates the inverse of cumulative distribution function of weibull distribution at
x
with shape a
and scale s
.
x
a real number
a
a real number greater than 0
s
a real number greater than 0
Returnthe quantiles (inverse of the weibull CDF) of the weibull distribution or
NaN
otherwise Calculates the cumulative distribution function of the Kolmogorov Smirnov distribution at
x
. This code is a port from the macro octave/2.1.35/m/statistics/distributions/kolmogorov_smirnov_cdf.m original written by Kurt Hornik.
x
a real number greater than 0
Returnthe cumulative distribution function of the Kolmogorov Smirnov distribution or
NaN
otherwise LicenseGPL
Calculates the probability density function of uniform distribution at
x
with parameter a
and b
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/uniform_cdf.m original written by Kurt Hornik.
x
a real number smaller
b
and greater a
a
a real number smaller than
b
b
a real number greater than
a
Returnthe probability density function of the uniform distribution or
NaN
otherwise LicenseGPL
Calculates the cumulative distribution function of uniform distribution at
x
with parameter a
and b
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/uniform_cdf.m original written by Kurt Hornik.
x
a real number
a
a real number smaller than
b
b
a real number greater than
a
Returnthe cumulative distribution function of the uniform distribution or
NaN
otherwise LicenseGPL
Calculates the inverse of the cumulative distribution function of uniform distribution at
x
with parameter a
and b
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/uniform_cdf.m original written by Kurt Hornik.
x
a real number between 0 and 1
a
a real number smaller than
b
b
a real number greater than
a
Returnthe quantiles (inverse of the uniform CDF) of the uniform distribution or
NaN
otherwise LicenseGPL
Calculates the probability density function of the exponential distribution at
x
with parameter lambda
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/exponential_pdf.m original written by Kurt Hornik.
x
a real number
lambda
a real number greater than 0
Returnthe probability density function of the exponential distribution or
NaN
otherwise LicenseGPL
Calculates the cumulative distribution function of the exponential distribution at
x
with parameter lambda
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/exponential_cdf.m original written by Kurt Hornik.
x
a real number
lambda
a real number greater than 0
Returnthe cumulative distribution function of the exponential distribution or
NaN
otherwise LicenseGPL
Calculates the inverse of the cumulative distribution function of the exponential distribution at
x
with parameter lambda
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/exponential_inv.m original written by Kurt Hornik.
x
a real number between 0 and 1
lambda
a real number greater than 0
Returnthe quantiles (inverse of the exponential CDF) of the exponential distribution or
NaN
otherwise LicenseGPL
Calculates the probability density function of the Cauchy distribution at
x
with location lambda
and scale sigma
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/cauchy_pdf.m original written by Kurt Hornik.
x
a real number
lambda
a real number
sigma
a real number greater than 0
Returnthe probability density function of the cauchy distribution or
NaN
otherwise LicenseGPL
Calculates the cumulative distribution function of the cauchy distribution at
x
with location lambda
and scale sigma
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/cauchy_cdf.m original written by Kurt Hornik.
x
a real number
lambda
a real number
sigma
a real number greater than 0
Returnthe cumulative distribution function of the cauchy distribution or
NaN
otherwise LicenseGPL
Calculates the inverse of the cumulative distribution function of the cauchy distribution at
x
with location lambda
and scale sigma
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/cauchy_inv.m original written by Kurt Hornik.
x
a real number between 0 and 1
lambda
a real number
sigma
a real number greater than 0
Returnthe quantiles (inverse of the cauchy CDF) of the cauchy distribution or
NaN
otherwise LicenseGPL
Calculates the probability mass function of the discrete distribution at
x
in v
of probability p
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/discrete_pdf.m original written by Kurt Hornik.
x
a real number
v
an array of the same length as
p
holding the values
p
an array of the same length as
v
holding the probabilities of the values in v
Returnthe probability mass function of the discrete distribution or
NaN
otherwise LicenseGPL
Calculates the cumulative distribution function of the discrete distribution at
x
in v
of probability p
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/discrete_cdf.m original written by Kurt Hornik.
x
a real number
v
an array of the same length as
p
holding the values
p
an array of the same length as
v
holding the probabilities of the values in v
Returnthe cumulative distribution function of the discrete distribution or
undefined
otherwise LicenseGPL
Calculates the inverse of the cumulative distribution function of the discrete distribution at
x
in v
of probability p
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/discrete_inv.m original written by Kurt Hornik. This code has the same bug as the original: it is off by one for some values. The reason is a rounding error.
x
a real number between 0 and 1
v
an array of the same length as
p
holding the values
p
an array of the same length as
v
holding the probabilities of the values in v
Returnthe quantiles (inverse of the discrete CDF) of the discrete distribution or
undefined
otherwise LicenseGPL
Calculates the probability mass function of the empirical distribution at
x
in v
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/empirical_pdf.m original written by Kurt Hornik.
x
a real number
v
an array holding the values
Returnthe probability mass function of the empirical distribution or
NaN
otherwise LicenseGPL
Calculates the cumulative distribution function of the empirical distribution at
x
in v
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/empirical_cdf.m original written by Kurt Hornik.
x
a real number
v
an array holding the values
Returnthe cumulative distribution function of the empirical distribution or
NaN
otherwise LicenseGPL
Calculates the inverse of the cumulative distribution function of the empirical distribution at
x
in v
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/empirical_inv.m original written by Kurt Hornik. Uses {Math.discreteInv()} and therefore suffers from the same bug.
x
a real number
v
an array holding the values
Returnthe quantiles (inverse of the empirical CDF) of the empirical distribution or
NaN
otherwise LicenseGPL
Calculates the probability density function of the f distribution at
x
with m
and n
degrees of freedom. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/f_pdf.m original written by Kurt Hornik.
x
a real number greater than 0
m
a real number greater than 0
n
a real number greater than 0
Returnthe probability density function of the f distribution or
NaN
otherwise LicenseGPL
Calculates the cumulative distribution function of the f distribution at
x
with m
and n
degrees of freedom This code is a port from the macro from octave/2.1.35/m/statistics/distributions/f_cdf.m original written by Kurt Hornik.
x
a real number greater than 0
m
a real number greater than 0
n
a real number greater than 0
Returnthe cumulative distribution function of the f distribution or
NaN
otherwise LicenseGPL
Calculates the inverse of the cumulative distribution function of the f distribution at
x
with m
and n
degrees of freedom This code is a port from the macro from octave/2.1.35/m/statistics/distributions/f_cdf.m original written by Kurt Hornik.
x
a real number between 0 and 1
m
a real number greater than 0
n
a real number greater than 0
Returnthe quantile (the inverse of the fCDF) of the f distribution or
NaN
otherwise LicenseGPL
Calculates the probability density function of the geometric distribution at
x
with m
and n
degrees of freedom. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/geometric_pdf.m original written by Kurt Hornik.
x
a real number greater than 0
p
a real number between 0 and 1
Returnthe probability density function of the geometric distribution or
NaN
otherwise LicenseGPL
Calculates the cumulative distribution function of the geometric distribution at
x
with m
and n
degrees of freedom. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/geometric_cdf.m original written by Kurt Hornik.
x
a real number greater than 0
p
a real number between 0 and 1
Returnthe cumulative distribution function of the geometric distribution or
NaN
otherwise LicenseGPL
Calculates the inverse of the cumulative distribution function of the geometric distribution at
x
with m
and n
degrees of freedom. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/geometric_inv.m original written by Kurt Hornik.
x
a real number between 0 and 1
p
a real number between 0 and 1
Returnthe quantiles (inverse of geometricCDF) of the geometric distribution or
NaN
otherwise LicenseGPL
Calculates the probability density function of the hypergeometric distribution at
x
with parameter m
, t
and n
. This is the probability of obtaining
x
marked items when randomly drawing a sample of size n
without replacement from a population of total size t
containing m
marked items. This code and the sentence above have been ported from the macro from octave/2.1.35/m/statistics/distributions/hypergeometric_pdf.m original written by Kurt Hornik.
x
a real number
m
an integer greater 0 and smaller
t
t
an integer greater 0
n
an integer greater 0 and smaller
t
Returnthe probability density function of the hypergeometric distribution or
NaN
otherwise LicenseGPL
Calculates the cumulative distribution function of the hypergeometric distribution at
x
with parameter m
, t
and n
. This is the probability of obtaining not more than
x
marked items when randomly drawing a sample of size n
without replacement from a population of total size t
containing m
marked items. This code and the sentence above have been ported from the macro from octave/2.1.35/m/statistics/distributions/hypergeometric_cdf.m original written by Kurt Hornik.
x
a real number
m
an integer greater 0 and smaller
t
t
an integer greater 0
n
an integer greater 0 and smaller
t
Returnthe cumulative distribution function of the hypergeometric distribution or
NaN
otherwise LicenseGPL
Calculates the inverse of the cumulative distribution function of the hypergeometric distribution at
x
with parameter m
, t
and n
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/hypergeometric_inv.m original written by Kurt Hornik.
x
a real number between 0 and 1
m
an integer greater 0 and smaller
t
t
an integer greater 0
n
an integer greater 0 and smaller
t
Returnthe quantiles (inverse of the hypergeometricCDF) of the hypergeometric distribution or
NaN
otherwise LicenseGPL
Calculates the probability density function of the Laplace distribution at
x
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/laplace_pdf.m original written by Kurt Hornik.
x
a real number
Returnthe probability density function of the Laplace distribution or
NaN
otherwise LicenseGPL
Calculates the cumulative distribution function of the Laplace distribution at
x
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/laplace_cdf.m original written by Kurt Hornik.
x
a real number
Returnthe cumulativ distribution function of the Laplace distribution or
NaN
otherwise LicenseGPL
Calculates the inverse of the cumulativ distribution function of the Laplace distribution at
x
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/laplace_inv.m original written by Kurt Hornik.
x
a real number between 0 and 1
Returnthe quantiles (inverse of laplaceCDF) of the Laplace distribution or
NaN
otherwise LicenseGPL
Calculates the probability density function of the Pascal distribution (the negative binomial distribution) at
x
with parameters n
and p
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/pascal_pdf.m original written by Kurt Hornik.
x
a real number
n
an integer greater than 1
p
a real number between 0 and 1
Returnthe probability density function of the Pascal distribution or
NaN
otherwise LicenseGPL
Calculates the cumulative distribution function of the Pascal distribution (the negative binomial distribution) at
x
with parameters n
and p
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/pascal_cdf.m original written by Kurt Hornik.
x
a real number
n
an integer greater than 1
p
a real number between 0 and 1
Returnthe cumulative distribution function of the Pascal distribution or
NaN
otherwise LicenseGPL
Calculates the inverse of the cumulative distribution function of the Pascal distribution (the negative binomial distribution) at
x
with parameters n
and p
. Precision problem:
Math.pascalInv(Math.pascalCDF(x,n,p),n,p)
might not always yield what you expected to harvest. It might be off by +1. Rounding towards zero or just truncating the digits of x
might help, but is definitly no solution. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/pascal_inv.m original written by Kurt Hornik.
x
a real number between 0 and 1
n
an integer greater than 1
p
a real number between 0 and 1
Returnthe quantiles (inverse of pascalCDF) of the Pascal distribution or
NaN
otherwise LicenseGPL
Calculates the probability density function of the Poison distribution at
x
with parameter lambda
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/poison_pdf.m original written by Kurt Hornik.
x
a real number
lambda
a real number greater than 0
Returnthe probability density function of the Poison distribution or
NaN
otherwise LicenseGPL
Calculates the cumulative distribution function of the Poison distribution at
x
with parameter lambda
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/poison_cdf.m original written by Kurt Hornik.
x
a real number
lambda
a real number greater than 0
Returnthe cumulative distribution function of the Poison distribution or
NaN
otherwise LicenseGPL
Calculates the inverse of the cumulative distribution function of the Poison distribution at
x
with parameter lambda
. This code is a port from the macro from octave/2.1.35/m/statistics/distributions/poison_cdf.m original written by Kurt Hornik.
x
a real number between 0 and 1
lambda
a real number greater than 0
Returnthe quantiles (inverse of poisonCDF) of the Poison distribution or
NaN
otherwise LicenseGPL
Dielectric constant of polyethylene.
One of some common dielectrics of coax cables
Since0.0.1
Version0.0.1
Dielectric constant of Teflon™.
One of some common dielectrics of coax cables
Since0.0.1
Version0.0.1
Dielectric constant of dry Air at 293.
15 K One of some common dielectrics of coax cables
Since0.0.1
Version0.0.1
Dielectric constant of Cocaine at 293.
15 K One of some common dielectrics of coax cables
Since0.0.1
Version0.0.1
Dielectric constant of SF6 at 293.
15 K One of some common dielectrics of coax cables
Since0.0.1
Version0.0.1
The capacitance of a cylinder capacitor (coax cable).
inner
inner radius, a real number
outer
outer radius, a real number
len
length of cylinder, a real number
e
relative permeability, a real number
Returnthe capacitance of a cylinder capacitor
Since0.0.1
Version0.0.1
Discrete Fourier transformation of a complex 1d data array.
This is a more or less verbatim port of Baoshe Zhangs Java Port of Paul N. Swarztraubre's Fortran and Pekka Janhuen's C code. The length of the array does not matter but there is code in it optimized for a multiple of either 4, 2, 3, or 5.
arr
an array with complex numbers
dir
a string, either "ft" for forward transformation or "bt" for the borward one
Returnan array
Since0.0.8
Version0.0.1
Calculates the integer part of
a
.
a
a real number
Returnthe integer part of the number
a
Since0.0.2
Version0.0.1
Calculates the fractional part of
a
.
a
a real number
Returnthe fractional part of the number
a
Since0.0.2
Version0.0.1
Calculates the nearest integer of
a
. The function Math.round may or may not do what you want. This function implements the nearest integer of half integers with the rule: if the integer part of the number is odd, the next even number will be used et vice versa. The rule for the other numbers: if the fractional part of the number
n
is smaller than 0.5 the nearest integer is n
and sgn(a)(abs(a)+1)
otherwise. Examples: nint(2.5) = 2
, nint(3.5) = 4
, nint(2.45) = 2
, nint(2.55) = 3
, nint(-2.45) = -2
, nint(-2.55) = -3
a
a real number
Returnthe nearest integer of the number
a
Since0.0.2
Version0.0.1
Calculates the area of a triangle given the length of all three sides.
Uses Heron's formula.
a
side a, a real number
b
side b, a real number
c
side c, a real number
Returnthe area of the triangle
Since0.0.1
Version0.0.1
Calculates the area of a triangle given the length of two sides and the angle between them.
a
side a, a real number
b
side b, a real number
alpha
angle between
a
and a
, a real number
Returnthe area of the triangle
Since0.0.1
Version0.0.1
Calculates the area of a triangle given the length of the two catheti of a right-angled triangle.
a
side a, a real number
b
side b, a real number
Returnthe area of the triangle
Since0.0.1
Version0.0.1
Calculates the area of a triangle given the length of one side and its height.
s
side s, a real number
h
height of side
s
, a real number
Returnthe area of the triangle
Since0.0.1
Version0.0.1
Calculates some values of an equilateral polygon given the length of one side and the number of angles, one of 3,4,5,6,8, or 10.
for the gardeners who spent a lot for their shiny new phone and do not want to do the trick with the dirty stick (What's that brown stuff on the tip, hu? Yuck!) and that giant knot someone sold you as 'rope'.
angles
number of angles, an integer
side
length of one side, a real number
Returnan array with subarrays comprising the following information
Name of the Entry | Description |
---|---|
angel | The angel between two edges |
outer | The radius of the outer circle |
inner | The radius of the inner circle |
area | The area of the polygon |
Since0.0.1
Version0.0.1
Calculates some values of an equilateral polygon given the outer radius and the number of angles, one of 3,4,5,6,8, or 10.
angles
number of angles, an integer
radius
radius of outer circle, a real number
Returnan array with subarrays comprising the following information
Name of the Entry | Description |
---|---|
angel | The angel between two edges |
side | The length of one side |
circumference | The circumference of the polygon |
inner | The radius of the inner circle |
area | The area of the polygon |
Since0.0.1
Version0.0.1
Calculates the circumference of an n-angle given number of edges and radius of the outer circle.
It is one of some more general formulas for n-angles.
number
the number of edges, an integer
radius
the radius of the outer circle
Returnthe circumference of the n-angle
Since0.0.1
Version0.0.1
Calculates the area of an n-angle given number of edges and radius of the outer circle.
It is one of some more general formulas for n-angles.
number
the number of edges, an integer
radius
the radius of the outer circle
Returnthe area of the n-angle
Since0.0.1
Version0.0.1
Calculates the circumference of an n-angle given number of edges and radius of the inner circle.
It is one of some more general formulas for n-angles.
number
the number of edges, an integer
radius
the radius of the inner circle
Returnthe circumference of the n-angle
Since0.0.1
Version0.0.1
Calculates the area of an n-angle given number of edges and radius of the inner circle.
It is one of some more general formulas for n-angles.
number
the number of edges, an integer
radius
the radius of the inner circle
Returnthe area of the n-angle
Since0.0.1
Version0.0.1
Calculates the length of one side of an n-angle given number of edges and radius of the outer circle.
It is one of some more general formulas for n-angles.
number
the number of edges, an integer
radius
the radius of the outer circle
Returnthe length of one side of the n-angle
Since0.0.1
Version0.0.1
Calculates the volume of a cone given radius and height.
Cone might be slanted.
radius
the radius of the cone, a real number
height
the height of the cone, a real number
Returnthe volume of the cone
Since0.0.1
Version0.0.1
Calculates the mantle area of a straight cone given radius and length of side.
radius
the radius of the cone, a real number
side
the side of the cone, a real number
Returnthe mantle area of the cone
Since0.0.1
Version0.0.1
Calculates the area of a straight cone given radius and length of side.
radius
the radius of the cone, a real number
side
the side of the cone, a real number
Returnthe area of the cone
Since0.0.1
Version0.0.1
Calculates the length of the side of a straight cone given radius and height.
radius
the radius of the cone, a real number
height
the height of the cone, a real number
Returnthe length of the side of the cone
Since0.0.1
Version0.0.1
Calculates the height of a straight cone given radius and side.
radius
the radius of the cone, a real number
side
the side of the cone, a real number
Returnthe length of the side of the cone
Since0.0.1
Version0.0.1
Calculates the circumference of a circle given radius.
radius
the radius of the circle, a real number
Returnthe circumference of the circle
Since0.0.1
Version0.0.1
Calculates the area of a circle given radius.
radius
the radius of the circle, a real number
Returnthe area of the circle
Since0.0.1
Version0.0.1
Calculates the length of a secant of a circle given radius and the angle of the "cake piece".
radius
the radius of the circle, a real number
angle
the angle of the "cake piece", a real number
Returnthe length of the secant of the circle
Since0.0.1
Version0.0.1
Calculates the circumference of a part of a circle given radius and the angle of the "cake piece".
radius
the radius of the circle, a real number
angle
the angle of the "cake piece", a real number
Returnthe circumference of a part of the circle
Since0.0.1
Version0.0.1
Calculates the area of a part of a circle limited by a secant and a part of the circle given radius and the angle of the "cake piece".
radius
the radius of the circle, a real number
angle
the angle of the "cake piece", a real number
Returnthe area of a part of the circle limited by a secant and a part of the circle.
Since0.0.1
Version0.0.1
Calculates the area of a part of a circle (a "cake piece") circle given radius and the angle of the "cake piece".
radius
the radius of the circle, a real number
angle
the angle of the "cake piece", a real number
Returnthe area of the "cake piece"
Since0.0.1
Version0.0.1
Calulates the area of a ring given radii of the inner and the outer circle.
radius
_large the radius of the outer circle, a real number
radius
_small the radius of the inner circle, a real number
Returnthe area of the ring
Since0.0.1
Version0.0.1
Calulates the area of an ellipse given length of long and short axis.
a
length of one axis, a real number
a
length of the other axis, a real number
Returnthe area of the ellipse
Since0.0.1
Version0.0.1
Calulates the area of an ellipse given length of large and small diameter.
large
length of large diameter, a real number
small
length of small diameter, a real number
Returnthe area of the ellipse
Since0.0.1
Version0.0.1
Calulates the area of a Lamé curve.
n
a real number
a
a real number
b
a real number
Returnthe area of the Lamé curve
Since0.0.1
Version0.0.1
Calulates the volume of a rotated Lamé curve.
n
the common exponent, a real number
x
length, a real number
y
depth, a real number
z
width, a real number
s
the east-west parameter, a real number
n
the north-south parameter, a real number
Returnthe area of the Lamé curve
Since0.0.1
Version0.0.1
Calculates the volume of a sphere given radius.
radius
the radius of the sphere, a real number
Returnthe volume of the sphere
Since0.0.1
Version0.0.1
Calculates the area of a sphere given radius.
radius
the radius of the sphere, a real number
Returnthe area of the sphere
Since0.0.1
Version0.0.1
Calculates the circumference of a sphere given radius.
Reason is unknown. Let's call it an easter egg.
radius
the radius of the sphere, a real number
Returnthe circumference of the sphere
Since0.0.1
Version0.0.1
Calculates the volume of a sphere cap given radius of the footpoint circle and height of the cap.
radius
the radius of the footpoint circle, a real number
height
height of the cap, a real number
Returnthe volume of the sphere cap
Since0.0.1
Version0.0.1
Calculates the volume of a sphere cap given radius of the sphere and height of the cap.
radius
the radius of the sphere, a real number
height
height of the cap, a real number
Returnthe volume of the sphere cap
Since0.0.1
Version0.0.1
Calculates the volume of a torus given radius of the turning circle and its distance from the rotational axis.
Did you know: "torus" is the Latin word for the marriage bed?
radius
the radius of the truning circle, a real number
distance
distance from the rotational axis, a real number
Returnthe volume of the torus
Since0.0.1
Version0.0.1
Calculates the area of a torus given radius of the turning circle and its distance from the rotational axis.
Did you know: "torus" is the Latin word for the marriage bed?
radius
the radius of the turning circle, a real number
distance
distance from the rotational axis, a real number
Returnthe area of the torus
Since0.0.1
Version0.0.1
Finds out if the number is a happy number.
A number is a happy number if the sum of the squares of the digits, iterated until it reaches one of 0, 1, 4, 16, 20, 37, 42, 58, 89, or 145, reaches 1.
Returntrue if it is a happy number, false if not and undefined if the number is not an integer greater than 0
Since0.0.2
Version0.0.1
Namespace for the heatstore, just a literal.
tempuser
= temperature of the consumer
tempstorebegin
= temperature of the heat store at the beginning
tempstoreend
= temperature of the heat store at the end
coeff
= heat transmission coefficient 1 W/m^2K -> 0.001 kJ/m^2sK (k)
capa
= specific heat capacity (c)
mass
= mass (m)
exchanger
= area of the exchanger (A)
Returnthe time to cover the difference in temperature
Since0.0.1
Version0.0.1 /
Calculates the temperature of the consumer.
The letters in parenthesis are the variable names from Newton's cooling equation for sensible heat-stores
log(dt/dt0)= - kA/(cm) t
tempstorebegin
= temperature of the heat store at the beginning
tempstoreend
= temperature of the heat store at the end
coeff
= heat transmission coefficient 1 W/m^2K -> 0.001 kJ/m^2sK (k)
capa
= specific heat capacity (c)
mass
= mass (m)
time
= time (t)
exchanger
= area of the exchanger (A)
Returnthe temperature of the consumer
Since0.0.1
Version0.0.1
Calculates the final temperature of the heatstore.
The letters in parenthesis are the variable names from Newton's cooling equation for sensible heat-stores
log(dt/dt0)= - kA/(cm) t
tempuser
= temperature of the consumer
tempstorebegin
= temperature of the heat store at the beginning
coeff
= heat transmission coefficient 1 W/m^2K -> 0.001 kJ/m^2sK (k)
capa
= specific heat capacity (c)
mass
= mass (m)
time
= time (t)
exchanger
= area of the exchanger (A)
Returnthe final temperature of the heatstore
Since0.0.1
Version0.0.1
Calculates the temperature of the heatstore at the start.
The letters in parenthesis are the variable names from Newton's cooling equation for sensible heat-stores
log(dt/dt0)= - kA/(cm) t
tempuser
= temperature of the consumer
tempstoreend
= temperature of the heat store at the end
coeff
= heat transmission coefficient 1 W/m^2K -> 0.001 kJ/m^2sK (k)
capa
= specific heat capacity (c)
mass
= mass (m)
time
= time (t)
exchanger
= area of the exchanger (A)
Returnthe temperature of the heatstore at the start
Since0.0.1
Version0.0.1
Calculates the heat transmission coefficient.
The letters in parenthesis are the variable names from Newton's cooling equation for sensible heat-stores
log(dt/dt0)= - kA/(cm) t
tempuser
= temperature of the consumer
tempstorebegin
= temperature of the heat store at the beginning
tempstoreend
= temperature of the heat store at the end
capa
= specific heat capacity (c)
mass
= mass (m)
time
= time (t)
exchanger
= area of the exchanger (A)
Returnthe heat transmission coefficient
Since0.0.1
Version0.0.1
Calculates the area of the exchanger.
The letters in parenthesis are the variable names from Newton's cooling equation for sensible heat-stores
log(dt/dt0)= - kA/(cm) t
tempuser
= temperature of the consumer
tempstorebegin
= temperature of the heat store at the beginning
tempstoreend
= temperature of the heat store at the end
coeff
= heat transmission coefficient 1 W/m^2K -> 0.001 kJ/m^2sK (k)
capa
= specific heat capacity (c)
mass
= mass (m)
time
= time (t)
Returnthe area of the exchanger
Since0.0.1
Version0.0.1
Calculates the specific heat capacity.
The letters in parenthesis are the variable names from Newton's cooling equation for sensible heat-stores
log(dt/dt0)= - kA/(cm) t
tempuser
= temperature of the consumer
tempstorebegin
= temperature of the heat store at the beginning
tempstoreend
= temperature of the heat store at the end
coeff
= heat transmission coefficient 1 W/m^2K -> 0.001 kJ/m^2sK (k)
mass
= mass (m)
time
= time (t)
exchanger
= area of the exchanger (A)
Returnthe specific heat capacity
Since0.0.1
Version0.0.1
Calculates the mass of the heatstore.
The letters in parenthesis are the variable names from Newton's cooling equation for sensible heat-stores
log(dt/dt0)= - kA/(cm) t
tempuser
= temperature of the consumer
tempstorebegin
= temperature of the heat store at the beginning
tempstoreend
= temperature of the heat store at the end
coeff
= heat transmission coefficient 1 W/m^2K -> 0.001 kJ/m^2sK (k)
capa
= specific heat capacity (c)
time
= time (t)
exchanger
= area of the exchanger (A)
Returnthe mass of the heatstore
Since0.0.1
Version0.0.1
Calculates the logarithm of the Barnes G-function at the integer
n
.
n
an integer greater than or equal 0
Returnthe logarithm of the Barnes G-function at the integer
n
Since0.0.2
Version0.0.1
Calculates the logarithm of the K-function at the integer
n
.
n
an integer greater than or equal 0
Returnthe logarithm of the K-function at the integer
n
Since0.0.2
Version0.0.1
Calculates the logarithm of the hyperfactorial of the integer
n
.
n
an integer greater than or equal 0
Returnthe logarithm of the hyperfactorial of the integer
n
Since0.0.2
Version0.0.1
Calulates the final sum given capital, interest and term.
capital
the capital, a real number
interest
the interest, a real number
term
the term, a real number
Returnthe final sum
Since0.0.1
Version0.0.1
Calulates the interest given capital, final sum and term.
capital
the capital, a real number
final
the final sum, a real number
term
the term, a real number
Returnthe interest
Since0.0.1
Version0.0.1
Calulates the term given capital, final sum and interest.
capital
the capital, a real number
final
the final sum, a real number
interest
the interest, a real number
Returnthe term
Since0.0.1
Version0.0.1
Calulates the capital given final sum, interest and term.
capital
the capital, a real number
interest
the interest, a real number
term
the term, a real number
Returnthe term
Since0.0.1
Version0.0.1
The Levenshtein function compares two strings.
It calculates the number of insertions, substitutions and deletions necessary to transform string
s
into t
and vice versa. It uses the memory optimized algorithm.
s
a string
t
a string
ReturnLevenshtein difference
Since0.0.1
Version0.0.1
The weighted Levenshtein function compares two strings.
It calculates the number of insertions, substitutions and deletions necessary to transform string
s
into t
and vice versa. The different actions are weighted different from one. It uses the memory optimized algorithm.
s
a string
t
a string
wins
a real number (default value is 1.0)
wsub
a real number (default value is 2.0)
wdel
a real number (default value is 3.0)
ReturnLevenshtein difference
Since0.0.1
Version0.0.1
Calculates the Lucas number
n
. The Lucas number follow the linear recurrence
Ln = Ln-1+Ln-2
with L1 = 1
and L2 = 3
. It is computed with this recurrence for values of n
up to 100 and with φn otherwise.
n
the Lucas number to compute
Returnthe Lucas number
n
Since0.0.2
Version0.0.1
The smallest difference between two numbers
a,b
such that a != b
calculated at load time.Returnthe value of epsilon
Since0.0.1
Version0.0.1
The reciprocal of
Math_EPSILON
.Returnthe value of 1/epsilon
Since0.0.1
Version0.0.1
Calculates the largest integer that the factorial function is able to process.
Returnthe value of the largest argument to
Math.factorial
Since0.0.1
Version0.0.1
Twin prime conjecture (C2) and the rest of the Hardy-Littlewood constants.
Since0.0.1
Version0.0.1
Twin prime conjecture (C2) and the rest of the Hardy-Littlewood constants.
Since0.0.1
Version0.0.1
Twin prime conjecture (C2) and the rest of the Hardy-Littlewood constants.
Since0.0.1
Version0.0.1
Twin prime conjecture (C2) and the rest of the Hardy-Littlewood constants.
Since0.0.1
Version0.0.1
Twin prime conjecture (C2) and the rest of the Hardy-Littlewood constants.
Since0.0.1
Version0.0.1
Twin prime conjecture (C2) and the rest of the Hardy-Littlewood constants.
Since0.0.1
Version0.0.1
Twin prime conjecture (C2) and the rest of the Hardy-Littlewood constants.
Since0.0.1
Version0.0.1
Twin prime conjecture (C2) and the rest of the Hardy-Littlewood constants.
Since0.0.1
Version0.0.1
Twin prime conjecture (C2) and the rest of the Hardy-Littlewood constants.
Since0.0.1
Version0.0.1
Twin prime conjecture (C2) and the rest of the Hardy-Littlewood constants.
Since0.0.1
Version0.0.1
Twin prime conjecture (C2) and the rest of the Hardy-Littlewood constants.
Since0.0.1
Version0.0.1
Twin prime conjecture (C2) and the rest of the Hardy-Littlewood constants.
Since0.0.1
Version0.0.1
Twin prime conjecture (C2) and the rest of the Hardy-Littlewood constants.
Since0.0.1
Version0.0.1
Twin prime conjecture (C2) and the rest of the Hardy-Littlewood constants.
Since0.0.1
Version0.0.1
Twin prime conjecture (C2) and the rest of the Hardy-Littlewood constants.
Since0.0.1
Version0.0.1
Decides if
x
is an integer.
x
a number
Return
true
if x
is an integer, false
otherwise Since0.0.1
Version0.0.1
Calculates the factorial of
x
.
x
an integer greater than or equal 0
Returnthe factorial of
x
or undefined Since0.0.1
Version0.0.1
Calculates the double factorial of
n
.
n
an integer greater than or equal 0
Returnthe double factorial of
n
or NaN
Since0.0.1
Version0.0.1
Calculates the logarithm of the double factorial of
n
.
n
an integer greater than or equal 0
Returnthe logarithm of the double factorial of
n
or NaN
Since0.0.1
Version0.0.1
Calculates the logarithm of
a
base base
.
a
a real number
base
a real number
Returnthe logarithm of
a
base base
Since0.0.1
Version0.0.1
Calculates the logarithm of
a
base 2.
a
a real number
Returnthe logarithm of
a
base 2 Since0.0.1
Version0.0.1
Calculates the logarithm of
a
base 10.
a
a real number
Returnthe logarithm of
a
base 10 Since0.0.1
Version0.0.1
Calculates the logarithm of the logarithm of
a
base e
.
a
a real number
Returnthe logarithm of the logarithm of
a
base e
Since0.0.1
Version0.0.1
Calculates the uniform deviation of
n
which is out of a range with a maximum of rmax
.
n
a real number
rmax
a real number
Returnthe uniform deviation of
n
Since0.0.1
Version0.0.1
Calculates the uniform deviation of
n
which is out of a range with a maximum of RAND_MAX
such that the result is in the range rmin,rmax
.
n
a real number
RAND
_MAX a real number
rmin
a real number
rmax
a real number
Returnthe uniform deviation of
n
in the range rmin,rmax
Since0.0.1
Version0.0.1
Calculates the factors of given integer
n0
. Written by Paul Rubin <phr@ocf.berkeley.edu>. Adapted for GNU, fixed to factor UINT_MAX by Jim Meyering.
n0
an integer
max
_n_factors the maximum of factors to calculate for one integer, an integer
Returnan array with the factors of
n0
Since0.0.1
Version0.0.1
LicenseGPL
Calculates the greatest common denominator of integers
a
and b
.
a
an integer
Returnthe greatest common denominator of
a
and b
Since0.0.1
Version0.0.2
Calculates the least common multiple of integers
a
and b
.
a
an integer
Returnthe least common multiple of
a
and b
Since0.0.1
Version0.0.1
Truncates the number after digit
n
. Truncates the fractional parts of numbers with a fraction part and exchanges the
n
lower digits of integers with zeroes.
n
an integer
Returnthe truncated number or
NaN
Since0.0.1
Version0.0.1
Truncates the number
f
after digit n
. Truncates the fractional parts of numbers with a fraction part and exchanges the
n
lower digits of integers with zeroes.
f
a real number
n
an integer
Returnthe truncated number or
NaN
Since0.0.1
Version0.0.1
Makes a column out of a row.
Like the
'
operator in Octave.
v
an array
Returnan array with
v
length rows Since0.0.1
Version0.0.1
Decides if the number
n
is a power of 2.
n
a real number
Returna
true
if n
is a power of 2, false
otherwise Since0.0.1
Version0.0.1
Decides if the number
n
is a power of 10.
n
a real number
Returna
true
if n
is a power of 10, false
otherwise Since0.0.1
Version0.0.1
Decides if the number
n
is a power of e.
n
a real number
Returna
true
if n
is a power of e, false
otherwise Since0.0.1
Version0.0.1
Calulates a number larger than
n
and a power of 2.
n
a real number
Returna number larger than
n
and a power of 2 Since0.0.1
Version0.0.1
Calulates a number larger than
n
and a power of 10.
n
a real number
Returna number larger than
n
and a power of 10 Since0.0.1
Version0.0.1
Calulates a number larger than
n
and a power of e.
n
a real number
Returna number larger than
n
and a power of e Since0.0.1
Version0.0.1
Calulates the number of bits needed for number
n
.
n
a real number
Returnthe number of bits needed for number
n
Since0.0.1
Version0.0.1
Reverses the bits in
n
. The FFT function this little algorithm belongs to is a work in progress.
n
a real number
Returnthe reversed bits of
n
Since0.0.1
Version0.0.1
Returns the proportion of the matrix.
One of the strings "irregular", "square", "rect", "vector","number" or "undefined".
Returnthe proportion of the matrix
Since0.0.1
Version0.0.2
Counts the number of elements in the matrix.
Returnthe number of elements in the matrix
Since0.0.1
Version0.0.1
Finds the rank of the matrix.
Returnthe rank of the matrix or
Number.NaN
Since0.0.1
Version0.0.2
Adds the matrix in the array and
m
. Length and form of both matrices must be similar.
m
the matrix to add, an array
Returnthe sum of the two matrices
Since0.0.1
Version0.0.1
Adds the matrices
a
and m
. Length and form of both matrices must be similar.
a
the matrix to add, an array
m
the matrix to add, an array
Returnthe sum of the two matrices
Since0.0.1
Version0.0.1
Subtracts
m
from the matrix in the array. Length and form of both matrices must be similar.
m
the matrix to subtract, an array
Returnthe difference of the two matrices
Since0.0.1
Version0.0.1
Subtracts
m
from the matrix a
. Length and form of both matrices must be similar.
a
the matrix to be subtracted, an array
m
the matrix to subtract, an array
Returnthe difference of the two matrices
Since0.0.1
Version0.0.1
Multiplies the matrix in the array with the matrix
m
in that order.
m
the multiplicator matrix, an array
Returnthe product of the two matrices
Since0.0.1
Version0.0.1
Multiplies the matrix
a
with the matrix m
in that order.
a
the multiplicator matrix, an array
m
the multiplicator matrix, an array
Returnthe product of the two matrices
Since0.0.1
Version0.0.1
Calculates the determinant of the matrix.
Returnthe determinant of the matrix or
Number.NaN
Since0.0.1
Version0.0.2
Calculates the determinant of the matrix.
a
the matrix, an array
Returnthe determinant of the matrix or
Number.NaN
Since0.0.1
Version0.0.2
Calculates the transposition of the matrix.
Returnthe transposition of the matrix or
undefined
. Since0.0.1
Version0.0.1
Calculates the transposition of the matrix.
a
the matrix, an array
Returnthe transposition of the matrix or
undefined
Since0.0.1
Version0.0.1
Calculates the adjoints for the matrix in the array.
Returnthe adjoints of the matrix or
undefined
Since0.0.1
Version0.0.1
Calculates the adjoints for the matrix in the array @author Christoph Zurnieden @param a the matrix, an array @return the adjoints of the matrix or
undefined
@since 0.Version0.0.1
Calculates the inverse of the matrix.
Returnthe inverse of the matrix or
undefined
Since0.0.1
Version0.0.1
Calculates the of the matrix.
a
the matrix, an array
Returnthe inverse of the matrix or
undefined
Since0.0.1
Version0.0.1
Returns an identity matrix of size
size
.
size
size of the identity matrix, an integer greater than 0
Returnthe identity matrix or
undefined
. Since0.0.1
Version0.0.1
Returns a matrix of size
size
with all elements set to 1.
size
size of the matrix, an integer greater than 0
Returnthe matrix or
undefined
. Since0.0.1
Version0.0.1
Returns a matrix with
col
columns and row
rows with all elements set to n
.
col
number of columns, an integer greater than 0
row
number of rows, an integer greater than 0
n
the value of all elements, a real number
Returnthe matrix or
undefined
if col
and row
are smaller than 1 and Number.NaN
if n
is not a number Since0.0.1
Version0.0.2
Fills up an irregular matrix with elements set to the value
n
to build a square matrix. It will add the new elements at the end of the rows and the columns respectively.
n
the value the added elements will take
Returnthe edited matrix number
Since0.0.1
Version0.0.1
Fills up an irregular matrix with elements set to the value
n
to build a square matrix. It will add the new elements at the end of the rows and the columns respectively.
a
the matrix, an array
n
the value the added elements will take (default is 0)
Returna square matrix number
Since0.0.1
Version0.0.1
Rounds the values of the matrix to precision
n
.
n
the precission
Returnthe rounded matrix number
Since0.0.1
Version0.0.1
Rounds the values of the matrix to precission
n
.
a
the matrix, an array
n
the precission
Returnthe rounded matrix or
undefined
number Since0.0.1
Version0.0.1
Evaluates the Kronecker delta of the given arguments.
This function takes an arbitrary number of arguments.
LIST
a number of at least 2 (two) numerical arguments
Return1 (one) if all arguments are equal and 0 (zero) otherwise or
Number.NaN
if any of the arguments is not a number Since0.0.5
Version0.0.1
Rotates a vector or a regular matrix in the array 90 degrees clockwise like the
'
operator in Octave.Returnthe rotated vector or matrix or
undefined
Since0.0.5
Version0.0.1
Rotates a vector or a regular matrix in
m
90 degrees clockwise like the '
operator in Octave.
m
an array with a non-irregular matrix or a vector
Returnthe rotated vector or matrix or
undefined
Since0.0.5
Version0.0.1
Calculates the trace (the sum of the values of the main diagonal) of a square matrix in the array.
Returnthe trace of the matrix or
undefined
Since0.0.5
Version0.0.1
Calculates the trace (the sum of the values of the main diagonal) of a square matrix in
m
.
m
an array with a square matrix
Returnthe trace of the matrix or
undefined
Since0.0.5
Version0.0.1
Calculates the product of the array and
m
.
m
an array, the matrix
Returnan array, the product or
undefined
if the matrices are not rectangular or if the number of columns of the array does not equal the number of rows of m
Since0.0.5
Version0.0.1
Calculates the product of the two matrices
a
and m
.
a
an array, the matrix
m
an array, the matrix
Returnan array, the product or
undefined
if the matrices are not rectangular or if the number of columns of a
does not equal the number of rows of m
Since0.0.5
Version0.0.1
Calculates the
n
th power of the square matrix in the array.
n
a positive integer greater than or equal 0
Returnan array, the power or
undefined
if the matrix is not square or Number.NaN
if n
is not a number Since0.0.5
Version0.0.1
Calculates the
n
th power of the square matrix m
.
m
a square matrix
n
a positive integer greater than or equal 0
Returnan array, the power or
undefined
if the matrix is not square or Number.NaN
if n
is not a number Since0.0.5
Version0.0.1
Find the roots of a square polynome with real coefficients numerically.
The coefficients are from left to right
x^2a + xb + c
A
a real, coefficient of the square
B
a real, coefficient of the variable
C
a real, the constant
Returna 2-element array with 2-element subarrays comprising the real and the imaginary parts of the solution in that order or
undefined
in case of an error Since0.0.5
Version0.0.1
Find the roots of a cubic polynome with real coefficients numerically.
The algorithm is the ordinary one described at http://mathworld.wolfram.com/CubicFormula.html The coefficients are from left to right
x^3a + x^2 b + xc + d
A
a real, coefficient of the cube
B
a real, coefficient of the square
C
a real, coefficient of the variable
D
a real not equal 0, the constant
Returna 3-element array with 2-element subarrays comprising the real and the imaginary parts of the solution in that order or
undefined
in case of an error Since0.0.5
Version0.0.1
Calculates the eigenvalues of the 2x2 square matrix
m
with real values.
m
a square matrix with real values
Returna 2-element array comprising 2-element arrays (Re and Im in that order)with the eigenvalues or
undefined
if the matrix is not a 2x2 square matrix Since0.0.5
Version0.0.1
Calculates the eigenvalues of the 3x3 square matrix
m
with real values.
m
a square matrix
Returna 3-element array comprising 2-element arrays (Re and Im in that order)with the eigenvalues or
undefined
if the matrix is not a 3x3 square matrix Since0.0.5
Version0.0.1
Constructor of the
Matrix
class. The special matrix "empty" listed in the table below is this 2×2 matrix:
Number.NaN | Number.NaN |
Number.NaN | "empty" |
rows
an integer greater than 0
cols
an integer greater than 0
type
a string
String | Description |
---|---|
identity | The identity matrix |
exchange | The identity matrix rotated 90 deg clockwise |
lehmer | The Lehmer matrix |
hilbert | The Hilbert matrix |
zero | Default. A rows×cols matrix with all values set to 0 (zero) |
uppershift | Upper main diagonal set to 1, rest to 0 |
lowershift | Lower main diagonal set to 1, rest to 0 |
empty | The special matrix used to mark an empty set |
Since0.0.6
Version0.0.2
Parses the format used by Octave and others into a matrix.
The ';' (semicolon) separates the rows and the ',' (comma) separates the columns, the whole thing can be optionally enclosed in square brackets to ease C&P. Example: "[ 0, 1 + 9.9i; 1 - 9.9i,0 ]". The parser for the complex numbers is a bit oversensitive with spaces if it gets not enough. Example that gives false results: "[1-8i,6+9i;1,2]" Nestes matrices are not yet implemented.
Returna matrix
Since0.0.6
Version0.0.1
Compares two matrices for equality.
Equal means that one matrix is an exact copy of the other.
m
a matrix
Returntrue if both matrices are equal and false otherwise
Since0.0.6
Version0.0.1
Checks if the matrix is empty.
Returntrue if the matrix is empty and false otherwise
Since0.0.6
Version0.0.1
Finds the form of the matrix.
Returna string, one of 'number' (1×1), 'vector' (1×n), 'square' (n×n), 'rect' (n×m with n!=m), 'irregular' (if the length of the rows differ) or undefined
Since0.0.6
Version0.0.1
The lengths of row and column.
Returna 2-element array with the length of the row and the length of the column in that order
Since0.0.6
Version0.0.1
Transposes and conjugates a matrix.
Returnthe conjugated transposed matrix
Since0.0.6
Version0.0.1
Transposes and conjugates a matrix.
conj
a boolean value set to true if the transpose shall be a conjugated one
Returnthe transposed matrix
Since0.0.6
Version0.0.1
Subtraction of two matrices.
m
a matrix
Returnthe difference
Since0.0.6
Version0.0.1
Multiplication of two matrices.
m
a matrix, the right multiplicant
Returnthe product
Since0.0.6
Version0.0.1
Divides the matrix by
m
.
m
a matrix, the denominator
Returnthe quotient
Since0.0.6
Version0.0.1
Rotates a matrix 90 degrees anti-clockwise.
Returnthe rotated matrix or undefined
Since0.0.6
Version0.0.1
Calculates the trace of the matrix.
Returna complex, the trace
Since0.0.6
Version0.0.1
Calculates the determinant of the matrix.
Returna complex, the determinant
Since0.0.6
Version0.0.2
Calculates the adjoint of a square matrix.
Returna matrix, the adjoint or 'Matrix.NaM' if the matrix is not square.
Since0.0.6
Version0.0.1
Changes the precision used.
n
a positive integer
Returna complex
Since0.0.6
Version0.0.1
Rounds the complex.
Uses just
Math.round()
on the real and the imaginary part. Returna complex, rounded
Since0.0.6
Version0.0.1
Rounds the complex to the nearest integer value.
Uses just
Math.nint()
on the real and the imaginary part. Returna complex, rounded
Since0.0.6
Version0.0.1
SeeMath.nint
Packs the three 2×2 Pauli matrices into an array.
Returna 3-element array with the 2×2 Pauli matrices
Since0.0.6
Version0.0.1
Builds a copy of the matrix by value.
Returna copy of the matrix
Since0.0.6
Version0.0.1
Sets all elements in a matrix to zero that fall below a limit.
The comparisons are made between the absolute values of the real and imaginary parts of the elements individually and the limit (the limit is for both).
limit
a real number (default is {
Returna matrix
Since0.0.7
Version0.0.1
Sets all numbers in an array to zero that fall below a limit.
The comparisons for complex numbers are made between the absolute values of the complex and the limit if
useAbs
is set to true and between the individual real and imaginary parts and the limit otherwise. Defaults to false
limit
a real number (default is this.length × EPSILON)
useAbs
set
true
if it shall use Complex.abs()
instead of handling the real and imaginary parts separatly. Defaults to false
Returnan array
Since0.0.7
Version0.0.2
Compares two arrays with numbers (real or complex) for strict equality.
a
an array
Returntrue if both arrays are the same, false otherwise
Since0.0.7
Version0.0.1
Extracts the main diagonal from a square matrix.
Returnan array with the values of the main diagonal
Since0.0.7
Version0.0.1
Calculates the LUP decomposition of a complex rectangular matrix
A = PLU
. Sets entries to 0+0i if the absolute value of the entry is smaller than
Math.EPSILON
, the machine's precision. Parts of the code is a port from the Public Domain software "Jama" http://math.nist.gov/javanumerics/jama/. Returna 4-element matrix with the the matrix L, the matrix U, the permutation matrix P and the determinant of the matrix (if the matrix is square, Complex(Number.NaN,Number.NaN) otherwise) in that order
Since0.0.7
Version0.0.1
Makes a decision about the non-singularity of a rectangular matrix via LU-decomposition.
Returntrue if the matrix is non-singular, "undefined" if the matrix is not rectangular and false otherwise
Since0.0.7
Version0.0.1
Changes the precision of the values in the matrix.
n
an integer greater than 0
Returna matrix with the changed precision
Since0.0.7
Version0.0.1
Changes the precision of the values in the array.
n
an integer greater than 0
Returnan array with the changed precision
Since0.0.7
Version0.0.1
Calculates
sqrt(a×b)
. The result is similar to the Java function of the same name.
a
a number (integer, real or complex)
b
a number (integer, real or complex)
Returna number, integer, real or complex depending on the input, or "undefined" if a different number of arguments than 2 are given, or
Number.NaN
if a
or b
are not numbers Since0.0.7
Version0.0.1
Calculates the QR decomposition of a complex general matrix.
A port of the Java code in the Public Domain software "Jama" http://math.nist.gov/javanumerics/jama/.
Returna 2-element array with the matrices Q and R in that order or "undefined" if the matrix is not square
Since0.0.7
Version0.0.1
Calculates the 2-norm condition of a real general matrix.
It calculates these values by doing a singular value decomposition.
limit
the upper limit for wich a number shall be considered zero, default is
Math.max(row,col) S[0][0] Math.EPSILON
Returnan integer, the rank
Since0.0.7
Version0.0.1
Calculates the rank of a real general matrix.
It calculates these values by doing a singular value decomposition.
limit
the upper limit for wich a number shall be considered zero, default is
Math.max(row,col) S[0][0] Math.EPSILON
Returnan integer, the rank
Since0.0.7
Version0.0.1
Calculates the rank, norm and 2-norm condition of a real general matrix.
It calculates these values by doing a singular value decomposition. It is advised to inspect the result of the singular value decomposition by hand if very small values are expected.
type
an integer, the type of information: 1 = rank, 2 = 2-norm, 3 = 2-norm condition
limit
the upper limit for wich a number shall be considered zero, default is
Math.max(row,col) S[0][0] Math.EPSILON
Returnan integer, the rank or "undefined" if m ;lt; n or "Matrix.NaM" if the given matrix is not what it seemd to be
Since0.0.7
Version0.0.1
Calculates the singular value decomposition of a real general matrix.
It ignores any imaginary parts of the complex numbers given. This is a nearly verbatim port from the Public Domain software "Jama" http://math.nist.gov/javanumerics/jama/. The main difference is, that it does not depend on
rows>columns
anymore.
svdonly
calulate only the singular values if set to true
Returna 3-element array with matrices U, S, V in that order or an array with the singular values if parameter
svdonly
is set to true Since0.0.7
Version0.0.1
Constructs an orthogonal Hessenberg matrix from a real square Matrix.
The Hessenberg matrix returned is a concatenation of both the upper and the lower Hessenberg matrix, no extra massages needed to extract any of them. This is a nearly verbatim port from the Public Domain software "Jama" http://math.nist.gov/javanumerics/jama/.
Returna 2-element array with the the Hessenberg matrix and the matrix V, in that order
Since0.0.7
Version0.0.1
Extracts the upper Hessenberg matrix from a Hessenberg matrix.
Returna matrix with the the upper Hessenberg matrix
Since0.0.7
Version0.0.1
Computes Eigenvalues and Eigenvectors via the Schur-decomposition of a real square matrix.
It ignores any imaginary parts of the complex numbers given.
This is a nearly verbatim port from the Public Domain software "Jama" http://math.nist.gov/javanumerics/jama/ so the comments there hold here too.
If A is symmetric, then A = VDV' where the eigenvalue matrix D is diagonal and the eigenvector matrix V is orthogonal and VV' equals the identity matrix.
If A is not symmetric, then the eigenvalue matrix D is block diagonal with the real eigenvalues in 1-by-1 blocks and any complex eigenvalues, lambda + imu, in 2-by-2 blocks, [lambda, mu; -mu, lambda]. The columns of V represent the eigenvectors in the sense that AV = VD. The matrix V may be badly conditioned, or even singular, so the validity of the equation A = VD inv(V) depends upon V.cond().
This is a nearly verbatim port from the Public Domain software "Jama" http://math.nist.gov/javanumerics/jama/ so the comments there hold here too.
If A is symmetric, then A = VDV' where the eigenvalue matrix D is diagonal and the eigenvector matrix V is orthogonal and VV' equals the identity matrix.
If A is not symmetric, then the eigenvalue matrix D is block diagonal with the real eigenvalues in 1-by-1 blocks and any complex eigenvalues, lambda + imu, in 2-by-2 blocks, [lambda, mu; -mu, lambda]. The columns of V represent the eigenvectors in the sense that AV = VD. The matrix V may be badly conditioned, or even singular, so the validity of the equation A = VD inv(V) depends upon V.cond().
Returna 3-element array with a matrix containing the eigenvectors, the real parts of the eigenvalues and the imaginary parts of the eigenvalues and the eigenvalue matrix in that order.
Since0.0.7
Version0.0.1
Extracts all real parts of the matrix and puts them in a 2-d array.
Returna 2-dimensional array with the real parts
Since0.0.7
Version0.0.1
Extracts all imaginary parts of the matrix and puts them in a 2-d array.
Returna 2-dimensional array with the imaginary parts
Since0.0.7
Version0.0.1
Converts a 2-d array into a member of the Matrix class.
The inverse of
Matrix.Re()
and Matrix.Im()
. It is e.g. possible to join both of these matrices with this function back into the original matrix re_part.toMatrix(im_part)
.
m
optionally a 2-d array containing the values for the imaginary part
Returna Matrix
Since0.0.7
Version0.0.1
Checks if the all of the imaginary parts of the elements of the matrix are zero.
Returnfalse if at least one element has an imaginary part, true otherwise
Since0.0.7
Version0.0.1
Checks if at least one element of the matrix has an imaginary part different from zero.
Returntrue if at least one element has an imaginary part, false otherwise
Since0.0.7
Version0.0.1
Finds the difference between the smallest and the largest element in the array.
a
the array
Returnthe difference in between the element in the array or
undefined
if all are equal Since0.0.1
Version0.0.1
Finds the difference between the smallest and the largest element in the array.
Returnthe difference in between the element in the array or
undefined
if all are equal Since0.0.1
Version0.0.1
Calculates the harmonic mean of the elements in the array.
a
the array
Returnthe harmonic mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the harmonic mean of the elements in the array.
Returnthe harmonic mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the geometric mean of the elements in the array.
a
the array
Returnthe geometric mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the geometric mean of the elements in the array.
Returnthe geometric mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the square mean of the elements in the array.
a
the array
Returnthe square mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the square mean of the elements in the array.
Returnthe square mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the arithmetic mean of the elements in the array.
a
the array
Returnthe arithmetic mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the arithmetic mean of the elements in the array.
Returnthe arithmetic mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the arithmetic mean of the logarithms of the elements in the array.
a
the array
Returnthe arithmetic mean of the logarithms of the elements in the array
Since0.0.1
Version0.0.1
Calculates the arithmetic mean of the logarithms of the elements in the array.
Returnthe arithmetic mean of the logarithms of the elements in the array
Since0.0.1
Version0.0.1
Calculates the power mean of the elements in the array.
a
the array
Returnthe power mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the power mean of the elements in the array.
Returnthe power mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the arithmetic-geometric mean of the elements of two arrays.
a
an array
b
an array
Returnthe arithmetic-geometric mean of the elements of the two arrays
Since0.0.1
Version0.0.1
Calculates the arithmetic-geometric mean of the elements in the array.
a
the array
Returnthe arithmetic-geometric mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the arithmetic-geometric mean of the elements in the array.
Returnthe arithmetic-geometric mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the geometric-harmonic mean of the elements of two arrays.
a
an array
b
an array
Returnthe geometric-harmonic mean of the elements of the two arrays
Since0.0.1
Version0.0.1
Calculates the geometric-harmonic mean of the elements in the array.
a
the array
Returnthe geometric-harmonic mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the geometric-harmonic mean of the elements in the array.
Returnthe geometric-harmonic mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the arithmetic-harmonic mean of the elements in the array.
a
the array
Returnthe arithmetic-harmonic mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the arithmetic-harmonic mean of the elements in the array.
Returnthe arithmetic-harmonic mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the weighted geometric mean of the elements in the array.
a
the array
w
the weight, an array with real numbers
Returnthe weighted geometric mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the weighted geometric mean of the elements in the array.
w
the weight, an array with a real numbers
Returnthe weighted geometric mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the weighted arithmetic mean of the elements in the array.
a
the array
w
the weight, an array with real numbers
Returnthe weighted arithmetic mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the weighted arithmetic mean of the elements in the array.
w
the weight, an array with real numbers
Returnthe weighted arithmetic mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the weighted harmonic mean of the elements in the array.
a
the array
w
the weight, an array with real number
Returnthe weighted harmonic mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the weighted harmonic mean of the elements in the array.
a
the array
w
the weight, an array with real numbers
Returnthe weighted harmonic mean of the elements in the array
Since0.0.1
Version0.0.1
Calculates the median of the elements in the array.
a
the array
f
an optional different sorting function
Returnthe median of the elements in the array
Since0.0.1
Version0.0.1
Calculates the median of the elements in the array.
f
an optional different sorting function
Returnthe median of the elements in the array
Since0.0.1
Version0.0.1
Calculates the mode of the elements in the array.
a
the array
Returnthe mode of the elements in the array as a 2-element array with the element defining the mode and th number of occurances of this element in that order or
undefined
if more than one such element exists. Since0.0.1
Version0.0.1
Calculates the mode of the elements in the array.
Returnthe mode of the elements in the array as a 2-element array with the element defining the mode and th number of occurances of this element in that order or
undefined
if more than one such element exists. Since0.0.1
Version0.0.1
Calculates the variance of the elements in the array.
a
the array
Returnthe variance of the elements in the array
Since0.0.1
Version0.0.1
Calculates the variance of the elements in the array.
Returnthe variance of the elements in the array
Since0.0.1
Version0.0.1
Calculates the variance of the logarithms of the elements in the array.
a
the array
Returnthe variance of the logarithms of the elements in the array
Since0.0.1
Version0.0.1
Calculates the variance of the logarithms of the elements in the array.
Returnthe variance of the logarithms of the elements in the array
Since0.0.1
Version0.0.1
Calculates the co-variance between the elements in the array
a
and the elements in the array y
.
a
the first array
y
the second array
Returnthe co-variance between the elements in the array
a
and the elements in the array y
Since0.0.1
Version0.0.1
Calculates the co-variance between the elements in the array and the elements in the array
y
.
y
the second array
Returnthe co-variance between the elements in the array
a
and the elements in the array y
Since0.0.1
Version0.0.1
Calculates the standard deviation of the elements in the array.
a
the array
Returnthe standard deviation of the elements in the array
Since0.0.1
Version0.0.1
Calculates the standard deviation of the elements in the array.
Returnthe standard deviation of the elements in the array
Since0.0.1
Version0.0.1
Calculates the standard deviation of the logarithms of the elements in the array.
a
the array
Returnthe standard deviation of the logarithms of the elements in the array
Since0.0.1
Version0.0.1
Calculates the standard deviation of the logarithms of the elements in the array.
Returnthe standard deviation of the logarithms of the elements in the array
Since0.0.1
Version0.0.1
Calculates the average deviation of the elements in the array.
a
the array
Returnthe average deviation of the elements in the array
Since0.0.1
Version0.0.1
Calculates the average deviation of the elements in the array.
Returnthe average deviation of the elements in the array
Since0.0.1
Version0.0.1
Calculates the geometric deviation of the elements in the array.
a
the array
Returnthe geometric deviation of the elements in the array
Since0.0.1
Version0.0.1
Calculates the geometric deviation of the elements in the array.
Returnthe geometric deviation of the elements in the array
Since0.0.1
Version0.0.1
Calculates the skewness of the elements in the array.
Returnthe skewness of the elements in the array
Since0.0.1
Version0.0.1
Calculates the kurtosis of the elements in the array.
Returnthe kurtosis of the elements in the array
Since0.0.1
Version0.0.1
Calculates the normalized kurtosis of the elements in the array.
A lot of statisticians subtract 3 from the value of the kurtosis such that the ideal case is 0 instead of 3.
Returnthe kurtosis -3 of the elements in the array
Since0.0.1
Version0.0.1
Calculates the period of a mathematical pendulum.
The Surface acceleration of the Earth is 9.780 m/s2 (NASA)
length
the length of the pendulum, a real number greater than 0
g
acceleration of gravity, a real number
Returnthe period of a mathematical pendulum
Since0.0.1
Version0.0.1
Calculates the pendulum length of a mathematical pendulum.
period
the period of the pendulum, a real number greater than 0
g
acceleration of gravity, a real number
Returnthe pendulum length
Since0.0.1
Version0.0.1
Calculates the difference in vertical distance of the object in time.
time
a real number
g
acceleration of gravity, a real number
Returnthe vertical distance traveled in time
Since0.0.1
Version0.0.1
Calculates the time spend to travel a vertical distance.
distance
the vertical distance, a real number
g
acceleration of gravity, a real number
Returnthe time needed to travel a vertical distance
Since0.0.1
Version0.0.1
Calculates a ballistical curve (in vacuum).
speed
speed at start
angle
angle at start
grav
accelerating gravity
Returnmaximum height, time to reach maximum height, maximum width and the time to reach maximum width in an array in that order
Since0.0.1
Version0.0.1
Calculates the force between two bodies.
mone
mass of the first body, a real number greater than 0
mtwo
mass of the first body, a real number greater than 0
distance
distance between the centers of gravity of the two bodies
Returnthe force (but not The Force, so don't be too disappointed)
Since0.0.1
Version0.0.1
Calculates the escape velocity (one body).
The radius must be larger than zero and larger than the Schwarzschild radius of the body.
mass
the mass of the body, a real number greater than 0
radius
radius of the body, a real number greater than 0
Returnthe escape velocity
Since0.0.1
Version0.0.1
Calculates the acceleration of gravity.
The radius must be larger than zero and larger than the Schwarzschild radius of the body.
mass
the mass of the body, a real number greater than 0
radius
the radius of the body
Returnthe acceleration of gravity
Since0.0.1
Version0.0.1
Calculates the average velocity of particles in a gas.
temp
the temperature, a real number greater than 0
mass
the mass of one particle, a real number greater than 0
Returnthe average velocity of particles in a gas
Since0.0.1
Version0.0.1
Calculates the Lorenz factor for given speed.
speed
the speed of the object, a real number greater 0 and smaller than 299792458.
Returnthe Lorenz factor
Since0.0.1
Version0.0.1
Calculates the time dilation.
time
the time of the resting body, a real number greater than 0
speed
the velocity of the moving body, a real number greater 0 and smaller than 299792458.
Returnthe time dilation
Since0.0.1
Version0.0.1
Calculates the length contraction.
length
the length of the resting body, a real number greater than 0
speed
the velocity of the moving body, a real number greater 0 and smaller than 299792458
Returnthe length contraction
Since0.0.1
Version0.0.1
Calculates the sum of two speeds in the same direction with relativistic correction.
one
first speed, a real number greater 0 and smaller than 299792458
two
second speed, a real number greater 0 and smaller than 299792458
Returnthe sum of the two speeds
Since0.0.1
Version0.0.1
Calculates the mass of a moving body.
mass
rest mass of the body, a real number greater than 0
Returnthe mass of a moving body
Since0.0.1
Version0.0.1
Calculates the velocity with given redshift.
This is the first of the three most inexact functions in this collection.
redshift
the redshift, a real number greater than 0 and smaller than 1
Returnthe velocity
Since0.0.1
Version0.0.1
Calculates the scaling factor in comparison with today with given redshift.
The scaling factor is the factor to multiply the actual size of the universe with to get the size of the universe before today. This is the second of the three most inexact functions in this collection.
redshift
the redshift, a real number greater than 0 and smaller than 1
Returnthe scaling factor in comparison with today
Since0.0.1
Version0.0.1
Calculates the distance given speed and Hubble factor.
If no Hubble factor is given, 75000 m/s is taken.
speed
the speed of the object, a real number greater than 0 and smaller than 199861638 (two third of the speed of light in vacuum)
hubble
the Hubble factor in m/s.
Returnthe distance or
undefined
if speed is greater than allowed Since0.0.1
Version0.0.1
Calculates the De Broglie wave length.
mass
the mass, a real number greater than 0
speed
the speed, a real number greater than 0 and smaller than 299792458
Returnthe De Broglie wave length
Since0.0.1
Version0.0.1
Calculates the Compton wavelength.
mass
the mass, a real number greater than 0
Returnthe Compton wavelength
Since0.0.1
Version0.0.1
Calculates the exit work of a photon.
f
the limit frequency, a real number greater than 0
Returnthe exit work of a photon
Since0.0.1
Version0.0.1
Calculates the energy of a photon given its frequency.
f
the frequency, a real number greater than 0
Returnthe energy of a photon
Since0.0.1
Version0.0.1
Calculates the mass of a photon given its frequency.
f
the frequency, a real number greater than 0
Returnthe mass of a photon
Since0.0.1
Version0.0.1
Calculates the impulse of a photon given its frequency.
f
the frequency, a real number greater than 0
Returnthe impulse of a photon
Since0.0.1
Version0.0.1
Calculates the Doppler effect given the frequency of the radiation, direction and speed of sender.
freq
the frequency of the radiation, a real number greater than 0
speed
the speed of the sender, a real number greater 0 and significantly smaller than the speed of light.
direction
the direction of the sender, a string. One of "toward" if the sender moves towards the receiver or "away"
maxspeed
the maximum speed a wave can reach in the medium, for example sonic speed, light speed.
Returnthe frequency at the receiver
Since0.0.1
Version0.0.1
Calculates the Doppler effect given the frequency of the radiation, direction and speed of receiver.
freq
the frequency of the radiation, a real number greater than 0
speed
the speed of the receiver, a real number greater 0 and significantly smaller than the speed of light.
direction
the direction of the receiver, a string. One of "toward" if the receiver moves towards the sender or "away"
maxspeed
the maximum speed a wave can reach in the medium, for example sonic speed, light speed.
Returnthe frequency at the receiver
Since0.0.1
Version0.0.1
Calculates the angular frequency.
f
the frequency, a real number greater than 0
Returnthe angular frequency
Since0.0.1
Version0.0.1
Calculates the wavelength of a body.
mass
the mass of the body, a real number greater than 0
speed
the speed of the body, a real number greater than 0 and smaller than 299792458
Returnthe wavelength of the body
Since0.0.1
Version0.0.1
Calculates the radiation of a black body.
temp
the temperature of the black body, a real number greater than 0
wlen
the wavelength of the radiation
Returnthe amount of radiation of the black body
Since0.0.1
Version0.0.1
Calculates the luminosity of a star.
temp
the temperature of the surface of the star
radius
the radius of the start
Returnthe luminosity of the star
Since0.0.1
Version0.0.1
Calculates the apparent magnitude of a star.
lum
the visible luminosity of the star
distance
the distance to the star
Returnthe apparent magnitude of the star
Since0.0.1
Version0.0.1
Calculates
n
th Fibonacci number directly.
n
an integer greater than 0
Returnthe
n
th Fibonacci number Since0.0.2
Version0.0.1
Rotates the ASCII-characters in the string 13 places.
Returnthe ASCII-characters in the string rotated 13 places
Since0.0.2
Version0.0.1
Builds an array with words from of the string.
The interpretation of "word" is: anything that is not a space character is a member of the word. That includes all the signs and symbols of the full 16 bit unicode range.
Returnan array with the words of the string
Since0.0.2
Version0.0.1
Builds an array with words from of the string, ASCII only.
The interpretation of "word" is: a-z, A-Z and the hyphen.
Returnan array with the words of the string
Since0.0.2
Version0.0.1
Counts the words in the string.
The interpretation of "word" is: anything that is not a space character is a member of the word. That includes all the signs and symbols of the full 16 bit unicode range.
Returnan array with the words of the string
Since0.0.2
Version0.0.1
Counts the words in the string, ASCII only.
The interpretation of "word" is: a-z, A-Z and the hyphen.
Returnan array with the words of the string
Since0.0.2
Version0.0.1
Counts the words in the string, every different word only once.
The interpretation of "word" is: anything that is not a space character is a member of the word. That includes all the signs and symbols of the full 16 bit unicode range.
Returnan array with the unique words of the string
Since0.0.2
Version0.0.1
Counts the words in the string, every different word only once, ASCII only.
The interpretation of "word" is: a-z, A-Z and the hyphen.
Returnan array with the unique words of the string
Since0.0.2
Version0.0.1
Counts the characters, words and lines of the string like the Unix
wc
command. The interpretation of "word" is: anything that is not a space character is a member of the word. That includes all the signs and symbols of the full 16 bit unicode range. Line ending is restricted to \r, \n, \r\n, \n\r (MacOS, most Unices, DOS/Windows, and dyslexic programmers).
Returnan array with the count of lines, words and characters in that order
Since0.0.2
Version0.0.1
Counts the characters, words and lines of the string like the Unix
wc
command. The interpretation of "word" is: a-z, A-Z and the hyphen. Line ending is restricted to \r, \n, \r\n, \n\r (MacOS, most Unices, DOS/Windows, and dyslexic programmers).
Returnan array with the count of lines, words and characters in that order
Since0.0.2
Version0.0.1
Counts the frequencies of the characters in the string.
The interpretation of "character" is: what the Javascript interpreter thinks is a character (the control character
\W
is used). It is most probably restricted to the ASCII range. Returnan array with the count of each character order
Since0.0.2
Version0.0.1
Calculates the Schwarzschild radius of a static black hole.
This method is not really correct but a good approximation. It is actually the so called apparent horizon, the distance from a black hole from which no photon can escape.
mass
the mass, a real number greater than 0
Returnthe Schwarzschild radius
Since0.0.2
Version0.0.1
Calculates the temperature given wavelength.
wlen
the wavelength, a real number greater than 0
Returnthe temperature
Since0.0.2
Version0.0.1
Calculates the wavelength given temperature.
wlen
the temperature, a real number greater than 0
Returnthe wavelength
Since0.0.2
Version0.0.1
Calculates the circular velocity.
mass
the mass of the central body, a real number greater than 0
distance
the distance of the gravitational centers of the two bodies, a real number greater than 0
Returnthe circular velocity
Since0.0.2
Version0.0.1
Calculates the mass of the central body given circular velocity.
speed
the speed of the circulating body, a real number greater than 0
distance
the distance of the gravitational centers of the two bodies, a real number greater than 0
Returnthe mass
Since0.0.2
Version0.0.1
Calculates the distance of two bodies given circular velocity and mass of central body.
speed
the speed of the circulating body, a real number greater than 0
mass
the mass of the central body, a real number greater than 0
Returnthe mass
Since0.0.2
Version0.0.1
Calculates the entropy of a black hole given the area of the event horizon.
Follows the Bekenstein-Hawking formula.
speed
the speed of the circulating body, a real number greater than 0
mass
the mass of the central body, a real number greater than 0
Returnthe mass
Since0.0.2
Version0.0.1
Calculates the pressure at
radius
for a star with given radius radius_star
and uniform density density
.
radius
_star the radius of the star, a real number greater than 0
radius
the radius for which the pressure shall be calculated, a real number greater than 0 and smaller than
radius_star
density
the density of the star
Returnthe pressure at
radius
Since0.0.2
Version0.0.1
Calculates the temperature at the center of a star with given radius
radius
and uniform density density
. It calculates the hydrodynamic temperature, without nuclear fusion.
mass
the mass of the star, a real number greater than 0
mm
the molecular mass, a real number greater than 0
radius
_star the radius of the star, a real number greater than 0
Returnthe temperature at the center of the star
Since0.0.2
Version0.0.1
Calculates the mass of a star with given radius
radius
, temperature temp
and molecular mass mm
. The formula can be used to approximate the mass a star needs to ignite the nuclear fusion.
temp
the temperature at the center of the star, a real number greater than 0
mm
the molecular mass, a real number greater than 0
radius
_star the radius of the star, a real number greater than 0
Returnthe mass of the star
Since0.0.2
Version0.0.1
Calculates specific angular momentum with given mass
mass
, length of the semimajor axis semimaj
and the eccentricity ecc
.
mass
the mass of the central body, a real number greater than 0
semimaj
the semimajor axis, a real number greater than 0
ecc
the eccentricity, a real number greater than 0
Returnthe specific angular momentum
Since0.0.2
Version0.0.1
Calculates eccentricity with given mass
mass
, length of the semimajor axis semimaj
and the specific angular momentum sam
.
mass
the mass of the central body, a real number greater than 0
semimaj
the semimajor axis, a real number greater than 0
sam
the specific angular momentum, a real number greater than 0
Returnthe eccentricity
Since0.0.2
Version0.0.1
Calculates gravitational energy with given mass of the central body
massc
, mass of the orbiting body masso
and the specific angular momentum sam
.
massc
the mass of the central body, a real number greater than 0
masso
the mass of the orbiting body, a real number greater than 0
sam
the specific angular momentum, a real number greater than 0
Returnthe gravitational energy
Since0.0.2
Version0.0.1
Calculates gravitational potential energy with given mass of the central body
massc
, mass of the orbiting body masso
and the orbital distance {@code }.
massc
the mass of the central body, a real number greater than 0
masso
the mass of the orbiting body, a real number greater than 0
distance
the orbital distance, a real number greater than 0
Returnthe gravitational potential energy
Since0.0.2
Version0.0.1
Calculates the mean motion of a body with the orbital period
period
.
period
the orbital period, a real number greater than 0
Returnthe mean motion
Since0.0.2
Version0.0.1
Calculates kinetic energy with given mass of the moving body
mass
and the velocity speed
.
mass
the mass of the orbiting body, a real number greater than 0
speed
the speed of the body, a real number greater than 0
Returnthe kinetic energy
Since0.0.2
Version0.0.1
Calculates Euler's totient function.
n
an integer greater 0
Returnthe number of co-primes smaller
n
Since0.0.2
Version0.0.1
Answers the question if
a
and b
are co-primes.
a
an integer greater 0
b
an integer greater 0
Returntrue if
a
and b
are co-primes or false otherwise Since0.0.2
Version0.0.1
Calculates the norm of the matrix.
This function works like the function "norm" in Octave 2.1.35 (author of that macro in Octave: "jwe") except of the. Parameter "1" returns the 1-norm (the largest column sum), Parameter "2" returns the 2-norm (largest singular value), Number.POSITIVE_INFINITY the infinity norm (the largest row sum), or the string "fro" for a Frobenius norm (also known as the L2 norm).
v
either the string "fro", the numbers 1 or 2, or Number.POSITIVE_INFINITY,
Returnthe choosen norm
Since0.0.6
Version0.0.2
LicenseGPL
Extracts the column
n
.
n
a positive integer, the column to extract starting at 0
Returna one column matrix with the extracted column
Since0.0.6
Version0.0.1
Extracts the row
n
.
n
a positive integer, the row to extract starting at 0
Returna one row matrix with the extracted row
Since0.0.6
Version0.0.1
Sums up the columns of the matrix.
Use
Matrix.prototype.rot90()
to sum the rows instead. Returna one row matrix with the sums of each column
Since0.0.6
Version0.0.1
Builds a product of the columns of the matrix.
Use
Matrix.prototype.rot90()
to multiply the rows instead. Returna one row matrix with the product of each column
Since0.0.6
Version0.0.1
Extracts the largest values in the columns.
Returna one row matrix with the largest values of each column
Since0.0.6
Version0.0.1
Extracts the smallest values in the columns.
Returna one row matrix with the smallest values of each column
Since0.0.6
Version0.0.1
The absolute values of the matrix
n
.Returna matrix with the absolute values
Since0.0.6
Version0.0.1
Produces a point of
size
and color
at the position x
an d y
in the element with the id
"plot". The point is actually an HTML span-element.
x
distance in pixels from the top of the parent element
y
distance in pixels from the left of the parent element
size
size of the point
color
color of the point
Since0.0.1
Version0.0.1
Plots a circle with the plotting function
plotxy()
.
radius
radius of the circle
center
of the circle
Since0.0.1
Version0.0.1
Plots a Lamé curve, named after the Mathematician Gabriel Lamé.
Try
Math.plotLameCurve(15/2,100,60)
, Math.plotLameCurve(6/3,100,80)
, or Math.plotLameCurve(3/5,100,80)
n
the exponent, a real number. Values grater than 1 make the figure concave, values smaller convex. A value of 1 results in a diamond shape.
a
on axis of the ellipse, a real number
b
the other axis of the ellipse, a real number
center
position of the the center of the curve
Since0.0.1
Version0.0.1
Converts an integer number into a Roman number.
lower
any number different from zero to order lower case output
Returna string or "undefined" if the number is no integer or smaller than 1 or greater than 6,000
Since0.0.8
Version0.0.1
Converts a string with a Roman number into a number.
The Roman number must be build correctly, only the letters "I,i,V,v,L,l,C,c,D,d,M,m" (from unicode range U+0000 - U+00ff) are allowed.
Returnan integer greater zero or
Number.NaN
if no suitable input had been detected Since0.0.8
Version0.0.1
Subtracts set
a
from set b
.
a
the minuend, an array
b
the subtrahend, an array
s
true
is a
and b
are proper sets and sorted. defaults to false
Returnan array with the difference
Since0.0.1
Version0.0.2
Unites the sets
a
a b
.
a
first set, an array
b
second set, an array
Returnan array with the union
Since0.0.1
Version0.0.1
Intersects the sets
a
a b
.
a
first set, an array
b
second set, an array
Returnan array with the intersection
Since0.0.1
Version0.0.1
Builds the cartesian product of the two sets A
a
and B b
.
a
first set, an array
b
second set, an array
Returnan array with the cartesian product as 2-element subarrays
Since0.0.1
Version0.0.1
Builds the cartesian product of the two sets A
a
and B b
edited with the function f f
.
a
first set, an array
b
second set, an array
f
a function taking two arguments f(x,y) with x ∈ A ∧ y ∈ B
Returnan array with the cartesian product as 2-element subarrays
Since0.0.1
Version0.0.1
Calculates the SHA256 hash function but is not fit for cryptographic use.
It is in the main parts the code from Angel Marin's implementation to be found at http://anmar.eu.org/.
input
a string
Returnthe SHA256 hash in an array with 8 32-bit values
LicenseBSD
Calculates the SHA256 hash function but is not fit for cryptographic use.
It is in the main parts the code from Angel Marin's implementation to be found at http://anmar.eu.org/.
s
a string
Returnthe SHA256 hash in a string with a lower case hexadecimal presentation of the SHA256 hash
LicenseBSD
Calculates a SHA256 hash function with the set from FIPS.
Pops up a message window if one of the tests failed.
Returnthe SHA256 hash in a string with a lower case hexadecimal presentation false if one of the tests fail and true otherwise
Calculates a crc-32 with polynom 0xedb88320.
Needs the table
Hashes.bloomCrc32Tab
.
data
a string
Returnthe crc-32 of
data
Calculates the similarity with the Ratcliff/Obershelp algorithm.
Algorithm is implemented as described in the July 1988 issue of Dr Dobbs Journal. This implementation is a port from C-code written by Steve Grubb < linux_4ever@yahoo.com> in 1999.
s
a string
t
a string
Returnthe similarity
Since0.0.2
Version0.0.1
LicenseGPL
Calculates the general partial harmonic function for real arguments.
n
the upper limit, an integer
m
the exponent, a real number
Returnthe general partial harmonic function
Since0.0.1
Version0.0.1
Calculates the general partial harmonic function for complex arguments.
Although it converges very slowly it can be used to calculate the Riemann zeta function for complex arguments. For
n=1000
about six digits of precision can be reached.
n
the upper limit, an integer
m
the exponent, a complex number
Returnthe general partial harmonic function or
Number.NaN
if n
is not a number. Since0.0.10
Version0.0.1
Calculates the partial harmonic function.
Values of
n
larger than 1000 will be calculated with an asymptotic series.
n
the upper limit, an integer
Returnthe partial harmonic function
Since0.0.1
Version0.0.1
Calculates the partial harmonic function fo complex arguments.
Uses
Math.cdigamma
and is therefore much less precise than the version for real numbers for small values. Please consider using Math.cgeneralPartialHarmon(n,new Complex(1,0))
instead.
n
the upper limit, a complex number
Returnthe partial harmonic function
Since0.0.10
Version0.0.1
Calculates the numerical values for Bernoulli numbers.
x
the number, an integer
Returnthe numerical value of the Bernoulli number
Since0.0.1
Version0.0.2
Calculates the numerical values for Chebychev polynomials at integer places.
n
the number of the polynomial, an integer
x
the value for x in the polynomials
Returnthe numerical value of the Chebychev polynomials
Since0.0.1
Version0.0.1
Calculates the zero for the Chebychev polynomial
n
at j
.
n
the number of the polynomial, an integer
j
the place of the zero
Returnthe zero of the Chebychev polynomial
n
Since0.0.1
Version0.0.1
Calculates all zeros for the Chebychev polynomial
n
.
n
the number of the polynomial, an integer
Returnall zeros of the Chebychev polynomial
n
in an array. Since0.0.1
Version0.0.1
Calculates the Pochhammer Symbol (the raising factorial) manually.
a
the constant, a real
n
the limit, an integer greater than or equal 0
Returnthe Pochhammer Symbol (the raising factorial)
Since0.0.1
Version0.0.2
Calculates the Pochhammer Symbol (the raising factorial) for complex argumente manually.
a
the constant, a complex number
n
the limit, an integer greater than or equal 0
Returnthe Pochhammer Symbol (the raising factorial)
Since0.0.10
Version0.0.1
Calculates the Pochhammer Symbol (the raising factorial).
This version is implemented with the gamma function.
x
the constant, a real number
n
the limit, a real number
Returnthe Pochhammer Symbol (the raising factorial)
Since0.0.1
Version0.0.1
Calculates the Pochhammer Symbol (the raising factorial) for complex arguments.
This version is implemented with the gamma function.
x
the constant, a complex number
n
the limit, a real number
Returnthe Pochhammer Symbol (the raising factorial)
Since0.0.10
Version0.0.1
Calculates the logarithm of the Pochhammer Symbol (the raising factorial).
This version is implemented with the log-gamma function.
x
the constant, a real number
n
the limit, a real number
Returnthe logarithm of the Pochhammer Symbol (the raising factorial)
Since0.0.1
Version0.0.1
Calculates the logarithm of the Pochhammer Symbol (the raising factorial) for complex arguments.
This version is implemented with the log-gamma function.
x
the constant, a complex number
n
the limit, a real number
Returnthe logarithm of the Pochhammer Symbol (the raising factorial)
Since0.0.10
Version0.0.1
Calculates the optimal quantity to order.
The author has reasons to doubt the usability of a crystal ball in inventory management, he prefers prepayment.
x
total demand per accounting period, a real number
B
fixed costs per order (e.g. porto&package), a real number
e
buying price, a real number
i
interest of storage costs (
e-i
= costs of storing per item)
Returnthe optimal quantity to order
Since0.0.1
Version0.0.1
Calculates the one sample student test for the array against the mean
mean
. This code is a port from the macro octave/2.1.35/m/statistics/statistics/t_test.m original written by written by Kurt Hornik. From Kurt Hornik's description of the function in Octave: With the optional argument string
which
, the alternative of interest can be selected. If which
is "!="
or "<>"
, the null is tested against the two-sided alternative mean(array) != mean
. If which
is ">"
, the one-sided alternative mean(array) > mean
is considered. Similarly for "<"
, the one-sided alternative mean(array)< mean
is considered, The default is the two-sided case.
mean
the mean, a real number
which
, the optional string to choose the sidedness
Returnthe p-value of the one sample student test
Since0.0.1
Version0.0.1
LicenseGPL
Calculates the two sample student test for the array against the second sample
y
. This code is a port from the macro octave/2.1.35/m/statistics/statistics/t_test_2.m original written by written by Kurt Hornik. From Kurt Hornik's description of the function in Octave: With the optional argument string
which
, the alternative of interest can be selected. If which
is "!="
or "<>"
, the null is tested against the two-sided alternative mean(x) != mean(y)
. If which
is ">"
, the one-sided alternative mean(x) > mean(y)
is used. Similarly for "<"
, the one-sided alternative
y
the second sample, an array
which
, the optional string to choose the sidedness
Returnthe p-value of the two sample student test
Since0.0.1
Version0.0.1
LicenseGPL
Calculates the one-way analysis of variance (ANOVA).
Takes an Array with one sample in each row.
Returnan array with five rows, each with 4-elements subarrays
"among" | sum of squares | degrees of freedom | empirical variance |
"within" | sum of squares | degrees of freedom | empirical variance |
"total" | sum of squares | degrees of freedom | empirical variance |
"stat-f" | f-distribution | ||
"p-val" | 1-fCDF(stat-f,df-a,df-w) |
Since0.0.1
Version0.0.1
Calulates the Fisher exact test of a 2x2 table.
It will show significant delays with absolute values of, depending on the horsepower of your machine, 3-5,000 and more. Calculation of the 2-sided values done after the suggestion made in: Agresti A, (1992)
"A Survey of Exact Inference for Contingency Tables"
Statistical Science,7,131-153
Returnan array with two rows each with a 4 element subarray
"==" | cutting point |
">=" | upper part |
"<" | lower part |
"><" | two sided |
Since0.0.1
Version0.0.1
Calulates the
χ2
test for contingency tables.
debug
the string "debug". The usage of this variable will be explained by the program when necessary and useful
Returnthe p-value
Since0.0.1
Version0.0.1
LicenseGPL
Perform a Bartlett test for the homogeneity of variances in the data vectors
x1, x2,…, xk
, where k > 1. This code is a port from the macro octave/2.1.35/m/statistics/statistics/bartlett_test.m original written by Kurt Hornik. From Kurt Hornik's description of the function in Octave: Under the null of equal variances, the test statistic
chisq
approximately follows a chi-square distribution with df
degrees of freedom. Returna 3-element array with the p-value, χ2 and degrees of freedom in that order.
Since0.0.4
Version0.0.1
LicenseGPL
Hotelling test.
For a sample
x
from a multivariate normal distribution with unknown mean and covariance matrix, test the null hypothesis that mean(x) == m
. From Kurt Hornik's description of the function in Octave: Under the null, (n-p) T^2 / (p(n-1))
has an F distribution with p
and n-p
degrees of freedom, where n
and p
are the numbers of samples and variables, respectively. This code is a port from the macro octave/2.1.35/m/statistics/statistics/hotelling_test.m original written by Kurt Hornik.
m
a real number, the mean to compare to
Returna 2-element array with the p-value and Hotellings T2 in that order
Since0.0.4
Version0.0.1
LicenseGPL
Hotelling test with two samples.
For two samples from multivariate normal distributions with the same number of variables, unknown means and unknown equal covariance matrices, test the null hypothesis
mean(x) == mean(y)
. From Kurt Hornik's description of the function in Octave: Under the null, (n_x+n_y-p-1) T^2 / (p(n_x+n_y-2))
has an F distribution with p
and nx+ny-p-1
degrees of freedom, where nx
and ny
are the sample sizes and p
is the number of variables. This code is a port from the macro octave/2.1.35/m/statistics/statistics/hotelling_test_2.m original written by Kurt Hornik.
y
an array with the second sample
Returna 2-element array with the p-value and Hotellings T2 in that order.
Since0.0.4
Version0.0.1
LicenseGPL
Kruskal-Wallis one-factor "analysis of variance".
Suppose a variable is observed for
k > 1
different groups, and let x1, x2,…, xk
be the corresponding data vectors. Under the null hypothesis that the ranks in the pooled sample are not affected by the group memberships, the test statistic k
is approximately chi-square with df = k - 1
degrees of freedom. This code, including the comment, is a port from the macro octave/2.1.35/m/statistics/statistics/bartlett_test.m original written by Kurt Hornik. Returna 3-element array with the p-value,
k
and the degrees of freedom in that order. Since0.0.4
Version0.0.1
LicenseGPL
Compute ranks adjusted for ties for the array.
This code is a port from the macro octave/2.1.35/m/statistics/base/ranks.m original written by Kurt Hornik.
Returnan array with the ranks
Since0.0.4
Version0.0.1
LicenseGPL
Concatenates the elements of array
a
at the end of the array by value. The native
array.concat()
might use references in some cases to conatenate arrays. This function does a manual concatenation and thus a copy of the elements of a
is concatenated to the array.
a
the array to concatenate
Returnthe concatenation of the array and the elements of
a
Since0.0.4
Version0.0.1
SeeArray.prototype.copyVal
Copies the array by value.
Copying an array might result in a pointer to the original only (copy by reference). This might not be desired in every case.
Returna copy of the array by value
Since0.0.4
Version0.0.1
SeeArray.prototype.addArray
Statistical sign test.
For two matched-pair samples
x
and y
, perform a sign test of the null hypothesis P(x > y) == P(x < y) == 1/2
. Under the null, the test statistic b
roughly follows a binomial distribution with parameters n = sum(x != y)
and p
= 1/2. With the optional argument alt
, the alternative of interest can be selected. If {
y
an array, the second sample, must be of the same size
alt
a string, one of either "!=", "<>", "<" or ">"
Returnthe p-value
Since0.0.4
Version0.0.1
LicenseGPL
F test to compare two variances.
For two samples
x
and y
from normal distributions with unknown means and unknown variances, perform an F-test of the null hypothesis of equal variances. Under the null, the test statistic f follows an F-distribution with df_num
and df_den
degrees of freedom. With the optional argument string alt
, the alternative of interest can be selected. If alt
is "!="
or "<>"
, the null is tested against the two-sided alternative var(x) != var(y)
. If alt
is ">"
, the one-sided alternative var(x) > var(y)
is used. Similarly for "<", the one-sided alternative var(x) < var(y)
is used. The default is the two-sided case. This code and the description is a port from the macro octave/2.1.35/m/statistics/statistics/var_test.m original written by Kurt Hornik.
y
an array, the second sample
alt
a string, one of either "!=", "<>", "<" or ">"
Returna 4-element array with the p-value, variance proprotion, degrees of freedom of the array and the degrees of freedom of
y
in that order Since0.0.4
Version0.0.1
LicenseGPL
Welch two-sample t test.
For two samples
x
and y
from normal distributions with unknown means and unknown and not necessarily equal variances, perform a Welch test of the null hypothesis of equal means. Under the null, the test statistic t approximately follows a Student distribution with df degrees of freedom. With the optional argument string alt
, the alternative of interest can be selected. If alt
is "!="
or "<>"
, the null is tested against the two-sided alternative mean(x) != m
. If alt
is ">"
, the one-sided alternative mean(x) > m
is considered. Similarly for "<"
, the one-sided alternative mean(x) < m
is considered. The default is the two-sided case. This code and the description is a port from the macro octave/2.1.35/m/statistics/statistics/var_test.m original written by Kurt Hornik.
y
an array, the second sample
alt
a string, one of either "!=", "<>", "<" or ">"
Returna 3-element array with the p-value, student-t and the degrees of freedom in that order
Since0.0.4
Version0.0.1
LicenseGPL
Calculates the probability density function of the standard normal distribution at
x
.
x
a real number
Returnthe probability density function of the standard normal distribution
Since0.0.4
Version0.0.1
Calculates the cumulative distribution function of the standard normal distribution at
x
.
x
a real number
Returnthe cumulative distribution function of the standard normal distribution
Since0.0.4
Version0.0.1
Calculates the inverse of the cumulative distribution function of the of the standard normal distribution at
x
. A port from octave/2.1.35/m/statistics/distributions/stdnormal_inv.m original written by Kurt Hornik.
a
a real number
b
a real number
Returnthe quantiles (the inverse of the standard normal CDF) of the standard normal distribution
Since0.0.4
Version0.0.1
LicenseGPL
Calculate the inverse of the error function.
This code is a port from the macro octave/2.1.35/m/specfun/erfinv.m original written by Kurt Hornik.
x
a real number greater than or equal -1 and smaller than or equal 1
Returnthe inverse of the error function
Since0.0.4
Version0.0.1
LicenseGPL
Converts radians in degrees.
r
a real number
Returndegrees (no, this function is in no way a valuable substitution for a good college education!)
Since0.0.1
Version0.0.1
Converts grad in degrees.
g
a real number
Returndegrees (it takes 360 degrees to build a circle but only one college degree to run in circles!)
Since0.0.1
Version0.0.1
Converts the classical representation of sphere coordinates (degrees, minutes, seconds and a letter for the hemisphere) into the signed decimal representation.
deg
degrees, an integer
min
minutes, an integer
sec
seconds, an integer
hem
hemisphere, one of 'N','S','E' or 'W'
Returndegrees as a signed rational number
Since0.0.1
Version0.0.1
Converts the signed decimal representation into the classical representation of sphere coordinates (degrees, minutes, seconds and a letter for the hemisphere).
deg
degrees, a signed rational number
dir
direction, one of the strings 'latitude' or 'longitude'
Returnan array with degrees, minutes, seconds and hemisphere in that order
Since0.0.1
Version0.0.1
Converts the signed decimal representation of latitude into the classical representation of sphere coordinates (degrees, minutes, seconds and a letter for the hemisphere).
This is just a shortcut for
Math.decimal2LatLongClassic(deg,'latitude')
.
deg
degrees, a signed rational number
Returnan array with degrees, minutes, seconds and hemisphere in that order
Since0.0.1
Version0.0.1
Converts the signed decimal representation of longitude into the classical representation of sphere coordinates (degrees, minutes, seconds and a letter for the hemisphere).
This is just a shortcut for
Math.decimal2LatLongClassic(deg,'longitude')
.
deg
degrees, a signed rational number
Returnan array with degrees, minutes, seconds and hemisphere in that order
Since0.0.1
Version0.0.1
Converts cartesian coordinates into sphere coordinates.
x
a real number
y
a real number
z
a real number
Returnan array with radius, theta and alpha in that order
Since0.0.1
Version0.0.1
Converts unit vector cartesian coordinates into unit vector sphere coordinates.
ex
a real number
ey
a real number
ez
a real number
Returnan array with the unit vectors radius, theta and alpha in that order
Since0.0.1
Version0.0.1
Converts cylinder coordinates into cartesian coordinates.
p
a real number
a
a real number
z
a real number
Returnan array with x, y and z in that order
Since0.0.1
Version0.0.1
Converts unit vector cylinder coordinates into unit vector cartesian coordinates.
ep
a real number
ea
a real number
ez
a real number
alpha
a real number
Returnan array with the unit vectors x, y and z in that order
Since0.0.1
Version0.0.1
Converts sphere coordinates into cartesian coordinates.
radius
a real number
theta
a real number
alpha
a real number
Returnan array with x, y and z in that order
Since0.0.1
Version0.0.1
Converts unit vector sphere coordinates into unit vector cartesian coordinates.
er
a real number
et
a real number
ea
a real number
radius
a real number
theta
a real number
alpha
a real number
Returnan array with unit vectors x, y and z in that order
Since0.0.1
Version0.0.1
Converts cylinder coordinates into sphere coordinates.
p
a real number
a
a real number
z
a real number
Returnan array with radius, theta and alpha in that order
Since0.0.1
Version0.0.1
Converts unit vector cylinder coordinates into unit vector sphere coordinates.
ep
a real number
ea
a real number
ez
a real number
theta
a real number
Returnan array with unit vectors radius, theta and alpha in that order
Since0.0.1
Version0.0.1
Converts sphere coordinates into cylinder coordinates.
radius
a real number
theta
a real number
alpha
a real number
Returnan array with p, a and z in that order
Since0.0.1
Version0.0.1
Converts unit vector sphere coordinates into unit vector cylinder coordinates.
er
a real number
et
a real number
ea
a real number
theta
a real number
Returnan array with unit vectors p, a and z in that order
Since0.0.1
Version0.0.1
Calculates the cosinus hyperbolicus of
a
.
a
a real number
Returnthe cosinus hyperbolicus
Since0.0.1
Version0.0.1
Calculates the sinus hyperbolicus of
a
.
a
a real number
Returnthe sinus hyperbolicus
Since0.0.1
Version0.0.1
Calculates the tangent hyperbolicus of
a
.
a
a real number
Returnthe tangens hyperbolicus
Since0.0.1
Version0.0.1
Calculates the cotangens hyperbolicus of
a
.
a
a real number
Returnthe cotangens hyperbolicus
Since0.0.1
Version0.0.1
Calculates the arcus cosinus hyperbolicus of
a
.
a
a real number
Returnthe arcus cosinus hyperbolicus
Since0.0.1
Version0.0.1
Calculates the arcus sinus hyperbolicus of
a
.
a
a real number
Returnthe arcus sinus hyperbolicus
Since0.0.1
Version0.0.1
Calculates the arcus tangens hyperbolicus of
a
.
a
a real number
Returnthe arcus tangens hyperbolicus
Since0.0.1
Version0.0.1
Calculates the arcus cotangens hyperbolicus of
a
.
a
a real number
Returnthe arcus cotangens hyperbolicus
Since0.0.1
Version0.0.1
Calculates the cotangens of
a
.
a
a real number
Returnthe cotangens
Since0.0.1
Version0.0.1
Calculates the arcus cotangens of
a
.
a
a real number
Returnthe arcus cotangens
Since0.0.1
Version0.0.1
Calculates the cosecans of
a
.
a
a real number
Returnthe cosecans
Since0.0.1
Version0.0.1
Calculates the cosecans of
a
.
a
a real number
Returnthe cosecans
Since0.0.1
Version0.0.1
Calculates the semiversus of
a
.
a
a real number
Returnthe semiversus
Since0.0.1
Version0.0.1
Calculates the arcus semiversus of
a
.
a
a real number
Returnthe arcus semiversus
Since0.0.1
Version0.0.1
Calculates the two argument tangens, the complex logarithmic version.
a
a real number
Returnthe arcus tangens with two arguments, logarithmic version
Since0.0.1
Version0.0.1
Calculates the two argument arcus tangens, the normal version.
Will only be used if no native version is available.
a
a real number
Returnthe the two argument arcus tangens, the normal version
Since0.0.1
Version0.0.1
Calculates the length of CB of a right-angled triangle with the right angle between the lines AC and CB, the angel alpha between AC and AB and the angel beta between AB and BC.
This can be used to calculate the height of a tower for example.
AC
the length of the line AC, a real number
alpha
the angel alpha, a real number
Returnthe length of CB
Since0.0.1
Version0.0.1
Calculates the length of AB of a right-angled triangle with the right angle between the lines AC and CB, the angel alpha between AC and AB and the angel beta between AB and BC.
This can be used to calculate the length of a guy wire for example.
CB
the length of the line CB, a real number
alpha
the angel alpha, a real number
Returnthe length of AB
Since0.0.1
Version0.0.1
Calculates the length of the third side of a right-angled triangle from the lengths of the other two sides.
a
the length one side, a real number
b
the length the other side, a real number
Returnthe length of the third side
Since0.0.1
Version0.0.1
Calculates the height of the hypotenuse AC of an isoceles triangle.
Usefull for example to calculate the distance of Earth-Mars with
a
= diameter of Mars and gamma
= angel of movement of the telescope from one side of Mars to the other: the parallax.
a
the length of the line AC, a real number
gamma
the angle between the two catheti AB and CB
Returnthe height of AC
Since0.0.1
Version0.0.1
Calculates the line AC given line AB and the angels alpha (the angel between AC and AB) and beta (the angel between AB and BC).
That's how they measured the world before the invention of the laser.
AB
the length of the line AB, a real number
alpha
the angle between AC and AB
beta
the angle between AB and BC
Returnthe length of AC
Since0.0.1
Version0.0.1
Calculates the angle between two points on the surface of a sphere.
latStart
latitude of the starting point
longStart
longitude of the starting point
latDest
latitude of the destination point
longDest
longitude of the destination point
Returnthe angle between two points on a sphere
Since0.0.1
Version0.0.1
Calculates the distance between two points on the surface of a sphere.
The Earth has an equatorial radius of 6378100m and an polar radius of 6356800m, at least according to the NASA.
latStart
latitude of the starting point
longStart
longitude of the starting point
latDest
latitude of the destination point
longDest
longitude of the destination point
radius
the radius of the sphere
Returnthe angle between two points on a sphere
Since0.0.1
Version0.0.1
Calculates the direction or heading between two points on the surface of a sphere clockwise from north.
latStart
latitude of the starting point
longStart
longitude of the starting point
latDest
latitude of the destination point
longDest
longitude of the destination point
Returnthe heading between two points on a sphere clockwise from north
Since0.0.1
Version0.0.1
Calculates the declination of a celestial body.
azimuth
the azimuth, a real number
zenitDist
the distance from the zenit, a real number
latitude
the latitude of the observer, a real number
Returnthe declination of the celestial body
Since0.0.1
Version0.0.1
Calculates the latitude of the observer of two celestial bodies.
decOne
the declination of the first celestial body
zenitOne
the zenith of the first celestial body
azimutOne
the azimut of the first celestial body
decTwo
the declination of the second celestial body
zenitTwo
the zenith of the second celestial body
azimutTwo
the azimut of the second celestial body
Returnthe latitude of the observer of two celestial bodies
Since0.0.1
Version0.0.1
Calculates the rise of a celestial body.
This algorithm ignores refraction.
declination
the declination of the celestial body, a real number
declination
the latitude of the observer of the celestial body, a real number
Returnthe rise of a celestial body
Since0.0.1
Version0.0.1
Calculates the angle between noon and the given hour on a correct aligned equatorial sundial.
Average error over the year is between -14 and +17 minutes.
latitude
the latitude of the sundial
hour
the difference between noon and the wanted hour
Returnthe angle between noon and the given hour
Since0.0.1
Version0.0.1
Calculates the refractional corrective for an atmosphere mix as found on Earth.
The precision of this algorithm is not very high.
alpha
the angel to zenit, a real number
pressure
the pressure of the air (the barometer reading) in hPa (approximately millibar), a real number greater 0
temperature
the temperature of the air in Kelvin, a real number greater 0
Returnthe refractional corrective
Since0.0.1
Version0.0.1
Generates type error based on most used the keyboard layouts in Portugal, Spain, France, Germany and the USA which is also the default layout.
This code is ported from the Perl modul Lingua::TypoGenerator written by Ivan Tubert-Brohman <itub@cpan.org>, only the keyboard layouts different from the US layout have been added.
keyb
the keyboard layout (default is US)
Layout | Description |
---|---|
en | US layout, the default |
de | German layout |
fr | French layout |
es | Spanish (europe) layout |
pt | Portugese (europe) layout |
Returnan array with a sorted list of the type errors
Since0.0.2
Version0.0.1
LicenseGPL
Finds the polynomial order of the arithmetic series
a
.
a
an array with the numerical values of the serie
Returnthe polynomial order of the arithmetic series
a
Since0.0.2
Version0.0.1
Finds a generating polynomial of the arithmetic series
s
. It is called fortytwo because it can find a polynomial for every given series (only limited by computing power and memory and precision) and so can be used to proof numerically (not a real proof!) that the very next element of every series is the integer 42. This function suffers from the limitations of the representation of real numbers on a Turing machine but moreso from the very finite precision of the representation of rationals.
a
an array with the numerical values of the series
Returna generating polynomial of the arithmetic series
a
Since0.0.2
Version0.0.1
Builds a string for Javascript's
eval()
out of the result of Math_fortytwo()
with the variablename n
.
m
an array with the result of
Math.fortytwo()
or any other function returning a similar array.
Returna string for Javascript's
eval()
Since0.0.2
Version0.0.1
Solves a linear equation system given in
m
and v
. In are
m
the polynomials and in v
are the solutions. At least on of the solutions must be different from zero, this is a numerical solver.
m
an array with
n
rows of the n
polynomials
v
an array with
n
rows of one numerical solutions for each of the n
polynomials in parameter m
. At least one of the solutions must be different from 0
Returnan array with the numerical solutions
Since0.0.2
Version0.0.1
An extension to the
typeof
function of Javascript to also differ between the Array
, Date
, RegExp
, Error
and Complex
object. It is easily extendable as can be seen with the
Complex
type. It uses the standard typeof
function for everything else. Returnthe lowercased name of the object or "empty" as a string
Since0.0.1
Version0.0.2
Builds an Array from a CSV (Comma Separated Values) and optionally massages every element with the function
f
. The delimiter between two values used here is the semi-colon ';'. The escape sign is '\' (ASCII backslash), the line separators are only '\r', '\n' or combination. This means, that a semi-colon inside a string is taken as a delimiter! Every semicolon not used as a delimiter must therefore be escaped.Probably not of much use outside the one time the author needed exactly that behavior, but it can be extended.
Returnan array with each line of the CSV as a row
Since0.0.2
Version0.0.1
The vector equivalent for
NaN
, the string 'NaVect'
.
length
an integer, the length of the vector
value
a number, the value of each element of the vector if
length
is greater than 0, default is 0 (zero)
Since0.0.8
Version0.0.1 /
Finds the size (number of elements) of the vector.
Returnan integer, the number of elements of the vector
Since0.0.8
Version0.0.1
Calculates the magnitude (absolute value) of the vector.
Returna complex number
Since0.0.8
Version0.0.1
Calculates the vector dot product.
v
a Vector of the same size
Returnthe dot product of the two vectors
Since0.0.8
Version0.0.1
Calculates the vector cross product of two complex vectors (3d or 7d).
v
a Vector of the same size and of 3 or 7 dimensions
Returnthe cross product of the two vectors
Since0.0.8
Version0.0.1
Addition of two vectors of the same size.
v
the vector to add
Returna vector, the sum
Since0.0.8
Version0.0.1
Subtraction of two vectors of the same size.
v
the vector to subtract
Returna vector, the difference
Since0.0.8
Version0.0.1
Multiply the vector with a scalar.
n
a real or complex number
Returna vector, the product
Since0.0.8
Version0.0.1
Divide the vector by a scalar.
n
a real or complex number
Returna vector, the quotient
Since0.0.8
Version0.0.1
Massage every element of the vector with a function.
This is for example usefull to calculate a gradient.
f
a function taking one argument
Returna vector
Since0.0.8
Version0.0.1
Calculates the Weierstrass function for rational x.
p
the numerator, an integer
q
the denumerator, an integer
Returnthe Weierstrass function for rational x or
undefined
if one or more of the arguments is not an integer value Since0.0.4
Version0.0.1
Calculates the logarithm of the Barnes' G function for real
x > 3
Algorithm from: Adamchik, V. "Symbolic and Numeric Computation of the Barnes Functions." Electronic Proceedings of the 7th International Conference on Applications of Computer Algebra. Albuquerque Technical Vocational Institute, Albuquerque, New Mexico, USA. May 31-June 3, 2001 (Ed. M. Wester). 2001. http://math.unm.edu/ACA/2001/Proceedings/SymNum/Adamchik_paper.pdf
x
a real number greater than or eauql 3
Returnthe logarithm of the Barnes' G function
Since0.0.4
Version0.0.1
Finds a rational for a given truncated decimal representation of a real.
In more common words: the inverse of a divisionmdashfinds one fraction for a given Quotient. The algorithm is very simple, so you will get
[1,3]
from input 0.3333333333333333
but not much more. This code suffers from finite precision, for example 300000000.00000002
will not give the expected result, and from the rounding errors in translations from base-10 to base-2 and vice versa. Needs more work.
a
the quotient, the truncated decimal representation of a a real number with the fractional part
f
of {code abs(a)} greater than 1/Number.MAX_VALUE
if the integer part i
is zero or greater than (f/(iD(i)) > Math.EPSILON
with D(x) = ceil(log10(x))
if the absolute value of the integer part is greater than 0
Returna 2-element array with the numerator and the denominator in that order or
undefined
Since0.0.4
Version0.0.1
Tries to reduce a fraction.
arr
a 2-element array with the numerator and the denominator in that order
Returnthe reduced fraction in a 2-element array with the numerator and the denominator in that order
Since0.0.4
Version0.0.1
Adds two rational fractions.
a
a 2-element array with the numerator and the denominator in that order
b
a 2-element array with the numerator and the denominator in that order
Returnthe sum as a rational fraction in a 2-element array with the numerator and the denominator in that order
Since0.0.4
Version0.0.1
Subtract two rational fractions
a-b
.
a
a 2-element array with the numerator and the denominator in that order
b
a 2-element array with the numerator and the denominator in that order
Returnthe prduct as a rational fraction in a 2-element array with the numerator and the denominator in that order
Since0.0.4
Version0.0.1
Multiply two rational fractions.
a
a 2-element array with the numerator and the denominator in that order
b
a 2-element array with the numerator and the denominator in that order
Returnthe prduct as a rational fraction in a 2-element array with the numerator and the denominator in that order
Since0.0.4
Version0.0.1
Divide two rational fractions
a/b
.
a
a 2-element array with the numerator and the denominator in that order
b
a 2-element array with the numerator and the denominator in that order
Returnthe quotient as a rational fraction in a 2-element array with the numerator and the denominator in that order
Since0.0.4
Version0.0.1
Calculates polygamma function of positive order
n >= 0
at z
.
n
an integer, the order
z
a real number
Returnthe result of the polygamma function at
z
Since0.0.2
Version0.0.1
If anybody was forgotten without a good reason, please send the author a short notice.