Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0007137 [Squeak] Any feature N/A 07-30-08 11:52 08-17-08 19:05
Reporter kwl View Status public  
Assigned To kwl
Priority normal Resolution no change required  
Status confirmed   Product Version
Summary 0007137: Highly composite numbers, Integer>>#numberOfDivisorCombinations
Description Attached is an integer method which computes the number of divisor combinations.

Examples 4096 => 13, 2520 => 48, more and links to background in the attached.
Additional Information
Attached Files  Integer-numberOfDivisorCombinations-7137-kwl.st [^] (1,127 bytes) 07-31-08 15:35

- Relationships

- 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.
 

- Issue History
Date Modified Username Field Change
07-30-08 11:52 kwl New Issue
07-30-08 11:52 kwl Status new => assigned
07-30-08 11:52 kwl Assigned To  => kwl
07-30-08 11:55 kwl File Added: Integer-numberOfDivisorCombinations-7137-kwl.st
07-31-08 06:52 kwl File Deleted: Integer-numberOfDivisorCombinations-7137-kwl.st
07-31-08 06:53 kwl File Added: Integer-numberOfDivisorCombinations-7137-kwl.st
07-31-08 08:27 nicolas cellier Note Added: 0012420
07-31-08 08:31 nicolas cellier Note Edited: 0012420
07-31-08 10:00 kwl Note Added: 0012421
07-31-08 15:32 kwl File Deleted: Integer-numberOfDivisorCombinations-7137-kwl.st
07-31-08 15:35 kwl File Added: Integer-numberOfDivisorCombinations-7137-kwl.st
07-31-08 15:35 kwl Note Added: 0012422
08-17-08 19:05 kwl Status assigned => confirmed
08-17-08 19:05 kwl Resolution open => no change required


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
57 total queries executed.
34 unique queries executed.
Powered by Mantis Bugtracker