From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.devel Subject: Re: How to use a float value with either GLYPH_DEBUG or NSTRACE Date: Mon, 21 Aug 2017 13:51:00 -0700 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Trace: blaine.gmane.org 1503348683 22589 195.159.176.226 (21 Aug 2017 20:51:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 21 Aug 2017 20:51:23 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 21 22:51:19 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djtfB-00058W-Jk for ged-emacs-devel@m.gmane.org; Mon, 21 Aug 2017 22:51:09 +0200 Original-Received: from localhost ([::1]:54191 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djtfI-0001hn-3Y for ged-emacs-devel@m.gmane.org; Mon, 21 Aug 2017 16:51:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djtfA-0001gu-QY for emacs-devel@gnu.org; Mon, 21 Aug 2017 16:51:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1djtf7-0000bX-Lg for emacs-devel@gnu.org; Mon, 21 Aug 2017 16:51:08 -0400 Original-Received: from gateway20.websitewelcome.com ([192.185.49.40]:40145) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1djtf7-0000b4-Db for emacs-devel@gnu.org; Mon, 21 Aug 2017 16:51:05 -0400 Original-Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway20.websitewelcome.com (Postfix) with ESMTP id 55DEF400CDC18 for ; Mon, 21 Aug 2017 15:51:03 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id jteRdVPTXc72gjteRdLy91; Mon, 21 Aug 2017 15:50:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date: Sender:Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=eofsoam3IBo9NJJcjYnUe3+d4l7nSfx3cQgmCpTJFdo=; b=cM5woOvVUf+4o03EuQhuJ1Snnm SAwaJImRTdONPOylQmP1FDBKq3i7WWtxlMAxBGYFY4w8e2969RTz5iAvbdTa/OO3p6lG3S0Xg/QPR Kl8HwDdiTpScXl45JtdBH4nxQ17ySnvb+JpwomU4kfbRlCmkoTlUc0A3ZFzuTdPEB3kWml8RCj4NS A4sMQpAjax39rW5XYfKABe+afbB2Dcct7tiESX8I/QoYYbnUguLZ+UfSnpxf34i8h9bRpiQz88Rn6 ccrYTbpZ86HOTxkXn5huCAacoi2AhC6XmB6Fz+qZqQ1ctvAxyrbNWEbv0+jNamVR11SEAQPz+qLHD j1VW0jsQ==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:53583 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.87) (envelope-from ) id 1djtf3-002G5t-Jt; Mon, 21 Aug 2017 15:51:01 -0500 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.239.195 X-Exim-ID: 1djtf3-002G5t-Jt X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.local) [45.48.239.195]:53583 X-Source-Auth: lawlist X-Email-Count: 5 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 192.185.49.40 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:217670 Archived-At: Thank you, Alan: I had erroneously assumed that `%f` was only for adding/removing decimal places or rounding, rather than to show the approximate value of a `double` in this context. I ran a few tests and am guessing that `%f` uses six (6) decimal places. I understand that %f can be used to increase/decrease the number of decimal places. However, this leaves me guessing exactly what the double looks like. If the double is exactly 1.0, then it would be nice to see the same thing rather than 1.000000. If the double is several decimal places, then I'd like to see the whole thing. Then again, it is possible that the snippet in the opening thread is producing a double of exactly six (6) decimal places, but I do not know for sure if that is the case. So the `%f` solution give me 99% of what I was looking for, which is certainly sufficient to handle this particular issue. If you or anyone else have a way to print the exact value of whatever the double is (without adding/removing decimal places), an additional approach would be appreciated. Keith ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; DATE: [08-21-2017 13:07:56] <21 Aug 2017 21:07:56 +0100> FROM: Alan Third > > * * * > > Is it not just like printf? > > NSTRACE("float: %f", var); > > -- > Alan Third