From: SourceForge.net <noreply@so...>  20090721 17:19:16

Bugs item #2824909, was opened at 20090721 19:19 Message generated for change (Tracker Item Submitted) made by crategus You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2824909&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core  Simplification Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Dieter Kaiser (crategus) Assigned to: Nobody/Anonymous (nobody) Summary: exp(%i*%pi/4 not simplified Initial Comment: The following expression is not fully simplified: (%i3) exp(%i*%pi/4); (%o3) %i/sqrt(2)+sqrt(2)/2 We have to do an extra simplification: (%i4) expand(%,0,0); (%o4) %i/sqrt(2)+1/sqrt(2) The reason is, that the routine spang1 in csimp.lisp returns the value of the global special variable sqrt2//2. The value is not correctly simplified by hand: (%i5) :lisp sqrt2//2 ((MTIMES SIMP) ((RAT SIMP) 1 2) ((MEXPT SIMP) 2 ((RAT SIMP) 1 2))) We have the same problem with the variable sqrt2//2 (%i5) :lisp sqrt2//2 ((MTIMES SIMP) ((RAT SIMP) 1 2) ((MEXPT SIMP) 2 ((RAT SIMP) 1 2))) There are two solutions: 1. Correct the value of the global variables. 2. Do not use the global variables, but use code which simplifies accordingly, e.g. sqrt2//2 > (div 1 ($sqrt 2)) The global variables sqrt2//2, sqrt//2, sqrt3//2, sqrt3//2 are definied in trigi.lisp. All variables are used only one time in csimp.lisp. I think it is the best to cut out these four variables and to insert the code directly in the routine spang1. Dieter Kaiser  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2824909&group_id=4933 