Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you're playing around subnormal numbers [0], most modern processors automatically switch to a microcode based calculation mode to preserve these numbers. However, these algorithms are very expensive, so it's not desired unless explicitly needed and generally used as an escape hatch for edge cases.

[0]: https://en.wikipedia.org/wiki/Subnormal_number



i'd be curious what matlab would do with finding the eigs for op's matrix. i'd bet a coffee that it (one of the eigs functions) prints a warning. entirely possible it may even switch search methods if precision loss is detected.


I get the same results as the author if I pass the matrix to eig (R2020a, Intel Mac)

   >> lesp = gallery('lesp', 100)
   >> any(imag(eig(lesp)))
   ans =
     logical
      0
   >> any(imag(eig(lesp')))
   ans =
     logical
      1


what about eigs() with the 'Display' option turned on?


No luck there either, I'm afraid. It sets 'flag' to zero (i.e., converged), but A and A^T still differ.


Right, it's a very slow bandaid. If you're reaching subnormal numbers, it's usually a sign you're doing something wrong.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: