Beliavsky <[EMAIL PROTECTED]> wrote:
...
> > I've taught "numerical computing" in university, and I would have had to
> > fail anybody who'd misunderstood floating-point computations badly
> > enough to try that "+=step" idea (including, sigh, the coders of several
> > Fortran compilers who were
On Apr 27, 1:32 am, [EMAIL PROTECTED] (Alex Martelli) wrote:
> Michael Hoffman <[EMAIL PROTECTED]> wrote:
> > [EMAIL PROTECTED] wrote:
> > > Thanks - you have covered a fair bit of gorund here - I will modify
> > > myRange taking your suggestions into account. The one suggestion that
> > > I'm goin
Michael Hoffman <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Thanks - you have covered a fair bit of gorund here - I will modify
> > myRange taking your suggestions into account. The one suggestion that
> > I'm going to have to think through is repeatedly incrementing res.
> >
> > I
Michael Hoffman wrote:
> How about something like this:
>
> index = 0
> while res < maximum:
> yield minimum + (step * index)
> index += 1
Well it really would have to be something LIKE that since I never
defined res. Let's try that again:
index = 0
res = minimum
while res < maximum:
[EMAIL PROTECTED] wrote:
> Thanks - you have covered a fair bit of gorund here - I will modify
> myRange taking your suggestions into account. The one suggestion that
> I'm going to have to think through is repeatedly incrementing res.
>
> I deliberately did not use this as repeated addition can c
Thanks - you have covered a fair bit of gorund here - I will modify
myRange taking your suggestions into account. The one suggestion that
I'm going to have to think through is repeatedly incrementing res.
I deliberately did not use this as repeated addition can cause
rounding errors to accumulate,
[EMAIL PROTECTED] wrote:
> I need to create ranges that can start and end with real numbers.
> Searching this newsgroup brought me to a function that I then modified
> as follows:
>
> def myRange(iMin, iMax=None, iStep=1):
> """Extends range to real numbers. Wherever possible, use Python's
> r
[EMAIL PROTECTED] schrieb:
> I need to create ranges that can start and end with real numbers.
> Searching this newsgroup brought me to a function that I then modified
> as follows:
>
> def myRange(iMin, iMax=None, iStep=1):
Just as a sidenote: it is not common to prefix your names with its type.