Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

range of the data types

Status
Not open for further replies.

arulvel

Programmer
Nov 13, 2000
1
0
0
US
set 32mod_val [expr 256%4294967296];
The above expression returns a message saying that the value is very large. Is there any ther way we can find the answer for this expression?

Thanks
 
The reason is 4294967296 is too large to be represented as a 32-bit integer. If you really need make calculations with large numbers, you may get the Mpexpr package (multiple precision arithmetic), installed in your system, then do

package require Mpexpr
set 32mod_val [mpexpr 256%4294967296]

Anyway, the answer for this simple expr is 256 :)
(the remainder of this particular division, of course)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top