Bug 150080 - "value too great for base" when performing matematical mod (%)
Summary: "value too great for base" when performing matematical mod (%)
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: 3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-03-02 09:20 UTC by cradford
Modified: 2007-11-30 22:11 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2005-03-11 09:42:54 UTC


Attachments (Terms of Use)

Description cradford 2005-03-02 09:20:11 UTC
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 09:42:54 UTC
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.