I'm working in an ARM (ARM9) system which does not have Floating point
co-processor or Floating point libraries. But it does support long long int
(64 bits).
Can you provide some link that would discuss about ways to emulate floating
point calculations with just long int or long long int. For eg., if i've a
formula X=(1-b)*Y + b*Z in floating point domain, i can calculate X with
just long ints (but, some data may be lost in final division; That's OK)
Floating Point:
X=(1-b)*Y + b*Z
/* 'b' is a floating point variable with 4 points precision and 'b' is in
the range of 0 to 1;X, Y and Z are unsigned int*/
With long int:
I can emulate the above calculation as:
X=((10000-10000*b)*Y +10000*b*Z)/10000
I'm in need of some link that would discuss this and any similar approach.
--
-Vinoth
co-processor or Floating point libraries. But it does support long long int
(64 bits).
Can you provide some link that would discuss about ways to emulate floating
point calculations with just long int or long long int. For eg., if i've a
formula X=(1-b)*Y + b*Z in floating point domain, i can calculate X with
just long ints (but, some data may be lost in final division; That's OK)
Floating Point:
X=(1-b)*Y + b*Z
/* 'b' is a floating point variable with 4 points precision and 'b' is in
the range of 0 to 1;X, Y and Z are unsigned int*/
With long int:
I can emulate the above calculation as:
X=((10000-10000*b)*Y +10000*b*Z)/10000
I'm in need of some link that would discuss this and any similar approach.
--
-Vinoth
Comment