cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Extract( ) and Count( ).

lvl107
20-Turquoise

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

1 ACCEPTED SOLUTION

Accepted Solutions
Werner_E
24-Ruby V
(To:lvl107)

5 REPLIES 5
Werner_E
24-Ruby V
(To:lvl107)

Would this help?

lvl107
20-Turquoise
(To:Werner_E)

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

(3).PNG

    Best Regards

Werner_E
24-Ruby V
(To:lvl107)

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

lvl107
20-Turquoise
(To:lvl107)

(4).PNG

        Regards.

           Loi.

Werner_E
24-Ruby V
(To:lvl107)

Happy New Year, too, and good luck for 2016!

Werner

EDIT:

Top Tags