From owner-freebsd-libh Tue Oct 23 13:59: 9 2001 Delivered-To: freebsd-libh@freebsd.org Received: from tomts7-srv.bellnexxia.net (tomts7.bellnexxia.net [209.226.175.40]) by hub.freebsd.org (Postfix) with ESMTP id 9416B37B403 for ; Tue, 23 Oct 2001 13:59:01 -0700 (PDT) Received: from khan.anarcat.dyndns.org ([65.94.128.156]) by tomts7-srv.bellnexxia.net (InterMail vM.4.01.03.16 201-229-121-116-20010115) with ESMTP id <20011023205900.UQBL2701.tomts7-srv.bellnexxia.net@khan.anarcat.dyndns.org> for ; Tue, 23 Oct 2001 16:59:00 -0400 Received: from shall.anarcat.dyndns.org (shall.anarcat.dyndns.org [192.168.0.1]) by khan.anarcat.dyndns.org (Postfix) with ESMTP id C128F19E3 for ; Tue, 23 Oct 2001 16:58:55 -0400 (EDT) Received: by shall.anarcat.dyndns.org (Postfix, from userid 1000) id C81B120ACE; Tue, 23 Oct 2001 16:59:26 -0400 (EDT) Date: Tue, 23 Oct 2001 16:59:26 -0400 From: The Anarcat To: Libh Subject: tcl integer limitations Message-ID: <20011023165922.F526@shall.anarcat.dyndns.org> Mail-Followup-To: The Anarcat , Libh Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Pql/uPZNXIm1JCle" Content-Disposition: inline User-Agent: Mutt/1.3.22.1i Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --Pql/uPZNXIm1JCle Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. I'm working on making it possible to change the size units in the label editor and the fdisk editor. Inevitably, I must use bytes instead of sectors to represent the sizes. The problem is that this overflows tcl's default integer type (long): anarcat@shall[~/libh/release/diskedit]% bc=20 bc 1.06 Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'.=20 60030432 * 512 30735581184 anarcat@shall[~/libh/release/diskedit]% tclsh8.3 % expr 60030432 * 512 670810112 % expr 30735581184 integer value too large to represent I guess the proper solution is to use a floating points, but that seems evil to me... Unless anyone has a better idea, i'll use floating point. Or at least try. ;) A. --Pql/uPZNXIm1JCle Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjvV2ikACgkQttcWHAnWiGeNcwCcDDN/Cz2NDv35wRLEIaervR6Z fA0An1fLcGeB8YH1EPO8q5RTAtUBGVq9 =/h5o -----END PGP SIGNATURE----- --Pql/uPZNXIm1JCle-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message