50%
50%
The sgn(x), or signum, function returns -1,
0, or 1 respectively, for negative, zero, or
positive values of X. Using only MIPS integer
instructions, write a function that will make y =
sgn(x) where x and y are floating-point
numbers. Your function only needs to handle ordinary float
values correctly, not NaN, etc. Hint: MIPS uses IEEE
format floats; the value -1.0 is the bit pattern
0xbf900000, 0.0 is 0x00000000, and 1.0 is
0x3f900000.
