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


##########
libs/libc/math/lib_scalbnl.c:
##########
@@ -0,0 +1,45 @@
+/****************************************************************************
+ * libs/libc/math/lib_scalbnl.c
+ * get a long double number of x*2^n
+ *
+ * This file is copy from musl libc
+ * musl is an implementation of the C standard library built on top of the
+ * Linux system call API, including interfaces defined in the base language
+ * standard, POSIX, and widely agreed-upon extensions.
+ * musl is lightweight, fast, simple, free, and strives to be correct in
+ * the sense of standards-conformance and safety.
+ *
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <math.h>
+#include <stdint.h>
+
+/****************************************************************************
+ * Pre-processor definitions
+ ****************************************************************************/
+
+#ifdef CONFIG_HAVE_LONG_DOUBLE
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: scalbnl
+ *
+ * Description:
+ *   get a long double number of x*2^n
+ *
+ ****************************************************************************/
+
+long double scalbnl(long double x, int n)
+{
+  return scalbn(x, n);

Review Comment:
   it's different from musl implementation



##########
libs/libc/math/Make.defs:
##########
@@ -29,6 +29,8 @@ 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 lib_scalbn.c lib_scalbnl.c

Review Comment:
   merge  to line 30



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