HAVE_LONG_DOUBLE is conditioned on but never set

Open Beginner friendly
#6,938 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
c, r
Domain
data

Research direction

Start by reading src/gsumm.c around lines 24-29 and trace the SQRTL and HAVE_LONG_DOUBLE references. Replace the conditional use with direct sqrtl calls as proposed, then verify that the macro is no longer needed and the package still builds and passes its checks.

Written by the indexing model from the issue text.

Description

internals

In gsumm.c, HAVE_LONG_DOUBLE is queried but it is never set (it is an internal value of R that seems to have come over from some copy-pasta).

https://github.com/Rdatatable/data.table/blob/a850eed4a469b1217ed920e703d876596a237188/src/gsumm.c#L24-L29

I think you can safely replace SQRTL by direct calls to sqrtl.

See thread from r-package-devel which was motivated by a similarish issue in the matrixStats package.

Dominant language
R
Stars
3.9k
Forks
1.1k
Avg merge
14h 4m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Rdatatable/data.table

All issues in Rdatatable/data.table

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.