Possible Easter Egg?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
It's interesting but likely a coincidence. The max length for a field is typically 1GB, which is 1073741823 bytes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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...
