Question: Use C language /* * floatFloat2Short - Return bit-level equivalent of expression (short) f * for floating point argument f. * Argument is passed as
Use C language
/* * floatFloat2Short - Return bit-level equivalent of expression (short) f * for floating point argument f. * Argument is passed as unsigned int, but * it is to be interpreted as the bit-level representation of a * single-precision floating point value. * Anything out of range (including NaN and infinity) should return 0. * Legal ops: Any integer/unsigned operations incl. ||, &&. also if, while * Max ops: 30 * Rating: 4 */ int floatFloat2Short(unsigned uf) { return 2; }
You are expressly forbidden to: 1. Define or use any macros. 2. Define any additional functions in this file. 3. Call any functions. 4. Use any form of casting. 5. Use any data type other than int or unsigned. This means that you cannot use arrays, structs, or unions. 6. Use any floating point data types, operations, or constants.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
