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

Re: BASH question

On 09Sep2006 07:57, Aaron Konstam <akonstam sbcglobal net> wrote:
| On Fri, 2006-09-08 at 16:38 -0500, Berna Massingill wrote:
| > I think you are:  The man page for dc talks about a "precision value"
| > that controls the number of figures to the right of the decimal point.
| > You set this value with the "k" command; e.g., "2 k" to set it to 2.
| > 
| > Compare the results of "1 2 / f" and "2 k 1 2 / f" for a quick example.
| > 
| Ok, k works as shown above. But these fractional numbers are all
| floating point.

What makes you think they're floating point? As opposed to fixed point
with 2 digits of precision after the point? Because they are fixed
point, not floating point.

I think you believe any number with a fractional part such as 1.5
is floating point, but this is not so. That is just a number with a
fractional part, no more. Floating versus fixed has to do with the
internal representation of the value and how computatation is done with
it, not whether it has a fractional part.

Have a gander at this wikipedia article:
It's not bad.

Cameron Simpson <cs zip com au> DoD#743

There's no trick to being a humorist when you have the whole government
working for you.        - Will Rogers

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