1 страниц (3 вхождений)
Very Slow Numerical Approximation - Newton-Raphson Method - Сообщения
#1 Опубликовано: 22.02.2023 15:02:25
I tried to make a simple sheet that would show the path the Newton-Raphson approximation takes to get to a solution based on an initial guess.
The problem I'm having is that it's very slow with anything more than 2/3 iterations.
I'm not sure why it is slow. I can simulate the loop in steps and none of the calcs are slow outside of the loop.
Any ideas as to why this is so slow for i>2. i=3 is still okay, but is gets eternal after that.
In this particular case, the solution converges at the 7th iteration for two decimal places of accuracy.
This is a snip of 4 iterations, which takes well over 2 minutes...
![2023-02-22 12_54_44-SMath Solver 1.0.8348 - [Newton-Raphson Approximation.sm].png](/ru-RU/file/DFVs64/2023-02-22-12_54_44-SMath-Solver-1_0_8348---_Newton-Raphson-Approximation_sm__png)
Any input would be much appreciated.
Thanks,
Newton-Raphson Approximation.sm (10 КиБ) скачан 52 раз(а).
The problem I'm having is that it's very slow with anything more than 2/3 iterations.
I'm not sure why it is slow. I can simulate the loop in steps and none of the calcs are slow outside of the loop.
Any ideas as to why this is so slow for i>2. i=3 is still okay, but is gets eternal after that.
In this particular case, the solution converges at the 7th iteration for two decimal places of accuracy.
This is a snip of 4 iterations, which takes well over 2 minutes...
Any input would be much appreciated.
Thanks,
Newton-Raphson Approximation.sm (10 КиБ) скачан 52 раз(а).
#2 Опубликовано: 22.02.2023 16:31:04
I changed optimization of for loop to Numeric. It runs in less than a second on my machine.
Newton-Raphson Approximation.sm (11 КиБ) скачан 57 раз(а).
Newton-Raphson Approximation.sm (11 КиБ) скачан 57 раз(а).
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
1 пользователям понравился этот пост
Wesly Centerwall 22.02.2023 16:44:00
#3 Опубликовано: 22.02.2023 16:44:57
I knew it was going to be something simple like this. Thanks!
1 страниц (3 вхождений)
-
Новые сообщения
-
Нет новых сообщений