Page 1 of 1

FIX and FLOAT instructions

PostPosted: Tue Jul 16, 2013 3:14 am
by Gravis
the "Operation" section for the FIX and FLOAT instructions say "RD = fix(RN)" and "RD = float(RN)".

can fix() or float() possibly return a result that is not conformant to IEEE-754 single-precision format?

it would be really nice if there were the full algorithms somewhere in the document.

Re: FIX and FLOAT instructions

PostPosted: Tue Jul 16, 2013 11:21 pm
by aolofsson
The 'e-run' single core simulator within the epiphany-sourceware tree has the bit exact simulator for the Epiphany instruction set.

Andreas

Re: FIX and FLOAT instructions

PostPosted: Wed Jul 17, 2013 2:42 pm
by Gravis
yeah, i checked out the simulator and it relies on the compiler to convert the type so it's definitely IEEE-754 single-precision format compliant. i would use the compiler too but it may prove problematic on a GPU that uses gigantic floats. not a problem though because i can read the spec or just copy code from a standards compliant soft float library.