From: analyst41 on 17 Jul 2010 09:42 In a**b are there any restrictions on the data types of a and b - or will the language handle all numeric cases? Thanks.
From: m_b_metcalf on 17 Jul 2010 10:37 On Jul 17, 3:42 pm, "analys...(a)hotmail.com" <analys...(a)hotmail.com> wrote: > In a**b are there any restrictions on the data types of a and b - or > will the language handle all numeric cases? > > Thanks. All combinations of intrinsic numeric types are permitted (MR&C, Table 3.2) but you cannot raise a negative real value to a real power. Regards, Mike Metcalf
From: Phillip Helbig---undress to reply on 17 Jul 2010 11:08 In article <83d9c160-d7f6-4c1b-9b4b-2e6fe7e68ccb(a)s9g2000yqd.googlegroups.com>, m_b_metcalf <michaelmetcalf(a)compuserve.com> writes: > On Jul 17, 3:42=A0pm, "analys...(a)hotmail.com" <analys...(a)hotmail.com> > wrote: > > In a**b are there any restrictions on the data types of a and b - or > > will the language handle all numeric cases? > > > > Thanks. > > All combinations of intrinsic numeric types are permitted (MR&C, Table > 3.2) but you cannot raise a negative real value to a real power. $ create test.f90 print*, (-1.0)**2.0 end Exit $ foro test $ link test $ r test 1.000000 The "foro" symbol includes "/STANDARD=F95/WARNINGS=ALL". What am I missing?
From: steve on 17 Jul 2010 11:16 On Jul 17, 8:08 am, hel...(a)astro.multiCLOTHESvax.de (Phillip Helbig--- undress to reply) wrote: > In article > <83d9c160-d7f6-4c1b-9b4b-2e6fe7e68...(a)s9g2000yqd.googlegroups.com>, > > m_b_metcalf <michaelmetc...(a)compuserve.com> writes: > > On Jul 17, 3:42=A0pm, "analys...(a)hotmail.com" <analys...(a)hotmail.com> > > wrote: > > > In a**b are there any restrictions on the data types of a and b - or > > > will the language handle all numeric cases? > > > > Thanks. > > > All combinations of intrinsic numeric types are permitted (MR&C, Table > > 3.2) but you cannot raise a negative real value to a real power. > > $ create test.f90 > print*, (-1.0)**2.0 > end > Exit > $ foro test > $ link test > $ r test > 1.000000 > > The "foro" symbol includes "/STANDARD=F95/WARNINGS=ALL". > > What am I missing? A descent compiler? laptop:kargl[203] gfc4x -o z a.f90 a.f90:1.9: print*, (-1.0)**2.0 1 Error: Raising a negative REAL at (1) to a REAL power is prohibited -- steve
From: glen herrmannsfeldt on 17 Jul 2010 11:47 analyst41(a)hotmail.com <analyst41(a)hotmail.com> wrote: > In a**b are there any restrictions on the data types of a and b - or > will the language handle all numeric cases? Now I believe all numeric types are allowed. Fortran 66 didn't allow complex powers. I am not sure when that restriction was removed. -- glen
|
Next
|
Last
Pages: 1 2 3 Prev: WORK WITH INTERNET ONLINE JOBS - EARN $19,000 MONTHLY Next: what memory gets used? |