how to use mod in variable that have big value
2 views (last 30 days)
Show older comments
hi all, i have little problem here
how to use mod in variable that have big value??
ex:
u= 1.3447e+236 v= 345
then why when i use mod it's return zero??
mod(u,v)
am i make a mistake in my code??
0 Comments
Accepted Answer
Sean de Wolski
on 21 Jun 2011
No. You've hit the limits of double precision floating point arithmetic. You would want vpi, which is no longer available, or it might be possible with the symbolic math toolbox.
3 Comments
Sean de Wolski
on 21 Jun 2011
No. It means working in double precision floating point will not get you a valid answer. You'll need to work with a class of operators that is not double precision floating point. The fixed-point toolbox (I've never used it) does that; the symbolic math toolbox does that, and John's vpi which is no longer available does that.
More Answers (0)
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!