Xref: utzoo comp.os.os9:711 comp.sys.m6809:1168 Path: utzoo!attcan!uunet!mcrware!jejones From: jejones@mcrware.UUCP (James Jones) Newsgroups: comp.os.os9,comp.sys.m6809 Subject: Re: basic09 calculations Summary: really RAD :-) Keywords: scientific calculations and problems, trig functions Message-ID: <1436@mcrware.UUCP> Date: 3 Jan 90 07:45:43 GMT References: <1692@esquire.UUCP> Reply-To: jejones@mcrware.UUCP (James Jones) Organization: Microware Systems Corp., Des Moines, Iowa Lines: 15 In article <1692@esquire.UUCP> wynkoop@esquire.UUCP (Brett Wynkoop) writes: > Why does the following line of code yield the wrong answer under BASIC09? >It works fine under microsoft basic on my model 102, and ECB on my coco. >It even works fine on my hp67. Help! > >distance =60*(acs((sin(lat1)*sin(lat2))+(cos(lat1)*cos(lat2)*cos(dlong)))) I post the answer here for the general public; Mr. Wynkoop has already received replies via CIS. BASIC09 comes up in the mode of presuming arguments to trig functions (or results of the inverse trig functions) to be in *radians*; one can switch that to degrees with the DEG command (and back with RAD, which Valley Dudes should appreciate :-). Mr. W. got the answer he expected with DEG. James Jones