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.0 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ab436e97ff76821f X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.219.170 with SMTP id pp10mr24255656pbc.1.1341912089907; Tue, 10 Jul 2012 02:21:29 -0700 (PDT) Path: l9ni11278pbj.0!nntp.google.com!news1.google.com!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Nasser M. Abbasi" Newsgroups: comp.lang.ada Subject: Re: Does Ada need elemental functions to make it suitable for scientific work? Date: Tue, 10 Jul 2012 04:21:17 -0500 Organization: Aioe.org NNTP Server Message-ID: References: <18c77859-480c-41f5-bb1c-df7ad067f4f3@googlegroups.com> <637de084-0e71-4077-a1c5-fc4200cad3cf@googlegroups.com> <1wqz1wr8wto96.1fwpyip6ct1z9.dlg@40tude.net> Reply-To: nma@12000.org NNTP-Posting-Host: 3VOmTkrtV3h0ncGAx1mHHw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-07-10T04:21:17-05:00 List-Id: On 7/10/2012 4:07 AM, Dmitry A. Kazakov wrote: > On Tue, 10 Jul 2012 03:39:58 -0500, Nasser M. Abbasi wrote: > >> That is a start. But not enough by any means. All functions should be >> vectorized. > > It is ill-defined. E.g. exp(A), where A is a matrix. Is exp(A) a matrix of > exponents or exponent matrix? Solved: ----------------------- octave:21> exp(A) ans = 2.7183 7.3891 20.0855 54.5982 octave:22> expm(A) ans = 51.969 74.737 112.105 164.074 ----------------------------- >To me it is the second. It is simply the way it is defined. Just like when I read a paper, I first look for the definitions of symbols and terms used by the author. one does not have to guess. Everything is defined. To do these in Ada, Ada will define them as it wishes. As long as there are there, and well defined, no one will complain. All of these issue have been solved in many other languages. >A similar example for > vectors: abs V. Is it a vector of absolute values, or maybe ||V||? > Also defined. ------------------------------- octave:23> A=rand(3,1) A = 0.45896 0.61557 0.26697 octave:24> abs(V) ans = 3 4 5 octave:25> norm(V) ans = 7.0711 ------------------------- --Nasser