mail[Ghdl-discuss] Bug in math_complex-body.vhdl


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Mark van Doesburg on June 12, 2007 - 09:52:
Hello,

I found a bug in math_complex-body.vhdl, the patch is included in this mail.

greetings,

Mark


--- math_complex-body.vhdl.orig 2007-06-12 09:47:41.000000000 +0200
+++ math_complex-body.vhdl      2007-06-12 09:40:53.000000000 +0200
@@ -119,7 +119,7 @@
     function COMPLEX_TO_POLAR(Z: in complex ) return complex_polar is
        -- converts complex to complex_polar
     begin
-               return COMPLEX_POLAR'(sqrt(z.re**2 + 
z.im**2),atan2(z.re,z.im));
+               return COMPLEX_POLAR'(sqrt(z.re**2 + 
z.im**2),atan2(z.im,z.re));
     end COMPLEX_TO_POLAR;
 
     function POLAR_TO_COMPLEX(Z: in complex_polar ) return complex is



Related Messages


Powered by MHonArc, Updated Wed Jun 20 02:00:23 2007