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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1e11857ea4f39dd6 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!e65g2000hsc.googlegroups.com!not-for-mail From: AJAskey Newsgroups: comp.lang.ada Subject: Re: Trig Function Linking Problems Date: 17 Apr 2007 02:59:26 -0700 Organization: http://groups.google.com Message-ID: <1176803966.623937.251290@e65g2000hsc.googlegroups.com> References: <1176755562.190964.167640@w1g2000hsg.googlegroups.com> <20ejmjj3ci.fsf@hod.lan.m-e-leypold.de> NNTP-Posting-Host: 71.58.108.40 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1176803966 19456 127.0.0.1 (17 Apr 2007 09:59:26 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 17 Apr 2007 09:59:26 +0000 (UTC) In-Reply-To: <20ejmjj3ci.fsf@hod.lan.m-e-leypold.de> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: e65g2000hsc.googlegroups.com; posting-host=71.58.108.40; posting-account=CYqfnw0AAAAF1B0yTvpOrbsgro2pqp2d Xref: g2news1.google.com comp.lang.ada:15078 Date: 2007-04-17T02:59:26-07:00 List-Id: Thanks for the responses. I really think the pragma "c" call to the actual Linux math library is not working. I've had this same problem many times over the years. In "c", many times I would not get an error message at link time if it could not find the correct library with the sin(), cos(), etc calls. The "c" function would "appear" to work (step into somewhere in the debugger) but garbage was always returned. This appears to be what is happening. Ada knows it is a valid call and doesn't complain. But somewhere in the depths of the call nothing actually happens. If I set b=1.0 then make the call b:=sin(a), b is changed to NaN. Something is happening but definitely not the sine function. If I had written the call then I would assume the code was wrong. But I am using code from the GNAT Ada library that works fine on a different computer. I'm pretty sure it has something to do with the gnatlink activity. Either something is defaulting correctly on the working system that is not the default on the newer system, or it just cannot find the library. I tested the same simple algorithm in "c" and it works fine - which means the library is available on the system. If anyone has any other ideas please let me know as this is a show stopper. Thanks. Andy