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

Gamma function #864

Open
steveklabnik opened this issue Feb 15, 2015 · 4 comments
Open

Gamma function #864

steveklabnik opened this issue Feb 15, 2015 · 4 comments
Labels
T-libs-api Relevant to the library API team, which will review and decide on the RFC.

Comments

@steveklabnik
Copy link
Member

Issue by stygstra
Friday Oct 24, 2014 at 02:44 GMT

For earlier discussion, see rust-lang/rust#18271

This issue was labelled with: A-libs in the Rust repository


It would be nice if tgamma and lgamma_r were exposed via std::num::Float. The foreign function definitions for both are present in src/libstd/num/f{32,64}.rs, but they're not exposed in the standard library.

@steveklabnik steveklabnik added A-community-library Area: The RFC is related to a community library. A-libs and removed A-community-library Area: The RFC is related to a community library. labels Feb 15, 2015
@petrochenkov petrochenkov added T-libs-api Relevant to the library API team, which will review and decide on the RFC. and removed A-libs labels Jan 28, 2018
@robsmith11
Copy link

Any reason this isn't moving forward? The gamma function is commonly used in scientific computing so would be useful to have easy access.

@droundy
Copy link

droundy commented Jul 3, 2021

I've got to say that this would certainly be convenient.

@Lokathor
Copy link
Contributor

Lokathor commented Jul 3, 2021

The Float trait doesn't even exist anymore.

most likely a path forward here is for someone to open a PR to add these methods directly to f32 and f64 behind a feature gate.

@kennytm
Copy link
Member

kennytm commented Jul 5, 2021

you could import the libm package if you need the tgamma and lgamma_r functions.

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Jul 28, 2022
Add gamma function to f32 and f64

Adds the [gamma function](https://en.wikipedia.org/wiki/Gamma_function) to `f32` and `f64` (`tgamma` and `tgammaf` from C).

Refs:
- rust-lang/rfcs#864
- rust-lang#18271
TaKO8Ki added a commit to TaKO8Ki/rust that referenced this issue Jun 27, 2023
Add gamma function to f32 and f64

Adds the [gamma function](https://en.wikipedia.org/wiki/Gamma_function) to `f32` and `f64` (`tgamma` and `tgammaf` from C).

Refs:
- rust-lang/rfcs#864
- rust-lang#18271
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 9, 2023
Add gamma function to f32 and f64

Adds the [gamma function](https://en.wikipedia.org/wiki/Gamma_function) to `f32` and `f64` (`tgamma` and `tgammaf` from C).

Refs:
- rust-lang/rfcs#864
- rust-lang#18271
RalfJung pushed a commit to RalfJung/miri that referenced this issue Aug 10, 2023
Add gamma function to f32 and f64

Adds the [gamma function](https://en.wikipedia.org/wiki/Gamma_function) to `f32` and `f64` (`tgamma` and `tgammaf` from C).

Refs:
- rust-lang/rfcs#864
- rust-lang/rust#18271
thomcc pushed a commit to tcdi/postgrestd that referenced this issue Oct 17, 2023
Add gamma function to f32 and f64

Adds the [gamma function](https://en.wikipedia.org/wiki/Gamma_function) to `f32` and `f64` (`tgamma` and `tgammaf` from C).

Refs:
- rust-lang/rfcs#864
- rust-lang/rust#18271
lnicola pushed a commit to lnicola/rust-analyzer that referenced this issue Apr 7, 2024
Add gamma function to f32 and f64

Adds the [gamma function](https://en.wikipedia.org/wiki/Gamma_function) to `f32` and `f64` (`tgamma` and `tgammaf` from C).

Refs:
- rust-lang/rfcs#864
- rust-lang/rust#18271
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this issue Apr 27, 2024
Add gamma function to f32 and f64

Adds the [gamma function](https://en.wikipedia.org/wiki/Gamma_function) to `f32` and `f64` (`tgamma` and `tgammaf` from C).

Refs:
- rust-lang/rfcs#864
- rust-lang/rust#18271
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-libs-api Relevant to the library API team, which will review and decide on the RFC.
Projects
None yet
Development

No branches or pull requests

6 participants