google / google/xls

apfloat bias and unbias function should be symetric

Open
#2,038 0 comments 0 reactions 0 assignees View on GitHub
cleanup
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

Currently we have a variety of function for dealing w/ bias which takes a variety of argument types:
- https://google.github.io/xls/floating_point/#apfloatbias: apply bias to the given unbiased exponent
- takes just the unbiases exponent
- https://google.github.io/xls/floating_point/#apfloatunbiased_exponent: return the unbiased exponent from a given apfloat
- takes a whole apfloat value (even if the rest of the apfloat fields are not used)
- https://google.github.io/xls/floating_point/#apfloatexponent_bias: return the bias for the given apfloat type
- take just an apfloat sentinel for type inference

We should unify the different variants and have symetric pair for function (and methods) that can operate on different type of arguments.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.