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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cc4f25d878383cc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-14 02:16:47 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!hub1.nntpserver.com!fu-berlin.de!uni-berlin.de!tar-alcarin.cbb-automation.DE!not-for-mail From: dmitry@elros.cbb-automation.de (Dmitry A. Kazakov) Newsgroups: comp.lang.ada Subject: Re: Dimensionality Checking (Ada 20XX) Date: Fri, 14 Dec 2001 10:16:44 GMT Message-ID: <3c19c13f.3311687@News.CIS.DFN.DE> References: <11bf7180.0112070815.2625851b@posting.google.com> <9v0crt$bo2bi$1@ID-25716.news.dfncis.de> <9v37rs$cdmva$1@ID-25716.news.dfncis.de> <3c17210a.3970375@News.CIS.DFN.DE> <3C18DF39.9BB2F868@mail.chem.sc.edu> NNTP-Posting-Host: tar-alcarin.cbb-automation.de (212.79.194.111) X-Trace: fu-berlin.de 1008325006 15141603 212.79.194.111 (16 [77047]) X-Newsreader: Forte Free Agent 1.21/32.243 Xref: archiver1.google.com comp.lang.ada:17903 Date: 2001-12-14T10:16:44+00:00 List-Id: On Thu, 13 Dec 2001 12:02:49 -0500, daniele andreatta wrote: > > >Stephen Leake wrote: > >> dmitry@elros.cbb-automation.de (Dmitry A. Kazakov) writes: >> >> > On 11 Dec 2001 11:39:30 -0500, Stephen Leake >> > wrote: >> > >> > >It is simply wrong to try to define units for trig and exponential >> > >functions. Remember the Taylor expansion for Sin: >> > > >> > >Sin (x) = x - 1/6 x**3 ... >> > > >> > >If x has dimensions of meters (shudder :), then what are the >> > >dimensions of Sin (x)? This is why angles must be dimensionless, as >> > >radians are. >> > >> > It is true, but the proof is wrong. Consider sqrt (x). It also has a >> > Taylor expansion in 1, which is also endless, yet sqrt (m**2) exists >> > and is m. >> >> Hmm. Good point. I guess infinite series are trickier than I remember; >> it has been a long time :). >> >> -- >> -- Stephe > >Taylor series keeps the unit of the function. Basically the series is (as >you recall) >f(x) = f(x_0) + f'(x_0) (x-x_0) +f''(x_0) (x-x_0)**2 + ... >and the unit of the derivatives are (indicating with [] the unit of the >quantity) >[f'(x)] = [f]/[x]; [f''] = [f]/[x]**2; .... >In the end >[f(x)] = [Taylor expansion] Right. Taylor series keep the unit just *per definition*, because otherwise it would be impossible to have f(x)=Taylor expansion (:-)). However this fact does not ensure that the function *exists*. In contrary, IF the function exits AND .. AND .. AND .. THEN there is an expansion. Let consider exp(x). exp(x) * exp(x)=exp(x+x) => [exp(x) * exp(x)] = [exp(2x)] = (surely, we don't want to have units depending on the magnitude) = [exp(x)] At the same time: [exp(x) * exp(x)] = [exp(x)] * [exp(x)] => => [exp(x)] = [exp(x)] * [exp(x)] => => [exp(x)] = [1] Now for any x, [log (exp (x))] = [x] => for any [x], [log (number)] = [x] ?!! This is why exp of meters is incompatible with the requirement that for any X, Y (real numbers), [exp (Xm)] = [exp (Ym)]. The same is valid for sin, of course. Regards, Dmitry Kazakov