Skip to content

log2 instrinsic #222

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

Open
brandongc opened this issue Aug 25, 2021 · 6 comments · May be fixed by #291
Open

log2 instrinsic #222

brandongc opened this issue Aug 25, 2021 · 6 comments · May be fixed by #291
Labels
Clause 16 Standard Clause 16: Intrinsic procedures and modules

Comments

@brandongc
Copy link

Currently the standard has log and log10 functions, but no log2.

@milancurcic
Copy link
Member

Good candidate for stdlib.

@certik certik added the Clause 16 Standard Clause 16: Intrinsic procedures and modules label Apr 23, 2022
@brandongc
Copy link
Author

or more generally, parity with math.h from C

@gklimowicz
Copy link
Member

or more generally, parity with math.h from C

After a brief discussion of this in JoR (Journal of Requirements) at the WG5 meeting this week, if there is a strong use case for this, please make it.

In general, feature parity with C math.h (in and of itself) doesn't appear to be a high priority for Fortran standards committee.

The best way to get this moved on to the "We really should do it" list is to make a strong use case for it ho help justify the return on investment for implementers.

@klausler
Copy link

It's not about feature parity with C, it's about feature parity with the modern IEEE-754 standard for floating-point arithmetic. log2 is one member of its list of recommended functions, and Fortran already has most of the rest.

@gklimowicz
Copy link
Member

The best way to get this moved on to the "We really should do it" list is to make a strong use case for it ho help justify the return on investment for implementers.

Peter's argument works for me, too. I'll see what I can do to help move this forward.

@brandongc
Copy link
Author

From Table 9.1 from IEEE-754

  • exp
  • expm1
  • exp2
  • exp2m1
  • exp10
  • exp10m1
  • log
  • log2
  • log10
  • logp1
  • log2p1
  • log10p1
  • hypot
  • rSqrt
  • compound
  • rootn
  • pown
  • sin
  • cos
  • tan
  • sinPi
  • cosPi
  • tanPi
  • asin
  • acos
  • atan
  • atan2
  • sinh
  • cosh
  • tanh
  • acosh
  • atanh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clause 16 Standard Clause 16: Intrinsic procedures and modules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants