|
Archives
D Programming
digitalmars.Ddigitalmars.D.bugs digitalmars.D.dtl digitalmars.D.ide digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger D.gnu D C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
digitalmars.D - Disable NaN and Inf
I would like to divide one array by another using the slice syntax so that I can benefit from the vectorized operation, but I am running into a problem. Some of the numbers is my denominator array are 0, producing NaNs and Infs in the result. My question is: Is there a way to force 0/0 and x/0 to result in 0? Thank you, JC Feb 05 2010
Jonathan Crapuchettes wrote:I would like to divide one array by another using the slice syntax so that I can benefit from the vectorized operation, but I am running into a problem. Some of the numbers is my denominator array are 0, producing NaNs and Infs in the result. My question is: Is there a way to force 0/0 and x/0 to result in 0? Thank you, JC Feb 06 2010
On 02/06/2010 09:16 AM, Andrei Alexandrescu wrote:Jonathan Crapuchettes wrote:I would like to divide one array by another using the slice syntax so that I can benefit from the vectorized operation, but I am running into a problem. Some of the numbers is my denominator array are 0, producing NaNs and Infs in the result. My question is: Is there a way to force 0/0 and x/0 to result in 0? Thank you, JC Feb 06 2010
== Quote from Andrei Alexandrescu (SeeWebsiteForEmail erdani.org)'s articleJonathan Crapuchettes wrote:I would like to divide one array by another using the slice syntax so that I can benefit from the vectorized operation, but I am running into a problem. Some of the numbers is my denominator array are 0, producing NaNs and Infs in the result. My question is: Is there a way to force 0/0 and x/0 to result in 0? Thank you, JC Feb 06 2010
dsimcha wrote:== Quote from Andrei Alexandrescu (SeeWebsiteForEmail erdani.org)'s articleJonathan Crapuchettes wrote:I would like to divide one array by another using the slice syntax so that I can benefit from the vectorized operation, but I am running into a problem. Some of the numbers is my denominator array are 0, producing NaNs and Infs in the result. My question is: Is there a way to force 0/0 and x/0 to result in 0? Thank you, JC Feb 06 2010
Andrei Alexandrescu wrote:dsimcha wrote:== Quote from Andrei Alexandrescu (SeeWebsiteForEmail erdani.org)'s articleJonathan Crapuchettes wrote:I would like to divide one array by another using the slice syntax so that I can benefit from the vectorized operation, but I am running into a problem. Some of the numbers is my denominator array are 0, producing NaNs and Infs in the result. My question is: Is there a way to force 0/0 and x/0 to result in 0? Thank you, JC Feb 06 2010
Are NaNs and Infs the result of a CPU operation or is that part of the D language? JC Andrei Alexandrescu wrote:Jonathan Crapuchettes wrote:I would like to divide one array by another using the slice syntax so that I can benefit from the vectorized operation, but I am running into a problem. Some of the numbers is my denominator array are 0, producing NaNs and Infs in the result. My question is: Is there a way to force 0/0 and x/0 to result in 0? Thank you, JC Feb 06 2010
Hello Jonathan,Are NaNs and Infs the result of a CPU operation or is that part of the D language? Feb 06 2010
Are NaNs and Infs the result of a CPU operation or is that part of the D language? Feb 06 2010
|