-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REAL16 proposal #13
Comments
I know there was a discussion about this point, as I asked the same question. @tclune do you remember what the arguments were? |
I think I've missed something. What is the question/position for which arguments are desired? |
@klausler was asking why not to just use |
Sorry - I did not real the OP carefully enough. Now I understand the context. At the very least checking to see if two results from SELECTED_REAL_KIND differ is something that happens at run time, and sometimes one wants to know at compile time that some functionality is not available. The question is really about why the existing standard has REAL32, REAL64, and REAL128. These are much more practical for library developers that wish to overload their procedures for the supported kinds of REAL provided by a given implementation. In that case it is not that the developer wants a certain amount of precision. They are trying to support other users that get to choose precision on their own. REAL16 is proposed just simply to be consistent for an increasingly common option on some hardware. Note that REAL32 et al are not quite sufficient in and of themselves to allow a portable implementation that covers all supported real kinds. Generally some logic is still required in the build system to control which kinds are selected. Note also that REAL32 is not necessarily the same thing as default REAL. Theoretically it can be tricky to distinguish such things. In practice, all extant compilers have |
@klausler wrote:
@klausler, can you please explain your point here? Are you giving a "thumbs down" or suggesting the proposal involving a trivial effort to add another few named constants (e.g., REAL16, LOGICAL8, LOGICAL16, ..)) to the list of those introduced in the language starting Fortran 2008 (such as REAL32) in ISO_FORTRAN_ENV intrinsic module be removed from consideration? |
@FortranFan I think @klausler is just asking a general question if user code should be using |
@klausler this is a long standing issue in Fortran, how you are supposed to declare the precision of the |
@klausler exactly. The other functions that go hand in hand with this are |
The document N2169 lists the approved items from the WG5 August 2019 Meeting in Tokyo, one of which is:
US08 - Additional named constant, REAL16, in ISO_FORTRAN_ENV to specify whether the processor supports a 16-bit REAL KIND. J3/19-139r1
The text was updated successfully, but these errors were encountered: