-
Divide 64bit number
Hi,
I want to divide a 64 bit value. I have a struct as following:
Code:
struct T
{
uint32_t high32;
uint32_t low32;
};
And in for example in my main:
Code:
main()
{
struct T value;
...
get a value for T
...
HERE I WANT to divide the value by say for ex. 1000.
}
Is there anyway fast/ simple algorithm to do it? I don't want to loop with while and determine the division.
Thanks,
Inderjit
-
-
-
How aboute:
Code:
union T
{
struct {
uint32_t high32;
uint32_t low32;
};
long long ll;
};
T t;
...
t.ll /= 1000;
...
[/code]
--
Mats
-
Thanks, it works!
Inderjit