patch to add C99 complex

Marco Atzeri marco_atzeri@yahoo.it
Wed Oct 6 07:02:00 GMT 2010


here is the cygwin follow up of the patch 
sent to newlib mailing list.

Marco


--- Mer 6/10/10, Marco Atzeri  ha scritto:

> The attached patch add C99 Complex to
> newlib
> using all NETBSD source except "long double" ones.
> 
> Tested on cygwin:
> 
> a = 1.000000+1.000000I
> b = 3.141590+1.200000I
> a+b = 4.141590+2.200000I
> a*b = 1.941590+4.341590I
> 1/c = 0.500000-0.500000I
> -a = -1.000000-1.000000I
> abs(a) = 1.414214+0.000000I
> cacos(a) = 0.904557-1.061275I
> casin(a) = 0.666239+1.061275I
> catan(a) = 1.017222+0.402359I
> ccos(a) = 0.833730-0.988898I
> csin(a) = 1.298458+0.634964I
> ctan(a) = 0.271753+1.083923I
> cacosh(a) = 1.061275+0.904557I
> casinh(a) = 1.061275+0.666239I
> catanh(a) = 0.402359+1.017222I
> ccosh(a) = 0.833730+0.988898I
> csinh(a) = 0.634964+1.298458I
> ctanh(a) = 1.083923+0.271753I
> cexp(a) = 1.468694+2.287355I
> clog(a) = 0.346574+0.785398I
> cpow(a,b) = -1.119157+0.295690I
> csqrt(a) = 1.098684+0.455090I
> carg(a) = 0.785398+0.000000I
> cimag(a) = 1.000000+0.000000I
> conj(a) = 1.000000-1.000000I
> cproj(a) = 1.000000+1.000000I
> creal(a) = 1.000000+0.000000I
> 
> Regards
> Marco
> 
> 
>      


      
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygwin_complex.patch
Type: text/x-diff
Size: 2748 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20101006/2fb04ea7/attachment.bin>


More information about the Cygwin-patches mailing list