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

Re: floating point hex calc?



On Fri, Mar 07, 2003 at 18:21:57 +0100, Vincent Lefevre wrote:
> But how about output in hexadecimal?
> 
>     $ bc -l
>     > ibase=16
>     > obase=16
>     > 1.23456
>     :  01.03 00 14 21
> 
> What does this means???

Hmm... it seems that the input base is taken into account for obase.
A bug, IMHO. So...

    $ bc -l
    > ibase=16
    > obase=10
    > 1.23456
    : 1.2344E

bc's rounding method is broken.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> - 100%
validated (X)HTML - Acorn Risc PC, Yellow Pig 17, Championnat International
des Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA



Reply to: