Closed paskino closed 3 years ago
ah, I was just editing #863 😄 .
Here's my policy: do not do anything special. The hardware will take care of it. On IEEE compatible systems, it will return inf
or nan
(depending on 1/0 or 0/0). On other systems, I don't know. But it's not our business to take care of this.
So, we need to implement the division in C++ accordingly.
So, we need to implement the division in C++ accordingly.
Not sure what you mean. I'm saying, "don't do anything special". If you divide in C++, your processor will decide what it does. We just accept that. (In practice, everyone will have an IEEE-compliant CPU. With GPUs it'll be different I guess).
excellent. might need some changes on the Python side? For instance, @paskino tests on the division throwing I think.
@paskino: could you fix your Python zero division tests please? I am not sure I understand them, so afraid to damage something.
@paskino: disabled zero-division checks in Utilities.py
for now to pacify Travis
Currently, not all
DataContainer
sub classes will throw an error on division by zero, https://github.com/SyneRBI/SIRF/issues/863.However, this is not standard for other packages, such as
numpy
for instance which returnsnumpy.inf
.We should define a policy and develop the code accordingly.