floating point operations

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

floating point operations

1,565件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rahulvasist on Sat Aug 13 22:25:12 MST 2011
Hello everyone,
    I've a few doubts about floating point operations in LPC1769
1. Does floating point operations have hardware support?
2. How are floating point numbers represented in memory?
3. How fast are floating point operations in terms of clock cycles?
0 件の賞賛
返信
5 返答(返信)

1,430件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rahulvasist on Mon Aug 15 06:22:40 MST 2011
Thanks
0 件の賞賛
返信

1,430件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Sun Aug 14 23:12:18 MST 2011
Floating point number are stored according to the IEEE 754 standard.
Psc.edu has a nice article (link) with a very short description of the format.
A more elaborate article can be found on wikipedia (link).

If, for some reason, you need to look at the binary representation, there is a nice java applet available (link).

As already noted by others; floating point is all done in software and thus slow.
Whenever possible have a look at fixed point solutions using integer arithmetic instead.

Rob
0 件の賞賛
返信

1,430件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Sun Aug 14 07:47:53 MST 2011
1. A float take 4 bytes, and a double takes 8 bytes. This is standard across just about any processor.
2. Search the forum... http://knowledgebase.nxp.com/showthread.php?t=2040
0 件の賞賛
返信

1,430件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rahulvasist on Sun Aug 14 05:36:30 MST 2011
thanks for replying.
1.About the memory storage, can u tell me the exact number of bytes a floating point number occupies?
2.How to check the number of clock cycles it takes to execute and instruction in lpcxpresso?
0 件の賞賛
返信

1,430件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Sun Aug 14 00:07:27 MST 2011
1. No. Cortex-m3 does not support hardware floating point.
2. As real floating point numbers
3. They are calculated in software and so are quite slow
0 件の賞賛
返信