a = 0xfff10100(32 bit)-negative b = 0x90001234(32 bit) - negative
x = 0x1234(16 bit)
The basic expression is (a*x)+b
a*x*2 result is fffeef063400 - but only the upper
32 bit result is used
so fffeef06 + 90001234 = ffff8ffdf040
result + b
I do this like this
set prod[expr {((1 << 1) * double($a) * double($a))}]
set prod1 [expr {floor ($prod/(1 << 16))}]
set sum [expr {double($prod1) + double($b)}]
My question is:
Is there a way to represent the result $sum like this
ffff8ffdf040
whenever I try to use format to convert $sum to HEX it says integer too large to represent...
any tips on how to do this...
thanks
x = 0x1234(16 bit)
The basic expression is (a*x)+b
a*x*2 result is fffeef063400 - but only the upper
32 bit result is used
so fffeef06 + 90001234 = ffff8ffdf040
result + b
I do this like this
set prod[expr {((1 << 1) * double($a) * double($a))}]
set prod1 [expr {floor ($prod/(1 << 16))}]
set sum [expr {double($prod1) + double($b)}]
My question is:
Is there a way to represent the result $sum like this
ffff8ffdf040
whenever I try to use format to convert $sum to HEX it says integer too large to represent...
any tips on how to do this...
thanks