Skip to content
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

IEEE-754 recommended functions #6148

Open
8 tasks
simonbyrne opened this issue Mar 13, 2014 · 8 comments
Open
8 tasks

IEEE-754 recommended functions #6148

simonbyrne opened this issue Mar 13, 2014 · 8 comments
Labels
help wanted Indicates that a maintainer wants help on an issue or pull request maths Mathematical functions

Comments

@simonbyrne
Copy link
Contributor

As I was enjoying the entertaining read that is the IEEE-754 standard for floating point arithmetic, I noticed they recommend some functions (section 9.2), of which we currently lack:

  • exp2m1: 2^x-1
  • exp10m1: 10^x-1
  • log2p1: log2(1+x) (might want to call this log21p, to match log1p?)
  • log10p1: log10(1+x) (similarly, log101p?)
  • rsqrt: 1/sqrt(x)
  • compound: (1+x)^n (pow1p?)
  • rootn: x^(1/n)
  • various inverse trig-pi functions, e.g. atanpi: atan(x)/pi (somewhat confusingly, not all of these are mentioned in the table, although they are referred to in the text below).

There's also three different "pow" functions: pown for integer exponents, two for handling floating-point exponents pow and powr which seem to differ mostly in how signals are raised, so we could probably wait until #2976 is completed.

@andrioni
Copy link
Member

I was thinking just today about how to deal with the rest #2976, namely the flags, but I haven't yet found a nice enough solution.

@lobingera
Copy link

Just as a comment: not everyone has IEEE library access, you are referencing a document that has a price tag.

@JeffBezanson
Copy link
Sponsor Member

I was able to find a free copy somewhere.

@lobingera
Copy link

I have f.e. (due to my job) IEEE library access and i guess a lot of universities also have, but still...

@johnmyleswhite
Copy link
Member

To obey US laws, Julia issues should probably not post links to free copies of things that are under copyright.

@lobingera
Copy link

... but this is only a side discussion. I remember this operations to be available on FP HW and the question is rather, does LLVM support them directly or can we make julia recognize them?

@simonbyrne
Copy link
Contributor Author

@lobingera I agree it's ridiculous that such a widely-used standard comes with a price tag, but if it's any consolation, it's even more expensive to buy it from ISO

@oscardssmith
Copy link
Member

oscardssmith commented Dec 2, 2022

It's probably worth pointing out that as of Julia 1.8 we do have special paths for Float^Int which is the pown part of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Indicates that a maintainer wants help on an issue or pull request maths Mathematical functions
Projects
None yet
Development

No branches or pull requests

9 participants