MATLAB Answers

how to use mod in variable that have big value

9 views (last 30 days)
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??

Accepted Answer

Sean de Wolski
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
Sean de Wolski on 21 Jun 2011
Fixed point doesn't appear to have mod or rem.

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!