integer value is too large to represent

For posts concerning the documentation, errors, ommissions, general comments, etc.

Moderators: silvia, selimgunay, Moderators

Post Reply
luohuande
Posts: 2
Joined: Tue Dec 09, 2014 1:08 am
Location: Institute Of Engineering Mechanics,China Earthquake Administration

integer value is too large to represent

Post by luohuande » Sat Jun 06, 2015 3:21 am

Hi ! dear friends, i am a new user using the Opensees. please forgive me if i have something wrong to present.
I have built a RC 2Dframe with three storys and three bays for a reversed cyclic pushover analysis. the gravity analysis is ok,but when i run the pushover using source command,the screen came out the "integer value is too large to represent while executing "expr int(abs($Dmax)/$Dincr)" ". i checked the scripts and modified one of them, i am not sure whether the Dincr is too small or the Dmax is too large not. My Dmax is "5 -5 8 -8 26 -25 25 -25 33 -34 34 -33 52 -50 49 -49 67 -67 67 -67 84 -86 84 -87 102 -101 151 -98 139 -138 139 -139 164 -164 165 -164 190 -192 190 -192 169"mm and Dincr is 0.004mm.
I am very appreciate if you can help me solve the problem. Thank you in advance.

fmk
Site Admin
Posts: 5883
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: integer value is too large to represent

Post by fmk » Wed Jun 10, 2015 3:33 pm

following works fine for me:

et Dmax {5 -5 8 -8 26 -25 25 -25 33 -34 34 -33 52 -50 49 -49 67 -67 67 -67 84 -86 84 -87 102 -101 151 -98 139 -138 139 -139 164 -164 1\
65 -164 190 -192 190 -192 169}
set Dincr 0.004

for {set i 0} {$i < [llength $Dmax]} {incr i 1} {
set val [lindex $Dmax $i]
set res [expr int(abs($val)/$Dincr)]
puts "$res $i"
}

luohuande
Posts: 2
Joined: Tue Dec 09, 2014 1:08 am
Location: Institute Of Engineering Mechanics,China Earthquake Administration

Re: integer value is too large to represent

Post by luohuande » Mon Jun 15, 2015 3:07 am

Dear fmk,
I have solved the problem with other method. Yours is also a better way.Thank you for your answer.

Huan Luo

Post Reply