2002-10-18 05:03:01

by omit_ECE

[permalink] [raw]
Subject: Double & Integral don't match

Hi,

In tcp_input.c, I declare a variable,
double t_owd_;
t_owd_ = rcv_tsecr - rcv_tsval;

But in this case, the right side in the equation are integrals,
which is against to the left side of double.
I tried,
t_owd_ = (double) rcv_tsecr - (double) rcv_tsval;

It didn't work. How could I do to make it?
Thank you.

YuZen


2002-10-18 05:07:23

by David McIlwraith

[permalink] [raw]
Subject: Re: Double & Integral don't match

No floating point in kernel.

- David McIlwraith
----- Original Message -----
From: "omit_ECE" <[email protected]>
To: <[email protected]>
Sent: Friday, October 18, 2002 3:10 PM
Subject: Double & Integral don't match


> Hi,
>
> In tcp_input.c, I declare a variable,
> double t_owd_;
> t_owd_ = rcv_tsecr - rcv_tsval;
>
> But in this case, the right side in the equation are integrals,
> which is against to the left side of double.
> I tried,
> t_owd_ = (double) rcv_tsecr - (double) rcv_tsval;
>
> It didn't work. How could I do to make it?
> Thank you.
>
> YuZen
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

2002-10-18 06:16:29

by David Miller

[permalink] [raw]
Subject: Re: Double & Integral don't match


You may not do floating point operations in the kernel.