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=2.9 required=5.0 tests=BAYES_50,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,79720e5f1992e61e X-Google-Attributes: gid103376,public From: Jacob.S.Rosenberg.1@gsfc.nasa.gov (Jacob S. Rosenberg.) Subject: Re: Math functions in Ada Date: 1997/05/16 Message-ID: <5lhvrk$cqj@mtinsc05.worldnet.att.net>#1/1 X-Deja-AN: 241934681 References: <5ka4nc$man@news1.mnsinc.com> Organization: NASA, GSFC Reply-To: Jacob.S.Rosenberg.1@gsfc.nasa.gov Newsgroups: comp.lang.ada Date: 1997-05-16T00:00:00+00:00 List-Id: wfrye@mnsinc.com (William Frye) wrote: >Is a there a source of freeware Ada routines for simple math functions? >I am particularly interested in a routine to calculate x**y where x and y >are floating point numbers. I am working with gnat on a Win95 platform. Hi William, First of all, x**y equals exp(y * log(x)). So, all you need are the log (logarithm) and exp (exponential) functions. It should be failrly easy to write such a function as log and exp are generally provided. Indeed, the whole thing would be: return exp(y * log(x)); I strongly recommend that the input values and the functions used are of type long_float and not float in order to provide greater range and accuracy. The function itself could return a float. In that case, you can do a conversion to float before the return statement. Regards, Jacob Rosenberg To find out about more job openings, please visit my website at http://www.jobspot.com. There are many more job listings in a variety of industries and in many technical specialties. All agency fees are paid by the companies. Interview and relocation costs are usually reimbursed by the companies. Please send your resume by mail, fax, or e-mail. For best quality, you are welcom to email your resume as an attached file. Thanks and lots of luck! Pearl Martin Image Associates Inc. 5254 Merrick Road Massapequa, NY 11758 Phone: (516)798-3993 Fax: (516)797-8703 E-Mail: image@worldnet.att.net or headhunter@jobspot.com --