On Friday 29 June 2007 14:09, G T Smith wrote:
Randall R Schulz wrote:
On Friday 29 June 2007 12:58, G T Smith wrote:
Adam Jimerson wrote:
<snip>
Dc (RPN) or bc (infix) are the way to go for non-trivial scripted calculation. They do floating point, arbitrary precision and have formatted printing. (BASH has this, too, perhaps even better, being modelled after the C library printf() function.)
Randall Schulz
Really..
Yes, really.
Have had a quick look at bc from command line to check on something I noticed some time ago, it returns the output of 7.3/2 as 3 for example, a little rounding problem methinks.... as ideally a better answer could be 4 if it was giving a rounded int rather than a truncated int ... not a lot better than bash really... accepting floating point is only useful if the appropriate value is returned...
Your look was too quick. The precision is arbitrary and programmable and the default precision is 0 (integers).
As I said for anything beyond the really simple one would need to work on it ...
Anything beyond the really simple requires work no matter what.
...
RPN .... my idea of torture by arithmetic... :-)
Parentheses are the real torture. Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org