Notes |
(0012420 - 322 - 358 - 358 - 358 - 358 - 358)
nicolas cellier
07-31-08 08:27
edited on: 07-31-08 08:31
|
Ah number theory... could be an add-on package with other functions like totient etc...
I propose that the method would be split in two parts:
- The message #primeFactors certainly is valuable by itself.
- And it could eventually be optimized by other techniques in case of LargeInteger arithmetic (if ever needed).
|
| |
(0012421 - 646 - 706 - 706 - 706 - 706 - 706)
kwl
07-31-08 10:00
|
Thank you for your interest Nice ;)
But the method does not just compute divisors, it computes all possible combinations of them. And I do not want to split it up, unless there is a demonstratable benefit.
If someone wants to speed it up then computing the next smallest prime factor would benefit performance for sure.
Another optimization would be to not use a dictionary. But this method is for SBE to demonstrate use of Dictionary as Bag.
BTW I doubt you can provide an optimization for Large*Integers :(
And please, do *not* discuss any further here, use private email or squeak-dev as fits, then post *results* to mantis. TIA |
| |
(0012422 - 86 - 86 - 86 - 86 - 86 - 86)
kwl
07-31-08 15:35
|
Corrected primesBag inject:into: to primesBag values inject:into: for ANSI compliance. |
| |