This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I was going through the "Creating an Iterative Macro" interactive lesson when I found a possible Easter egg. The result from the iterative macro (where you take the penny and iteratively multiply it by itself each day for 30 days) is $10,737,418.24
This value looks very similar to the default size value for when you create a new formula. It's off by a penny. Thought that was an odd coincidence 🙂
I don't work on Alteryx's dev team, so I can't give a definitive answer, but it looks like we are using a 32 bit number to count the number of bytes in a string. For a V_String, one character requires one byte of storage. We would expect this would put the upper limit of bytes in a string at 2**32 -1 (2 raised to the 32nd power minus 1) or 4294967295. But the actual limit is 2137483647 (= 2**31 - 1) so one byte must be used for something else. A V_Wstring requires two bytes for each character so the limit would be half of that for a V_String, actually 2**30 - 1 or 1073741823.
I think the macro you are referring to doubles the value each day. So if you start before the first day with 1 unit, at the end of the first day you would have 1*2 units, the end of the second 1*2*2, and so on. So the value at the end of any day is 1 * 2**(day number). At the end of day 30, that would be 2**30 or 1073741824.
So it's not an Easter egg, just part of the joy of binary math...