On 3/12/20 7:58 AM, LIU Zhiwei wrote: > +static uint8_t float16_eq_quiet(uint16_t a, uint16_t b, float_status *s) > +{ > + int compare = float16_compare_quiet(a, b, s); > + if (compare == float_relation_equal) { > + return 1; > + } else { > + return 0; > + } > +}
You really need remember that boolean results in C are 1 and 0. You do not need to keep translating true to 1 and false to 0. > +static uint8_t vmfne16(uint16_t a, uint16_t b, float_status *s) > +{ > + int compare = float16_compare_quiet(a, b, s); > + if (compare != float_relation_equal && > + compare != float_relation_unordered) { Indentation. > +static uint8_t float16_le(uint16_t a, uint16_t b, float_status *s) > +{ > + int compare = float16_compare(a, b, s); > + if (compare == float_relation_less || > + compare == float_relation_equal) { > + return 1; Indentation. r~