                                 Exhackt v1.2
                                                          


                        For irrational numbers of the form

a / b            
sqrt(a)
a*sqrt(b)
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
This includes the negative values too   
          
                           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 ( much 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. Good results I hope! This program was written on a ROM version R HP48GX. 


What's New!

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 that the number IS reduced. It is sometimes faster than QPI 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!! and can do MORE!


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 ALG48 v4.02 to reduce all expressions that you get with Exhackt .  Exhackt could be an add-on for ALG48 but I will make changes later on.
bug reports are welcome; send them to jlaugher@gulf.net. Remember! no computer algebra software is perfect; you may have manipilate 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  that you see above now without manipulation
TRY IT!!

use ALG48 or ERABLE to simplify; They are the best programs 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.

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 too.  I crashed my calc. many times learning SYS-RPL.  I would not try to hack this program because it may be very confusing for you; it is to 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. It can't do lists yet or arrays and symbolics.  Soon though!  Baby steps for now! 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 or small irrational numbers.  I made the changes in version 1.1 so as to give more this flexability.  If you catch yorself waiting for a long time then 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 display or 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
without the factoring it would take two minutes to get.  Exhackt now gets it in 2.18877 seconds with JAVA installed!!


Other:

Ohh, another thing, this program does not work on lists or arrays yet and 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 ALG48 or ERABLE to simplify. That's all for now.  Good luck!!  and best wishes!!  suggestions are welcom too.  Thanks Joe!


Jeremy E. Laughery -Author of Exhackt 