max NaN 0 should be NaN
  Home FAQ Contact Sign in
 
Advanced search
MATCHING GROUPS



more...
POPULAR GROUPS

more...

found 125 articles for 0.032 sec
Re: max(NaN,0) should be NaN     

Group: comp.lang.fortran · Group Profile · Search for max NaN 0 should be NaN in comp.lang.fortran
Author: glen herrmannsfeldt
Date: Sep 8, 2006 09:32

... noes not define any operations called max and min. It has MinNum, MaxNum... would not call them 'min' or 'max'... For an extra complication (for comp.lang.fortran), what should MAX1(NaN,0) return? Note that C, or at least C89, doesn't have max and min, but they are commonly ..., and likely not symmetric. #define MAX(a,b) ((a>b)?(a):(b)) I don't expect MAX(NaN,0.) to be the same as...
Show full article (0.68Kb) · Show article thread
Re: max(NaN,0) should be NaN     

Group: comp.lang.fortran · Group Profile · Search for max NaN 0 should be NaN in comp.lang.fortran
Author: Mike Cowlishaw
Date: Sep 8, 2006 08:15

..., I found that it assumed max(NaN,0.) = 0. We thought long and hard... was for it to return NaN -- many programmers seem to think of max() as the kind of arithmetic operator which should return NaN if any input is a NaN.... noes not define any operations called max and min. It has MinNum, MaxNum... the language. Personally I would not call them 'min' or 'max'... mfc
Show full article (0.94Kb) · Show article thread
Re: max(NaN,0) should be NaN     

Group: comp.lang.fortran · Group Profile · Search for max NaN 0 should be NaN in comp.lang.fortran
Author: jacko
Date: Sep 8, 2006 07:35

hi Had the inspiration when doing data bases a while back, that as well as null, void is also needed. null=unknown quantity void=no quantity max(null,0)=null max(void,0)=0 NaN appears like a null so max(nan,0)=nan ;-) curry shop ahoy!! NaD would be Not a Datum cheers. jacko
Show full article (0.29Kb) · Show article thread
Re: max(NaN,0) should be NaN     

Group: comp.lang.fortran · Group Profile · Search for max NaN 0 should be NaN in comp.lang.fortran
Author: Nick Maclaren
Date: Sep 8, 2006 02:19

... the conflation of two |> meanings for NaN, so it wouldn't be at ...no* definite right answer for max(NaN,0). There IS a definite right answer, using the meaning of NaN that is implied by IEEE 754,...answer, you need a meaning of NaNs that is not currently in IEEE .... Firstly, IEEE 754 requires max(SNaN,0) to raise the invalid exception,... that would imply that QNaN+0.0 = 0.0 and, thirdly, the only...
Show full article (0.96Kb) · Show article thread
Re: max(NaN,0) should be NaN     

Group: comp.lang.fortran · Group Profile · Search for max NaN 0 should be NaN in comp.lang.fortran
Author: Ken Hagan
Date: Sep 8, 2006 01:55

...this case it is clear that setting max(NAN,0.)=0. will cause problems. It is less clear why setting max(NAN,0.)=NAN will cause problems. It is... is the conflation of two meanings for NaN, so it wouldn't be at all ... *no* definite right answer for max(NaN,0). Now, I probably have less experience ... if I may be indulged a little, what is wrong with... max(QNaN,0) = 0 max(SNaN,0) =...
Show full article (0.63Kb) · Show article thread
Re: max(NaN,0) should be NaN     

Group: comp.lang.fortran · Group Profile · Search for max NaN 0 should be NaN in comp.lang.fortran
Author: norb1
Date: Sep 7, 2006 15:07

...>After tracking down a bug in my Fortran program, I found that it assumed max(NaN,0.) = 0. We thought long and hard about this and decided that least surprise was for it to return NaN -- many programmers seem to think of max() as the kind of arithmetic operator which should return NaN if any input is a NaN. But no competing compiler did this, and it ...
Show full article (0.82Kb) · Show article thread
Re: max(NaN,0) should be NaN     

Group: comp.lang.fortran · Group Profile · Search for max NaN 0 should be NaN in comp.lang.fortran
Author: William Hughes
Date: Sep 7, 2006 10:08

... undefined and should be NaN. max(NaN,0.) = NaN Why? Well, because a NaN *could* be plus infinity, or a number ... > If one wants to *implement* NaNs *at all*, one's _reason_ for ... to the trouble of bothering with NaNs, and then deciding that treating them...about the consequences of setting max(NAN,0.)=0 (and John Savard appears to have none) how do you...
Show full article (3.18Kb) · Show article thread
Re: max(NaN,0) should be NaN     

Group: comp.lang.fortran · Group Profile · Search for max NaN 0 should be NaN in comp.lang.fortran
Author: Herman Rubin
Date: Sep 7, 2006 07:57

...as the outcome of the operation is undefined and should be NaN. max(NaN,0.) = NaN Why? Well, because a NaN *could* be plus infinity, or a number too large... represented. If one wants to *implement* NaNs *at all*, one's _reason_ for doing so... going to the trouble of bothering with NaNs, and then deciding that treating them pessimistically ...
Show full article (1.87Kb) · Show article thread
Re: max(NaN,0) should be NaN     

Group: comp.lang.fortran · Group Profile · Search for max NaN 0 should be NaN in comp.lang.fortran
Author: William Hughes
Date: Sep 7, 2006 07:19

... undefined and |> should be NaN. |> max(NaN,0.) = NaN |> |> Why? |> |> Well, because a ... If one wants to *implement* NaNs *at all*, one's _reason_ for ... to the trouble of bothering with NaNs, and then deciding that |> treating them ...You are wrong on three counts: max/min are not part of IEEE...he has no idea of why NAN's are used and is incorrect...
Show full article (2.53Kb) · Show article thread
Re: max(NaN,0) should be NaN     

Group: comp.lang.fortran · Group Profile · Search for max NaN 0 should be NaN in comp.lang.fortran
Author: Terje Mathisen
Date: Sep 7, 2006 06:56

... |> I.e. doing the opposite which would be to require max(...,NaN,...) to |> always be NaN simply discards everything we know about the representable ... even in the case where the NaN simply means Not |> Applicable, i.e....By providing ways to lose the NaN state quietly, you are rendering them ...agree with you, specifically that dropping NaN information is a _very_ surprising behavior...
Show full article (1.15Kb) · Show article thread
1 · 2 · 3 · 4 · 5 · 6 · 7 · 8 · 9 · next