Hi,
I'm programming a routine on my Concerto MCU to try to compensate for the lack of standard C libraries on the TI implementation on their product, but I'm stumbling across a truncation issue.
long double value = 2.0; int64_t integer_part = (int64_t) value; // on here integer_part equals 1 long double fraction_part = value - integer_part; // here fraction_part equals 0.99999996
I also tried using the truncl(long double) from math.h and not putting the type cast and the error still persists.
So I ask, how do I make this truncation work properly?