Re: [Tutor] Scientific Notation + 18 Digit Precision

2005-11-28 Thread Danny Yoo
> Unless someone asks me, I do not plan to further mix physics with > Python. My QM instructor said that my electron model theory was "like a > snake chasing its tail," so perhaps Python is the right language to use? Hi Hubert, I see, so it sounds like you're using Python as an extended calculati

[Tutor] Scientific Notation + 18 Digit Precision

2005-11-27 Thread Hubert Fitch
Thank you Danny for your comments!   I have now printed out four responses, and perhaps I might even learn some Python! It will take me some time to analyze all comments!    I had never heard of Python until I audited two Physics classes. "Math Methods for Physics,"  and "Quantum Mechanics.

Re: [Tutor] Scientific Notation + 18 Digit Precision

2005-11-27 Thread Danny Yoo
On Sun, 27 Nov 2005, Hubert Fitch wrote: > Thanks to all of you (Alan, Chris, Kent) for your responses! > > Before I try to follow up on these suggestions, it might be good to > examine the display function module, and provide a few lines from a .py > module that needs display. [warning: long m

[Tutor] Scientific Notation + 18 Digit Precision

2005-11-27 Thread Hubert Fitch
Thanks to all of you (Alan, Chris, Kent) for your responses!   Before I try to follow up on these suggestions, it might be good to examine the display function module, and provide a few lines from a .py module that needs display.   Typical lines in a defintion module, that need a formatted d

Re: [Tutor] Scientific Notation + 18 digit precision

2005-11-27 Thread Alan Gauld
> Is there an easy way to convert these large numbers to the scientific > notation format? The numbers are, of course, stored in binary so the real question is: can we *display* them in scientific format? The answer is yes using string format operators. Try playing with the %e and %g options:

Re: [Tutor] Scientific Notation + 18 digit precision

2005-11-26 Thread Chris or Leslie Smith
| The display function operates on each line in the .py file and | provides 4 formatted columns for: | Variable Name, Data (18 digits ), Assignment Formula, and Comments. | There are a couple of recipes at ASPN that might be useful with table generation: http://aspn.activestate.com/ASPN/Cookb

Re: [Tutor] Scientific Notation + 18 digit precision

2005-11-26 Thread Kent Johnson
Hubert Fitch wrote: > Now for the questions: > > Most data and results are displayed properly formatted in scientific > notation, but sometimes large numbers resulting from calculations are > not converted to scientific notation. > > For example: mu0*I0/r0 = 1209755258303.6067 (should have >

[Tutor] Scientific Notation + 18 digit precision

2005-11-26 Thread Hubert Fitch
I am using Python 2.3 under Windows XP Home edition   I am too old to learn all the tricks of Python, and my main purpose is for Physics calculations   I do have some questions, but perhaps my useage of Python as an Algebraic Calculator will be interesting to someone?   Python is the best pr