Skip to content

Add lgamma_r and lgammaf_r#518

Merged
Amanieu merged 1 commit intorust-lang:masterfrom
ankane:lgamma
Mar 5, 2023
Merged

Add lgamma_r and lgammaf_r#518
Amanieu merged 1 commit intorust-lang:masterfrom
ankane:lgamma

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!

tgross35 pushed a commit that referenced this pull request Jan 31, 2026
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

Comments