103 karma · joined August 11, 2011
> x = (float)&i;
breaks strict aliasing, and has undefined behavior. If you compile it with g++ -O2, you may get unexpected results. The solution is to use a union, or to compile with -no-strict-aliasing.
I used to have a lot of code like this, which worked fine on older compilers, but not on newer compilers. It's perfectly reasonable code, so I'm not sure why the newer compilers don't produce the expected behavior by default.
On a related note, in Excel, -1^2 = 1 because they are calculating (-1)^2 instead of the more standard interpretation, -(1^2).
If Linda is a randomly chosen person, then clearly 1 is more probable.
However, there is another sense in which 2 is more likely to be true. For example, in the radiology department where I work, doctors ordering studies need to enter in a reason for the study. Frequently, they put something generic like "pain" to get the study approved, which may or may not be accurate. On the other hand, if I saw a history that said "1 day history of RLQ pain, nausea, and fever", I would consider that history to be more likely to be true.
So in a narrow probabilistic sense, 1 is true, but when you consider that people sometimes make stuff up or don't have the full story, you might rationally judge a more detailed story to be more believable.
1. The average radiologist gets paid about $40 (after expenses) to read a CT scan. So you have to read a LOT of scans to make as much as roentgen. Many scans contain hundreds of images, and the diagnosis can depend on just a few pixels. Partly based on the radiologist's diagnosis, the patient may need to go to surgery (at least $25,000) or need another round of chemotherapy ($50,000), etc. When viewed in this context, I think $40 is a great value for getting an expert opinion. (As a side note, there is a lot of regional variation in salaries. They are probably lowest in New York City. Contrast that to law or finance, where the highest salaries are probably in New York City. I think the difference is due to the fact that medicine (even radiology) is practiced locally, and thus depends on local supply and demand, and does not have the kind of network effects that you see in law or finance.)
2. In terms of disruptive technologies in radiology, I don't think that computers will be able to replace radiologists any time soon, but there are lots of ways that computers could help radiologists be more productive or accurate. Much of the advances in consumer technology from the past decade are not yet available in radiology. Images are usually transferred to another hospital by mailing a CD. Reports are transferred using a fax machine. We're lucky if we can get 10 frames per second when scrolling through a large study. Computer systems are not linked -- ie, we have to type the patient's name into both the radiology system and the medical records system. For various reasons, many of these problems will have to be solved by big companies and not startups. But there are other opportunities for startups. If you're interested, check out my startup http://www.revisionrads.com.