From 7d88a8706b9cd6d22963c4db5e2ed40393ca936e Mon Sep 17 00:00:00 2001
From: Conor Hoekstra <36027403+codereport@users.noreply.github.com>
Date: Wed, 2 Feb 2022 19:01:45 -0500
Subject: [PATCH] Fix `fixed_point` binary operation documentation (#10198)
As pointed out by @bdice in https://github.com/rapidsai/cudf/pull/10179, the docs are backwards for some of the binary operations on `fixed_point`. This PR fixes them and removes the `
` HTML tag as well.
Authors:
- Conor Hoekstra (https://github.com/codereport)
Approvers:
- Bradley Dice (https://github.com/bdice)
- David Wendt (https://github.com/davidwendt)
- MithunR (https://github.com/mythrocks)
URL: https://github.com/rapidsai/cudf/pull/10198
---
cpp/include/cudf/fixed_point/fixed_point.hpp | 54 ++++++++++----------
1 file changed, 27 insertions(+), 27 deletions(-)
diff --git a/cpp/include/cudf/fixed_point/fixed_point.hpp b/cpp/include/cudf/fixed_point/fixed_point.hpp
index 6a85428d8f0..a7112ae415d 100644
--- a/cpp/include/cudf/fixed_point/fixed_point.hpp
+++ b/cpp/include/cudf/fixed_point/fixed_point.hpp
@@ -387,9 +387,9 @@ class fixed_point {
/**
* @brief operator + (for adding two `fixed_point` numbers)
*
- * If `_scale`s are equal, `_value`s are added
- * 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`
@@ -402,9 +402,9 @@ class fixed_point {
/**
* @brief operator - (for subtracting two `fixed_point` numbers)
*
- * If `_scale`s are equal, `_value`s are subtracted
- * 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`
@@ -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`
@@ -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`
@@ -443,9 +443,9 @@ class fixed_point {
/**
* @brief operator == (for comparing two `fixed_point` numbers)
*
- * If `_scale`s are equal, `_value`s are compared
- * 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`
@@ -458,9 +458,9 @@ class fixed_point {
/**
* @brief operator != (for comparing two `fixed_point` numbers)
*
- * If `_scale`s are equal, `_value`s are compared
- * 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`
@@ -473,9 +473,9 @@ class fixed_point {
/**
* @brief operator <= (for comparing two `fixed_point` numbers)
*
- * If `_scale`s are equal, `_value`s are compared
- * 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`
@@ -488,9 +488,9 @@ class fixed_point {
/**
* @brief operator >= (for comparing two `fixed_point` numbers)
*
- * If `_scale`s are equal, `_value`s are compared
- * 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`
@@ -503,9 +503,9 @@ class fixed_point {
/**
* @brief operator < (for comparing two `fixed_point` numbers)
*
- * If `_scale`s are equal, `_value`s are compared
- * 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`
@@ -518,9 +518,9 @@ class fixed_point {
/**
* @brief operator > (for comparing two `fixed_point` numbers)
*
- * If `_scale`s are equal, `_value`s are compared
- * 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`
@@ -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`