Hi, Not much progress this week. I decided to take a break from the hard stuff, and go back to grade school math and implement bignums (compiled in optionally, of course). All the basic arithmetic operations work, though more tests are needed.
Computers do nothing better than crunch numbers, yet if you just want to use your machine as a calculator there is very little software that can handle numbers larger than the machine precision. Even bc(1) fails when numbers get too large (more than double precision?). For quotient and remainder I didn't actually use the grade school algorithm, I used a sort of inverted Russian peasant algorithm. I think it makes for a simpler implementation without sacrificing performance. Rationals would be a likely future extension. Native support for complex numbers is less of a priority. I've had occasion to want a quick estimate for a combinatorial problem resulting in astronomically large numbers, which would require more memory than you could ever hope to have if represented as a bignum. For these cases, I'm considering an alternate representation, using Knuth arrows and/or Conway chained arrow notation. -- Alex --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Plan 9 Google Summer of Code" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/plan9-gsoc?hl=en -~----------~----~----~----~------~----~------~--~---
