From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bd74f408cd771388 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-11 23:26:24 PST Message-ID: <3F0FAA0E.7BCA9AA7@somewhere.nil> Date: Sat, 12 Jul 2003 08:26:22 +0200 From: Gautier Write-only X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Compute a Sin(X) and Cos(X) pair, FSINCOS, inlining References: <3F0C7B5D.81F0FDCD@somewhere.nil> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 80.218.249.185 X-Trace: news.swissonline.ch 1057991183 80.218.249.185 (12 Jul 2003 08:26:23 +0200) X-Complaints-To: abuse@swissonline.ch Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!snoopy.risq.qc.ca!news.imp.ch!news.imp.ch!news-zh.switch.ch!switch.ch!news.swissonline.ch!not-for-mail Xref: archiver1.google.com comp.lang.ada:40222 Date: 2003-07-12T08:26:22+02:00 List-Id: Jerry van Dijk: # Sorry, the original article already scrolled off my system. Nice... (what system! even with on a VT220 I could scroll up news ;-) # 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...): [the correct one:] 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 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; Thanks! I don't have an urgent need but one never knows... BTW, what is the variant for Long_Float ? In any case, it would be nice to have a compiler producing FSINCOS - e.g. for those users not familiar with machine code. ________________________________________________________ Gautier -- http://www.mysunrise.ch/users/gdm/gsoft.htm NB: For a direct answer, e-mail address on the Web site!