
                               Exhackt v1.9c
                                                          


                     For irrational numbers of the form

a / b            
sqrt(a)
sqrt(a) / b
sqrt(a) / b / c
sqrt(a) + b
( sqrt(a) + b ) * c
sqrt(a) / b + c
sqrt(a) / b + c / d
(sqrt(a) / b + c / d ) * e
and sometimes
( sqrt(a) / b + c / d ) / e
( (sqrt(a) / b + c / d ) / e ) * f 
( (sqrt(a) / b + c / d ) / e ) / f

          
                         Written by Jeremy E. Laughery

This program is based  only on Qpi's continued fraction algorithm. Without it, this program would not have been possible.  Special thanks goes out to Mika Heiskanen for this algorithm and for the JAZZ library ( many thanks ).  Also, thanks goes out to the beta testers. Thanks to Joe Horn for the first results of the tests and to EEK the cat, but many more will soon follow.  This program was written on a ROM version R HP48GX. 

Caution: This program clears system flag 3 for symbolic results.



What's New!

Exhackt v1.9a has a few bug fixes that I discovered; urge!  Everything seems to be O.K. now as far as the RX command and some little stuff.  I had to change the tagged object PTR in the RX command to the correct PTR.  


   NOTE: You may now cancel the program if there is a list or an array by

         pressing the right-shift ( green ) key and then pressing the cancel        
         key.  You can also elect to press the cancel key to move to the 

         next object in a list or in an array. 


Exhackt v1.9 now does arrays and lists. Exhackt will also do symbolics, tagged objects and units too. I have added a new routine to Exhackt to make it more powerful in that it will now return the symbolic value for irrational numbers that have been divided by a large number. For instance,

Exhackt will return sqrt(34)/15/10000 for the decimal number 3.88730126323e-5 and QPI will not.  There are millions of numbers like these that Exhackt will now recognize!  Exhackt will now return the symbolic value for the sqrt of a very large number where as QPI will not.  For example, Exhackt will return 1000*sqrt(95) for the decimal number 9746.79434481 where QPI will not. There are thousands of numbers like these that Exhackt will now recognize! Thanks to Romain Desplats for the RX and the RN commands too! 

Future Version

Exhackt v2.0 will be a little more powerful as I find an algorithm to speed up the recursive steps to find the numerator for the irrational number of the form  ( a + sqrt( b ) ) note: this is the tricky part and could take a long time to find. Otherwise, Exhackt is finished! Unless people nag me to make Exhackt more powerful, I'll take my time with version 2.0. A long time.

Older Versions

Exhackt v1.8 has a new routine added to make the task of finding the numerator of the irrational number faster.  Also, I have added some non factorable numbers as built-in factors because Exhackt did not recognize those factors.  Therefore, Qpi does not recognize those factors as well.  However, Exhackt is now more powerful in that it will recognize irrational numbers that Qpi can not.  For example, Qpi will not return  '2*sqrt(2) / 87' for the decimal number 3.25106566062E-2 but Exhackt will.  Another example, Qpi will not return '10*sqrt(5) / 37' for the decimal number .604342696622 but Exhackt will. There are hundreds of numbers like the examples above that Exhackt will now recognize. 


Exhackt  v1.7 has some list manipulation routines added to speed things up a bit.  Updated the INFO file that was shipped with Exhackt also.

Exhackt v1.6 now has external calls to QPI to look for other than irrational numbers.  Please read the QPI documents if you are not familiar with what QPI does.  I encourage that You install QPI before using Exhackt.  Exhackt does not need QPI to function properly though. However, QPI is recommended.


Exhackt version 1.5 has an algorithm added to find the hard to reach numbers
that were giving problems in version 1.4.  

Exhackt v1.4 has an internal variable environment bug fixed so that you can now use this program without any stack replacement program. Version 1.4 also has some composite object decomposition, I invented myself; for faster operations.  Exhackt v1.4 has some ML code added to the continued fraction algorithm to speed things up some.  Exhackt is now a little faster and a little better.


Exhackt v1.3 has some bug fixes and an external call to QPI if it exists. 
Also, Exhackt v1.3 can do more irrational numbers than v1.2.


Exhackt v1.2 now simplifies radicals with an algorithm I invented myself.  The new algorithm is much more accurate than QPI and will give the exact result; it works on the number recursively to make sure the result IS reduced. It is sometimes faster too!
TRY THIS!!
put 178885.4382 on the stack and do alpha alpha Exh and get the exact answer then
do again with QPI.  Exhackt handles very large numbers and can simplify very quickly!
Exhackt v1.3 is even better than v1.2!!


How to use: 

 Just download to your calc and install as you would a library then find an irrational number and do alpha alpha Exh and "Exhackt" it. A better version will soon follow this one. This is my first System RPL program. Exhackt is written in 90 % Sys-RPL and 10 % ML.  This program took a lot of time so I hope all is well. Also, you can look at the info softkey for an example. I recommend for now that you use the RSIM command from ALG48 to reduce all expressions that you get with Exhackt .  Exhackt could be an add-on for ALG48. Bug reports are welcome; send them to jlaugher@gulf.net. Remember! 
no computer algebra software/system ( CAS ) is perfect; you may have to manipulate the number just a bit. An example follows.

.144379028331
should give sqrt(8) / 75 + 8 / 75. Instead, I programmed Exhackt to give you the starting value and an approximation back in case you don't want the Exhackt number if it doesn't find it on the first pass. But, You should multiply by 10 and try again. Then Exhackt should give sqrt(32) / 15 + 16 / 15. Not forgetting that you multiplied by 10, you must divide the result by 10 to get

( sqrt(32) / 15 + 16 / 15 ) / 10 which is Exhackt!! / exact.
This is of the form ( sqrt(a) / b + c / d ) / e,       

Note: most of the time ( e ) will be 10

 UPDATE: Exhackt will do the example above without manipulation
TRY IT!!

Use RSIM to simplify; This is the best program for this task for now. I will write a better version later that will do the simplification for you. Sometimes You don't need to simplify though.

The RSIM command can be found at http://hp48.ml.org/math/symbolic/RSIM

Warranty:

I am not responsible for any damage or lose of memory due to this program. Use at your own risk!!!.  I am using at my own risk also.  I crashed my HP many times learning SYS-RPL.  I would not try to hack this program because it may be very confusing for you; it is for me sometimes. So, save yourself some brain ache and let the Author hack into it. 


Limitations:
 
This program is limited to decimal numbers of TYPE floating real. If Exhackt does not find the answer for you, it doesn't mean that the program does not work.  I haven't made it that far yet to look into how far it can and can't go. I know one thing though, with version 1.1; I almost never got the default answer which is the same as QPI's.  You can do some very large irrational numbers and very small irrational numbers.  I made the changes in version 1.1 so as to give more of this flexibility.  If you catch yourself waiting for a long time, press the CANCEL key to quit the program. The Program never gets jammed so don't think that if you don't see anything going on with the annunciators that something is wrong.  Exhackt is thinking and crunching numbers.
TRY THIS!!
  75273.8612788 and press the Exh softkey and watch it go ( it factors for speed! ) NEW! in v1.1 ( I invented the factorization routine myself ).  Without the factoring, it would take two minutes to get the symbolic value.  Exhackt now gets it in 2.18877 seconds with JAVA installed!!


Other:

  If you are Exhackting the other root of a quadratic, you must first invert it then use Exhackt and invert it back. An example would be too detailed now but just try it. Invert the other root and use Exhackt then invert it back and use RSIM to simplify.
Try this:

Put 1.72385762508 on the stack.
This number is the other root of a quadratic equation with coefficients 
[ 9 -48 56 ], and 3.60947570827 is the principle root.
Now, invert the other root to give
.580094310256 and use Exhackt. Then invert the symbol that you get when Exhackt is finished.  Use ALG48 or ERABLE to simplify.

NOTE:  The reason that You must invert the other root is that Exhackt has no way to determine whether or not it is dealing with the other root at this time. I will work on an algorithm to do so in the future. In most situations, You will know which root You are dealing with. 

That's all for now.  Good luck!!  and best wishes!!  suggestions are welcome too.  Thanks Mr. Horn!

P.S. Should You become successful for using this application, DON'T FORGET        THE AUTHOR WHO WROTE THE APPLICATION AS WELL AS TELLING ME 
     WHAT YOU ARE DOING WITH IT BEFORE YOU USE IT FOR THAT 
     PURPOSE.



Jeremy E. Laughery -Author of Exhackt        The h and the k are silent ;-)
