What does NOT work:
Count=5000*8*analogRead(A0);
Yes, from avr-libc documentation: "float and double are 32 bits (this is the only supported floating point format)"I realize that there could be a big performance penalty using doubles if they were possible, but is it true that the compiler makes type double the same as type float, which means only 32 bit floats are possible and not 64 bit doubles as in 'regular' C ?
Hi misterT,
Oh yes very interesting. I really wanted to use the Atmega chips however, too bad for me i guess. I dont know if i want to get involve with Arm processors yet. Maybe i'll have to look into them a little more anyway though.
For most of my stuff i'll probably end up using pseudo floating point anyway using integers, but it would be nice if they allowed doubles natively.
A friend wanted to create a voltmeter with built in calculator, with a decent calculator numerical precision.
Looks nice although it will be hard to make another board with the ARM chip because of the small pins.
This sounds interesting. Are you talking about fixed point math which is quite common, or do you actually have more elaborate thing? For example, do you allow the decimal point move around and you just keep track of it for every variable?...I had to build my own pseudo floating point software using integer math..
I hope you realise if you need proper floating point math, you can get a bolt on FPU quite cheap... SPI or I2C..
https://www.sparkfun.com/products/8450
I have never used one.
That is interesting. It just sounds that with the same effort you could have implemented standard IEEE floating point in softwareI have always intended to write a "fixed point" library where the decimal point is not actually fixed in a constant place, but its place is stored with the variable itself.. something like:
struct fp{
int32_t value;
uint8_t n;
}
Where n is the number of fractional bits.. The only reason I have not written the library is that I have no use for it.. haha
But, I think it could be a good compromise between software (ieee) floats and traditional fixed point. Well, I think there are systems that use that solution, it is not a new thing.
I hope you realise if you need proper floating point math, you can get a bolt on FPU quite cheap... SPI or I2C..
https://www.sparkfun.com/products/8450
I have never used one ( I think microchip does one aswell ) The aforementioned chip has an arduino library...
Just for reference.....
So you can see that i had to build my own pseudo floating point software using integer math in order to get past this ridiculous float bottleneck problem with AMD cheating on the cores.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?