TI 83/84
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   Dev Hardware ForumsSOFTWARETI 83/84

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Hardware Forums Sponsor:
  Trader Rating: 0 · #1  
Old March 11th, 2008, 02:42 PM
SoulShot SoulShot is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 3 SoulShot User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 35 sec
Reputation Power: 0
Formula of Bolzano

Hi there
Today @ math we learned a new formula, it's like typing alwasy the same thing over again, to get closer to a point.
Now i thougt to put it in a program, but the program won't work. What i got is this:

(A+B)/2 => M
Y1(M) => C
If C>0
Then
M => B
Else
M => A
Disp "A=",A
Disp "B=",B
Disp "M=",M
Disp "F(m)=",C

The problem is in the if-then-else part.. When F(m) outcomes negative, it should store M in A, when it turns op postive it should store it in B..

The problem is, it won't Disp anything? :s

Reply With Quote
  Trader Rating: 0 · #2  
Old March 11th, 2008, 03:00 PM
SoulShot SoulShot is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 3 SoulShot User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 35 sec
Reputation Power: 0
What i figured out now, it SOMETIMES gives the Displays.. sometimes it just says Done without giving nothing.. What's causing this bug?

Reply With Quote
  Trader Rating: 0 · #3  
Old March 11th, 2008, 04:41 PM
SoulShot SoulShot is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 3 SoulShot User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 35 sec
Reputation Power: 0
For the ones who wanna figure it out, stop here, because i got it already, sorry for making the forum dirty for it
I had to add an end in it, because in the first version, it only displays when it's negative.. Programming is just logics i guess

(A+B)/2 => M
Y1(M) => C
If C>0
Then
M => B
Else
M => A
End
Disp "A=",A
Disp "B=",B
Disp "M=",M
Disp "F(m)=",C

Reply With Quote
  Trader Rating: 0 · #4  
Old April 2nd, 2008, 09:14 AM
MrLarkins's Avatar
MrLarkins MrLarkins is offline
The HS Math Teacher
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Oct 2007
Location: Central Arkansas
Posts: 46 MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 8 h 12 m 5 sec
Reputation Power: 2
Send a message via ICQ to MrLarkins
hmm, would this be a program that you ran over and over until the value converged? if so, why not create a While() loop? Then you wouldn't have to rerun the program over and over again.

and then what if f(x)= -x^2 + 4 with A=0 and B=5,
(0+5)/2=2.5
f(2.5)= -2.25

according to your code (if C>0, then replace B else replace A) you'd replace the wrong value...correct? causing a squeeze between 2.5 and 5 when the zero is between 0 and 2.5

i think you'd need more to the program first, in order to decide with way to squeeze.

edit: ah, the teacher wants to see your work, thus the steps shown...got it. still the error in the replacement.

Reply With Quote
  Trader Rating: 0 · #5  
Old April 2nd, 2008, 11:04 AM
MrLarkins's Avatar
MrLarkins MrLarkins is offline
The HS Math Teacher
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Oct 2007
Location: Central Arkansas
Posts: 46 MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 8 h 12 m 5 sec
Reputation Power: 2
Send a message via ICQ to MrLarkins
check this out!
Code:
Lbl 1
Prompt A,B
If abs(Y1(A))=Y1(A):1->K
If abs(Y1(A))[notequal]Y1(A):0->K
If abs(Y1(B))=Y1(B):1->J
If abs(Y1(B))[notequal]Y1(B):0->J
If K=J
Then
Disp "No sign change"
Goto 1
Else
Lbl 2
(A+B)/2->C
Y1(C)->M
If abs(Y1(C))=Y1(C):1->Z
If abs(Y1(C))[notequal]Y1(C):0->Z
Disp "A",A
Disp "B",B
Disp "C",C
Disp "Y1(C)",M
Pause 
If Z=K
Then
C->A
Else
C->B
End
Goto 2
End

Reply With Quote
Reply

Viewing: Dev Hardware ForumsSOFTWARETI 83/84 > Formula of Bolzano


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway