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.5 required=5.0 tests=BAYES_00,INVALID_MSGID, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,bf11afc1c11f3d84 X-Google-Attributes: gid103376,public From: Simon Wright Subject: Re: Maths LIb Date: 1997/10/18 Message-ID: #1/1 X-Deja-AN: 282208654 X-NNTP-Posting-Host: pogner.demon.co.uk [158.152.70.98] References: <877175772.10098.0.nnrp-08.9e988f8e@news.demon.co.uk> Organization: At Home Newsgroups: comp.lang.ada Date: 1997-10-18T00:00:00+00:00 List-Id: "DRD Woodward" writes: > I'm using !!@*&^ AvtivAda ^^&%�!!? and having severe problems. I use GNAT. > It tells me that the package I require, (GENERIC_ELEMENTARY_FUNCTIONS), > is already compiled,and all I need do is use the a global 'With' clause, > then Instantiate it.( $%�&) This sounds (pardon me if I'm wrong) as though you aren't very familiar with Ada? > It compiles ok. but 'bind' says package (GENERIC_ELEMENTARY_FUNCTIONS) > not compiled. Perhaps if you gave us a source example we would be better able to help. > Any way as I,m tied into using Ada and for now this heap of Binary Dross > (deadline in eight days.... and counting....) I wonder if one of you kind > people out there might have an appropriate maths package (Spec+Body) that > contains at least the Tanh function and are happy to wing it down the wires > to me as soon as possible. It's called Ada.Numerics.Generic_Elementary_Functions -- see example: with Ada.Text_Io; with Ada.Float_Text_Io; with Ada.Numerics.Generic_Elementary_Functions; procedure Math is package Funcs is new Ada.Numerics.Generic_Elementary_Functions (Float); X : Float := 0.5; Y : Float; begin Y := Funcs.Tanh (X); Ada.Text_Io.Put ("tanh(0.5) is"); Ada.Float_Text_Io.Put (Y); Ada.Text_Io.New_Line; end Math; Output is "tanh(0.5) is 4.62117E-01", is that OK? > ANSI/MIL-STD-1815A-1983 Of course, if you're using Ada83 this particular solution won't help you -- but then, you said you're using ActiveAda -- -- Simon Wright Work Email: simon.j.wright@gecm.com GEC-Marconi Radar & Defence Systems Voice: +44(0)1705-701778 Command & Information Systems Divsion FAX: +44(0)1705-701800