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

acosh: Change example to avoid returning NaN #14477

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

szarnyasg
Copy link
Collaborator

@szarnyasg szarnyasg commented Oct 21, 2024

#13346 added acosh along with other hyperbolic trigonometric functions. The current acosh example uses a value that falls outside of the function's domain. In Postgres, this returns and error, while in DuckDB it returns a NaN:

postgres=# select acosh(0.5);
ERROR:  input is out of range
D select acosh(0.5);
┌────────────┐
│ acosh(0.5) │
│   double   │
├────────────┤
│        nan │
└────────────┘

This PR changes the example.

@szarnyasg szarnyasg force-pushed the update-acosh-example branch from dafbf90 to 9249f2e Compare October 21, 2024 17:28
@duckdb-draftbot duckdb-draftbot marked this pull request as draft October 21, 2024 17:28
@szarnyasg szarnyasg marked this pull request as ready for review October 21, 2024 17:29
@Mytherin
Copy link
Collaborator

Thanks! LGTM

@szarnyasg szarnyasg requested a review from Mytherin October 21, 2024 17:30
@Mytherin Mytherin merged commit 10c4243 into duckdb:main Oct 22, 2024
44 of 45 checks passed
@szarnyasg szarnyasg deleted the update-acosh-example branch October 22, 2024 18:43
github-actions bot pushed a commit to duckdb/duckdb-r that referenced this pull request Nov 2, 2024
acosh: Change example to avoid returning NaN (duckdb/duckdb#14477)
github-actions bot added a commit to duckdb/duckdb-r that referenced this pull request Nov 2, 2024
acosh: Change example to avoid returning NaN (duckdb/duckdb#14477)

Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants