Math help needed - Warning complex equation!!....read only if brain is in stable conditon
Mark Jackson
mjackson at alumni.caltech.edu
Thu Feb 6 11:59:57 EST 2003
More information about the Python-list mailing list
Thu Feb 6 11:59:57 EST 2003
- Previous message (by thread): Math help needed - Warning complex equation!!....read only if brain is in stable conditon
- Next message (by thread): pyqt and windows system tray
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Michael Hudson <mwh at python.net> writes: > 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' Thanks! Gosh, I wonder how *that* could have happened. . . . > I was quite pleased with myself when I tried that :-) And I suspect the OP will be quite pleased when he replaces it with '-'; with that single change the code executed fine for me. -- Mark Jackson - http://www.alumni.caltech.edu/~mjackson A retired physicist reading the /Encyclopaedia Britannica/ can do just so much toward securing world peace. - Brian Hayes
- Previous message (by thread): Math help needed - Warning complex equation!!....read only if brain is in stable conditon
- Next message (by thread): pyqt and windows system tray
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list