Thread with 5 posts
jump to expanded post
I have noticed a worrying trend in computer science where topics that are have surprising, non-intuitive properties are now taught as “oh, treat this as a magic black box, you will never understand it”. I hate this as people then “teach” by discouraging exploration in the space
For example, it is now commonly explained to engineers that floating point math does not behave like real-valued arithmetic. This is surprising for most new programmers and this a good topic to introduce. But it’s not done well! We say “here be dragons” but never explain *where*
The result is that I’m reading a Stack Overflow question right now (“why does sin produce different results on different computers”) and a lot of well-meaning people have responses that boil down to “you can’t really expect anything from floating point numbers”.
@saagar i recall that someone made a math library that actually gives consistent results for transcendentals on different computers for at least fp32, and does so efficiently, but don't recall the name/author
@saagar oh it's probably this thing, i should've checked the other replies https://discuss.systems/@steve/112056419368964724