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

Fix fixed_point binary operation documentation #10198

Merged
merged 3 commits into from
Feb 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions cpp/include/cudf/fixed_point/fixed_point.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,9 @@ class fixed_point {
/**
* @brief operator + (for adding two `fixed_point` numbers)
*
* If `_scale`s are equal, `_value`s are added <br>
* If `_scale`s are not equal, number with smaller `_scale` is shifted to the
* greater `_scale`, and then `_value`s are added
* If `_scale`s are equal, `_value`s are added.
* If `_scale`s are not equal, the number with the larger `_scale` is shifted to the
* smaller `_scale`, and then the `_value`s are added.
*
* @tparam Rep1 Representation type of number being added to `this`
* @tparam Rad1 Radix (base) type of number being added to `this`
Expand All @@ -402,9 +402,9 @@ class fixed_point {
/**
* @brief operator - (for subtracting two `fixed_point` numbers)
*
* If `_scale`s are equal, `_value`s are subtracted <br>
* If `_scale`s are not equal, number with smaller `_scale` is shifted to the
* greater `_scale`, and then `_value`s are subtracted
* If `_scale`s are equal, `_value`s are subtracted.
* If `_scale`s are not equal, the number with the larger `_scale` is shifted to the
* smaller `_scale`, and then the `_value`s are subtracted.
*
* @tparam Rep1 Representation type of number being added to `this`
* @tparam Rad1 Radix (base) type of number being added to `this`
Expand All @@ -417,7 +417,7 @@ class fixed_point {
/**
* @brief operator * (for multiplying two `fixed_point` numbers)
*
* `_scale`s are added and `_value`s are multiplied
* `_scale`s are added and `_value`s are multiplied.
*
* @tparam Rep1 Representation type of number being added to `this`
* @tparam Rad1 Radix (base) type of number being added to `this`
Expand All @@ -430,7 +430,7 @@ class fixed_point {
/**
* @brief operator / (for dividing two `fixed_point` numbers)
*
* `_scale`s are subtracted and `_value`s are divided
* `_scale`s are subtracted and `_value`s are divided.
*
* @tparam Rep1 Representation type of number being added to `this`
* @tparam Rad1 Radix (base) type of number being added to `this`
Expand All @@ -443,9 +443,9 @@ class fixed_point {
/**
* @brief operator == (for comparing two `fixed_point` numbers)
*
* If `_scale`s are equal, `_value`s are compared <br>
* If `_scale`s are not equal, number with smaller `_scale` is shifted to the
* greater `_scale`, and then `_value`s are compared
* If `_scale`s are equal, `_value`s are compared.
* If `_scale`s are not equal, the number with the larger `_scale` is shifted to the
* smaller `_scale`, and then the `_value`s are compared.
*
* @tparam Rep1 Representation type of number being added to `this`
* @tparam Rad1 Radix (base) type of number being added to `this`
Expand All @@ -458,9 +458,9 @@ class fixed_point {
/**
* @brief operator != (for comparing two `fixed_point` numbers)
*
* If `_scale`s are equal, `_value`s are compared <br>
* If `_scale`s are not equal, number with smaller `_scale` is shifted to the
* greater `_scale`, and then `_value`s are compared
* If `_scale`s are equal, `_value`s are compared.
* If `_scale`s are not equal, the number with the larger `_scale` is shifted to the
* smaller `_scale`, and then the `_value`s are compared.
*
* @tparam Rep1 Representation type of number being added to `this`
* @tparam Rad1 Radix (base) type of number being added to `this`
Expand All @@ -473,9 +473,9 @@ class fixed_point {
/**
* @brief operator <= (for comparing two `fixed_point` numbers)
*
* If `_scale`s are equal, `_value`s are compared <br>
* If `_scale`s are not equal, number with smaller `_scale` is shifted to the
* greater `_scale`, and then `_value`s are compared
* If `_scale`s are equal, `_value`s are compared.
* If `_scale`s are not equal, the number with the larger `_scale` is shifted to the
* smaller `_scale`, and then the `_value`s are compared.
*
* @tparam Rep1 Representation type of number being added to `this`
* @tparam Rad1 Radix (base) type of number being added to `this`
Expand All @@ -488,9 +488,9 @@ class fixed_point {
/**
* @brief operator >= (for comparing two `fixed_point` numbers)
*
* If `_scale`s are equal, `_value`s are compared <br>
* If `_scale`s are not equal, number with smaller `_scale` is shifted to the
* greater `_scale`, and then `_value`s are compared
* If `_scale`s are equal, `_value`s are compared.
* If `_scale`s are not equal, the number with the larger `_scale` is shifted to the
* smaller `_scale`, and then the `_value`s are compared.
*
* @tparam Rep1 Representation type of number being added to `this`
* @tparam Rad1 Radix (base) type of number being added to `this`
Expand All @@ -503,9 +503,9 @@ class fixed_point {
/**
* @brief operator < (for comparing two `fixed_point` numbers)
*
* If `_scale`s are equal, `_value`s are compared <br>
* If `_scale`s are not equal, number with smaller `_scale` is shifted to the
* greater `_scale`, and then `_value`s are compared
* If `_scale`s are equal, `_value`s are compared.
* If `_scale`s are not equal, the number with the larger `_scale` is shifted to the
* smaller `_scale`, and then the `_value`s are compared.
*
* @tparam Rep1 Representation type of number being added to `this`
* @tparam Rad1 Radix (base) type of number being added to `this`
Expand All @@ -518,9 +518,9 @@ class fixed_point {
/**
* @brief operator > (for comparing two `fixed_point` numbers)
*
* If `_scale`s are equal, `_value`s are compared <br>
* If `_scale`s are not equal, number with smaller `_scale` is shifted to the
* greater `_scale`, and then `_value`s are compared
* If `_scale`s are equal, `_value`s are compared.
* If `_scale`s are not equal, the number with the larger `_scale` is shifted to the
* smaller `_scale`, and then the `_value`s are compared.
*
* @tparam Rep1 Representation type of number being added to `this`
* @tparam Rad1 Radix (base) type of number being added to `this`
Expand All @@ -534,7 +534,7 @@ class fixed_point {
* @brief Method for creating a `fixed_point` number with a new `scale`
*
* The `fixed_point` number returned will have the same value, underlying representation and
* radix as `this`, the only thing changed is the scale
* radix as `this`, the only thing changed is the scale.
*
* @param scale The `scale` of the returned `fixed_point` number
* @return `fixed_point` number with a new `scale`
Expand Down