Terms of Service have been updated 06/07/08.
All new members must read and accept before posting.
| Author | Comment | ||
|---|---|---|---|
Crawl and 1OOO |
The Calculator Thread |
Lead | |
|
This will be the thread for all calculator related posts. I'm only posting it in this forum because I assume this will have limited appeal, not because it's nonsense.
|
|||
Crawl and 1OOO |
Re: I LOVE FO! | ||
|
I am in nerd paradise. I have just used my new calculator to solve two nonlinear equations of two variables with Newton's multidimensional method.
Before I get to that: I'm still trying to put the calculator through its paces, trying to figure out all the things it can and can't do (which I may talk about later), and just how to get the things it can do to work. I'm mostly done with that, but just today I learned how to use the "rectangular to polar" function (it unintuitively stores the results in the E and F memory), and I still don't know what the difference is between the CALC [ulate] and "=" buttons. One function that I really couldn't figure out was the line copy function. Like most current pocket calculators, this one has one line for operations and one for the result. Plus, several previous lines are stored, in case you want to go back to them or edit them. Anyway, the line copy function puts a bunch of previous lines on one single line. The example the book uses is like this: 1 + 2 = 3 3 * 4 = 12 4 - 2 = 2 Then the line copy function is used, which results in the line 1 + 2 : 3 * 4 : 4 - 2 Pressing the equals key gives 3, 12, 2, in sequence. Wow!, I thought. That must be the most useless function ever! Then today I was thinking about the Ans [wer] key. With my older calculator, which didn't have the equation line, the Ans key was needed so you could do any calculations on the fly, without needing to plan ahead much. So, say you wanted to multiply 2 * 16... 32. Now you realize you need to take the fifth root of that number. Then you'd hit 5 (universal root button) Ans = 2. BUT, due to my new calculator's equation line, the Ans button can be used for more than that! It can be used multiple times in one line (while retaining the same value as the previous answer. My old calculator updated the answer value after each calculation). I quickly realized this could be used for Newton's method in one variable. Newton's method is [new] X = [old] X - f(X)/f ' (X) Where f is the function you want to equal zero. Well, to use that on my calculator, all you have to do is initialize X by hitting some number and equals, then type in Ans - f(Ans)/f ' (Ans) where of course you have to enter the real function and figure out the derivative on your own. But after you do that, all you have to do to iterate Newton's method is hit the equals button over and over! This still isn't very useful for my calculator. It, after all, has a built in one variable equation solver using Newton's method, and that saves you the trouble of finding and typing the derivative, and hitting the equals button. (It can be useful on other calculators that aren't as good as mine, though. For instance, it can be used with some recent TI calculators) But then I got the idea of wondering if this could also solve two variable equations. Instead of using the Ans button, I could use the calculator's independent memories (it has A-F, and X and Y). Newton's method in one variable is a single step method. In two variables, it uses a bunch of steps, but I figured that would be a good use of the line copy feature! I thought a good equation to test my calculator with was X = Log (X) [Note: It is my custom to write Log to mean Log to base e. I think writing Ln, unless I'm referring to the Ln button, is stupid] This equation has no real roots. After thinking about it, I decided the best first step would be to raise e to both sides power, giving X = exp(X). If the variable would be X + i Y, this becomes x + i y = exp(x)( cos (y) + i sin (y)) or x - exp (x) cos (y) = 0 y - exp (x) sin (y) = 0 Two real (nonlinear) equations in two real unknowns. I have to admit that I tried solving this equation with my calculator a few different ways before I found one that worked. The problem is that the final combined line can only have around 75 combined keystrokes. So, a straightforward typing in of the equations wouldn't work. This also means that equations that are too complicated probably would never work. But I eventually streamlined this particular problem. Okay, to use Newton's method in multiple variables, I said the first expression (to the left of "= 0") was function "a" and the second expression was function "b". Then, da / dx = c da / dy = d It just so happens that for this particular problem, db / dx = -d db / dy = c making things easier for us. (Again, more complicated problems might not work) This is what I typed 2 -> X 2 -> Y (Just arbitrary seeds. However, all seeds won't work, if they're too far from the solution. I tried (5,5), and it lead to (0,0), which is not a solution, but generated a math error, because c = d = 0 there.) X-eXcosY -> A Y-eXsinY -> B 1-eXcosY-> C eXsinY -> D X + (BD - AC)/(C2 + D2 -> X Y - (CB + DA)/ (C2 + D2 -> Y And I entered everything just about literally as it's displayed. On this calculator, the juxtaposition BD works as B*D, so I suppressed the * to minimize key strokes. Also, you don't need to close parenthesis at the end of lines. After I typed that in, I hit the "up" button enough times to take me to the first line ( X-eXcosY -> A ) and hit copy. After that, all you have to do is repeatedly hit "enter" to iterate. Needless to say, this saves a lot of time compared to having to enter all of those formulas for each iteration. The final answer, by the way, is 0.318131505 + i 1.337235701 |
|||
Crawl and 1OOO |
I LOVE FO! | ||
|
Wow, after all this time, I learned something new about my old calculator.
Quote: Sometimes, sometimes not. Just for the heck of it, I tried numerically solving x^2 - 2 = 0 with my old calculator and Newton's method. And it worked. (Not very well - you still have to enter the formula each time. But you don't have to worry about storing intermediate values) So, then I thought maybe every calculation didn't change the memory, just pressing "=" updates it. But no, I found that typing 2 + 5 ) changes the answer value to 7. Ie., 2 + 5 ) * Ans would give 49, regardless of the previous calculation. I *think* the way it works is, if you start a formula with Ans, then Ans for the rest of the formula will keep that value, even if you hit ). But if you do another calculation before hitting Ans, then Ans will be updated. |
|||
Crawl and 1OOO |
I LOVE FO! | ||
|
That line copy method can also be used for infinite series.
Example, to use Leibniz's formula for pi 4 -> A 3 -> B A - 4 / B + 4 / (B + 2) -> A B + 4 -> B Hit up to get to A - 4 / B + 4 / (B + 2) -> A , hit copy, then hitting equals over and over (slowly) calculates pi. Of course, this is a terrible method for calculating pi (especially since all worthwhile calculators have pi permanently stored in memory anyway). But that's because Leibniz's formula converges very slowly. This is just to demonstrate proof of principle. I imagine this could be useful if, for example, you have to solve a differential equation at a certain value, and it can only be solved as an infinite series, and it converges at a worthwhile rate, and no actual computer is nearby. |
|||
Facilitypro |
Re: The Calculator Thread | ||
|
I have a TI-81. I used it in pre calc and calc in high school. Then I used it for pre calc and calc in junor college. Then I realized I will never understand math so now I use the adding and subtracting functions for balancing my checkbook.
(Although before I got busy I bought a couple math textbooks in order to (re)teach myself some advanced algebra and basic calculus that, someday, might help in case I ever need to model psychological phenomena over time or used advanced probability theory. It's just a matter of repetition. I'm not that smart, so I have to learn things three or four times before they stay with me.) |
|||
Ultimate Chicken |
Re: The Calculator Thread | ||
|
Almost off topic: famous search engine Google seems to have integrated a calculator function of sorts into it's search engine. As a test, you can go to www.google.com and just enter 3 + 2 into the text field.
This calculator will NOT attempt to solve anything that will definitely give you a MA.ERROR (so 1 / 0 doesn't trigger the calculator, and neither does 3000 ^ 20000). However, it can perform pretty complex fuctions: 10 cosh 8 exp -1 1024 ^ 2 And you can even do things like: the speed of light * the speed of light minutes in a millenium The calculator can even tell you The Answer to Life, the Universe, and Everything ...but for some reason it can't calculate the airspeed velocity of an unladen swallow. Also, it can't seem to recognize cosec and cot. Try it, and have fun! tan cos sin sec cos 10======
A munchkin is an annoying, ape-like critter with superb math skills and selective memory. It is near immortal, and excels at the field of its choice. However, it has a dangerous lack of common sense, social skills and concern for its fellow player.It is closely related to the Power gamer, and Number cruncher. - Nezumi, Dumpshock Forums ![]() |
|||
Red Clawbot |
Re: The Calculator Thread | ||
|
I'm still in Algebra =(
|
|||
Ultimate Chicken |
Re: The Calculator Thread | ||
|
Ah. Since you're still in that year, do you know how to access the hidden simultaneous equation functions in older Casio calculators? Forgive me if they're no longer hidden and are documented, but back in Grade 6-8 I had to go through a convoluted button press procedure, which for the life of me I can no longer remember.
======
A munchkin is an annoying, ape-like critter with superb math skills and selective memory. It is near immortal, and excels at the field of its choice. However, it has a dangerous lack of common sense, social skills and concern for its fellow player.It is closely related to the Power gamer, and Number cruncher. - Nezumi, Dumpshock Forums ![]() |
|||
Red Clawbot |
Re: The Calculator Thread | ||
|
Actually, I passed Algebra in high school like 4 years ago, but I have never taken my math to the next level since. If I saw any algebra I'd be rusty at first, but it wouldn't take me that long to be get used to it again.
Don't know how to access the whatever it is on the casio calculator your talking about. =l |
|||
CRAWLand1000 |
I LOVE FO! | ||
|
BTW, this calculator is a Casio fx-115MS.
If I'd rate it at Amazon.com, I'd probably give it 4 stars. At the time I first got it, I thought its predecessor was the best solar calculator I used. While this model is better in most ways, there are still a couple of things I prefer about the older one. One good thing I haven't yet mentioned about this calculator is that it's *fast*. The usual way I "race" scientific calculators is by having them calculate 69!. Presumably, they actually calculate 2 * 3 * 4 * 5 * ... * 67 * 68 * 69, making it the longest single calculation for a calculator to do. Well, this calculator does this instantaneously. It's even slightly faster at this than my previous Casio calculator, which had beaten all prior contenders. (I suppose it's possible this calculator has all those values - or even some of them - in a look-up table to speed this up, which might sort of invalidate this test) The only thing it does slowly is its integral calculation, which can take several minutes. However, being able to do that at all is something of a bonus on a $15 calculator. And of course, that is not a single calculation, but a long series of them. But, anyway, there are a couple of things my older calculator did better. My old calculator had 6 independent memories (A-F) plus the "M" memory, which I think could even store a complex number. This one has the 6 A-F variables, plus X and Y, plus M. This might sound better, but they are not independent memories. If you wanted to, you could use the memories in my older calculator to store, say, fundamental physical constants (like the mass of an electron). I never actually did that, but it was possible. The fx-115MS, however, sometimes uses those memories for other things, so what you'd put into them would be overwritten. For instance, in linear regression mode, those memories store some parameters of the data. Simply going to regression mode and then back to computational mode clears the memories. The memories are also inaccessible during certain modes. You can't get to them while in equation solving mode, for instance. It'd be nice to be able to "import" the result from an equation solution back into computation mode for further work. If you'd want to do that now, you'd have to write the intermediate result down on paper. Also, while this calculator is pretty good at having most functions available with a button press or two, there are a few functions that are accessible only through menus. Only one of these annoys me: The "estimate" function in regression mode. I said before that one of the nicest things about my older calculator was its regression mode. Now, if you're wondering what use that would have for a scientist, a big one would be linear interpolation from a table. That calculator could do things like that very quickly and usefully. The fx-115ms can still do this, but since you have to go through numerous menus to get the final result, it's much slower and a bigger pain. (This is still MUCH better than the TI 30XII, which I think is a POS. Half the functions are only accessible through menus, plus the thing misses key strokes like crazy (we have some of these sitting around in the lab for general use; I don't personally own one). I don't think it's built very durably) Aside from those things, though, this calculator is nearly perfect. For its price, I doubt there's a better calculator (though I have to admit I don't have much experience with Sharp's latest models) It also might be a little early to talk about its durability (one thing I was happy with for my older one, which was repeatedly accidentally stepped on and dropped), but I have already accidentally dropped it down half a flight of stairs (onto carpeting) without a problem. "Perhaps one did not want to be loved so much as to be understood." -Orwell |
|||
Ultimate Chicken |
Re: I LOVE FO! | ||
|
The one thing I hate about calculators is the general lack of a MODULO function (find remainder of given division problem). This was essential for the cracking of certain cypher algorithms. Had to do long division (of numbers > 30,000 divided by a 2 digit number) to get those. Ah well.
|
|||
Crawl and 1OOO |
Re: I LOVE FO! | ||
|
There are ways around that, even on 4 function calculators.
But the easiest way to do it with the fx-115MS is to use the fraction feature. Say you want to know the remainder of 145695 when divided by 19. Type in 145695 (fraction button) 19, hit equals, it evalutates to 7668 _| 3 _| 19 (ie., 7668 and 3/19). 3 is the remainder. There are limitations, though: The whole number, numerator, and denominator, and the two fraction symbols of the result must take up 10 or fewer characters. This isn't that much of a limitation, though. I've seen TI calculators that only allow a 3 digit denominator, regardless of the rest of the number. If you wanted to use the method of a four function calculator: Example, find the remainder of 763549283 when divided by 9781. This problem has too many digits to use the fraction technique. First, you just divide them. That gives 78064.54176.... Round it to 78064. Then type 763549283 - 9781 * 78064. This equals 5299. That is the remainder. <center><img src=http://www.boomspeed.com/omelette/smoosh/monolith.jpg><br>
<a href=http://www.boomspeed.com/omelette/smoosh/2001.mid>Dun... dun... dun... DUN DUN!</a></center> |
|||
sethrashnoo |
Re: I LOVE FO! | ||
|
When I was in school, we weren't allowed to have calculators. Now, they're mandatory. What gives?
|
|||
Red Clawbot |
Re: I LOVE FO! | ||
|
You know what I want to be for halloween?
A CALCULATOR!! |
|||
CRAWLand1000 |
Re: The Calculator Thread | ||
|
I actually had someone in my high school class who made a TI-81 Halloween costume (basically, a big box painted blue with the buttons also painted on). I think he actually wore it in school. But it was a private school, so that might have gotten him out of the dress code for one day.
I think it's bullshit that calculators would be mandatory. My brother is in highschool now, and they have to buy some expensive graphing calculator for math class. I made it through high school, got a BS, and made it a good ways through graduate school without ever needing a graphing calculator. Frankly, it seems most exam problems that could conceivably require scientific functions (eg., sine of an angle) are either written in such a way that you don't need a scientific calculator (for example, maybe the angle in question is 30 degrees, which you should be able to figure out the trigonometric functions for without a calculator) or they'll even just include a sine table with the test. One thing I found amusing while looking up Amazon reviews for the TI-89 was that several people said it ruined their life. They said they are now so dependent on the calculator that they can't solve problems on their own, and they're terrified of having their professors find out. (I guess that could be seen as more sad that amusing, but I have a hard time taking it seriously) Ideally, a person should be able to do (in principle, at least) everything they need to do by hand before they use a calculator. I'll get back to this issue. Quote: Just a few days ago, someone else told me they use a TI graphing calculator to balance their checkbook. I couldn't figure that out, since I thought it'd be easier to use a "normal" calculator, since a graphing one's big screen might be too cluttered. But they said that it was easier to see all the numbers lined up, and all at once to catch errors. So go figure. "Perhaps one did not want to be loved so much as to be understood." -Orwell |
|||
CRAWLand1000 |
Re: The Calculator Thread | ||
|
I've read a few things about calculator reliability and bugs lately. Some reviews at Amazon claim the fx-115ms has some bugs, but I think of those particular complaints as more idiosyncrasies. They're things you can deal with if you know they are there, which you should. You can't use any tool unless you know how to use it. And a calculator, however nice, is just a tool; it is not a replacement for your brain.
Bigger problems might be with inaccuracies. Someone pointed out that on the TI 36X, (262144 * 4096) - (2^18 * 2^12) gives -0.01. This is a bit more baffling (I haven't seen this problem on any other calculator). On the other hand, I've seen several math books that give calculations that inevitably will get incorrect results on any calculator. I can't remember most of them. But one common issue is solving the Schrodinger equation to find the energy levels. The correct solution for the ground state would look something like this: www.boomspeed.com/omelette/smoosh/sch1.gif However, if you start from the left and numerically integrate to the right, you'll get something like this: www.boomspeed.com/omelette/smoosh/sch2.gif Ideally, as you go to infinity, the wavefunction should go to zero. Instead, it quickly starts exploding towards infinity. Anyway, I never found much for bugs with my old calculator, although I was a little worried about the linear regression feature a few times. I now think there is no real bug in the routine, but rather that that's a feature that especially exposes the inaccuracies of a calculator. "Perhaps one did not want to be loved so much as to be understood." -Orwell |
|||
CRAWLand1000 |
Re: The Calculator Thread | ||
|
Here's a comparison of linear regression of several calculators. I'm using it to find the derivative (or tangent line) of x^2 at x = 100. To do this, I enter (100, 100^2) as one data point, and (100+h, (100+h)^2) as the other. With calculus, we know the exact tangent line would have a slope of 200, and an intercept of -10 000. If you'd simply use algebra, you'd find the approximation using h would give a slope of 200 + h. First of all, EVERY calculator I've tried this with gave an Error for h = 1e-4. By which I mean, it not only gave the wrong result, it couldn't even give any result at all. BUT, every calculator I tried this with was also able to give a good (if not exact) result if you just used the slope of a line formula! fx-115s This is my "old" Casio calculator. Using h = 1e-3 gives intercept = -5000, slope = 100, r = square root of .5 These results are totally wrong, but this is also the only calculator that gives any result at all for this value. h = 1e-2 gives intercept= -10000, slope = 200, r = 1 The slope should be 200.01, but the results are reasonably okay. h = 1e-1 gives intercept= -10010, slope = 200.1, r = 1.000000125 Now the first two numbers are exact, but there's an error in r! For any two point problem, r should be EXACTLY 1. (Well, two caveats: If the slope is negative, it should be exactly -1. Also, arguably for a line with 0 slope, r is undefined. But since |r| = 1 for all nonzero slopes, |r|=1 for zero slopes by analytic continuity) fx-115ms My "new" Casio calculator. h=1e-3 gives an Error. Arguably, no result is better than a totally wrong result, but the totally wrong r value for the previous calculator could have been a clue something was wrong. h = 1e-2 gives intercept= -9999.99995, slope = 200, r = 1.000050004 h = 1e-1 gives intercept= -10010, slope = 200.1, r = 1.000000125 Same result as with the older calculator. TI 36X This a Texas Instruments model that's currently on the market. It's the only one of these calculators that has a one (rather than two) line display. It seems sort of "old school" to me because of its postfix conventions (ie., to find sin(1) you'd hit 1 sin). h = 1e-3 gives intercept= -10000, slope = 200, r = 1 h = 1e-2 gives intercept= -10000, slope = 200, r = 1 h = 1e-1 intercept= -10000, slope = 200, r = 1.000000125 TI-30X IIS This is the calculator I earlier called a "POS". Well, it has one thing over all these other calculators, which is that it has one extra internal digit of accuracy. That might make these results slightly more accurate than for the other calculators, but it's still not perfect... h = 1e-3 gives Error (Division by zero, IIRC) h = 1e-2 gives intercept= -10001, slope = 200.01, r = 1.000000001 h = 1e-1 gives intercept= -10010, slope = 200.1, r = 1 If you use the slope of the line formula with h=1e-4, you get 200.0001, which is exactly right. The others give 200. The only other calculator I had access to while performing these tests was a TI 30Xa. It had no two variable statistics function. However, just like all the other calculators, it can, even with h = 1e-4, get a reasonable slope of 200 just with rise to run. "Perhaps one did not want to be loved so much as to be understood." -Orwell |
|||
Crawl and 1OOO |
Re: The Calculator Thread | ||
|
I'm trying to learn to use a TI 89 Titantium. Anyway, long story short, an exam in a class I took a few years ago asked us to write a program to numerically calculate the energy levels of the Morse Potential (using the WKB approximation). It was a good exam problem, because it requires numerically finding roots, integrating, finding a root of a function that isn't explicitly defined, etc. Basically, putting a bunch of stuff together.
So, I tried doing the same thing on the TI 89, and found that it was easier to do, because the calculator has built in functions for root finding and integration. You don't have to use your own subroutines. In fact, this was more accurate -- Exact, actually -- on the TI 89 than the results I got a few years ago (it turns out the Morse potential can be solved exactly [analytically as opposed to numerically] though our teacher didn't tell us that, and I doubt any student bothered look it up, though a Google search gives the result ) It might even run faster, though the old program's speed depends on the computer its operating on. The limitation in accuracy to the old program is in the integration routine. Maybe it could be fixed by using Gaussian integration rather than Simpson's or Bode's rule or something. Anyway, this is the program: Looking at it now, I see I could improve it in a few ways. For one thing, a comment says "Quantum number", but it doesn't refer to anything. In an older version of the program, I defined n after that line. Now, n is a parameter sent to the program. I plan on trying to convert a bunch of numerical recipes programs to TI basic. I already converted gammaln. |
|||
Crawl and 1OOO |
Re: The Calculator Thread | ||
|
And since the Ti89 is a graphing calculator, maybe I should show some graphs?
The curves here are the Morse potential. The straight lines are the bound energy levels. There are actually 6 bound energy levels, but the highest one's energy is so close to zero (-1/48) that it just overlaps with the x axis and you can't see it in the second picture. |
|||
Crawl and 1OOO |
Re: The Calculator Thread | ||
|
Here's a much more general topic, which doesn't really have anything to do with math: Texas Instruments reliability.
I said before that a long time ago I had two TI calculators that didn't last me a year. Other TI lab calculators have also died (we also have a dead Sharp lying around somewhere in the lab; I'm surprised about that. My first calculator ever was a 4 function Sharp and it was built like a brick. It's probably still around and working even today, though it'd be at my mother's house), and someone at work told me they had some TI calculators for their house that died. And check out the Amazon.com reviews. There are all kinds of reports of dying displays or other problems. Anyway, there isn't much mystery as to why my two older TIs died. I opened them up to see what was going on. I think most TIs are screwed in at a few places, and the plastic is welded at a couple others, and you have to snap that. After I got them opened, I noticed something which really surprised me: THE DISPLAY AND SOLAR CELL WEREN'T CONNECTED TO ANYTHING!! They were just passively sitting there. The only thing that kept them connected to the rest of the calculator was the pressure of the front and back plates. After you got those off, the display could be lifted right out. I tried a simple fix of one of my calculators by putting something inside of the case to apply extra pressure to keep everything in place, which sort of worked, but not very well. I tried opening the lab TI 30XII to see if it was true for that model as well, but just removing the screws didn't do it, and I didn't want to snap the plastic as it isn't really my calculator. The funny thing about that is, the TI 30XII is both solar and battery powered. So, you're never supposed to replace the battery? I guess the thing really is designed to be a disposable calculator! My Casios are also both solar and battery powered, and I have opened them as well. Their screen is connected to the calculator's circuits with a data ribbon. And the solar cell is soldiered in. The new one, the 115ms, also has a little plate (it looks like either stainless steel or aluminum) behind the screen, as protection I guess. (It's been longer since I opened the older 115s, so I don't remember exactly what it's like inside) I have to confess the new one doesn't feel quite as "solid" as the old one, but I still have more confidence in it than TI stuff. I notice that the TI 36X's box says "Built to last!" Well, we'll see. |
|||
Crawl and 1OOO |
Re: The Calculator Thread | ||
|
Weird bug in the TI 36!
I mentioned an example of an inaccuracy with this calculator above, but it probably seemed like a strange, unlikely example. Well, you don't need to go to 2^18 for it to manifest itself. Just type in 2^3 - 8 = 1e-11 This bug is apparently known I don't even know if I'd call it a bug. It seems to just be a rounding issue. If it is really calculated with 2^3 = e^(3log2), then there will be intermediate irrational numbers that will have to be truncated. I guess there could be a check that integers raised to integer powers must also be integers, so the calculator could round if it doesn't get that (and maybe that's what other calculators do to get the right result...). But it gets weirder... First, they pointed out that log (1 1e-9) results in 1.000335068 e - 9. This is wrong, and you don't even need a calculator to check it. Near 1, log (1 x) = x - x^2/2 So, obviously, the number should be less than 1e-9, not greater. And you could probably even do in your head that it should be about 9.999999995 e- 9. I'm really not sure why it gives this result. It's almost baffling. The only thing I could come up with was maybe something to do with unlisted digits. (This is just a guess, I don't really know) So, the calculator has 12 digits of accuracy (though only 10 are displayed), so 1 1e-9 = 1.00000000100 Now, on most calculators, it's assumed that digits that aren't given are zero, so 1.00000000100 = 1.0000000010000000000000.... However, since those extra digits aren't ever shown, who knows. While you may only have access to 12 digits at any time, maybe the calculator stuffs extra digits at the end during a calculation, and drops them before it gives you the result. And low and behold... log (1.0000000010003350685) = 1.000335068 e - 9 So, if the calculator stuffed extra digits with nonzero numbers (like in this case, 0335...), it could explain the result. To the calculator, there's no difference between 1.00000000100 and 1.0000000010003350685 Up to this point, this bug still doesn't seem like the end of the world. I mean, we always have to be careful with subtracting very close numbers, and 1 and (1 1e-9) are very close. As I said, ALL calculators can eventually give an inaccurate result for certain calculations, and you just have to use common sense to know when to be careful. BUT IT GETS WEIRDER! After you type 1.000000001 and log, (ie., the LN button), take the antilog. You get 1.000000031. Huh???? If x is close to zero, e^x = 1 + x. Instead, we get 1 + 31x. This is totally wrong. This can't be explained due to rounding errors or anything. Even if the log was TWICE as big, its antilog would be 1.000000002 not 1.000000031 I found that e^(1.0000x00 e-9) = 1.0000000x1, for whatever digit x is. Or, for that matter, what the other zero digits are. For instance, e^(1.23456789e-9) = 1.000000061. In my opinion, this is potentially a much bigger (and more inexplicable) bug. So far, I've only tested it enough to see it manifest with dealing with numbers times 1e-9, but if it could show up in other situations, it could really undermine confidence in the calculator. Too bad. |
|||
Crawl and 1OOO |
Re: The Calculator Thread | ||
|
Even my newer Casio calculator is a little quirky with log(1+1e-9) (the older Casio is fine), but I don't have that calculator with me right now and I don't want to post about it at length now anyway.
I've found a couple of good sites dedicated to calculators. One, dedicated to old Hewlett Packard calculators, is the HP Museum. One for Texas Instruments is Datamath. The Texas Instruments one has info for every single model of TI calculator ever, including variants. It also has some other trivia as well (I learned there that Casio made the first graphing calculator ever, in the '70's!). It might seem kind of hard to believe there are people still dedicated to ancient calculators (it might be less hard to believe if you consider there are people still dedicated to videogame systems that are more than 20 years old). But consider. When I bought my old Casio (which would have been around '96), it actually said "Complex" (rather than "Scientific") on it, to indicate that it could do math with complex numbers, and to distguish it from TI calculators that generally couldn't (I still think most TI calculators can't). And it couldn't really do complex math, just complex arithmatic (it couldn't find arccos(2), or even sqr(-1)). Well, the HP 15C could do real complex math... and deal with 5 by 5 matrices... and had a solver... and a numerical integrater... and was programmable... all back in the early 1980's! I made some posts above about how the Casio ffx-115ms had some impressive features, but if you take a long view of history, the only impressive thing about them is that they're in a calculator that costs only $15. Otherwise, the 15-c can do things the 115ms can't. (The 115ms isn't really programmable, but I've said about how it can do some simple iterative calculations) Also, it seemed kind of impressive to me that the TI-89 can do symbolic math. It's like a mini-Maple, but more user friendly and portable. I kind of wish I had something like that when I did graduate level Electrodynamics. I never thought I'd see something like that in a handheld calculator. Well, I guess I was wrong, because the HP 28S apparently could do symbolic math, again, back in the '80's! Or, maybe it seems impressive |
|||
Crawl and 1OOO |
Re: The Calculator Thread | ||
|
I have no idea how I was planning on ending that sentence. Anyway, it bothered me that the highest end graphing calculators have a lot of symbolic functions, but they don't have the solution to the cubic equation built-in (despite that it is known, and has been since the 1300's). So, I wrote my own for the TI 89. I want to talk about the results a little... Towards the end of the solution, you've reduced the problem to a quadratic equation, which of course has two solutions (corresponding to the "plus or minus" sign of the square root). Well, you can't use a "plus or minus" function on the TI 89, so I arbitrarily chose to use the plus sign. This should still give all three roots to the cubic equation. Those come in when you take a cube root, which has three "signs" (1, 1/2 +/- i Sqr(3)/2). If you take a different sign on the earlier square root, you'll just get the same results, but in a different order, once you get to the cube root step. Or maybe not. While the program would work for many cubic equations, some gave "undef" as their results. One example was x^3 - 3x^2 + 3x - 1 = 0 (which is of course (x-1)^3, which has x = 1 as a triple root). Equations like x^3 - 8 = 0 gave the right answer. Equations like x^3 + 8 = 0 gave the wrong answer. The problem came about when solving problems that either were to begin with, or were transformed to (like the (x-1)^3 example) during the course of the solution, of the form x^3 + b = 0 (particularly if b was positive). I solved this problem in the program, but to see what's going on, you can use the calculator to solve x^3 + a x + b = 0 One solution is Then I used the TI 89 to take the limit as a goes to zero. The TI 89 gives This kind of disturbed me. If b was negative, it would give the correct solution to the equation, the cube root of -b. But if b was positive, it seemed like the formal solution would introduce, in the limit, the solution of Zero, which is wrong. But I knew the formal solution should be correct even as a -> 0. I realized what was really happening was that the TI 89 evaluated the limit incorrectly. (Yes, that the TI 89 would do this wrong is less distrubing. Math should be consistent with itself in all cases, even limiting ones. But I've said before that you can't just use a calculator as a substitute for your brain) Because the second term has "a" in the numerator, the TI 89 assumes it goes to zero as "a" goes to zero. If b is negative, the second term does go to zero. But the TI 89's own solution points to what went wrong: If b is positive, the second term goes to something proportional to a / (|b| - b) which goes to 0/0. So, you have to be careful about evalutating the limit to the second term. In fact, I haven't done it formally yet. La'Hopital's rule doesn't help (at least it didn't for me) because it results in an expression that goes to 0/0 and is more complicated than the original expression. But I tried it numerically with a = 1e-2 and b = 8. This gave -1.9986... which is pretty close to the answer of -2 that you'd get if "a" would equal zero. (If I used a = 1e-3 or smaller on the calculator I evaluated that term on, I'd get an "infinite result" error). I'd post the actual program, but I don't feel like it right now... ![]() | |||