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-Thread: 103376,5f5a48f21d7f7525 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news3.google.com!feeder.news-service.com!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeder1.enfer-du-nord.net!gegeweb.org!aioe.org!not-for-mail From: "John B. Matthews" Newsgroups: comp.lang.ada Subject: Re: Inferring array index type from array object Date: Tue, 29 Jun 2010 17:20:41 -0400 Organization: The Wasteland Message-ID: References: <6b20ed09-efc1-4df7-90f9-5e141482e8d0@d37g2000yqm.googlegroups.com> <1305oqccr1h2t$.x33x4oxwd84d$.dlg@40tude.net> <88ec2vF3uqU1@mid.individual.net> <88f9osFmcmU1@mid.individual.net> <88sld2F9m8U1@mid.individual.net> NNTP-Posting-Host: LQJtZWzu+iKlBROuDg+IUg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Xref: g2news1.google.com comp.lang.ada:12005 Date: 2010-06-29T17:20:41-04:00 List-Id: In article , Warren wrote: > >> I was looking for the inverse of a complex number function. [...] > > So, what is the "missing" function? > > > > > > 1) The "inverse" of a complex number. Ah, the multiplicative inverse. I thought you meant inverse of a complex valued function, such as Exp/Log or Sin/Arcsin. As Adam and Damien suggested, 1.0 / Z looks right: function "/" (Left : Real'Base; Right : Complex) return Complex; > 2) Also, math libraries usually include atan2(y,x), > since the error can be large with certain ranges > of x in the tan(x) form: > > #include > > double atan2(double y, double x); > float atan2f(float y, float x); > long double atan2l(long double y, long double x); Adam also mentioned Arctan for real values: For complex values, you may want "the principal value of the argument of the complex number x + iy." function Argument (X : Complex) return Real'Base; -- John B. Matthews trashgod at gmail dot com