Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #435
| Newsgroups | comp.lang.postscript |
|---|---|
| Subject | Re: Can it be! A bug in "for"? |
| References | <b0f2ade7-c738-401f-8b72-0615f50f6a96@r28g2000yqj.googlegroups.com> <4eb354d5$0$13884$c3e8da3$76491128@news.astraweb.com> <3aad31c8-7b0e-4225-a38d-3e97bd62d4f2@t8g2000yql.googlegroups.com> |
| Organization | Gizmos & Gadgets, Ltd. |
| From | bonomi@host122.r-bonomi.com (Robert Bonomi) |
| Message-ID | <PJOdnQXwi-mpxyXTnZ2dnUVZ_qSdnZ2d@posted.nuvoxcommunications> (permalink) |
| Date | 2011-11-07 16:22 -0600 |
In article <3aad31c8-7b0e-4225-a38d-3e97bd62d4f2@t8g2000yql.googlegroups.com>,
luser- -droog <mijoryx@yahoo.com> wrote:
>On Nov 3, 9:58 pm, A D <amd1...@fastmail.com.au> wrote:
>> On 04/11/11 11:11, luser- -droog wrote:
>>
>>
>>
>> > To be fair, I only just fixed mine yesterday. But now that I can get
>> > ghostscript to animate smoothly, I noticed I wasn't getting the in-
>> > phase pyramid gradient where I expected it.
>>
>> > 695(1)06:59 PM:~ 0> cat for.ps
>> > %!
>>
>> > .1 .10 1 {=} for
>>
>> > %!!gsnd -q %\n produces
>> > %0.1
>> > %0.2
>> > %0.3
>> > %0.4
>> > %0.5
>> > %0.6
>> > %0.7
>> > %0.8
>> > %0.9
>> > %GS>GS>
>>
>> > %!!xpost -nd -q %\n produces
>> > %0.1
>> > %0.2
>> > %0.3
>> > %0.4
>> > %0.5
>> > %0.6
>> > %0.7
>> > %0.8
>> > %0.9
>> > %1.0
>> > %PS>PS>
>>
>> Never trust floating point numbers to behave like integers?
>>
>> Say
>> 1 1 10 {=} for
>> ... 10.0 div ...
>
>True, but shouldn't 'for' be doing a fuzzy comparison?
"Should" or "should not" depends on _which_ behaviour you want, when the
internal representation of the increment is -not- an exact sub-multiple of
internal representation of the range between start and limit.
Sometimes some people want one behavior, sometimes some people want the
other behavior -- there is no option that will please 'all of the people
all of the time'. So, you do it 'the easy way', and document the quirks
that result therefrom.
Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar
Can it be! A bug in "for"? luser- -droog <mijoryx@yahoo.com> - 2011-11-03 17:11 -0700
Re: Can it be! A bug in "for"? A D <amd1234@fastmail.com.au> - 2011-11-04 13:58 +1100
Re: Can it be! A bug in "for"? luser- -droog <mijoryx@yahoo.com> - 2011-11-03 22:18 -0700
Re: Can it be! A bug in "for"? ken <ken@spamcop.net> - 2011-11-04 08:02 +0000
Everybody stop panicking! It's not a bug. (was Re: Can it be! A bug in "for"?) luser- -droog <mijoryx@yahoo.com> - 2011-11-04 01:22 -0700
Re: Can it be! A bug in "for"? bonomi@host122.r-bonomi.com (Robert Bonomi) - 2011-11-07 16:22 -0600
Re: Can it be! A bug in "for"? ken <ken@spamcop.net> - 2011-11-04 08:01 +0000
csiph-web