Skip to main content
14-Alexandrite
Jul 31, 2018 11:06 AM UTC
Solved

PROGRAMMING NEWTON RAPHSON ON PRIME

Hi

I need to use Newton algorythm with prime.

I write algorythm  step by step.

I don't know prime correctly  to make a program for iterative loop.

I need to make 10 loop max, and i want to program break when:

- iterative loop over 10

or

- Error control match with range value Ec

I need to enter manualy first step x0

I need to enter nanualy Error_control Ec

Please, can you help me to write NR with program in prime.

Thanks

 

in this capture:

find root for f(x) function with NR algorythm

 

Capture.PNG

 

Werner_E
Werner_EAnswer
25-Diamond I
Jul 31, 2018 12:13 PM UTC

Here's a slightly different function with two additional arguments - function and max.iterations - and a table as output:

B.png

Worksheet in P4 format attached.

 

13 replies

23-Emerald I
Jul 31, 2018 11:37 AM UTC

try this

Translate
XDN14-AlexandriteAuthor
14-Alexandrite
Jul 31, 2018 11:47 AM UTC

Thanks, it's great!

because i don't understand one things

In you program, where is limited iteration with 10 loop max ?

 

Translate
Werner_E
Werner_E25-Diamond IAnswer
25-Diamond I
Jul 31, 2018 12:13 PM UTC

Here's a slightly different function with two additional arguments - function and max.iterations - and a table as output:

B.png

Worksheet in P4 format attached.

 

Translate
XDN14-AlexandriteAuthor
14-Alexandrite
Jul 31, 2018 12:23 PM UTC

It's ok for me !!!

Thanks!!!!

 

For my use, it's not necessary to iterative loop is "var"

ten value will be implemented in hard.

But it's more pretty in your solutionSmiley Wink

 

Translate