TI中文支持网
TI专业的中文技术问题搜集分享网站

请问28335有没有LONG DOUBLE的运算库?

math.h中看到这里

/* Overloaded version of math functions for float and long double removed */
/* from here, and include in cmath instead (see Section 26.5 of C++ standard */
/* for details). Thus cpp_inline_math.h is now included in cmath . */

这个意味着下载cmath就可以进行long double精度的数据运算么?

请解答。

mangui zhang:供参考
CLAF2806x_Cla_typedefs.h 头文件的定义为:

#ifndef DSP28_DATA_TYPES
#define DSP28_DATA_TYPES
typedef short int16;
typedef long int32;
typedef unsigned char Uint8;
typedef unsigned short Uint16;
typedef unsigned long Uint32;
typedef float float32;
typedef long double float64;
#endif

math.h中看到这里

/* Overloaded version of math functions for float and long double removed */
/* from here, and include in cmath instead (see Section 26.5 of C++ standard */
/* for details). Thus cpp_inline_math.h is now included in cmath . */

这个意味着下载cmath就可以进行long double精度的数据运算么?

请解答。

user5917501:

回复 mangui zhang:

比如一个问题,我定义2个long double a,b;

a = 35.92615701202078;

b = sqrt(a);

28335得到的b = 5.99384355545044

而MATLAB得到的b = 5.993843258879964;

然后在sqrt函数中看到其变量格式为FLOAT。。。所以进行的并不是LONG DOUBLE运算。

math.h中看到这里

/* Overloaded version of math functions for float and long double removed */
/* from here, and include in cmath instead (see Section 26.5 of C++ standard */
/* for details). Thus cpp_inline_math.h is now included in cmath . */

这个意味着下载cmath就可以进行long double精度的数据运算么?

请解答。

Susan Yang:可以实现64位浮点运算,但其是通过定点指令的乗加运算实现的,而不是通过FPU的浮点指令实现的,运算量会比较大些。

math.h中看到这里

/* Overloaded version of math functions for float and long double removed */
/* from here, and include in cmath instead (see Section 26.5 of C++ standard */
/* for details). Thus cpp_inline_math.h is now included in cmath . */

这个意味着下载cmath就可以进行long double精度的数据运算么?

请解答。

user78960159:可以关注下目前预发布的TMS320F28388 有64位浮点运算硬核

赞(0)
未经允许不得转载:TI中文支持网 » 请问28335有没有LONG DOUBLE的运算库?
分享到: 更多 (0)