Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Apr 2011 08:30:14 GMT
From:      Dan Strick <mla_strick@att.net>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/155886: bc(1) sometimes mangles hexidecimal numbers
Message-ID:  <201104120830.p3C8UEM6027231@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/155886; it has been noted by GNATS.

From: Dan Strick <mla_strick@att.net>
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104120830.p3C8UEM6027231>