------- Comment #4 from laurent at guerby dot net  2006-01-03 21:19 -------
May be this one? 

[EMAIL PROTECTED]:~/tmp/pr20754> cat > p2.adb
with Ada.Numerics.Elementary_Functions;
with Ada.Numerics.Complex_Types; 
with Ada.Numerics.Complex_Elementary_Functions; 
with Ada.Text_IO;

procedure P2 is

   use Ada.Numerics.Elementary_Functions;
   use Ada.Numerics.Complex_Types;
   use Ada.Numerics.Complex_Elementary_Functions;
   use Ada.Text_IO;

   procedure Put (C : in Complex) is
   begin
      Put_Line ("(" & Float'Image (Re (C)) & ", "
                & Float'Image (Im (C)) & ")");
   end Put;

  C0 : constant Complex := (-1.0, 0.0);
  C1 : Constant Complex := Log (C0);

begin
   Put (C0);
   Put (C1);
   Put_Line (Float'Image (Arctan (Y => 0.0, X => -1.0)));
end P2;
[EMAIL PROTECTED]:~/tmp/pr20754> gnatmake p2
gcc -c p2.adb
gnatbind -x p2.ali
gnatlink p2.ali
[EMAIL PROTECTED]:~/tmp/pr20754> ./p2
(-1.00000E+00,  0.00000E+00)
( 0.00000E+00,  3.14159E+00)
 3.14159E+00


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20754


Reply via email to