Altera_Forum
Honored Contributor
21 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) { float c = ALT_CI_IEEE_FPADD(a,http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/cool.gif ; printf("Answer = %f", c); return 0; } I get 0x40490fda returned by my CI, but c is printed as 1078530010 (that number!) how do I cast it as a float so I get 3.1415926 back? Regards, Steve.