This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] SPU cbrt and cbrtf


Sorry, I missed this one. Patch applied.

-- Jeff J.

Ken Werner wrote:
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.
*/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]