not-very-good collection of functions for rational numbers in Lua
a few notes:
- Arithmetic and relational operations may only be used with 2 rationals, not with a rational and a number!
- It is generally not a good idea to try to exponentiate rationals. However, it can technically be done if the answer is real and rational. It will raise an error if the answer is not real or not rational!
- This was purely a project for practicing using metatables. There are probably better alternatives out there.
- If you do want to use it, just copy-paste the code from Rationals.lua into your own source code. I think you can also use the require function, but I don't know how.