Publicité

Hello- I am writing a program that uses the secant method to search fo.docx

rtodd588
27 Jan 2023
Hello- I am writing a program that uses the secant method to search fo.docx
Prochain SlideShare
Help! How to find A and B- Du Point Analysis- Calculate and interpret.docxHelp! How to find A and B- Du Point Analysis- Calculate and interpret.docx
Chargement dans ... 3
1 sur 1
Publicité

Contenu connexe

Plus de rtodd588(20)

Publicité

Hello- I am writing a program that uses the secant method to search fo.docx

  1. Hello, I am writing a program that uses the secant method to search for a root of f(x) = 3x^2 + sin(x) - e^x, given two values (a and b) Why is it that every time I run the program the "non existent slope" failure runs, is there something wrong with that if loop? It always seems to execute even if fabs(a-b) is NOT .00001. Here is the code (c++) : Any suggestions or possibly the solution to fix or improve this code would be great. Solution Look it would be better if you place your code inside the try catch block because by doing so you can get the actual error, and if the try catch does'nt give any error then the problem is in your logic. here the code which is more prone to error is in the non-existent slope if condition
Publicité