comp.lang.ada
 help / color / mirror / Atom feed
From: Jerry van Dijk <jvandyk@attglobal.net>
Subject: about fsincos
Date: 11 Jul 2003 01:18:33 +0200
Date: 2003-07-11T01:18:33+02:00	[thread overview]
Message-ID: <m2y8z63r92.fsf@attglobal.net> (raw)


Sorry, the original article already scrolled off my system.

Although there are very good reasons not to, if you are really need it,
why not define your own, something like (could probably be improved, it's 
been a while...):

   procedure Sin_Cos (Angle : Float; Sin : out Float; Cos : out Float);
   pragma Inline (Sin_Cos);

   procedure Sin_Cos (Angle : Float; Sin : out Float; Cos : out Float) is
      use ASCII;
   begin
      Sin := 0.0; Cos := 0.0;
      Asm (("fsincos"  & LF & HT &
            "fstp  %0" & LF & HT &
            "fst   %1"),
           Outputs => (Float'Asm_Output ("=m", Cos),
                      (Float'Asm_Output ("=m", Sin))),
           Inputs  => (Float'Asm_Input ("t", Angle)));
   end Sin_Cos;

and write modified numerics functions to take advantage of it ?


-- 
--  Jerry van Dijk   | email: jvandyk@attglobal.net
--  Leiden, Holland  | web:   users.ncrvnet.nl/gmvdijk



             reply	other threads:[~2003-07-10 23:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-10 23:18 Jerry van Dijk [this message]
2003-07-10 23:22 ` about fsincos Jerry van Dijk
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox