1 Dec 2005 14:36
advice on lognumer
Barton Willis <willisb <at> unk.edu>
2005-12-01 13:36:25 GMT
2005-12-01 13:36:25 GMT
I would like to modify log so that it uses the CL log function for complex double float arguments. Doing this isn't difficult, but I don't know what to do with things like log(1.2 + %i*5.6) when 'lognumer' is true. If you don't know, lognumer makes log *sometimes* behave as log composed with abs. (%i1) lognumer : true$ (%i2) float(log(-5)); (%o2) 1.6094379124341003 bfloat (and rectform) ignores lognumer: (%i3) bfloat(log(-5)); (%o3) 3.141592653589793B0*%i+1.6094379124341B0 log is really messed up when lognegint == true and lognumer == true: (%i4) lognegint : true$ (%i5) log(-5); (%o5) log(5)+%i*%pi (%i6) log(-5.0); (%o6) 1.6094379124341003 The function 'plog' matches my expectations: (%i7) plog(-5); (%o7) log(5)+%i*%pi (%i8) plog(-5.0);(Continue reading)
RSS Feed