Giter Site home page Giter Site logo

Comments (5)

certik avatar certik commented on May 23, 2024

People in #25 who preferred different names than sp, dp and qp are: @jvdp1, @milancurcic, @marshallward. Others seem either fine with it, or not expressed an opinion.

The next candidate seems to be the names from iso_fortran_env, so real32, real64 and real128.

Let's also discuss half precision. The natural names for iso_fortran_env would be real16 (j3-fortran/fortran_proposals#13) and bfloat16 (j3-fortran/fortran_proposals#3).

The shorter names could be hp for half precision. For bfloat16 there does not seem to be an established short name (some candidates could be bp, bfp, ..., but I would maybe just use bfloat16, as I assume it will not be as commonly used in Fortran codes as dp is).


To move this forward, how about using a similar multilayered approach as in other issues:

  1. The stdlib_kinds module introduces real16, real32, real64, real128 names, the same as in iso_fortran_env.
  2. Then it also introduces aliases hp, sp, dp, qp.

And we can use both, say in user codes. Regarding the stdlib code itself, we can use both for now also (depending who submits the code). Later, as we fix #35, and routinely support all integer and real kinds, I think a natural and consistent convention will arise for stdlib, as we gain experience.

@jvdp1, @milancurcic, @marshallward, is that an acceptable compromise?

from stdlib.

jvdp1 avatar jvdp1 commented on May 23, 2024

@jvdp1, @milancurcic, @marshallward, is that an acceptable compromise?

I would suggest to use one of the 2, but not both, simply to avoid to go through all the codes in the lib, when a convention will be taken.
My preference is still for real16, real32, ... but I would be ok with the other one, especially since stdlib has its own kinds module.

from stdlib.

milancurcic avatar milancurcic commented on May 23, 2024

I also prefer sp, dp, etc. over having both, which would be confusing to any reader unaware of this discussion.

from stdlib.

marshallward avatar marshallward commented on May 23, 2024

I would prefer to not have two sets of naming schemes.

I would also prefer not to just re-use the names from iso_fortran_env and have them point to the contents in iso_fortran_env. I already somewhat consider those "reserved".

As the last ones standing, I guess that I would be fine with sp, dp, qp.

Still not a fan of these, I think short two-letter names are better reserved for scratch variables (e.g. iteration counters) but I would also not wish such concerns to impede progress.

from stdlib.

certik avatar certik commented on May 23, 2024

Ok then. I am fine with the current scheme also. We can revisit this later. For now I think we can close this issue.

from stdlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.