Skip to main content

Timeline for Float/Integer overload?

Current License: CC BY-SA 4.0

11 events
when toggle format what by license comment
Jul 8 at 17:11 history edited Markus von Broady CC BY-SA 4.0
added 235 characters in body
Jun 6, 2023 at 10:28 comment added OroNZ Indeed :) After your input, I started down the path of "OK, so, what would be the most efficient node clock I could make that required the least number of calculations?" :) But... I just need something that works for a 5 minute animation. I avoided weeks and months for the same reason I avoided years - months are uneven, weeks don't divide evenly into a solar year at the 'second' level, and years leaping every 4th and 100th... I don't care how cool the node tree looks, The Gregorian Calendar is uuuuuug-LY.
Jun 6, 2023 at 10:18 comment added Markus von Broady @OroNZ I think it might be an interesting question in and of itself how to code a clock with (YM)DHMS offsets.
Jun 6, 2023 at 9:37 comment added OroNZ Thanks again, Markus :) I've modified my clock. hh:mm:ss are still worked out the same way, but days are no longer converted into secs - a Compare-Switch pair increments days if hours goes over 23.
Jun 6, 2023 at 8:36 comment added Markus von Broady Eventually the ranges will spread there's more buckets to share a range than the numbers in that range, and at that point only every 2nd bucket gets a single number (and then only every 4th bucket etc.)
Jun 6, 2023 at 8:28 history edited Markus von Broady CC BY-SA 4.0
added 699 characters in body
Jun 6, 2023 at 7:53 comment added Markus von Broady @OroNZ both integer and float use 32 bits of memory. It would be silly if a float could express all possible integers, and then on top of that some non-integers :D If you draw a histogram with the bucket width of 1, the line describing how many numbers can be stored for an integer will be a horizontal line from -2147483648 to +2147483647. If you draw a float, it will by a logarithmic distribution, with a very high peak of [0..1) buckets of height $(2^7-1)×2^{23}+1$, then in range [1..2) the height will be $2^{23}$, two buckets in [2..4) will share $2^{23}$, so ${2^{23}\over2}=2^{22}$ each etc.
Jun 5, 2023 at 23:15 comment added OroNZ A more careful read of your explanation raises another question around Modulo arithmetic. How does connecting an int to a float input 'lose precision'? I can see that practice gaining decimal precision for the operation, but not losing its pre-decimal magnitude. Is precision loss always the case, or are you talking about the magnitude of the int and float number spaces?
Jun 5, 2023 at 11:37 comment added OroNZ I was hoping it wasn't going to be a binary space problem :( I could avoid big numbers completely and turn my nice, easy-to-read Math nodes into a bunch of complicated Compare/Switch node conditionals, to cater for the 60s/60m/24h/365d rollovers to zero. That's not fun. But thanks, Markus :)
Jun 5, 2023 at 11:30 vote accept OroNZ
Jun 5, 2023 at 11:27 history answered Markus von Broady CC BY-SA 4.0