Math help needed - Warning complex equation!!....read only if brain is in stable conditon

Michael Hudson mwh at python.net
Thu Feb 6 11:27:57 EST 2003


mjackson at alumni.caltech.edu (Mark Jackson) writes:

> jranchordas at hotmail.com (Jay) writes:
> > right, now that I got your attention, I need help on the following
> > piece of python code:
> > 
> > distance = 1.15 * (180 * (acos((sin(pi * lat1 / 180) * sin(pi * lat2 /
> > 180)) + (cos(pi * lat1 / 180) * cos(pi * lat2 / 180) * cos(pi * (lon2
> > – lon1) / 180))) / pi) * 60)
> 
> --^^-- what's this weird character here where a "-" ought to be?

The character displays as \226 in Gnus.  Hmm...

>>> unicodedata.name("\226".decode('cp1252'))
'EN DASH'

I was quite pleased with myself when I tried that :-)

Cheers,
M.

-- 
  Guido (like us!) is a bit schizophrenic here: he wants to be a
  benevolent dictator, but also wants to treat people like
  grownups. This probably worked better before Python got a large
  American audience <0.9 wink>.             -- Tim Peters, 10 Feb 2000




More information about the Python-list mailing list