[patch] SPU cbrt and cbrtf
Ken Werner
ken@linux.vnet.ibm.com
Mon Jun 9 09:22:00 GMT 2008
Hi,
this patch adds a missing declaration for the SPU implementation of cbrt and
cbrtf. Ok to apply?
Ken
newlib/ChangeLog:
2008-06-06 Ken Werner <ken.werner@de.ibm.com>
* libm/machine/spu/headers/cbrt.h: cbrt_factors[] declared.
* libm/machine/spu/headers/cbrtf.h: Likewise.
Index: src/newlib/libm/machine/spu/headers/cbrt.h
===================================================================
--- src.orig/newlib/libm/machine/spu/headers/cbrt.h
+++ src/newlib/libm/machine/spu/headers/cbrt.h
@@ -37,7 +37,13 @@
#include <spu_intrinsics.h>
#include "headers/vec_literal.h"
-extern double cbrt_factors[5];
+static double cbrt_factors[5] = {
+ 0.629960524947436484311, /* 2^(-2/3) */
+ 0.793700525984099680699, /* 2^(-1/3) */
+ 1.0, /* 2^(0) */
+ 1.259921049894873164666, /* 2^(1/3) */
+ 1.587401051968199583441 /* 2^(2/3) */
+};
/* Compute the cube root of x to double precision.
*/
Index: src/newlib/libm/machine/spu/headers/cbrtf.h
===================================================================
--- src.orig/newlib/libm/machine/spu/headers/cbrtf.h
+++ src/newlib/libm/machine/spu/headers/cbrtf.h
@@ -36,7 +36,13 @@
#include <spu_intrinsics.h>
#include "headers/vec_literal.h"
-extern double cbrt_factors[5];
+static double cbrt_factors[5] = {
+ 0.629960524947436484311, /* 2^(-2/3) */
+ 0.793700525984099680699, /* 2^(-1/3) */
+ 1.0, /* 2^(0) */
+ 1.259921049894873164666, /* 2^(1/3) */
+ 1.587401051968199583441 /* 2^(2/3) */
+};
/* Compute the cube root of the floating point input x.
*/
More information about the Newlib
mailing list