From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: giacomo.boffi@gmail.com Newsgroups: gmane.emacs.help Subject: Re: distance from Easter Island to Chile Date: Mon, 21 Apr 2014 00:39:24 +0200 Organization: The Sun and the Rain. Message-ID: <87bnvveicj.fsf@pascolo.net> References: <87mwfguasr.fsf@nl106-137-194.student.uu.se> <87mwfg823s.fsf@nl106-137-194.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1398033942 14173 80.91.229.3 (20 Apr 2014 22:45:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Apr 2014 22:45:42 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 21 00:45:37 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wc0UN-00008o-Vt for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Apr 2014 00:45:32 +0200 Original-Received: from localhost ([::1]:46841 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wc0UN-0004Qx-9w for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Apr 2014 18:45:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wc0U3-0004Q9-Lr for help-gnu-emacs@gnu.org; Sun, 20 Apr 2014 18:45:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wc0Ty-0005ZR-7t for help-gnu-emacs@gnu.org; Sun, 20 Apr 2014 18:45:11 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:56754) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wc0Tx-0005Wc-NN for help-gnu-emacs@gnu.org; Sun, 20 Apr 2014 18:45:05 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Wc0Tv-00083d-7W for help-gnu-emacs@gnu.org; Mon, 21 Apr 2014 00:45:03 +0200 Original-Received: from ppp-21-23.21-151.libero.it ([151.21.23.21]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Apr 2014 00:45:03 +0200 Original-Received: from giacomo.boffi by ppp-21-23.21-151.libero.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Apr 2014 00:45:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 25 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ppp-21-23.21-151.libero.it User-Agent: Gnus/5.101 (Gnus v5.10.10) XEmacs/21.5-b34 (linux) Cancel-Lock: sha1:tASYWA7hbU3N+EPNUYf3TkvVFRA= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:97277 Archived-At: Emanuel Berg writes: > Frank Stutzman writes: > >> I get an answer of 4301.199 mee too > That's normal (progn (defun d2r (x) (/ (* pi x) 180)) (defun spherical-law-of-cosines (p1 p2) "http://en.wikipedia.org/wiki/Great-circle_distance#Formulas" (let ((lat1 (car p1)) (lon1 (cadr p1)) (lat2 (car p2)) (lon2 (cadr p2))) (acos (+ (* (sin lat1) (sin lat2)) (* (cos lat1) (cos lat2) (cos (- lon2 lon1))))))) (setq santiago (mapcar 'd2r '(33.4500 70.6667))) (setq easter_i (mapcar 'd2r '(27.1167 109.3667))) (insert (format "\nEaster Island to Santiago distance is%8.2f km." (* (spherical-law-of-cosines santiago easter_i) 6378.1)))) ^ put the cursor over the caret and type C-x C-e