From owner-freebsd-bugs@FreeBSD.ORG Tue Apr 12 08:30:14 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD68D106564A for ; Tue, 12 Apr 2011 08:30:14 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9FD228FC13 for ; Tue, 12 Apr 2011 08:30:14 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p3C8UE4C027234 for ; Tue, 12 Apr 2011 08:30:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p3C8UEM6027231; Tue, 12 Apr 2011 08:30:14 GMT (envelope-from gnats) Date: Tue, 12 Apr 2011 08:30:14 GMT Message-Id: <201104120830.p3C8UEM6027231@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Dan Strick Cc: Subject: Re: bin/155886: bc(1) sometimes mangles hexidecimal numbers X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dan Strick List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2011 08:30:14 -0000 The following reply was made to PR bin/155886; it has been noted by GNATS. From: Dan Strick To: bug-followup@freebsd.org, coloncolonone@googlemail.com, mla_strick@att.net Cc: Subject: Re: bin/155886: bc(1) sometimes mangles hexidecimal numbers Date: Tue, 12 Apr 2011 01:11:57 -0700 (PDT) > This seems to be somewhat similar to Debian Bug 84995 where one can find > some explanations: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84995 I took a look at the Debian bug report. The author of the bc program explains: > This is a result of having the number stored in base 10 and then > using other bases in the fractional values. I can't quote the > posix document, but I'm sure this is legal behavior. The behavior may be "legal" (i.e. consistent with POSIX.2?), but it is sufficiently counterintuitive as to require specific mention on the bc man page. In other words, this behavior is either a program bug or a documentation bug. It cannot be neither. Dan Strick