Solving Fizz Buzz with Cosines

https://susam.net/fizz-buzz-with-cosines.html

44 points · 4 comments · view on lemmy.world

4 Comments

vivalapivo@lemmy.today · 9 pts · 262d

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

ZILtoid1991@lemmy.world · 7 pts · 262d

Still better than Enterprise Fizz Buzz

FizzyOrange@programming.dev · -4 pts · 262d (1 reply)

This is silly, and not in an interesting way.

palordrolap@fedia.io · 7 pts · 262d

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.