Has anyone any idea where I can get a double precision maths library which will work with the Keil C51 compiler.
I'd always assumed fp meant 'Floating Point' and nothing else!
how lovely achieved in fp is that "fixed point" or "floating point" ambigous abbreviations hurt when you sit down. erik
Unfortunately, we need a range which includes numbers from 0.0005--- to 16,000,000^3 both positive and negative. We have looked into using 64bit integers but this requires an aweful lot of extra scaling which we feel would be easier to achieved in fp.
"We have found whilst doing a project that we need to do some calculations which require greater than 11 digits of accuracy." Now, how about the range requirements? If you don't need the range that having an exponent gives you, then a using 64-bit fixed-point format might do the trick.
We have found whilst doing a project that we need to do some calculations which require greater than 11 digits of accuracy. The normal float only supplies 7/8! We have done the calculations in Visual C++ but the only way to get them to work properly was to use double types. When the code is transported to C51 the inaccuracies are too great.
"I believe the C51 compiler will only accept float (32bit)types and will not recognise the double & long double(64bit) types." That's the C51 implementation itself - but you were asking about an add-on library. What exactly do you want of this library to constitute "working" with C51?
I believe the C51 compiler will only accept float (32bit)types and will not recognise the double & long double(64bit) types.
I s'pose it depends on what exactly you mean by, "will work with the Keil C51 compiler." ... ??
If it is 64-bit floating point you are looking for, I don't think that you will find it. It is possible to do 64-bit fixed point arithmetic, but you already know about that: http://www.keil.com/forum/docs/thread7167.asp
View all questions in Keil forum