05-31-2018, 08:26 PM
Hello,
So I'm running into a pretty wierd issue with doing basic math. My program has a section where it takes a variable and adds 0.1 and the results don't add up correctly. For example 2.0 + 0.1 will come out as 2.099999 when it's pretty well known it should be 2.1. Any suggestions or solutions? I am using mB Pro 5.40 with a PIC18F45K22 and 46K22.
Please help.
Thanks
So I'm running into a pretty wierd issue with doing basic math. My program has a section where it takes a variable and adds 0.1 and the results don't add up correctly. For example 2.0 + 0.1 will come out as 2.099999 when it's pretty well known it should be 2.1. Any suggestions or solutions? I am using mB Pro 5.40 with a PIC18F45K22 and 46K22.
Please help.
Thanks