Warning
I'll RIIR! You can find the JS in this branch
Most math libs are focused on arithmetic and algebra, and practical applications like cryptography. This lib is targeted at Pure Math, Number Theory, and recreational math.
(WIP) Esoteric Mathematic Library for Rust
Warning
I'll RIIR! You can find the JS in this branch
Most math libs are focused on arithmetic and algebra, and practical applications like cryptography. This lib is targeted at Pure Math, Number Theory, and recreational math.
They don't belong here.
This seems like a basic function to have, but I don't know if it should be added to this library
Decorators are functions that wrap other functions, essentially acting as functions that construct other functions. These are useful to apply common/shared behavior to many fns
There's missing multiplication and insertion at the end of the function. This step is required to include all even divisors and powers of 2
It should return Number type only if it's a safe number, otherwise BigInt type, and only do that if there's multiple valid choices available
The paper "Detecting Perfect Powers in Essentially Linear Time" shows that there is a better way to check if n
is a perfect power
This is just to make it consistent with the remainder %
operator
This isn't an important problem, but causes inconsistency between my library and the IEEE 754 standard
(More info at #2 )
I'm concerned about the future of this library because I want to take it seriously, but I feel like I don't know if the direction I'm going is a good goal.
This library started like my "Useless-Math" repo, just a bunch of functions lying around, and there was no clear direction to take. Then I realized what direction I wanted to take, I wanted this to be a polyfill. But polyfills are usually meant to be used in websites, and this library is definitely not a good idea to use in a website, but I already stated that in the README disclaimer. So now I'm wondering in what should this be focused on?
This is a nice idea for automated testing, and would help to reach 100% code coverage. It's also a win-win situation for everyone using this lib and myself, since I won't need to install it on my system. lol I'm so lazy.
I'll activate the workflow after migrating everything to ESM format
The function should return the smallest fraction that when converted to Number yields exactly the same value as the original input, but some inputs cause it to loop too many times and return a bogus fraction. After fixing the bug, I plan on using it in Math.gcd
to preserve precision of computations, and Math.factorize
to get negative exponents
Fix thrown exceptions that occur when args are not of the same type. Like in factorial
The IntN
version has potential for avoidable out of memory errors when e < 2
, while the Math
version doesn't preserve precision when the exponent isn't an integer (there's no "modular multiplicative inverse" to correct this)
Use JSD for param type annotations (and API documentation, obviously)
I'm removing a lot of features, to make development easier, and to reduce redundancy (because other libraries already include those features)
See this
TLDR: radToAngle
may not be a good name
Even if the tests will be ran manually, there must be a test file to increase code coverage. This is a serious library, no bugs should be allowed
Add Modular Multiplicative Inverse, and Extended Euclidean Algorithm. modInv
is useful to avoid wrong return values in Math.modPow
When input strings have 1 "." (dot), it throws, even though it should be more flexible
I don't know whether mod
ulo fns should have a param to select a variant, or if each variant should have its own independent function. The JS trend seems to be that they should be separated.
This is useful for fast generation of random primes. I still need to search for a nice algorithm that runs in polynomial time
Prevents external code from changing the behavior of the library by modifying property values of global objects that some functions depend on. This means using aliases to objects, and copying primitive values
This has the lowest priority because radix
is usually small (and should be), any absurdly large (2^53) BigInt or String value given to it is considered a misuse or an accident by the user or developer and I have no responsibility for that
The name NTML
is already in use by an NPM package and by Microsoft. I should rename (again)
This document: http://www.luschny.de/math/factorial/FastFactorialFunctions.htm , and this repo: https://github.com/PeterLuschny/Fast-Factorial-Functions , show that my implementation is kinda slow, lol
I don't know if this should be implemented only on Set.prototype
, or if I should also add it to Array.prototype
, or maybe not add it at all. Is this actually useful in JS?
This would extend the input and output domain to the Reals instead of just Ints
That function is madness
There's wrong output when strings are large. This is a minor bug because the original/built-in also has it, so this has the lowest priority now
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.