Re: [Tutor] If elif not working in comparison

2005-03-29 Thread Sean Perry
Smith, Jeff wrote: Which is just what you'd expect. It's absolutey absurd to tell someone to have *NO* faith in floating numbers. It's like anything else in programming: you have to understand what you are doing. Unless a float that has been through a round function I do not trus it. That is what

RE: [Tutor] If elif not working in comparison

2005-03-29 Thread Smith, Jeff
Brian van den Broek wrote: > Sean Perry said unto the world upon 2005-03-29 03:48: > >> Kent Johnson wrote: >> Not without using round. Have *NO* faith in floating points. This is especially true when you are creating the decimals via division and the like. >>> >>> Can you be

Re: [Tutor] If elif not working in comparison

2005-03-29 Thread Kent Johnson
Brian van den Broek wrote: Sean Perry said unto the world upon 2005-03-29 03:48: Kent Johnson wrote: Not without using round. Have *NO* faith in floating points. This is especially true when you are creating the decimals via division and the like. Can you be more specific about what kinds of prob

Re: [Tutor] If elif not working in comparison

2005-03-29 Thread Brian van den Broek
Sean Perry said unto the world upon 2005-03-29 03:48: Kent Johnson wrote: Not without using round. Have *NO* faith in floating points. This is especially true when you are creating the decimals via division and the like. What?!?! OK, floats don't necessarily have the exact values you expect (the

Re: [Tutor] If elif not working in comparison

2005-03-29 Thread Sean Perry
Kent Johnson wrote: Not without using round. Have *NO* faith in floating points. This is especially true when you are creating the decimals via division and the like. What?!?! OK, floats don't necessarily have the exact values you expect (they may have errors after many decimal places), and com

Re: [Tutor] If elif not working in comparison

2005-03-28 Thread Kent Johnson
Sean Perry wrote: gerardo arnaez wrote: On Mon, 28 Mar 2005 09:27:11 -0500, orbitz <[EMAIL PROTECTED]> wrote: Floats are inherintly inprecise. So if thigns arn't working like you expect don't be surprised if 0.15, 0.12, and 0.1 are closer to the same number than you think. Are you telling me th

Re: [Tutor] If elif not working in comparison

2005-03-28 Thread Sean Perry
gerardo arnaez wrote: On Mon, 28 Mar 2005 09:27:11 -0500, orbitz <[EMAIL PROTECTED]> wrote: Floats are inherintly inprecise. So if thigns arn't working like you expect don't be surprised if 0.15, 0.12, and 0.1 are closer to the same number than you think. Are you telling me that I cant expect 2 d

Re: [Tutor] If elif not working in comparison

2005-03-28 Thread gerardo arnaez
On Mon, 28 Mar 2005 09:27:11 -0500, orbitz <[EMAIL PROTECTED]> wrote: > Floats are inherintly inprecise. So if thigns arn't working like you > expect don't be surprised if 0.15, 0.12, and 0.1 are closer to the same > number than you think. Are you telling me that I cant expect 2 digit preceision?

Re: [Tutor] If elif not working in comparison

2005-03-28 Thread Jeff Shannon
On Mon, 28 Mar 2005 09:27:11 -0500, orbitz <[EMAIL PROTECTED]> wrote: > Floats are inherintly inprecise. So if thigns arn't working like you > expect don't be surprised if 0.15, 0.12, and 0.1 are closer to the same > number than you think. However, the imprecision of floats is in the 10-12 precis

Re: [Tutor] If elif not working in comparison

2005-03-28 Thread orbitz
Floats are inherintly inprecise. So if thigns arn't working like you expect don't be surprised if 0.15, 0.12, and 0.1 are closer to the same number than you think. On Mar 28, 2005, at 6:32 AM, Kent Johnson wrote: gerardo arnaez wrote: Hi all, I am trying to get a value dependant on initial vlau

Re: [Tutor] If elif not working in comparison

2005-03-28 Thread Kent Johnson
gerardo arnaez wrote: Hi all, I am trying to get a value dependant on initial vlaue inputed Depending on the value, I want the functiont to return a percentage For some reason, It seems to skip the first if state and just print out the 1st elif not sure what is going. Are you sure you are passing a