From owner-freebsd-current@freebsd.org Mon Jan 15 16:55:24 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15FBCEBA35B for ; Mon, 15 Jan 2018 16:55:24 +0000 (UTC) (envelope-from yuripv@icloud.com) Received: from pv33p00im-asmtp003.me.com (pv33p00im-asmtp003.me.com [17.142.194.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBA1980D83; Mon, 15 Jan 2018 16:55:23 +0000 (UTC) (envelope-from yuripv@icloud.com) Received: from process-dkim-sign-daemon.pv33p00im-asmtp003.me.com by pv33p00im-asmtp003.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) id <0P2L00J00T1V9T00@pv33p00im-asmtp003.me.com>; Mon, 15 Jan 2018 15:54:58 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=04042017; t=1516031698; bh=ZYUQT3ux/rNdIwj82V1oyCIHrUOOD8ULuwsCQccfqqk=; h=Subject:To:From:Message-id:Date:MIME-version:Content-type; b=jdgOT9sKdlSv9aEo9/0AstvHvQsSvoFDbDGT1TmO1iCSajrrXL5NZobQGNVcOzN7f 3JWNIFFzWQPdMyUpS1OFw0gWMYjGweyOF3E2dcr1Jbiyot+M3V9ma2jBql1hkpqQF0 8tjySvunikk8eULDBnLv9XmWsSTczthtry93GyNONS64MzRjG9Gnzp0RqfvJMcEW7Q C2Gi6dl4xm65tvWAPn1HfUTQUsQHxhWBIZkaWxsR/78Eafi0NF2qbuzLS1VLzr65Jv pdwpiMRP3/awi54JMJDgmEHxosQj37T/2lXmuQ1k3zAt+UHQBhWP0ORyzEKuqFxBHp ZACvkBohgm5FA== Received: from icloud.com ([127.0.0.1]) by pv33p00im-asmtp003.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) with ESMTPSA id <0P2L003QLTJH7G00@pv33p00im-asmtp003.me.com>; Mon, 15 Jan 2018 15:54:57 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-15_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1011 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1801150227 Subject: Re: inconsistent for() and while() behavior when using floating point To: David Chisnall , Hans Petter Selasky Cc: freebsd-current References: <6c423dbf-cd85-3c93-41e4-3362c06dfbb7@icloud.com> <379d470c-480b-96d7-819b-873cc3100fc7@selasky.org> <3E349DFD-046F-46B2-A80B-5C19755CC3D4@FreeBSD.org> From: Yuri Pankov Message-id: <0b310384-819d-292c-f407-9ab73f6c4ec9@icloud.com> Date: Mon, 15 Jan 2018 18:54:54 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-version: 1.0 In-reply-to: <3E349DFD-046F-46B2-A80B-5C19755CC3D4@FreeBSD.org> Content-type: text/plain; charset=utf-8; format=flowed Content-language: en-US Content-transfer-encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jan 2018 16:55:24 -0000 On Mon, Jan 15, 2018 at 02:54:59PM +0000, David Chisnall: > On 15 Jan 2018, at 14:49, Hans Petter Selasky 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 :-)