xiaoxiang781216 commented on code in PR #7724: URL: https://github.com/apache/nuttx/pull/7724#discussion_r1034897966
########## libs/libc/stdlib/lib_strtof.c: ########## @@ -228,27 +294,53 @@ float strtof(FAR const char *str, FAR char **endptr) p++; } - if (negative) + if (flag_sixt == 1) { - exponent -= n; + if (negative) + { + exponent = (exponent *4) - n; Review Comment: why need modify ########## libs/libc/stdlib/lib_strtof.c: ########## @@ -228,27 +294,53 @@ float strtof(FAR const char *str, FAR char **endptr) p++; } - if (negative) + if (flag_sixt == 1) { - exponent -= n; + if (negative) + { + exponent = (exponent *4) - n; + } + else + { + exponent = (exponent *4) + n; + } } else { - exponent += n; + if (negative) + { + exponent -= n; + } + else + { + exponent += n; + } } } if (exponent < __FLT_MIN_EXP__ || exponent > __FLT_MAX_EXP__) { set_errno(ERANGE); - number = infinite; + if (exponent < __FLT_MIN_EXP__) + { + number = divzero; Review Comment: why need -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org