I feel like I'm over thinking this one..
I'm making a calculus program that does newtons method for you.
You input the function, it's derivative, your starting value and the number of decimals you want it to be accurate to.
If you don't understand the above it's fine. Here's a good explanation of where you guys can help;
The user inputs what decimal place they want to answer to be accurate to. If the user inputs let's say, 5 for the accuracy, then the function loop would keep doing the function until the decimal stops changing at that decimal. So since they picked 5, it would keep getting answers until the fifth decimal wasn't changing;
1.436326
1.423445
1.421432
1.421346
1.421353
1.421354
and then it would output that number in which the fifth decimal place did not change, along with how many times it had to run the function for it to get there. Is there anyway to compare the decimal places?
I'm making a calculus program that does newtons method for you.
You input the function, it's derivative, your starting value and the number of decimals you want it to be accurate to.
If you don't understand the above it's fine. Here's a good explanation of where you guys can help;
The user inputs what decimal place they want to answer to be accurate to. If the user inputs let's say, 5 for the accuracy, then the function loop would keep doing the function until the decimal stops changing at that decimal. So since they picked 5, it would keep getting answers until the fifth decimal wasn't changing;
1.436326
1.423445
1.421432
1.421346
1.421353
1.421354
and then it would output that number in which the fifth decimal place did not change, along with how many times it had to run the function for it to get there. Is there anyway to compare the decimal places?