multiplication problem

mikroC, mikroBasic and mikroPascal PRO for Microchip’s 8-bit PIC MCUs.
Post Reply
Author
Message
ubuntuman
Posts: 3
Joined: 15 Nov 2017 00:17

multiplication problem

#1 Post by ubuntuman » 13 Feb 2019 14:21

Hi guys
i use mikro C for PIC program to write my codes
i found that multiplying three variables so the total value exceed the int capacity the result is wrong but when i divide the multiplication process to two variables by two variables in the same time the result is right
so is there a reason for that weird thing ?!!

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

Re: multiplication problem

#2 Post by filip » 14 Feb 2019 12:00

Hi,

Which compiler version are you using ?
Could you please attach here the minimal project that represents this issue ?

Regards,
Filip.

Post Reply

Return to “PIC PRO Compilers”