Slashdot Mirror


User: Ihlosi

Ihlosi's activity in the archive.

Stories
0
Comments
4,892
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 4,892

  1. 20 years of programming, and you think division by zero should be treated as zero?

    ARM thinks that this is valid under certain circumstances and provides an appropriate setting in their CPUs (DIV_0_TRAP).

    Would they do that if it was completely useless?

  2. Re:What I don't get is... on Ask Slashdot: What's the Harm In a Default Setting For Div By Zero? · · Score: 1
    Why does the submitter suggest "zero" as the output for division by zero? How is that a better answer than 23?

    Statistically, returning zero usually yields less horrible consequences than returning an arbitrary non-zero number.

    If the result of the division is used in further calculations, e.g. in a product, a zero won't cause additional undefined behavior by signed integer overflows, etc.

  3. Re:Infinity on Ask Slashdot: What's the Harm In a Default Setting For Div By Zero? · · Score: 1
    Code which divides by zero is not "horribly" broken.

    Depends on the code. If dividing by zero results in occasional audio glitches, it's not horribly broken. If dividing by zero results in the code occasionally killing people, it's horribly broken.

  4. Re:Infinity on Ask Slashdot: What's the Harm In a Default Setting For Div By Zero? · · Score: 1
    CPUs aren't too happy with divisions by zero either.

    Depends on your CPU. It may have a setting to make it just return zero when dividing by zero. Sometimes, that's less harmful than other options.

  5. Re:Infinity on Ask Slashdot: What's the Harm In a Default Setting For Div By Zero? · · Score: 1
    However 0/0 is not a multiplication

    It can be expanded to (0*1)/0 and then to 0*(1/0), since anything multiplied by one is itself.

  6. CPUs do have a setting for that. on Ask Slashdot: What's the Harm In a Default Setting For Div By Zero? · · Score: 1
    ARMs let you chose if you want a division by zero to result in an exception or in a result of zero (DIV_0_TRAP bit).

    Of course, you need to get down to assembly to mess with this setting, since most programming languages specify a behavior in this case, or behave in an unspecificed way.

    Then again, dividing by zero usually means that there's something wrong with your design.

  7. Re:They didn't fix everything, maybe even added a on Unreal Engine Code Issues Fixed By Third-party Company · · Score: 1
    Which should have triggered their own warning: PVS-Studio: V522 Dereferencing of the null pointer 'GEngine' might take place.

    Please explain under which condition(s) the code

    return GEngine ? GEngine->DisplayGamma : 2.2f;

    will dereference a null pointer.

  8. While we're at it, let's investigate Sputnik! on Russian Official Calls For "International Investigation" of the Apollo Program · · Score: 1

    And let's be tooooootally impartial. What could go wrong?

  9. Re:They didn't fix everything, maybe even added a on Unreal Engine Code Issues Fixed By Third-party Company · · Score: 1
    Did you RTFA at all? A previous example on the same page threw V522 warnings from a similar construct.

    The construct is similar, but not identical. The difference is significant, though.

  10. Re:shooting themselves in foot on AMD Announces Fiji-based Radeon R9 Fury X, 'Project Quantum', Radeon 300 Series · · Score: 1
    If a $X GPU plays games at 1080p/60fps with all settings on max, there is no point to a $2X GPU, unless you are going to go at a higher resolution.

    Power, noise, heat ...

  11. Re:What issues are they "fixing" on Unreal Engine Code Issues Fixed By Third-party Company · · Score: 1
    In general, static code analysis can only improve the code quality marginally.

    Finding a potential problem through static code analysis and fixing it before the release is usually much cheaper than finding the problem in the wild, tracking down the bug, fixing it, and patching everything that's out there.

  12. Re:Problems causing Video effects? on Unreal Engine Code Issues Fixed By Third-party Company · · Score: 1
    It's code all the way down.

    If you haven't encountered hand-soldered transistors, you haven't gone "down" far enough.

  13. Looks like they're avoiding parentheses ... on Unreal Engine Code Issues Fixed By Third-party Company · · Score: 1
    ... in the code at all costs to make it look pretty, and, hey, everyone's supposed to know the operator precedence rules. Which promptly come and bite them in the rear, see the "suspicious sum" paragraph.

    I can see why one of the MISRA rules states that "limited dependence" should be placed on C operator precedence and expressions should be clarified (to the reader, not to the compiler) by using parentheses.

  14. Re:Quite simply... on Philae's Lost Seven Months Were Completely Unnecessary · · Score: 2
    1) High-level radioactive waste is deadly to touch, hold, carry, etc., for hundreds of thousands of years.

    No, it's not. The stuff that kills you if you stand next to it has half-lives below 50 years, which means that after one or two thousand years, there's hardly anything left of the original amount.

    The isotopes with half-lives in the thousands of years don't emit enough radiation to give someone deadly radiation poisoning in a few minutes, but they will raise cancer rates if released into the environment at any point in the next couple of hundred thousand years.

  15. Re:Geezzze GET YOUR UNITS RIGHT. m is not mmj on Monitoring Brain Activity With Mesh Electronics · · Score: 1
    I don't thing such a "needle" could inject anything.

    I guess you don't need to inflate small asteroids on a regular basis?

  16. Re:I have a bad feeling about this on Monitoring Brain Activity With Mesh Electronics · · Score: 2

    Things get really confusing when you omit the prefix on microphone ... or Microsoft.

  17. Look at the bright side: on Monitoring Brain Activity With Mesh Electronics · · Score: 2
    No chance of headache. In fact, you won't feel anything at all .. permanently.

    In unrelated news: 'm' is not an abbreviation of 'micron'.

  18. Huh? They had full control of the hardware. on Samsung, LG Smartwatches Give Up Personal Data To Researchers · · Score: 1

    These researchers had physical control of the hardware in question and were able to extract unencrypted data? That must have been difficult.

  19. Germany doesn't have a minimum drinking age. on How American Students Can Get a University Degree For Free In Germany · · Score: 1
    Drinking beer and wine (unsupervised) is legal in most of Europe for kids aged 16 and above.

    Actually, drinking is legal in Germany regardless of age. The youth protection law in Germany just regulates sale of alcohol, or serving alcohol in public, or letting underage people consume alcohol in a public bar/restaurant.

    Now, at some point, the German version of CPS might raise an eyebrow if a childs health is in danger, but that's another issue.

  20. The tuition fees were never that high anyway. on How American Students Can Get a University Degree For Free In Germany · · Score: 1

    On the other hand, you'll have to deal with German, Germans, Germany and their respective quirks.

  21. Re:Fast, cheap, flexible - choose one on On Managing Developers · · Score: 1
    Not sure if it actually says that, but there's a huge difference between "can" and "will".

    Any development methodology that's guaranteed to work should be viewed with a healthy dose of suspicion.

  22. Re:same as maanaging any other productive group on On Managing Developers · · Score: 1
    Maybe that works with someone willing to take advice, but flying blind is a different story.

    Usually, industrial radiography equipment is fairly unforgiving to people who aren't willing to learn. Maybe leaving said manager alone with the equipment, just for a few minutes, would have resolved the issue.

  23. Re:If it were easy on On Managing Developers · · Score: 1
    But very few people can fake that for their entire career.

    You just need to fake it until you get your first golden parachute, and then switch careers, e.g. into politics.

  24. Loose lips ... on US Bombs ISIS Command Center After Terrorist Posts Selfie Online · · Score: 1
    ... sink ships.

    Evidently, some IS people didn't study this particular example of basic security precaution...

  25. Re:Be the damned day on Disney Making Laid-Off US Tech Workers Train Foreign H1-B Replacements · · Score: 1
    Train the H1-B to completely F* up every possible aspect of the job would be my parting gift tot he company.

    That's bound to backfire. Legally.

    Personally, I'd include in my contract that training replacements is explicitly not part of my job description unless a) there is sufficient time for proper training (say, 12 months or so), or b) the replacement is necessary because I'm quitting the job.