inconsistent for() and while() behavior when using floating point

Yuri Pankov yuripv at icloud.com
Mon Jan 15 16:55:24 UTC 2018


On Mon, Jan 15, 2018 at 02:54:59PM +0000, David Chisnall:
> On 15 Jan 2018, at 14:49, Hans Petter Selasky <hps at selasky.org> wrote:
>>
>> The "seq" utility should use two 64-bit integers to represent the 10-base decimal number instead of float/double. And then you need to step this pair of integers.

Thanks for the hint!

> As the saying goes:
> 
>> Sometimes, people think 'I have a problem and I will solve it with floating point values' and then they have 1.99999999 problems.

Well, seq(1) is about floating numbers, so at least initially using them 
internally would seem correct, though reading your replies I now 
understand it's not :-)


More information about the freebsd-current mailing list