Skip to content

feat: add C implementation for math/base/special/acsch #1662

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

Closed

Conversation

yaswanthkosuru
Copy link
Contributor

@yaswanthkosuru yaswanthkosuru commented Mar 3, 2024

Resolves #860

Description

FEATURE TO
ADD C IMPLEMENTATION FOR ACSCH FUNCTION

This pull request:

Copy link
Contributor

@stdlib-bot stdlib-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 Hi there! 👋

And thank you for opening your first pull request! We will review it shortly. 🏃 💨

Copy link
Member

@Pranavchiku Pranavchiku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR! Requested changes.

Comment on lines +117 to +118
double out = stdlib_base_acsch( 2.0 );
// returns ~0.5493
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
double out = stdlib_base_acsch( 2.0 );
// returns ~0.5493
double out = stdlib_base_acsch( 1.0 );
// returns ~0.881

/**
* @license Apache-2.0
*
* Copyright (c) 2022 The Stdlib Authors.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Copyright (c) 2022 The Stdlib Authors.
* Copyright (c) 2024 The Stdlib Authors.

#/
# @license Apache-2.0
#
# Copyright (c) 2018 The Stdlib Authors.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Copyright (c) 2018 The Stdlib Authors.
# Copyright (c) 2024 The Stdlib Authors.

/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Copyright (c) 2018 The Stdlib Authors.
* Copyright (c) 2024 The Stdlib Authors.


t = tic();
for ( i = 0; i < ITERATIONS; i++ ) {
x = ( 100.0*rand_double() ) + 1.1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any specific reason for 1.1 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok thank u for pointing in right direction it should be x = ( 200.0*rand_double() ) -100(referenced from benchmark.js in same file)

/**
* @license Apache-2.0
*
* Copyright (c) 2022 The Stdlib Authors.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Copyright (c) 2022 The Stdlib Authors.
* Copyright (c) 2024 The Stdlib Authors.

#/
# @license Apache-2.0
#
# Copyright (c) 2022 The Stdlib Authors.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Copyright (c) 2022 The Stdlib Authors.
# Copyright (c) 2024 The Stdlib Authors.

/**
* @license Apache-2.0
*
* Copyright (c) 2022 The Stdlib Authors.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Copyright (c) 2022 The Stdlib Authors.
* Copyright (c) 2024 The Stdlib Authors.

/**
* @license Apache-2.0
*
* Copyright (c) 2022 The Stdlib Authors.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Copyright (c) 2022 The Stdlib Authors.
* Copyright (c) 2024 The Stdlib Authors.

Comment on lines +29 to +30
* out = stdlib_base_acsch( 2.0 );
* // returns ~0.5493
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* out = stdlib_base_acsch( 2.0 );
* // returns ~0.5493
* out = stdlib_base_acsch( 1.0 );
* // returns ~0.881

@Pranavchiku Pranavchiku added Feature Issue or pull request for adding a new feature. C Issue involves or relates to C. Needs Changes Pull request which needs changes before being merged. labels Mar 3, 2024
@Planeshifter Planeshifter changed the title feat: add c implementation for acsch feat: add C implementation for math/base/special/acsch Mar 3, 2024
@yaswanthkosuru yaswanthkosuru deleted the feature/acsh branch March 7, 2024 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C Issue involves or relates to C. Feature Issue or pull request for adding a new feature. Needs Changes Pull request which needs changes before being merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC]: Add C implementation for @stdlib/math/base/special/acsch
3 participants