by fatneckbeard · 3y ago · 0 comments
in the integers basically the only thing you can do to break arithmetic is 'divide by 0'
in matrices there are a lot more ways to do something resulting in an error.
there are ways to reimagine integers so that divide by zero is not an error. they are esoteric but they exist.
i wonder if they have done this for the matrix?
Now, you may think a matrix whose elements are polynomials with coefficients that are integers modulo some prime p with the polynomial ring itself quotiented by some irreducible polynomial might be too bizarre and esoteric to be useful but in fact these structures do see a lot of use in cryptography.
[1] https://www.quantamagazine.org/ai-reveals-new-possibilities-...
It's very different in programming, of course.
There is also the overflow which is even more nasty than the zero-divide, because often it goes unnoticed.
What would it take to have a practical representation that’s better? I’m not well versed in the fields and rings theories in math, but it seems like the fundamental problem here is that floats have a finite number of bits, which means they are forced to round the results. That rounding is what causes a very large portion of all the trouble, it is what breaks associativity & commutativity. Since there is no practical way to have an unlimited number of bits, I wonder if a practical field of floats cannot exist in general?
The only concrete finite fields are the finite fields of size p^k, where p is prime. I'm kind of thinking that there must be some representations that at least can shove off the breaking of associativity, commutativity, etc more into the background. It's probably more of a computer science and usability problem, but hopefully backed up by enough theory to provide some guarantees.
You can make a "free" field as a programming interface (like in the OP) - and the floats would then be a leaky implementation of that interface. I think the question is how to make an implementation that better captures what we talk about when we talk about real numbers, while having good enough performance for big numerical tasks, and avoiding common numerical problems. Definitely not easy, and I think application dependent to a great extent - a place where one really has to be able to glide up and down levels of abstraction.
aka you are never going to store sqrt 2 in a register.
the closest you can get is symbolic algebra packages. but at the end you still have to come down from infinite land and actually have an ASCII decimal representation because you cannot cut a board at sqrt2 feet long or fill your car with sqrt2 gallons of gasoline. or pay pi dollars for a pizza and expect your bank to keep a list of all the different transcendental atomic values you have used for payments over the years. "Your account has 17 pi plus 45 sqrt2 plus 97 e minus the golden ratio" is never going to work very well.
one thing that i think would help is to put non-real mathematics into the mathematics curriculum and stop handwaving about how a computer does real numbers.. (it doesnt). teach discrete math, modular arithmetic, prime number theory, at the same time as pre-calculus.