* "J?rgen A. Erhard" ([EMAIL PROTECTED]) spake thusly:
> > "Dimitri" == Dimitri Maziuk <[EMAIL PROTECTED]> writes:
...
> No way in hell. As double has a 50+ bit mantissa, all ints smaller
> than this (typical 4 byte long int) can be converted without loss.
> (IEEE 754 53 bits mantissa, 10 bits
> "Dimitri" == Dimitri Maziuk <[EMAIL PROTECTED]> writes:
Dimitri> * Craig Dickson ([EMAIL PROTECTED]) spake thusly:
>> I don't see how. I see it as a legitimate compiler
>> optimization. If you have "double f = 4;", and you compile 4 as
>> a double-precision value rather than
Dimitri Maziuk wrote:
* Craig Dickson ([EMAIL PROTECTED]) spake thusly:
...
(2) Is there any essential difference between the following two
declarations:
double f = 4;
double f = 4.0;
such that a conforming C compiler is prohibited from compiling them
^^
Dimitri Maziuk wrote:
> Sorry, Craig, WTF cares what "a conforming" compiler is "not prohibited"
> to do?
Because that was the question under discussion: whether the standard
allows a compiler to do that. Someone (I forget who now) thought not;
I disagreed.
> The question is "is my 'now even mo
* Craig Dickson ([EMAIL PROTECTED]) spake thusly:
...
> (2) Is there any essential difference between the following two
> declarations:
>
> double f = 4;
> double f = 4.0;
>
> such that a conforming C compiler is prohibited from compiling them
^^ ^^
On Tue, Aug 14, 2001 at 09:03:32AM -0700, Craig Dickson wrote:
[...]
| But this is all quite irrelevant to the original question, the point of
| which was, I think, missed by Dimitri Maziuk. Let's back off here and
| restate the original problem, which was:
[...]
| You (dman) seem to be following D
dman wrote:
> On Tue, Aug 14, 2001 at 07:34:26AM -0700, David Roundy wrote:
> | On Mon, Aug 13, 2001 at 12:37:45PM -0500, Dimitri Maziuk wrote:
> | > * Craig Dickson ([EMAIL PROTECTED]) spake thusly:
> | > > I don't see how. I see it as a legitimate compiler optimization. If you
> | > > have "doub
On Tue, Aug 14, 2001 at 07:34:26AM -0700, David Roundy wrote:
| On Mon, Aug 13, 2001 at 12:37:45PM -0500, Dimitri Maziuk wrote:
| > * Craig Dickson ([EMAIL PROTECTED]) spake thusly:
| > > I don't see how. I see it as a legitimate compiler optimization. If you
| > > have "double f = 4;", and you co
On Mon, Aug 13, 2001 at 12:37:45PM -0500, Dimitri Maziuk wrote:
> * Craig Dickson ([EMAIL PROTECTED]) spake thusly:
> > Paul Scott wrote:
> >
> > > Well that may date me a little even though I am actively programming at
> > > this moment. I will research this a little more. My logic would be it
* Craig Dickson ([EMAIL PROTECTED]) spake thusly:
> Paul Scott wrote:
>
> > Well that may date me a little even though I am actively programming at
> > this moment. I will research this a little more. My logic would be it
> > would break the rules of the language to assume that conversion.
>
On Sat, Aug 11, 2001 at 03:44:17AM -0400, [EMAIL PROTECTED] wrote:
> I'm sorry not to have provided more information in my first e-mail although
> i'm very glad so many people responded to help, but i've done some more
> testing:
>
> specifically i'm getting 'prase error in tmp/x' where x is a l
Shaul Karl wrote:
I'm sorry not to have provided more information in my first e-mail although
i'm very glad so many people responded to help, but i've done some more
testing:
specifically i'm getting 'prase error in tmp/x' where x is a long string of
characters that tends to change on every
On Sat, Aug 11, 2001 at 03:44:17AM -0400, [EMAIL PROTECTED] wrote:
> I'm sorry not to have provided more information in my first e-mail although
> i'm very glad so many people responded to help, but i've done some more
> testing:
>
> specifically i'm getting 'prase error in tmp/x' where x is a l
> I'm sorry not to have provided more information in my first e-mail although
> i'm very glad so many people responded to help, but i've done some more
> testing:
>
> specifically i'm getting 'prase error in tmp/x' where x is a long string of
> characters that tends to change on every run of th
Craig Dickson wrote:
Paul Scott wrote:
Well that may date me a little even though I am actively programming at
this moment. I will research this a little more. My logic would be it
would break the rules of the language to assume that conversion.
I don't see how. I see it as a legitima
Paul Scott wrote:
> Well that may date me a little even though I am actively programming at
> this moment. I will research this a little more. My logic would be it
> would break the rules of the language to assume that conversion.
I don't see how. I see it as a legitimate compiler optimizatio
Craig Dickson wrote:
Paul Scott wrote:
I doubt if this is your problem but on most compilers:
double num;
num = 4;
is inefficient; It normally causes an integer constant 4 to be stored
somewhere. Then when num = 4; is executed the integer 4 is converted
to double every you execu
On Fri, 10 Aug 2001 [EMAIL PROTECTED] wrote:
> when i try to use the sqrt function in gcc 3.0, and the gcc that's standard
> with 2.2r3 ( i forget the version) i get errors. here's some example code:
>
> #include
> #include
>
> double num;
> double num_root;
>
> int main ()
> {
> num =
Paul Scott wrote:
> I doubt if this is your problem but on most compilers:
>
> double num;
>
> num = 4;
>
> is inefficient; It normally causes an integer constant 4 to be stored
> somewhere. Then when num = 4; is executed the integer 4 is converted
> to double every you execute the
[EMAIL PROTECTED] wrote:
> when i try to use the sqrt function in gcc 3.0, and the gcc that's standard
> with 2.2r3 ( i forget the version) i get errors. here's some example code:
>
> #include
> #include
>
> double num;
> double num_root;
>
> int main ()
> {
> num = 4;
> num_root =
[EMAIL PROTECTED] writes:
> when i try to use the sqrt function in gcc 3.0, and the gcc that's standard
> with 2.2r3 ( i forget the version) i get errors. here's some example code:
In general, you should post the exact errors when asking a question of
this sort, since it helps people find your
[EMAIL PROTECTED] wrote:
when i try to use the sqrt function in gcc 3.0, and the gcc that's standard
with 2.2r3 ( i forget the version) i get errors. here's some example code:
#include
#include
double num;
double num_root;
int main ()
{
num = 4;
num_root = sqrt(num);
return (0
22 matches
Mail list logo