Skip to content

feat: add C implementation for stats/base/dists/frechet/mode #4571

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

Merged
merged 5 commits into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore: fix formatting
Signed-off-by: Philipp Burckhardt <[email protected]>
  • Loading branch information
Planeshifter authored May 5, 2025
commit af8a9495a575e7e40a3ca417a4404c01e2d250ec
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ static double benchmark( void ) {

t = tic();
for ( i = 0; i < ITERATIONS; i++ ) {
y = stdlib_base_dists_frechet_mode( alpha[ i%100 ], s[ i%100 ], m[ i%100 ] );
y = stdlib_base_dists_frechet_mode( alpha[ i%100 ], s[ i%100 ], m[ i%100 ] );
if ( y != y ) {
printf( "should not return NaN\n" );
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ double stdlib_base_dists_frechet_mode( const double alpha, const double s, const
return 0.0 / 0.0; // NaN
}
ainv = 1.0 / alpha;
return m + ( s * stdlib_base_pow( 1.0 + ainv, -ainv ) );
return m + ( s * stdlib_base_pow( 1.0 + ainv, -ainv ) );
}
Loading