bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: division math problems in bash!


From: Chet Ramey
Subject: Re: division math problems in bash!
Date: Fri, 25 May 2001 15:51:59 -0400

> I stumbled across this problem and am wondering if i am missing
> something. It appears that bash on my system cannot divide properly.
> The version of bash I am running is: 2.04.12(1) for linux-mandrake.

Bash is right.  Your idea about what it is doing is wrong.  Read up
on what the `%' operator does and think about why it's incorrect to
just stick it to the right of a decimal point.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]