News for hackers. Stuff that matters.
Re:Do Developers Understand IEEE Floating Point? [pdf] by kbumsik on Friday December 28, 2018 @03:20AM (#18775499)
Although understanding floating point is important, it is often ignored in Data Science schools.

The title reminds me a friend of mine who attends a data science master course without computer background. He asked me for help for his numpy homework on Bayesian Probability theory. The number he got was so small that he got weird result. I immedieatly thought it was because float64 couldn't cover that number so I told him to use longdouble dtype (it's 80 bits in Intel I think) and the problem solved.

Later he told me even the professor didn't expect such case when announcing the homework and many students couldn't finish the hw on time because of this.

Re:Do Developers Understand IEEE Floating Point? [pdf] by mehrdadn on Friday December 28, 2018 @06:08AM (#18776123)
Would the log-sum-exp trick have helped by any chance? https://en.wikipedia.org/wiki/LogSumExp
Re:Do Developers Understand IEEE Floating Point? [pdf] by kbumsik on Friday December 28, 2018 @06:38AM (#18776210)
I didn't know this (I'm not in ML/Data Science) but that looks very helpful. I looked through his learning materials but I have never seen this one though.
Re:Do Developers Understand IEEE Floating Point? [pdf] by mehrdadn on Friday December 28, 2018 @07:19AM (#18776346)
Yeah I only happened to know because of ancourse I took that taught some ML. I mentioned it because, later on, I even came across a situation where it would've been directly applicable, but for some reason the thought that it might solve the problem escaped me at that moment, so I asked and someone else had to remind me of that fact... so I feel it's probably not the easiest thing to recognize when it's happening.
Re:Do Developers Understand IEEE Floating Point? [pdf] by Veedrac on Friday December 28, 2018 @06:54PM (#18780473)
> I immedieatly thought it was because float64 couldn't cover that number so I told him to use longdouble dtype (it's 80 bits in Intel I think) and the problem solved.

This is a very dangerous habit. If 64 bits isn't enough you are generally using the wrong representation.

Re:Do Developers Understand IEEE Floating Point? [pdf] by de_watcher on Friday December 28, 2018 @03:41AM (#18775590)
That's a difficulty that exists for the simulations, optimization problems and various algorithms. Some need so many bits that they don't work at all.
Re:Do Developers Understand IEEE Floating Point? [pdf] by gronne on Friday December 28, 2018 @04:58AM (#18775897)
No such thing as “Data science” - just a fancy term for trade school computer skills. Thats why.
Re:Do Developers Understand IEEE Floating Point? [pdf] by wolfgke on Friday December 28, 2018 @10:47AM (#18777369)
> No such thing as “Data science” - just a fancy term for trade school computer skills. Thats why.

Relevant xkcd: https://xkcd.com/435/

Or as my friend put it: everything is just a trivial special case of either mathematics or physics. ;-)

Re:Do Developers Understand IEEE Floating Point? [pdf] by gronne on Friday December 28, 2018 @01:39PM (#18778557)
True :) I know the strip. tbh I just felt like trolling the insecure “data hackers” crowd. Looking at downvotes: I think it worked.
Re:Do Developers Understand IEEE Floating Point? [pdf] by everybodyknows on Friday December 28, 2018 @02:28PM (#18778850)
Fun xkcd, but mathematics does not belong on a continuum of the scientific disciplines, all of which seek to describe nature.

"Die ganzen Zahlen hat der liebe Gott gemacht, alles andere ist Menschenwerk"

https://en.m.wikipedia.org/wiki/Leopold_Kronecker

Verbose, highly literal translation: "Loving God created the absolute integers; all else is the work of humanity."