[TIB] Re: solver


[Prev][Next][Index][Thread]

[TIB] Re: solver



Title:
That's true. I'm guessing that it uses something like the guess the number algorithm but it probably starts with your guess and gets progressively higher and lower until the sign changes. For example, if the answer is 2.34567, and your guess is 2, it might run through like this:
2
2.1
1.9
2.2
1.8
2.3
1.7
2.4 (hey the sign changed!)
2.31, 2.32, 2.33, 2.34, 2.35 (changed again!)
2.341, etc.
2.3451, etc.
2.34561, etc
2.34567 WORKS!
The times when it gets long decimals like 1.99999993 instead of 2 must be because it rounds the answer and it becomes equal.

Andrey wrote:
000701c330b3$30c08b30$6701a8c0@homepc">
Well, some equations have more than one answer, say, if there's trig
functions.  Also, it needs to find the value that's closest to the guess
that is provided.  Although I doubt that your method works except if the
graph would be either strictly increasing or decreasing.

----- Original Message ----- 
From: "Nick Peaden" <Nitrocloud@earthlink.net>
To: <ti-basic@lists.ticalc.org>
Sent: Thursday, June 12, 2003 1:40 AM
Subject: [TIB] Re: solver


  
A quick way would be, check -inf, 0, +inf, then figure where it is out of
those three and take half of the domain value (isn't perfect infinity,
otherwise it wouldn't work), and work your way from there, much like the
algorithm everyone uses for Guess The Number.
    



  


References: