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

#programming

threaded - newest

vivalapivo@lemmy.today on 21 Nov 08:49 next collapse

I feel like we could make it weirder using the fact that fizzbuzz is a concatenation of fizz and buzz.

ZILtoid1991@lemmy.world on 21 Nov 09:08 next collapse

Still better than Enterprise Fizz Buzz

FizzyOrange@programming.dev on 21 Nov 18:35 collapse

This is silly, and not in an interesting way.

palordrolap@fedia.io on 21 Nov 19:29 collapse

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.