A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://TheAlgorithms.github.io/C-Plus-Plus/d7/d6a/bisection__method_8cpp_source.html below:

TheAlgorithms/C++: numerical_methods/bisection_method.cpp Source File

Go to the documentation of this file. 22#define MAX_ITERATIONS 50000 26static double eq

(

double

i) {

27 return

(std::pow(i, 3) - (4 * i) - 9);

33 return

(T(0) < val) - (val < T(0));

38 double

a = -1, b = 1, x, z;

53

std::cout <<

"\nFirst initial: "

<< a;

54

std::cout <<

"\nSecond initial: "

<< b;

60

std::cout <<

"\n\nz: "

<< z <<

"\t["

<< a <<

" , "

<< b

61

<<

" | Bisect: "

<< x <<

"]"

;

69 if

(std::abs(z) < EPSILON)

73

std::cout <<

"\n\nRoot: "

<< x <<

"\t\tSteps: "

<< i << std::endl;

#define MAX_ITERATIONS

Maximum number of iterations to check.

static double eq(double i)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4