Re: python rounding problem.

2006-05-13 Thread Florian Diesch
Thomas Bartkus [EMAIL PROTECTED] wrote: Grant Edwards [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 2006-05-08, Thomas Bartkus [EMAIL PROTECTED] wrote: does python support true rations, which means that 1/3 is a true one-third and not 0.3 rounded off at some

Re: python rounding problem.

2006-05-11 Thread Tim Roberts
chun ping wang [EMAIL PROTECTED] wrote: Hey i have a stupid question. How do i get python to print the result in only three decimal place... Example round (2.9954254, 3) 2.9951 but i want to get rid of all trailing 0's..how would i do that? Your problem is not a problem in

Re: python rounding problem.

2006-05-09 Thread Thomas Bartkus
Grant Edwards [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 2006-05-08, Thomas Bartkus [EMAIL PROTECTED] wrote: Or you can write 0.1 3 :) Ahhh! But if I need to store the value 1/10 (decimal!), what kind of a precision pickle will I then

Re: python rounding problem.

2006-05-09 Thread Grant Edwards
On 2006-05-09, Thomas Bartkus [EMAIL PROTECTED] wrote: Even base 60 makes more sense if you like it when a lot of divisions come out nice and even. Did they actually have 60 unique number symbols and use place-weighting in a manner similar to the arabic/indian system we use? I don't know.

Re: python rounding problem.

2006-05-09 Thread Dan Bishop
Grant Edwards wrote: ... Did they actually have 60 unique number symbols and use place-weighting in a manner similar to the arabic/indian system we use? The Bablyonians did use a place-value system, but they only had two basic numerals: a Y-like symbol for 1 and a -like symbol for ten. These

Re: python rounding problem.

2006-05-09 Thread Grant Edwards
On 2006-05-09, Dan Bishop [EMAIL PROTECTED] wrote: Grant Edwards wrote: ... Did they actually have 60 unique number symbols and use place-weighting in a manner similar to the arabic/indian system we use? The Bablyonians did use a place-value system, but they only had two basic numerals: a

Re: python rounding problem.

2006-05-09 Thread Dan Bishop
Grant Edwards wrote: On 2006-05-09, Dan Bishop [EMAIL PROTECTED] wrote: Grant Edwards wrote: ... Did they actually have 60 unique number symbols and use place-weighting in a manner similar to the arabic/indian system we use? The Bablyonians did use a place-value system, but they

Re: python rounding problem.

2006-05-08 Thread Thomas Bartkus
Gary Wessle [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Erik Max Francis [EMAIL PROTECTED] writes: chun ping wang wrote: Hey i have a stupid question. How do i get python to print the result in only three decimal place... Example round (2.9954254, 3)

Re: python rounding problem.

2006-05-08 Thread Grant Edwards
On 2006-05-08, Thomas Bartkus [EMAIL PROTECTED] wrote: does python support true rations, which means that 1/3 is a true one-third and not 0.3 rounded off at some arbitrary precision? At risk of being boring ;-) - Python supports both rational and irrational numbers as floating

Re: python rounding problem.

2006-05-08 Thread Thomas Bartkus
Grant Edwards [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 2006-05-08, Thomas Bartkus [EMAIL PROTECTED] wrote: does python support true rations, which means that 1/3 is a true one-third and not 0.3 rounded off at some arbitrary precision? At risk of being boring

Re: python rounding problem.

2006-05-08 Thread Grant Edwards
On 2006-05-08, Thomas Bartkus [EMAIL PROTECTED] wrote: Or you can write 0.1 3 :) Ahhh! But if I need to store the value 1/10 (decimal!), what kind of a precision pickle will I then find myself while working in base 3? Then we're right back where we started. No

python rounding problem.

2006-05-07 Thread chun ping wang
Hey i have a stupid question. How do i get python to print the result in only three decimal place... Example round (2.9954254, 3) 2.9951 but i want to get rid of all trailing 0's..how would i do that? _ Express

Re: python rounding problem.

2006-05-07 Thread Erik Max Francis
chun ping wang wrote: Hey i have a stupid question. How do i get python to print the result in only three decimal place... Example round (2.9954254, 3) 2.9951 but i want to get rid of all trailing 0's..how would i do that? Floating point arithmetic is inherently

Re: python rounding problem.

2006-05-07 Thread gene tani
Erik Max Francis wrote: chun ping wang wrote: Hey i have a stupid question. How do i get python to print the result in only three decimal place... Example round (2.9954254, 3) 2.9951 but i want to get rid of all trailing 0's..how would i do that? Floating

Re: python rounding problem.

2006-05-07 Thread Gary Wessle
Erik Max Francis [EMAIL PROTECTED] writes: chun ping wang wrote: Hey i have a stupid question. How do i get python to print the result in only three decimal place... Example round (2.9954254, 3) 2.9951 but i want to get rid of all trailing 0's..how would i do