Skip to main content
20-Turquoise
Dec 29, 2015 3:58 PM UTC
Solved

Extract( ) and Count( ).

  Hello, Everyone.

(1).PNG

or

(2).PNG

  Is there a way to create a program function as the above ?

     Thanks in advance for your time and help.

         Regards.

Message was edited by: Loi Le

Werner_E
Werner_EAnswer
25-Diamond I
Dec 29, 2015 11:41 PM UTC

Would this help?

5 replies

Werner_E
Werner_E25-Diamond IAnswer
25-Diamond I
Dec 29, 2015 11:41 PM UTC

Would this help?

Translate
lvl10720-TurquoiseAuthor
20-Turquoise
Dec 30, 2015 12:17 AM UTC

This Program Function Model is very, very helpful to me, Werner. Thanks and thanks, again.

(3).PNG

    Best Regards

Translate
Werner_E
25-Diamond I
Dec 30, 2015 11:56 AM UTC

I doubt that the function "count" will be of any help if you try to get hold on the prime factors of a number and their multiplicity.

As I am not aware of any method to be able to use the results of the symbolic "factor" command, we would have to write our own routine.

This is not that difficult, but slower and you will run into the same problem with larger numbers as before because of the well known limitations given by the numerics.

One way around could be to symbolically evaluate the function, but be prepared that it massively slows down calculation speed!

I am not sure why. The way to find the factors is a very bold and inefficient one (trying every odd number up to the root) and sure could be significantly speeded up by using a vector of precalculated primes, but there seems to be something else which slows down symbolic evaluation that massive.

I could not wait until the facorization of your original number finishes, but I guess you would get the correct result - some day.

Werner

Translate