Macro Scheduler may be very helpful for some Math Calculations
But I , absolutely , need to use a DIVISOR function which retrieves the smallest divisor
Exemple DIVISOR (77) =7 or DIVISOR (95334677) =1831
Do you know a way (even an indirect way) to reach this function with Macro Scheduler ?
Thanks
Reaching a divisor function with Macro Scheduler [solved]
Moderators: Dorian (MJT support), JRL
Reaching a divisor function with Macro Scheduler [solved]
Last edited by ABIVEN on Sat Jul 07, 2018 8:31 am, edited 1 time in total.
Re: Reaching a divisor function with Macro Scheduler
Don't truly know what you're looking for but this gives the same answer as your example.
Code: Select all
Let>value=95334677
Let>kk=1
Repeat>kk
Add>kk,1
Let>res={%value%/%kk%}
Separate>res,.,item
If>item_Count<2
Let>ans=kk
Let>kk=done
EndIf
Until>kk=done
mdl>ans
Re: Reaching a divisor function with Macro Scheduler
Many thanks JRL for this swift reply
In fact I have to get all the divisors of a number ; with a lot of number to deal.
Your macro works very well for that purpose but I am very concerned by the calculation time
I mark this topic [solved] and I'II explain it better later
Regards
In fact I have to get all the divisors of a number ; with a lot of number to deal.
Your macro works very well for that purpose but I am very concerned by the calculation time
I mark this topic [solved] and I'II explain it better later
Regards