Forum Discussion

abaxor's avatar
abaxor
Icon for New Contributor rankNew Contributor
3 years ago

How to convert an ihc::hls_float <8, 23> s_tanf to an ac_int or ac_fixed?

Hi,

I have to calculate an arctan on a CycloneV. Since HLS/ac_fixed_math.h does not include atan I use HLS/hls_float_math.h. Just now I run in trouble to convert the

ihc::hls_float <8, 23> s_tanf

variable to an

ac_int <16, false> s_tan = 0;

or better

ac_fixed <24, 8, true> s_tan = 0;

I found casting methods in hls_float.h but don't understand them.

Can you give me any hint on how to convert it?

Thanks

5 Replies