cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ninoLiu
Observer
Observer
211 Views
Registered: ‎07-23-2020

定点数计算log和exp

计算公式如下:
Voc=Voc*((1-c*DT)*hls::log10(exp(1)+b*DS));

所有变量类型均为ap_fixed<58,18>

会出现如下错误提示:

Invalid arguments '
Candidates are:
unsigned int log10(unsigned int)
short int log10(short int)
double log10(double)
signed char log10(signed char)
unsigned short int log10(unsigned short int)
float log10(float)
int log10(int)
unsigned char log10(unsigned char)
half log10(half)
ap_int<int3 #0 0> log10(ap_int<int3 #0 0>)
ap_uint<int3 #0 0> log10(ap_uint<int3 #0 0>)
ap_fixed<int3 #0 0,int3 #1 0,enum ap_q_mode5,enum ap_o_mode3,int0> log10(ap_fixed<int3 #0 0,int3 #1 0,enum ap_q_mode5,enum ap_o_mode3,int0>)
ap_ufixed<int3 #0 0,int3 #1 0,enum ap_q_mode5,enum ap_o_mode3,int0> log10(ap_ufixed<int3 #0 0,int3 #1 0,enum ap_q_mode5,enum ap_o_mode3,int0>)
'

 

请问如何正确使用log和exp函数?

0 Kudos
0 Replies