Date: Tue, 29 Aug 2017 14:58:35 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 221869] bc doesn't always convert ibase to obase correctly Message-ID: <bug-221869-8-kKGrUJ5qqo@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-221869-8@https.bugs.freebsd.org/bugzilla/> References: <bug-221869-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221869 Conrad Meyer <cem@freebsd.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Closed CC| |cem@freebsd.org Resolution|--- |Not A Bug --- Comment #1 from Conrad Meyer <cem@freebsd.org> --- Note that as soon as you set ibase=3D2, numbers are input in base 2. obase= =3D10 assigns 0b10 (=3D=3D decimal 2) to obase. You want obase=3D1010, or assign= obase before changing ibase. I believe this is identical in GNU bc. $ bc (GNU) 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'. ibase=3D2 obase=3D1010 1111 15 $ /usr/bin/bc (BSD) ibase=3D2 obase=3D1010 1111 15 --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-221869-8-kKGrUJ5qqo>