contributed by < KAILIAO>
Full source code here
Quiz 1_C
I chose problem C from Quiz 1 and translated it from C code into a complete RISC-V assembly program. The implementation includes the fabsf function and the fp16_to_fp32 function, which converts a 16-bit floating-point number in IEEE half-precision format (bit representation) to a 32-bit floating-point number in IEEE single-precision format (bit representation). This implementation avoids using any floating-point arithmetic and utilizes the clz function
Fabsf function
C code
#include <stdio.h>
#include <stdint.h>