JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.33k stars 5.45k forks source link

IEEE-754 recommended functions #6148

Open simonbyrne opened 10 years ago

simonbyrne commented 10 years ago

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:

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 commented 10 years ago

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 commented 10 years ago

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

JeffBezanson commented 10 years ago

I was able to find a free copy somewhere.

lobingera commented 10 years ago

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

johnmyleswhite commented 10 years ago

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

lobingera commented 10 years ago

... 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 commented 10 years ago

@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 commented 1 year ago

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.