Part Number: TMS320F28023
Tool/software: TI C/C++ Compiler
Win7 32bit (SP1), CCS 6.2.0.00050, F28023.
I have been attempting to make a coefficient generator using double precision floating point (64bit) math.
I finally figured out you need to define each variable as a long double as simply using double is the same as float (32bit)
I also see I must post-pend the letter L to any constants to make the compiler treat them as a long double (example, 10.0L)
However, the functions like sin(double_variable), cos(double_variable) and pow(10.0L, double_variable) still seem to be doing this in 32bit float size.
It seems that for the following, the C compiler converts the numbers to floats, does the sin, then converts it back to long double.
long double d_sine_omega; long double d_omega; ... some assignment of d_omega... d_sine_omega = sin(d_omega);
resulting assembly code
3f092c: 5CAD MOVZ AR4, @SP 3f092d: DC92 SUBB XAR4, #18 3f092e: 5CA4 MOVZ AR4, @AR4 3f092f: 767F2FB4 LCR FD$$TOFS 3f0931: 767F2C07 LCR sin 3f0933: 5CAD MOVZ AR4, @SP 3f0934: DC98 SUBB XAR4, #24 3f0935: 88A4 MOVZ AR6, @AR4 3f0936: 767F306D LCR FS$$TOFD
Are there long double functions to these?
Thanks, Mark.