Boost logo

Boost :

From: Guillaume Melquiond (gmelquio_at_[hidden])
Date: 2003-06-22 07:08:57


On Sun, 22 Jun 2003, Gennaro Prota wrote:

> On Sun, 22 Jun 2003 00:50:32 +0200 (CEST), Guillaume Melquiond
> wrote:
>
> >We are sure c_l is the nearest 'long double'. Now we want the nearest
> >'double'. Can we simply do:
> >
> >double c_d() { return c_l(); }
> >
> >No, we can't.
>
> We already agreed that a different definition must be provided for
> each type (float, double, long double, and possibly UDTs in some of
> the proposed approaches). Is this the only objection? I haven't
> analyzed the rest of the post because this could be a crucial
> misunderstanding (I've read everything, only a little more
> absent-mindedly).
>
> Genny.

Yes, it's what I meant. A different value should be provided for each type
(and for 'long double', it will have to be machine-dependent: 80, 64+64 or
128 bits) and it must be exactly representable for the type (so, if the
decimal representation of a constant doesn't at least end by a 5, there is
an error). I thought I add to make it clear, since it's not the case in
the "reviewed" library and it will be tedious to implement.

Regards,

Guillaume


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