This isn't exact and won't produce exact or reduced forms, but it will get you at least approximately the right answer. ALL INPUTS MUST BE IN DEGREE FORM, PUTTING IN RADIAN INPUTS WILL GIVE A WRONG ANSWER