Solving Fizz Buzz with Cosines
(susam.net)
from maxint@programming.dev to programming@programming.dev on 21 Nov 08:02
https://programming.dev/post/41098526
from maxint@programming.dev to programming@programming.dev on 21 Nov 08:02
https://programming.dev/post/41098526
#programming
threaded - newest
I feel like we could make it weirder using the fact that fizzbuzz is a concatenation of fizz and buzz.
Still better than Enterprise Fizz Buzz
This is silly, and not in an interesting way.
There's an argument to be made that a continuous function is better than a piecewise function when coming at things mathematically, so in that sense it's at least somewhat interesting.
Sure, in computer science where discrete mathematics is king and the modulus operator is ubiquitous, a cosine representation is entirely unnecessary, but from a recreational mathematical angle, it's a fun distraction.
And it's not like cosine interpolations are useless in a broader sense. They've contributed much to computer graphics.