Gerry Thomas wrote: > "Joost VandeVondele" <jv244@cam.ac.uk> wrote in message > news:54661aa9.0410040741.2efedd39@posting.google.com... > >>I'm wondering if 0.0**0 (as opposed to 0.0**0.0) has the value 1 as >>per fortran standard or if this is left to the compiler vendors >>(different vendors do different things, unhappily). >> > > > 0**0=1. Knuth argued the case long ago. Matlab, Mathematica, C/C++, etc. do > likewise. If your Fortran compiler does otherwise, ditch it. > > That's funny, Mathematica gives 0^0 as "Indeterminate". Once again, your mean, stupid little face is dripping with egg, you pathetic little man. Aardpig

0 |

10/4/2004 11:11:00 PM

Gerry Thomas wrote: > "Eric K." <ejko123@yahoo.com> wrote in message > news:4ccbcc1c.0410042045.5c78ad27@posting.google.com... > >>"Gerry Thomas" <gfthomas@sympatico.ca> wrote in message > > news:<5_j8d.12510$jj2.523749@news20.bellglobal.com>... > >>>0**0=1. Knuth argued the case long ago. Matlab, Mathematica, C/C++, > > etc. do > >>>likewise. >> >>No, they don't. Section 7.12.7.4 of the C standard states >> >> "The pow functions compute x to the power y. A domain error >> occurs if x is finite and negative and y is finite and not >> an integer value. A domain error may occur if x is zero and >> y is less than or equal to zero." >> >>Some implementations, such as GNU, may choose to define pow(0.0,0.0)=1.0, >>but this is an extension to the standard; portable programs cannot rely > > on it. > > > Portability be damned, I care even less about the C standard than I do > about the Fortran's, any C/C++ compiler that I use sets pow(x,y) = 1 if y = > 0.0, and =\ 0 or x = 0.0; if x = 0.0, and y < 0 it returns Inf, exactly > like Matlab. This suites me fine. Foot in your mouth, Gerry -- you were wrong about Mathematica, and you're now wrong about C/C++. What your compiler does is not relevant here. If I were you, I'd stop posting to c.l.f; you make an utter fool of yourself every time you do so. Aardpig

0 |

10/5/2004 1:43:45 PM