<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
to whom it may concern<BR> <BR> <BR>here are a few suggestions to make life easier with python at least i hope<BR> <BR> <br><a href="http://docs.python.org/bugs.html">http://docs.python.org/bugs.html</a><br> <br><a href="mailto:docs@python.org">mailto:docs@python.org</a> <br> <br> I'm not a programmer but i like to use Python with Blender and like to work with Complex numbers<BR>but right now i think there is room for improvement for the Cmath lib or add a new lib may be.<br> <BR>so here are a few suggestions:<BR><br> <br>1- Interference between math and Cmath lib<br> <br> <br> <br> <br># <a href="http://docs.python.org/library/math.html#module-math">http://docs.python.org/library/math.html#module-math</a><br># <a href="http://docs.python.org/library/cmath.html#module-cmat">http://docs.python.org/library/cmath.html#module-cmat</a><br> <br> <br> if these 2 modules are loaded and you try to find a log10 for a real number you get by default the Cmath.log10(x) with a Complex Result!<br> <br> i think it would be more logical to default to math.log10(x) for X being a real number which is not the case right now!<br> <br> Suggestion:<br> <br> change the name for Cmath log10 for something like Clog10(x) to get a Complex number for X and the result!<br> then by default log10 for X real would be a real number and not a complex one!<BR><br> <br> Other functions which could be change too:<br> <br> cmath.sqrt(x)¶ ---> cmath.csqrt(x)¶<br> cmath.log(x[, base]) ---> ¶cmath.Clog(x[, base])¶<br> cmath.exp(x)¶ ---> cmath.cexp(x)¶<br> cmath.acos(x)¶ ----> cmath.cacos(x)¶<br> cmath.asin(x)¶ ----> cmath.casin(x)¶<br> cmath.atan(x)¶ ----> cmath.catan(x)¶<br> cmath.cos(x ----> cmath.ccos(x<br> cmath.sin(x) ----> cmath.csin(x)<br> cmath.tan(x)¶ ----> cmath.ctan(x)¶<br> <br> <br> cmath.acosh(x)¶ ----> cmath.cacosh(x)¶<br> cmath.asinh(x)¶ ----> cmath.casinh(x)¶<br> cmath.atanh(x) ----> cmath.atanh(x)<br> cmath.atanh(x)¶ ----> cmath.catanh(x)¶<br> <br> cmath.cosh(x)¶ ----> cmath.ccosh(x)¶<br> cmath.sinh(x) ----> cmath.csinh(x)<br> <br> cmath.tanh(x)¶ ----> cmath.ctanh(x)¶<br> <br> <br> <br> Unless the Argument is complex then it would use the Complex function but for real number it should default to the math lib functions.<br> <br> <br> <br> <br>2 - C math Polar operators<br> <br> Right now it appears that polar operators don't exist <br> <br> Suggestion add new polar Operators + - X / using polar values<br> <br> Ex: Z1=120 /__ 0 Radian angle<br> z2= 10/__1 Radian angle<br> <br> New operator Polar + : Z1<strong>+</strong> Z2 = 120 /__ 0 + 10/__1 <br> Polar - : Z1/ Z2 = 120 /__ 0 <strong>- </strong> 10/__1 <br> Polar X : Z1/ Z2 = 120 /__ 0 <strong>X</strong> 10/__1 <br> Polar / : Z1/ Z2 = 120 /__ 0 <strong>/ </strong>10/__1 <br> <br> <br> Note: In electrical engeenering we very often use polar notation for Voltage current and Z impedance values<br> because it is easier to visualize it with angle then using the rectangular form.<br> <br> I think this would make Cmath more user friendly in any case!<BR> <BR> if possible make the angle like 120D or 1.5R for having the flexibiliy to give angle in degrees or radians!<BR><br> <br> 3- complex matrix <BR> it might also be very usefull to have the basic capabilities to work with and solve complex matrix<BR> like we do in electrical engeneering calculations <BR> hope this can be inmplemented too may be inside the Cmath lib!<BR><br> <BR>i hope these suggestions make sense and also hoping these can be implemented to make life easier with python<BR> <BR>thanks & have a nice day <BR> <BR>Richard Jean<BR> <BR> <BR> <BR> <BR> <BR> <BR>                                            </div></body>
</html>