Algorithm for obtaining first bracket

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

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

View Full Document Right Arrow Icon
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 )))
Background image of page 1

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

View Full DocumentRight Arrow Icon
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
Background image of page 2
Background image of page 3

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

View Full DocumentRight Arrow Icon
Background image of page 4
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 Right Arrow Icon
Ask a homework question - tutors are online