Hey all, I am in need of a little bit of math advice. I have a need to take a really big number (10+ digits) and to get specific digits out of it. From a separate site, I saw this :
a=1298
first2 = floor(a/100)
second2 = rem(a, 100)
in an example for trying to get the digits of the number 1298. But I'm not sure how this translates into getting, lets say, numbers 456 out of a larger number of 123456789. Unfortunately, I don't see a rem function, though I do see we have a floor function. Anyone have any idea how this translates to Designer?
Replies
To get 456 in 123456789 you would need to compute :
456 = (123456789 / 1000) % 1000
and more generally, in base 10, to get a sequence x of n figures starting with the kth figure within a number y, you would need to do :
x = (y / (10^(k-1))) % (10^n)