Bug 150080 - "value too great for base" when performing matematical mod (%)
"value too great for base" when performing matematical mod (%)
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: bash (Show other bugs)
3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-02 04:20 EST by cradford
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-03-11 04:42:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description cradford 2005-03-02 04:20:11 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Description of problem:
The following command failed, but only for the ninth week of the year.
echo "$((`date +U` % 5))"
The `date` executable prepends an unnecessary leading zero to week 
nine (but not earlier weeks, IS THIS ALSO A BUG?). 
The following commands fail (whenever the digits 8 or 9 exist with 
the occurrance of leading zero):
echo "$((08 % 5))"
echo "$((09 % 5))"
echo "$((0800 % 5))"
echo "$((078 % 5))"
The following commands succeed
echo "$((07 % 5))"
echo "$((78 % 5))"

Version-Release number of selected component (if applicable):
exists on all versions (back to RH release 7.2)

How reproducible:
Always

Steps to Reproduce:
1.See Description
2.
3.
    

Additional info:
Comment 1 Tim Waugh 2005-03-11 04:42:54 EST
The leading '0' indicates that the number is octal, and so having digits greater
than 7 is not allowed.

Note You need to log in before you can comment on or make changes to this bug.