Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[BUG] numeric_limits for f16 inherits storage-type return values

Open Beginner friendly
#3,260 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 5 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp
Domain
backend

Research direction

Open cpp/base/f16.hpp and read the std::numeric_limits<base::f16> specialization: it derives from numeric_limits<storage_type> and only overrides quiet_NaN()/signaling_NaN(). Add overrides for min(), lowest(), max(), epsilon() and round_error() that return base::f16, converting from the storage-type base implementations. Because no caller is reported, add a static_assert or small C++ test in the cpp test suite asserting those members return base::f16; done means it compiles and the assertions pass.

Written by the indexing model from the issue text.

Description

Affected code

cpp/base/f16.hpp, std::numeric_limits<base::f16<T>>

Behavior

The specialization derives from std::numeric_limits<base::f16<T>::storage_type> and overrides only quiet_NaN() and signaling_NaN() to return base::f16<T>. Other value-returning members such as min(), lowest(), max(), epsilon(), and round_error() are inherited with the storage type as their return type, rather than base::f16<T> as required by the numeric_limits<T> interface. This makes the public specialization's signatures inconsistent with its advertised type even if an implicit conversion is available at a call site.

This is based on the visible specialization; no C++ build or test was run. There is no tracked caller demonstrating the downstream compile/runtime impact.

Dominant language
C++
Stars
9.2k
Forks
726
PR merge metrics
No merged PRs in 30d

Getting set up

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 activeloopai/deeplake

All issues in activeloopai/deeplake

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.