Talk:Chowla numbers: Difference between revisions

m
→‎Large computations: corrected a typo. away --> a way
m (→‎Large computations: corrected a typo. away --> a way)
 
Line 73:
::Unfortunately I later learned that the sympy library holding divisors is pure Python, but it is well regarded so I used it rather than creating my own.
::Hi Gerard, I mainly program in interpreted Python but '''don't''' want the present limits to be lowered.
::It is good to have some tasks that stress some languages, but I was thinking of finding <strike>away</strike> a way for most of the slower mplementations to naturally use the same lowered lmits. In the Python example I tried to do something like that and used shorter runs to prove my code, but just left the longer runs to the end and left them running. Luckily for me, they eventually finished, after sometime! --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 21:49, 12 March 2019 (UTC)
 
::: Does Python use a non-interpreted "language" for its BIFs? &nbsp; (In particular, &nbsp; '''divisors'''.) &nbsp; &nbsp; The reason I ask is that I wrote a home-grown &nbsp; '''divisors''' &nbsp; REXX function that instead of finding the divisors, and then adding them (say, with a &nbsp; '''sum''' &nbsp; function), I modified a version of the &nbsp; '''divisors''' &nbsp; code to instead of creating a list of proper divisors, I had the function just add the divisors on-the-fly (eliminating the stand-alone summation part). &nbsp; I then further modified the function to be aware if the target is odd or even, and adjusted the &nbsp; '''do''' &nbsp; loop accordingly (along with the &nbsp; '''do''' &nbsp; loop increment); &nbsp; that doubled the speed (or halved the computation time, &nbsp; pot-tay-toe, pot-tah-toe). &nbsp; Essentially, I coded a &nbsp; '''sigma_proper_divisors''' &nbsp; function with the subtraction of unity as being built-in by starting the summation with zero instead of unity). &nbsp; &nbsp; &nbsp; Do you happen to know if Python's &nbsp; '''divisors''' &nbsp; BIF does that? &nbsp; I would suspect that it does. &nbsp; In any case, this is why I included several formulas/algorithms to calculate the &nbsp; '''chowla''' &nbsp; function so that programmers could choose the fastest (most efficient) algorithm. &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 23:00, 12 March 2019 (UTC)