General Discussions

Discuss a wide range of topics! Questions about the Alteryx Platform should be directed to the appropriate Product discussion forum.

Possible Easter Egg?

jmwagner
6 - Meteoroid

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 🙂

 

penny.PNG

jmwagner_2-1620841479030.png

 

3 REPLIES 3
TheOC
12 - Quasar

oo Interesting!

it really wouldn't surprised me, especially after finding a couple of these:
https://community.alteryx.com/t5/Inspire-2018-Buzz/So-You-Think-You-Can-Find-the-Easter-Eggs/td-p/16... 

Luke_C
13 - Pulsar

It's interesting but likely a coincidence. The max length for a field is typically 1GB, which is 1073741823 bytes. 

 

 

 

Luke_C_0-1620860233027.png

 

 

TonyA
Alteryx
Alteryx

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...