Issues with Float/Double data type Precision

General discussion on mikroBasic PRO for ARM.
Post Reply
Author
Message
shahzaibsd
Posts: 4
Joined: 22 Jun 2021 19:14

Issues with Float/Double data type Precision

#1 Post by shahzaibsd » 04 Oct 2021 15:33

Dear MikroE Team
I have been playing around with Float/Double Data type and I didn't get the precise results. The result I get in watch window (using hardware debugging) shows the value 1.029000E+004 (i.e. 10290.00), while the exact precise result is 10290.001306. Then I simply added two values 10290 and .001306 to verify my results, but again I got the same result (i.e. 10290.00). I tried float/double and extended data type but couldn't get the results I wanted. What should I do now, as my required precision is up to six decimal places. Thanks in anticipation.

Development Board: Easy Mx Pro V7 for Stm32 ARM
MCU: STM32F107VC
Compiler: MikroBasic Pro for ARM V4.2.0

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Issues with Float/Double data type Precision

#2 Post by filip » 07 Oct 2021 16:09

Hi,

Can you please attach minimal project that demonstrates this issue ?

Regards,
Filip.

Post Reply

Return to “mikroBasic PRO for ARM General”