whole number constants
  Home FAQ Contact Sign in
 
Advanced search
MATCHING GROUPS



more...
POPULAR GROUPS

more...

found 725 articles for 0.024 sec
Re: whole number constants     

Group: comp.lang.fortran · Group Profile · Search for whole number constants in comp.lang.fortran
Author: Dick Hendrickson
Date: Jul 23, 2008 08:26

...what is "best practice" when coding whole numbers in real (kind specified) ...), parameter :: onei = 1 For real constants that are exact integers and are...goes undetected. Certainly true, but the whole discussion started out with parameter ... to misuse of the kind number. Another point on which you are... particular, in some the kind number of one-byte integers corresponds ...
Show full article (4.84Kb) · Show article thread
Re: whole number constants     

Group: comp.lang.fortran · Group Profile · Search for whole number constants in comp.lang.fortran
Author: robin
Date: Jul 22, 2008 22:14

... what is "best practice" when coding whole numbers in real (kind specified) formulas...dp), parameter :: onei = 1 For real constants that are exact integers and are ... obvious in Fortran. As a float constant (as the user intended it to ...attention to misuse of the kind number. Another point on which you are...In particular, in some the kind number of one-byte integers corresponds to...
Show full article (4.07Kb) · Show article thread
Re: whole number constants     

Group: comp.lang.fortran · Group Profile · Search for whole number constants in comp.lang.fortran
Author: Dick Hendrickson
Date: Jul 22, 2008 08:02

...@earthlink.net wrote: This may be a dumb question but what is "best practice" when coding whole numbers in real (kind specified) formulas. I am looking for accuracy, consistancy and prortability reagardless of what value... = 1.0 real(dp), parameter :: onei = 1 For real constants that are exact integers and are small enough to fit in ...
Show full article (2.57Kb) · Show article thread
Re: whole number constants     

Group: comp.lang.fortran · Group Profile · Search for whole number constants in comp.lang.fortran
Author: Paul van Delst
Date: Jul 22, 2008 06:14

... but I think it is perhaps overly conservative to specify a parameter for a whole number rather than use coding like label 300 The fact that you're confused about.... if you're always going to stick to whole numbers like 1. But if you get into the habit, you could end up ...x/(y - 0.15) where now the literal constants are not represented to the same precision as ...
Show full article (2.01Kb) · Show article thread
Re: whole number constants     

Group: comp.lang.fortran · Group Profile · Search for whole number constants in comp.lang.fortran
Author: robin
Date: Jul 21, 2008 22:34

...> This may be a dumb question but what is "best practice" when coding whole numbers in real (kind specified) formulas. I am looking for accuracy, consistancy and ...> real(dp), parameter :: onei = 1 For real constants that are exact integers and are small enough ... getting in the habit of using just plain constants is with dummy arguments. Here, you need ...
Show full article (2.47Kb) · Show article thread
Re: whole number constants     

Group: comp.lang.fortran · Group Profile · Search for whole number constants in comp.lang.fortran
Author: dancerchris
Date: Jul 21, 2008 17:49

... not a property of a whole equation. That's actually important ... the conversion of lower rank number (say single to double precision)....is not a "floating point number" the decimal conversion of the...that you specifically asked about whole numbers. It really does make...use and practice of coding whole numbers, I am NOT confusing...with non-whole numbers) and you have very clearly answered. Thanks...
Show full article (2.39Kb) · Show article thread
Re: whole number constants     

Group: comp.lang.fortran · Group Profile · Search for whole number constants in comp.lang.fortran
Author: nospam
Date: Jul 21, 2008 16:38

...is not a property of a whole equation. That's actually important and...label 100 is using a true constant such that the numerical value out...There is no concept of a constant that is of a given kind... with the syntax used for constants. And such things are never "... that you specifically asked about whole numbers. It really does make a...'t generalize this to non-whole numbers, though. I'm thinking ...
Show full article (3.58Kb) · Show article thread
Re: whole number constants     

Group: comp.lang.fortran · Group Profile · Search for whole number constants in comp.lang.fortran
Author: dancerchris
Date: Jul 21, 2008 15:58

... problems I have run into are generally with error functions and comparison of like values between subroutines/functions, but I think it is perhaps overly conservative to specify a parameter for a whole number rather than use coding like label 300
Show full article (0.45Kb) · Show article thread
Re: whole number constants     

Group: comp.lang.fortran · Group Profile · Search for whole number constants in comp.lang.fortran
Author: nospam
Date: Jul 21, 2008 15:00

...> I still would like to understand what the best practice is. writing global constants for whole numbers like 1 seems redundant. It pretty much is. You will have no precision loss from expressing whole numbers of "reasonable" magnitude in any actual compiler. It... and kind of the parameter. In the case of whole numbers, this conversion will be exact. Note that it...
Show full article (3.22Kb) · Show article thread
Re: whole number constants     

Group: comp.lang.fortran · Group Profile · Search for whole number constants in comp.lang.fortran
Author: dancerchris
Date: Jul 21, 2008 14:52

... but what is "best practice" when coding whole numbers in real (kind specified) formulas. В I am looking for accuracy, consistancy ...(dp), parameter :: onei = 1 For real constants that are exact integers and are small...beyond precision of dp) ergo not a constant end if Sorry to be so nitpicky...I am trying to establish a truly constant value to two so they are equal...
Show full article (2.71Kb) · Show article thread
1 · 2 · 3 · 4 · 5 · 6 · 7 · 8 · 9 · next