Home » Extra libraries, Code snippets, applications etc. » C++ language problems and code snippets » FP exception vs NaN
Re: Capture division by zero [message #55316 is a reply to message #55307] |
Thu, 29 October 2020 14:19   |
 |
koldo
Messages: 3432 Registered: August 2008
|
Senior Veteran |
|
|
mirek wrote on Wed, 28 October 2020 14:04I am also pretty interested what will you do when you get exception in eigen. I am not that advanced in math, but I am pretty sure that e.g. matrix inversion can produce a lot of divide by zero for degenerate matrix and I am also pretty sure that eigen follows NaN model like every other mature library (if for nothing else, then for performance reasons).
Are you going to compute determinant before each call to inversion?
Mirek
I am well aware of operations that could be bad conditioned . I use a lot matrix inversion.
In fact STEM4U includes some tools to handle infinite precision numbers (well, but as expected, very inefficiently)
If you ask me if I prefer to search for NaNs after every matrix algebra operation, or catching an exception, I will choose the second.
And remember that U++ is not for people who are content to following STL or BOOST, but is for people who wants more performance and simplicity of use. There are other libraries more compliant but, unfortunately for them, they are worse than U++. And you are the biggest culprit of it .
Best regards
IƱaki
|
|
|
 |
|
FP exception vs NaN
By: koldo on Mon, 26 October 2020 21:08
|
 |
|
Re: Capture division by zero
By: mirek on Tue, 27 October 2020 09:23
|
 |
|
Re: Capture division by zero
By: mirek on Tue, 27 October 2020 11:09
|
 |
|
Re: Capture division by zero
By: mirek on Tue, 27 October 2020 11:16
|
 |
|
Re: Capture division by zero
By: koldo on Tue, 27 October 2020 11:38
|
 |
|
Re: Capture division by zero
By: mirek on Tue, 27 October 2020 11:40
|
 |
|
Re: Capture division by zero
By: koldo on Tue, 27 October 2020 11:36
|
 |
|
Re: Capture division by zero
By: koldo on Tue, 27 October 2020 17:18
|
 |
|
Re: Capture division by zero
By: mirek on Tue, 27 October 2020 18:52
|
 |
|
Re: Capture division by zero
By: mirek on Tue, 27 October 2020 19:19
|
 |
|
Re: Capture division by zero
By: koldo on Tue, 27 October 2020 19:25
|
 |
|
Re: Capture division by zero
By: Klugier on Tue, 27 October 2020 20:35
|
 |
|
Re: Capture division by zero
By: mirek on Tue, 27 October 2020 20:47
|
 |
|
Re: Capture division by zero
By: koldo on Wed, 28 October 2020 09:29
|
 |
|
Re: Capture division by zero
By: mirek on Tue, 27 October 2020 20:50
|
 |
|
Re: Capture division by zero
By: koldo on Wed, 28 October 2020 09:24
|
 |
|
Re: Capture division by zero
By: mirek on Wed, 28 October 2020 13:51
|
 |
|
Re: Capture division by zero
By: mirek on Wed, 28 October 2020 14:04
|
 |
|
Re: Capture division by zero
By: koldo on Thu, 29 October 2020 14:19
|
 |
|
Re: Capture division by zero
By: mirek on Mon, 02 November 2020 10:31
|
 |
|
Re: Capture division by zero
By: koldo on Mon, 02 November 2020 18:07
|
Goto Forum:
Current Time: Wed Apr 30 00:48:29 CEST 2025
Total time taken to generate the page: 0.04289 seconds
|