Bisection Method

Embed Size (px)

DESCRIPTION

sas

Citation preview

  • // Bisection method// calculating root for polynomial: f(x) = x^3 - x - 2

    read a, b, tolerance and max_iteration

    set i = 1while(i 0 then a = celse b = c

    i = i + 1end

    Notes: 1. we will using math.h for the "pow" (power - n to the x) function2. better if enclose the math expression calculation with a function