Boost logo

Boost :

From: Paul A Bristow (pbristow_at_[hidden])
Date: 2006-05-25 13:55:07


 

| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]] On Behalf Of Maarten
| Kronenburg
| Sent: 25 May 2006 15:38
| To: boost_at_[hidden]
| Subject: Re: [boost] Infinite precision integer draft
|
|
| > 1 I wonder if the get_sign could not be sign_bit to comform to
| > floating-point types. I know that one could maintain there isn't a
sign bit
| > (it's a byte or more).
|
| I like the name get_sign more, just like for example get_time.

agree, but ...

| Where did you find sign_bit?

C99 incorporation into C++ TR1 added signbit - but (intended?) only for
floating-point perhaps?.
  
| > 2 If you have to write is_zero() instead of == 0, will this make
| templated code difficult?
|
| The == 0 notation is always allowed, also in templates,
| but it is a little slower than is_zero().
| The == 0 generates a temporary integer with value zero,
| by implicit converting constructor.
| But in templates that also should work for template type
| parameter int, the == 0 indeed must be used.

Fine.
  
| > 3 Is there a reason for starting with integer rather than unsigned
| integer
| > (which sounds simpler). Will deriving unsigned integer
| from (signed)
| integer
| > be less efficient that vice versa?
|
| The unsigned integer is not simpler but
| more difficult than the integer,

I'm sure you are right.

| > But this is long, long overdue as a Boost and Standard Library.
| >
| > Good luck!
| >
| > Paul
| >
| > ---
| > Paul A Bristow
| > Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB
| > +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS
| > pbristow_at_[hidden]


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk