[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in dc
From: |
John Cowan |
Subject: |
Re: Bug in dc |
Date: |
Tue, 17 Jul 2018 16:23:00 -0400 |
That's because bc uses base-10 arithmetic internally. It is the equal and
opposite phenomenon to the loss of significance in other languages when
using standard base-2 floating point.
On Tue, Jul 17, 2018 at 3:28 PM, Russell Harper <address@hidden>
wrote:
> Literal real values in bases other than 10 lose precision, e.g.
>
> $ dc <<<'16 d i o F423F.FD p'
> F423F.FA
>
> Would expect the output to be F423F.FD
>
> It basically makes the calculator useless for non-decimal calculations.
>
> Regards,
>
> Russell
>
- Bug in dc, Russell Harper, 2018/07/17
- Re: Bug in dc,
John Cowan <=