dpb
Posts:
6,847
Registered:
6/7/07
|
|
Re: How to avoid wrong answers in simple arithmetic expressions.
Posted:
Jan 19, 2013 8:53 AM
|
|
On 1/19/2013 1:04 AM, SK wrote: ...
> But, due to rounding error, this gives a wrong answer for example for a > = 135.01. > The problem does not go away even if I replace the last line by a = > rem(a, v(i)). > How does one avoid such issues in general?
Scaling and/or fixed point are common techniques...
--
|
|