![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Code Samples & Tips Share your recent discoveries and ideas with other users. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi
Attached is code to evaluate math same as Basic4ppc code operations. This supports ^, MOD, /,*,-,+, INT,ABS,SIN,COS,TAN,ASIN,ACOS, ATAN,LN,EX(for e),E[E+,E-](for eng'g),PI. calculations in radians. I've tried to compare results to Basic4PPC operations and it's ok, but still need to test for other bugs.(sometimes I got last (13th)decimal place descripancy in comparison). I'll add factorial (!) on next update. Regards,
__________________
Rioven O2 Atom life 624MHz, 1GB Internal ROM, WM6(upgraded) Last edited by Rioven : 12-07-2007 at 12:22 AM. Reason: File removed updated available |
|
|||
|
Now also supports factorial 170! maximum. (integer number only)
Fixed, Entering constant(PI or EX) alone now returns value. TIP: New Variables/constants can be added at line 380.
__________________
Rioven O2 Atom life 624MHz, 1GB Internal ROM, WM6(upgraded) Last edited by Rioven : 12-06-2007 at 10:01 AM. Reason: file removed, updated available |
|
|||
|
Hi HarleyM,
This from my old code just converted to Basic4ppc, It can be optimized further. I created this function for my project that user can alter the default calculation formula or input their own formula. Hope it works well for you. Please test it more and let me know if there are still problems. Regards, Rioven
__________________
Rioven O2 Atom life 624MHz, 1GB Internal ROM, WM6(upgraded) |
|
|||
|
I connected your code into a program that I'd written around Erel's Eval routine. Your code breathes new life into it. Allowing the user to select a range of x values & uses your routines to populate a table based on the formula entered into a text box. The user can then display the table in one of 3 graph formats. Thanks again for the work you did in creating the expression calculator. I only needed to change one thing & that was to reset the 'C' variable after a calculation so that it would accept modified variables thereafter.
Cheers!! ![]() |
|
|||
|
Quote:
Thanks for pointing out the C variable to reset. I attached the revised code and this is still ![]() I've fixed some input variable/constant filters and bug on dividing negative value. The code requires more input filters or errorhandling and tests. Regards,
__________________
Rioven O2 Atom life 624MHz, 1GB Internal ROM, WM6(upgraded) Last edited by Rioven : 11-24-2007 at 06:55 AM. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Label/Text Control text centering | TWELVE | Basic4ppc Wishlist | 1 | 06-04-2008 03:20 PM |
| Fixed Point Math | im4retro | Questions & Help Needed | 3 | 05-31-2008 06:13 AM |
| Help with Math function | go4saint | Questions & Help Needed | 2 | 03-31-2008 09:15 AM |
| RPNCalc a simple scientific calculator | klaus | Share Your Creations | 1 | 11-13-2007 12:26 PM |
| ComboBox text input | mwaite | Questions & Help Needed | 1 | 06-07-2007 07:04 PM |