[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] exact algebraic numbers?



Greg Ewing wrote:
But the back of my envelope is not wide enough
to accommodate any more of this.

A little bit further and you would have seen the fail: sqrt(3) * sqrt(6) = 3 * sqrt(2) and we're back where we started. However my algebra book assures me (non-constructively) that {1, sqrt(2), sqrt(3), sqrt(6)} is a basis for the smallest field over the rationals containing sqrt(2) and sqrt(3), so it should be possible to divide. I just have to chase the proofs backwards to figure out how. I'll let you know.
As for libraries dealing with this kind of stuff, there
might be something in Sage. But you're probably not going to
want to bolt Sage into your game...


Ah, I'd not seen sage, that looks cool. I agree though, prolly don't want it as part of my game :).

--Mike