TI-89 HomeGames ArchiveTitanium GamesGames How ToProgramsFAQForumTI-89 WikiLinks

Bisection Method Programming Problem

 
Post new topic   Reply to topic    Your TI-89 Resource Forum Index -> BASIC Programming
Author Message
Link-



Joined: 14 Nov 2007
Posts: 1

PostPosted: November 14, 2007 8:06 PM    Post subject: Bisection Method Programming Problem Reply with quote

Hi,

I'm trying to program bisection method for my numerical analysis class, I still having a problem on it for some reason fp and fa are having the same value.

Here's my code
Code:

ClrIO
Dialog
Request "Function",f
Request "Initial point",a
Request "Final Point",b
Request "Tolerance",tol
EndDlog
If Ok=0:Stop
expr(a)->a:expr(f)->f:expr(b)->b:expr(tol)->tol
a->x
f->fa
While abs(a-b)/(abs(a+b)/2)>tol
     a+(b-a)*0.5->p
     p-x
     f->fp
   If fp=0 Then
          Disp "p=",p
          Stop
   EndIf
   If fa*fp>0 Then
         p->a
         fp->a
   Else
        p->b
   EndIf
EndWhile
Disp "f(p)=0, p=",p
EndPrgm


By the way, could some recommend me a book for learning TI-Basic programming?

Thanks
Link[/code]
Back to top
View user's profile Send private message
ablemerle1



Joined: 13 Feb 2008
Posts: 5

PostPosted: February 13, 2008 1:20 AM    Post subject: k Reply with quote

delvar
Back to top
View user's profile Send private message
Display posts from previous:    View previous topic : View next topic  
Post new topic   Reply to topic    Your TI-89 Resource Forum Index -> BASIC Programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Contact Us | Privacy Policy | Disclaimer | Trademarks

Copyright ©2006 All rights reserved.


Free Greeting Cards | Girly Myspace Layouts | Myspace Unblocker |