Boost logo

Boost :

From: Rainer Deyke (root_at_[hidden])
Date: 2001-05-09 16:33:26

----- Original Message -----
From: "Bill Seymour" <bsey_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, May 09, 2001 12:43 PM
Subject: Re: [boost] Fixed-Point Decimal Type

> Right. I'm actually thinking of two implementations: a maximally
> portable one with an internal representation of 10's complement in
> an array of char, one digit per char; and a less portable but more
> efficient one with a boost::int_least64_t used internally. (If I
> get excited, I might also do a BCD representation with lots of
> inline assembler; but that wouldn't be an official Boost library
> because it wouldn't be portable at all.)

Bad idea for two reasons:

1. This is *not* anywhere close to an optimal representation of 64 bit
numbers on 32 bit machines. You'd be much better off with an array of four
shorts, for example.

2. A portable 64 bit integer would be useful outside of the context of fixed
point math, and should therefore be put in a separate class.

Rainer Deyke (root_at_[hidden])
Shareware computer games           - 
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor

Boost list run by bdawes at, gregod at, cpdaniel at, john at