Forum Discussion
Altera_Forum
Honored Contributor
22 years agoLong to Float
Hi, I have a custom instruction which returns a float, but NIOS seems to grab this and treat it like a long, converted to float (if that makes sense) # include "system.h" int main (void)...
Altera_Forum
Honored Contributor
22 years agoHow about this:
unsigned int ui = ALT_CI_IEEE_FPADD(a, http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/cool.gif ; float f = *((float*)&ui); Seems like an ugly hack to me but it works! Maybe there is a better way.