xiaoxiang781216 commented on code in PR #7850:
URL: https://github.com/apache/nuttx/pull/7850#discussion_r1045716329


##########
libs/libc/math/lib_scalbnf.c:
##########
@@ -0,0 +1,76 @@
+/****************************************************************************
+ * libs/libc/math/lib_scalbnf.c
+ * get a double number of x*2^n
+ *
+ * This file is a part of NuttX:
+ *
+ *   Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ *   Ported by: Darcy Gong
+ *
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <math.h>
+#include <stdint.h>
+
+#define FLT_MIN 0x1p-126f

Review Comment:
   add preprocess section 



##########
libs/libc/math/Make.defs:
##########
@@ -28,7 +28,7 @@ CSRCS += lib_ldexpf.c lib_logf.c lib_log10f.c lib_log2f.c 
lib_modff.c
 CSRCS += lib_powf.c lib_sinf.c lib_sinhf.c lib_sqrtf.c lib_tanf.c
 CSRCS += lib_tanhf.c lib_asinhf.c lib_acoshf.c lib_atanhf.c lib_erff.c
 CSRCS += lib_copysignf.c
-
+CSRCS += lib_scalbnf.c

Review Comment:
   merge to previous line



##########
libs/libc/math/lib_scalbnf.c:
##########
@@ -0,0 +1,76 @@
+/****************************************************************************
+ * libs/libc/math/lib_scalbnf.c
+ * get a double number of x*2^n
+ *
+ * This file is a part of NuttX:

Review Comment:
   correct the copyright



##########
libs/libc/math/lib_scalbnf.c:
##########
@@ -0,0 +1,76 @@
+/****************************************************************************
+ * libs/libc/math/lib_scalbnf.c
+ * get a double number of x*2^n
+ *
+ * This file is a part of NuttX:
+ *
+ *   Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ *   Ported by: Darcy Gong
+ *
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <math.h>
+#include <stdint.h>
+
+#define FLT_MIN 0x1p-126f
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: scalbnf
+ *
+ * Description:
+ *   get a float number of x*2^n
+ *
+ ****************************************************************************/
+
+float scalbnf(float x, int n)

Review Comment:
   what about scalbn/scalbnl



-- 
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

Reply via email to