| The United-TI Forum is Read-Only. | |
| 11 Nov 2008 11:02:40 pm by thornahawk | ||
| Risch's algorithm is so terribly big and complicated that you'd be hard-pressed to try and fit the algorithm into a TI calculator, much less the special cases that fall through the cracks. The TI 89 and ilk implement a rather restricted portion of this algorithm, and one shouldn't wonder that it can't do some "simple" indefinite and definite integrals a computer algebra system can spit out in a heartbeat.
As to The Integrator, it uses something more elaborate than Risch's algorithm. See here (scroll down to "Differentiation and Integration") for details. thornahawk |
||
| 15 Nov 2008 04:35:17 pm by Snipes17 | ||||
With no real time to work on this program, I have only managed to create an equation editor that works from the graphscreen. Anyway, I was wondering if there are any big optimizations that can be made to this:
This code is just the custom text input routine. This file is the program as a whole: (Note: there is a bit of variable cleanup required after running the program) |
||||
| 16 Nov 2008 02:45:40 pm by Galandros | ||
| Instead of:
If not(F 1→F Use: F or 1→F Big optimizations, I had to see more close the program flow. |
||
| 16 Nov 2008 08:34:53 pm by Snipes17 | ||||
Ummmm.... I don't know if that's what I meant to type. Thanks, I'll look at that again. |
||||
| 17 Nov 2008 08:19:53 am by luby | ||
| No, you should use not(F→F
@ snipes, I think you are confused by the "or" part. That means that you should use the or in the (2nd+math, right) Logic menu. It does an or on it, but I'm not sure it would work. |
||
| 17 Nov 2008 02:22:49 pm by calc84maniac | ||||
From the little code snippet, it seemed that he wanted F to become 1 if it was 0, but not vice versa. |
||||
| 17 Nov 2008 06:02:06 pm by Snipes17 | ||||
Yes, you are right. That is what I was trying to do. I put the "If not(F" part in there because it was in another "If" statement beforehand and I forgot to take it out. If you want the long explanation, here it is: When you type in text, it wraps around if the next character is off the edge. When you are on the last row and this happens, F is reset and the character is not added to the string or the graphscreen. When you can't type anymore, and you press delete (backspace), F is set so that it knows to allow text again. *Edit* As I was typing this, a thought just hit me. When you type a long character, it resets F based on what was described, but what if the character was shorter and could fit at the end? I realized that if I set F to 1 before the getkey loop, I could erase the other two, and the one that initializes F and it would fix that small bug. Thanks for the help! I might not have caught this as early on if you all hadn't mentioned it. |
||||
| 18 Nov 2008 07:25:18 am by darkstone knight | ||||
uhm, isn't that exacly the same as 1→F? |
||||
| 18 Nov 2008 04:55:24 pm by Weregoose | ||
| The big question is, can F take on a value other than zero or one? If not(F:1→F sets F to one if F is zero, but leaves F alone otherwise. In F or 1→F, it doesn't matter what F is, and isn't what we'd want if F could be something other than zero or one. Looking at it from this angle, the If variety cannot always be substituted for one of the others, but is acceptable in the context of this program. Lastly, the expression F or 1 is always true regardless of F, so we can replace the expression with its inevitable result of one.
Let's try optimizing something more worthwhile. |
||
| 18 Nov 2008 09:41:03 pm by Snipes17 | ||||
Well, I did post my code, and you always have this ability to reduce a solid program to a faster, smaller one, so I was hoping you could help. |
||||
| 19 Nov 2008 06:43:47 am by Weregoose | ||
| Frankly, I would optimize it to the home screen... I know that's not in the spirit of things, but I tend to want to adjust programs in the direction of what'd get the job done in the fastest time or in the least amount of space, and those are rarely graphical. :)
My above comment on finding something more worthwhile to optimize was aimed at the over-attentiveness of something so trivial; posts went by, and it's like no one else had anything to add. I had instead hoped that people would give a good shot at it. Anyway, since the program is overall pretty decent, I'll only make note of a few things. In parts, the coding is a bit more "safe" than useful, resulting in repeated conditions and extraneous parentheses. One example is the cursor movement...
Then B→[font="arial"]LOL(iPart(C/7 1→B C+10→C Else If B+Ans>93 and C=57 DelVar F End ...which can be made leaner at a glance. Breaking apart and nesting the conditions (using C≠57→F as a finishing touch):
Then If C<57 Then B→[font="arial"]LOL(iPart(C/7 1→B C+10→C Else C≠57→F End End Saved only five bytes, but that's a good five Rollover® bytes, so don't waste it! Three-valued whitelists like max(Ans={23,45,105}) I rarely use, and this one I'd stay away from; the comparison in question can be replaced by Ans=23 or abs(Ans-75)=30, using the rules explained here. The logical and has greater precedence than or, so the parentheses around A or (B and C) or D can be dropped, and it will still work the same. 10fPart(.1M)+5(iPart(.1M)-5→E can be replaced by M-25-5int(.1M→E, believe it or not (as long as M remains positive). Also, tiny things that don't need to be there, like the parenthesis in the last Line( argument, can start packing. But, nice job with the lookup, I have to say! |
||
| 19 Nov 2008 09:00:59 pm by Snipes17 | ||
| Thank you for the help Goose. I knew you had some modifications for what I could hardly do any better! As for the text input, it has been a goal of mine to make a graphscreen text input for awhile, so I wanted to do it for this project. I know it takes up a lot more room, but I was doing the graphscreen so I could fit more of the equation on there for the user and use a small amount of prettyprint (not implemented yet, of course) for exponents. I haven't had much time to further this due to basketball every day, but it is moving along, albeit at a snail's pace! | ||
| The United TI Forum is Read-Only. | |
[Switch to Desktop view]
© Copyright 2000-2013 Cemetech & Kerm Martian :: Mobile Design by Alex "comicIDIOT" Glanville
Problems? Issues? Or Suggestions? There's a thread for that!
© Copyright 2000-2013 Cemetech & Kerm Martian :: Mobile Design by Alex "comicIDIOT" Glanville
Problems? Issues? Or Suggestions? There's a thread for that!
