News for hackers. Stuff that matters.
Re:Floats Are Weird by Pinus on Monday February 19, 2024 @12:50PM (#39432594)
Ages ago, when I was in college, a "numerical methods" course was more or less obligatory... has that changed?

Anyway, toying with a slide rule is a fun way of making these things very obvious, because you are essentially working with something like 3-digit floating point. When you find yourself subtracting 1.234 from 1.235, but you know that both the "4" and the "5" are really fuzzy around the edges, it becomes obvious that the resulting 0.001 does not really mean much. Similarly, when you take 1.234e+6 (again with a really fuzzy "4") and add 2, you realize that 1.234002e+6 is not really a sane answer.

Re:Floats Are Weird by bee_rider on Monday February 19, 2024 @01:41PM (#39433158)
I assume it depends on the department. CS students are afraid of non-integer values, engineering students are afraid of codes longer than 200 lines. Just kidding, mostly.

I do somewhat wonder if numerical methods have suffered from their success; like everybody uses LAPACK via Numpy but understanding it under the hood, that job always belongs to the next department over wherever you are, haha.

Re:Floats Are Weird by jmrm on Monday February 19, 2024 @02:47PM (#39433874)
AFAIK in Europe numerical methods is mandatory in most Telco/EE degrees, but not in CS/SWE. The opposite happens with discrete maths btw
Re:Floats Are Weird by anthk on Monday February 19, 2024 @05:32PM (#39435633)
Here in Spain if you can't grasp numerical methods in CS you can't even think on earning a degree.
Re:Floats Are Weird by rerdavies on Thursday February 22, 2024 @04:40PM (#39473664)
Here in Canada, CS is part of the Math Department at the University of Waterloo, but part of the Philosophy Department at University of Toronto.

Waterloo graduates take a Numerical Methods course in second year. I fear for the philosophers.

Re:Floats Are Weird by ArcticLandfall on Monday February 19, 2024 @08:21PM (#39436942)
How floats work is a non-trivial part of my 3rd semester CS course (Computer Architecture) in the US, I'd imagine the same applies to every other good college.