[boost] Re: Advanced match constants scheme

2003-06-22 Thread Gennaro Prota
On Sun, 22 Jun 2003 00:50:32 +0200 (CEST), Guillaume Melquiond [EMAIL PROTECTED] 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

[boost] Re: Advanced match constants scheme

2003-06-21 Thread Gennaro Prota
On Fri, 20 Jun 2003 22:04:53 +0200 (CEST), Guillaume Melquiond [EMAIL PROTECTED] wrote: [...] I know this part of the standard. But it doesn't apply in the situation I was describing. I was describing the case of a constant whose decimal (and consequently binary) representation is not finite. It

[boost] Re: Advanced match constants scheme

2003-06-20 Thread Gennaro Prota
On Fri, 20 Jun 2003 18:30:48 +0200 (CEST), Guillaume Melquiond [EMAIL PROTECTED] wrote: On Fri, 20 Jun 2003, Paul A Bristow wrote: [snip] | [*] It is not even true. Due to double rounding troubles, | using a higher precision can lead to a value that is not the | nearest number. Is this

Re: [boost] Re: Advanced match constants scheme

2003-06-20 Thread Guillaume Melquiond
On Fri, 20 Jun 2003, Gennaro Prota wrote: | [*] It is not even true. Due to double rounding troubles, | using a higher precision can lead to a value that is not the | nearest number. Is this true even when you have a few more digits than necessary? Kahan's article suggested to me