Christian Tismer <tismer@tismer.com> wrote ... > Andrew Koenig wrote: [rational representations] > > Seriously, I don't know whether it would help in practice. > > It might be that normalizing rationals from time to time would > > be enough. > > Ok, not just zeros, but normalizing the fraction to no > common denominator. That makes sense if lots of small > numbers/fractions were multiplied and prime factors > pile up. > Not so with addition. This creates completely different > prime factors all the time, and addition becomes much > more expensive than multiplication when the common > denominator must always be reduced to the minimum. > > gotta-be-expensive -- chris > Next someone will suggest that we store rationals as a sequence of coefficients of the prime factors. This would make primes really easy to recognise (since they'd be a sequence of zeros followed by a one with a single one as denominator). but-it-might-slow-down-other-operations-a-bit-ly y'rs - steve ----------------------------------------------------------------------- Steve Holden http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/pwp/ Previous .sig file retired to www.homeforoldsigs.com -----------------------------------------------------------------------
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4