[Bug 12336] New: bc: bug in comparing negative numbers

bugzilla at busybox.net bugzilla at busybox.net
Thu Nov 21 17:58:59 UTC 2019


https://bugs.busybox.net/show_bug.cgi?id=12336

            Bug ID: 12336
           Summary: bc: bug in comparing negative numbers
           Product: Busybox
           Version: unspecified
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P5
         Component: Other
          Assignee: unassigned at busybox.net
          Reporter: gladchenko at gmail.com
                CC: busybox-cvs at busybox.net
  Target Milestone: ---

Created attachment 8291
  --> https://bugs.busybox.net/attachment.cgi?id=8291&action=edit
Fix a bug in comparing negative numbers

Hi,

There's a bug in comparing negative numbers via bc calculator.
When the number of significant figures differs it gives the wrong result.

$ bc
bc 1.32.0.git
Adapted from https://github.com/gavinhoward/bc
Original code (c) 2018 Gavin D. Howard and contributors
-11 < -10
1
-10 < -9
0

The patch is trivial (attached).

The original code by Gavin Howard has this bug as well, hopefully it will be
fixed soon (pull request submitted).

Regards,
Eugene Gladchenko

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list