From owner-freebsd-current@freebsd.org Mon Jan 15 14:55:10 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 11A92EB2196 for ; Mon, 15 Jan 2018 14:55:10 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (xvm-110-62.dc2.ghst.net [46.226.110.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "theravensnest.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A6DD47990E for ; Mon, 15 Jan 2018 14:55:09 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from c124.sec.cl.cam.ac.uk (c124.sec.cl.cam.ac.uk [128.232.18.124]) (authenticated bits=0) by theravensnest.org (8.15.2/8.15.2) with ESMTPSA id w0FEt0lr060099 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 15 Jan 2018 14:55:00 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: inconsistent for() and while() behavior when using floating point From: David Chisnall In-Reply-To: Date: Mon, 15 Jan 2018 14:54:59 +0000 Cc: Yuri Pankov , freebsd-current Content-Transfer-Encoding: quoted-printable Message-Id: <3E349DFD-046F-46B2-A80B-5C19755CC3D4@FreeBSD.org> References: <6c423dbf-cd85-3c93-41e4-3362c06dfbb7@icloud.com> <379d470c-480b-96d7-819b-873cc3100fc7@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.3273) 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 14:55:10 -0000 On 15 Jan 2018, at 14:49, Hans Petter Selasky wrote: >=20 > 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. 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. David