 |
 |
| View previous topic :: View next topic |
| Author |
Message |
miro
Joined: 15 Jan 2011 Posts: 62
|
|
Posted: Tue Mar 27, 2012 4:06 pm |
|
|
The pcwhd has float with 32bit, 48bit and 64bit precisions. Only 64bit fp may satisfy your requirements, though. A friend of mine tested the precision with the "9degree" test
"9degree" = asin(acos(atan(tan(cos(sin("9degree"))))))
and the only acceptable result was with 64bit fp. C18/C30 does it better.
For reference see http://www.rskey.org/~mwsebastian/miscprj/models.htm
PS: in case you need much higher precision and the speed is not the paramount you may consider the decNumber library http://speleotrove.com/decimal/decnumber.html
I "ported' it to stm32f100 (128k flash/8k ram) so it may fit into pic24/dspic33 parts easily. It does provide arbitrary precision math (up to 999,999,999 decimal digits, with exponents up to 9 digits) and it is precise enough, indeed .. |
|
 |
John P
Joined: 17 Sep 2003 Posts: 331
|
|
Posted: Wed Mar 28, 2012 9:14 am |
|
|
It occurred to me that someone might make an add-on floating point unit that could do the calculation off-chip, to use with small processors, and if they were smart they'd make the interface easy to use. So I searched on <floating point math spi> and found this:
http://www.sparkfun.com/products/8129
20 bucks doesn't seem like a bad price.
Wait, I see that they've come out with a 64-bit chip for $25:
http://www.micromegacorp.com/umfpu64.html |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|