Jump to content

User talk:Polarit

From Rosetta Code

resurrected edit

Hi there, and welcome to rosettacode. I've resurrected your attempted edit: Prime_decomposition#Elm and put a "(to be added)" where the output should go. Please review and fill in that part. --Petelomax (talk) 15:22, 20 December 2023 (UTC) Petelomax (talk) 15:22, 20 December 2023 (UTC)

Thank you for help!
I have read all the instructions and still did’nt understand, where to locate a new page.
Sorry about misunderstanding Polarit (talk) 15:36, 20 December 2023 (UTC)
Thought you might like to know: if I run https://ellie-app.com/pMYxVPQ4fvca1 and change the number by +1 it only shows 2, +1 again and it only shows 7... seems a bit wierd. --Petelomax (talk) 20:23, 20 December 2023 (UTC) Petelomax (talk) 20:23, 20 December 2023 (UTC)
Thanks for checking my code!
That code behaves ok for lower numbers. I have made this code on base of a c++ code, manually translating it to Elm and compiled to JS (Ellie compiles automatically but I have to compile local by my elm).
There are differences with c++ and JS upper limit, how big numbers work well, somewhere in the range 1.0E31 ... 1.0E32. JavaScript works better with the big numbers. C++ compiler claims about high integers telling that they are interpreted as negative numbers.
However, there may still be some error either in my translated code or in the algorithm.
I must add some upper limit to the code to avoid the errors.
I have another calculator made in plain JS with a little different logic at https://suncalc.lammi.cc/calculus/primefactors.html
If you increase the number 84894624407 by +1, it will show the primes 3067 4357 6353 .
Btw, I could not reply earlier because Rosetta Code was two days down - at least here in Finland, and I suspected already that I am banned.
Season greetings,
Polarit Polarit (talk) 07:47, 23 December 2023 (UTC)
Cookies help us deliver our services. By using our services, you agree to our use of cookies.