Skip to content

Conversation

Neerajpathak07
Copy link
Member

@Neerajpathak07 Neerajpathak07 commented Mar 14, 2025

Resolves #6050.

Description

What is the purpose of this pull request?

This pull request:

  • adds constants/float32/max-safe-nth-tribonacci to expand the scope for float32 operations.

Related Issues

Does this pull request have any related issues?

This pull request:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.


@stdlib-js/reviewers

@stdlib-bot
Copy link
Contributor

stdlib-bot commented Mar 14, 2025

Coverage Report

Package Statements Branches Functions Lines
constants/float32/max-safe-nth-tribonacci $\color{green}49/49$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}0/0$
$\color{green}+100.00\%$
$\color{green}49/49$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this PR.

@Neerajpathak07
Copy link
Member Author

@kgryte @Planeshifter LMK your views on this

@Neerajpathak07 Neerajpathak07 marked this pull request as ready for review March 14, 2025 19:57
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Mar 14, 2025
@kgryte kgryte added the Feature Issue or pull request for adding a new feature. label Mar 14, 2025
Copy link
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

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

LGTM

@kgryte kgryte removed the Needs Review A pull request which needs code review. label Mar 14, 2025
Copy link
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

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

Sorry. I take this back. @Neerajpathak07 how did you calculate the maximum safe tribonacci? When checking in the REPL, I find

In [40]: base.tribonacci(30)
Out[40]: 15902591

In [41]: FLOAT32_MAX_SAFE_INTEGER
Out[41]: 16777215

In [42]: base.tribonacci(31)
Out[42]: 29249425

base.tribonacci( 35 ) far exceeds the maximum safe float32.

@kgryte kgryte added the Needs Changes Pull request which needs changes before being merged. label Mar 14, 2025
@Neerajpathak07
Copy link
Member Author

Neerajpathak07 commented Mar 15, 2025

@kgryte Was using a external Float Converter which would be the reason for the inaccurate values. Was having doubts on how to use the repl to find the values.
Will be going with tribonacci( 30 ) as the value resides well below the safe integer limit.

@Neerajpathak07 Neerajpathak07 requested a review from kgryte March 15, 2025 04:15
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Mar 15, 2025
@kgryte kgryte removed Needs Changes Pull request which needs changes before being merged. Needs Review A pull request which needs code review. labels Mar 15, 2025
@kgryte kgryte merged commit a2bca96 into stdlib-js:develop Mar 15, 2025
38 checks passed
@Neerajpathak07 Neerajpathak07 deleted the float32/tribonacci branch March 15, 2025 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Issue or pull request for adding a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC]: add constants/float32/max-safe-nth-tribonacci

3 participants