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

Add lgamma_r and lgammaf_r #518

Merged
merged 1 commit into from
Mar 5, 2023
Merged

Add lgamma_r and lgammaf_r #518

merged 1 commit into from
Mar 5, 2023

Conversation

ankane
Copy link
Contributor

@ankane ankane commented Mar 4, 2023

@ankane ankane changed the title Added lgamma_r and lgammaf_r Add lgamma_r and lgammaf_r Mar 4, 2023
@ankane
Copy link
Contributor Author

ankane commented Mar 4, 2023

Note the signature is different from math.h - not exactly sure if that should be taken into account here or downstream for rust-lang/rust#99747.

@ankane
Copy link
Contributor Author

ankane commented Mar 4, 2023

Now thinking it may need to be taken into account here since the signature in cmath.rs will be:

pub fn lgamma_r(n: f64, s: &mut i32) -> f64;

@Amanieu
Copy link
Member

Amanieu commented Mar 5, 2023

The signature here should match the C one. You'll need to manually generate the wrapper function instead of using the no_mangle macro.

@ankane
Copy link
Contributor Author

ankane commented Mar 5, 2023

Thanks (again) @Amanieu. Updated to match the C signature.

@Amanieu Amanieu merged commit 68cf2e9 into rust-lang:master Mar 5, 2023
@ankane
Copy link
Contributor Author

ankane commented Mar 6, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants