Algorithm for obtaining first bracket

# Algorithm for obtaining first bracket - low< f high Then...

This preview shows pages 1–4. Sign up to view the full content.

Algorithm for obtaining first bracket IF (f low >0 AND f high > 0 , Then IF(f low > f high , Then x low = x high x high = x high + x Else IF (f low < f high Then x high = x low x low = x low - x ENDIF ELSEIF (f low <0 AND f high <0 , Then IF(f low > f high , Then x low = x low - x x high = x low Else IF (f low < f high Then x low = x high x high = x high + x ENDIF ELSEIF (f low * f high <0 , Then IF(f low * fmiddle<0 , Then x high = x middle else IF(f high * f middle >0 , Then x low = x middle ENDIF ENDIF Code in Excel for x low x low =IF(AND(f low >0, f high >0), then IF(f low > f high , x high , x low - x) else IF(AND(f low <0, f high <0), then IF(f low > f high , x low - x, x high ), else (bracket!!) IF(f low * f middle <0, x low , x middle )))

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
IF (f low >0 AND f high > 0 , Then IF(f low > f high , Then x low = x high x high = x high + x Else IF (f

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: low < f high Then x high = x low x low = x low- ∆ x ENDIF ELSEIF (f low <0 AND f high <0 , Then IF(f low > f high , Then x low = x low- ∆ x x high = x low Else IF (f low < f high Then x low = x high x high = x high + ∆ x ENDIF ELSEIF (f low * f high <0 , Then IF(f low * fmiddle<0 , Then x high = x middle else IF(f high * f middle >0 , Then x low = x middle ENDIF ENDIF Code in Excel for x high x high =IF(AND(f low >0, f high >0), then IF(f low > f high , x high + ∆ x, x low ) , else IF(AND(f low <0, f high <0), then IF(f low > f high , x low , x high + ∆ x), else (bracket!!) IF(f low * f middle <0, x middle , x high )))...
View Full Document

## This note was uploaded on 08/31/2011 for the course ENGR 3723 taught by Professor Staff during the Summer '11 term at Oklahoma State.

### Page1 / 4

Algorithm for obtaining first bracket - low< f high Then...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online