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

Re: BASH question

On Sat, 2006-09-09 at 18:20, Aaron Konstam wrote:

> Look all this information is interesting. And indeed there have been
> cpu-s that were capable of fixed point arithmetic. Pentiums are not
> among them. I have not seen the source code for either bc or dc but I
> doubt if they implement a form of fixed point arithmetic. It would be
> possible to do this but it is an awful lot of trouble for something that
> can be done in floating point arithmetic and then displayed with the
> appropriate precision.
> But if you know that bc and dc actually implement fixed point arithmetic
> routines ans can testify to that fact I will be interested to hear about
> it.

They do decimal integer math and shift the decimal point where
you tell it.  And they don't use the processor representation
since they can handle arbitrarily large numbers.

  Les Mikesell
   lesmikesell gmail com

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