Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
4
Task/Integer-overflow/Tcl/integer-overflow.tcl
Normal file
4
Task/Integer-overflow/Tcl/integer-overflow.tcl
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
proc tcl::mathfunc::clamp32 {x} {
|
||||
expr {$x<0 ? -((-$x) & 0x7fffffff) : $x & 0x7fffffff}
|
||||
}
|
||||
puts [expr { clamp32(2000000000 + 2000000000) }]; # ==> 1852516352
|
||||
Loading…
Add table
Add a link
Reference in a new issue