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,5f5a48f21d7f7525 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!.POSTED!not-for-mail From: Warren Newsgroups: comp.lang.ada Subject: Re: Inferring array index type from array object Date: Tue, 29 Jun 2010 19:31:04 +0000 (UTC) Organization: A noiseless patient Spider 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> Injection-Date: Tue, 29 Jun 2010 19:31:04 +0000 (UTC) Injection-Info: mx01.eternal-september.org; posting-host="9f8M0iN5t54V+4DF/iqO8g"; logging-data="21795"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18jWP25TEggl1HM5/HX0ORla83GiL+Ypug=" User-Agent: Xnews/5.04.25 X-Face: &6@]C2>ZS=NM|HE-^zWuryN#Z/2_.s9E|G&~DRi|sav9{E}XQJb*\_>=a5"q]\%A;5}LKP][1mA{gZ,Q!j Cancel-Lock: sha1:KtnX1bZwEyquAVgelniILjOvq5Y= Xref: g2news2.google.com comp.lang.ada:12963 Date: 2010-06-29T19:31:04+00:00 List-Id: John B. Matthews expounded in news:nospam-803846.13501829062010 @news.aioe.org: > In article , > Warren wrote: > >> One thing that really irks me (in lack of convenience) >> is the lack of certain functions in the library support. >> For example, I was looking for the inverse of a complex >> number function. Did I missed it? My googling didn't >> turn up much, nor did grep on the package hdrs. >> >> So because it is missing (AFIK), I had to google it and >> figure out how it is done and code it myself. Wouldn't it >> be safer if the function was already provided and tested? >> Wouldn't it also be more accurately coded (floating >> point can be tricky)? At least it would be tested. >> >> IIRC, I ran into the similar issues with some other >> functions (ATAN2??). The LOG10() issue was >> resolved when I discovered there is a base argument >> in LOG(), so that was just my own "user error". >> >> But even if a function is considered "trivial", I >> think it would be "safer" to include it. Additionally, >> having them provided means that they will >> be coded for the best accuracy. > > So, what is the "missing" function? > > 1) The "inverse" of a complex number. 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); Warren