3 ms·
Define ‘math’. I guess you want to work with the ‘normal’ integers and reals. If so, you’ll need - fixed-size integers (signed and unsigned) - big integers -
by Someone 6y ago
Define ‘math’. I guess you want to work with the ‘normal’ integers and reals. If so, you’ll need
- fixed-size integers (signed and unsigned)
- big integers
- rationals with big integer numerators and denominators
You also want all of them to be fast, especially if you’re going to explore things.
If you’re going to do exact polynomials, you’ll want the ability to represent radicals (square root of 2, third root of (square root of 2 plus 1), etc). That gets you to a computer algebra system (https://en.wikipedia.org/wiki/Computer_algebra_system https://en.wikipedia.org/wiki/Computer_algebra_system) that will also help in doing exact analysis.
If you want your system to be extensible, you’ll want operator overloading (if you implement addition mod n, you will want to write it using ‘+’). You’ll also need extensibility if you’re going to hunt for counterexamples, as you’ll need it for performance.
On the other hand, if you want to do proofs, you may want an automated theorem prover (https://en.wikipedia.org/wiki/Automated_theorem_proving https://en.wikipedia.org/wiki/Automated_theorem_proving) or a proof assistant (https://en.wikipedia.org/wiki/Proof_assistant https://en.wikipedia.org/wiki/Proof_assistant)
I don’t think you can get all of the above in one system. That’s why you have to decide what kind of math you want to do before picking the system.