From cf038a70104ed9311660d41d43010cbdbf002f14 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Thu, 27 Aug 2026 11:22:09 +0530 Subject: [PATCH] docs: add equations to complex-valued function READMEs Add defining equations to the intro sections of cceil, cfloor, cround, cceiln, cfloorn, croundn, cpolar, csignum, cflipsign and their single-precision variants. Ref: https://github.com/stdlib-js/metr-issue-tracker/issues/1257 --- .../@stdlib/math/base/special/cceil/README.md | 14 ++++++++++++++ .../@stdlib/math/base/special/cceilf/README.md | 14 ++++++++++++++ .../@stdlib/math/base/special/cceiln/README.md | 14 ++++++++++++++ .../math/base/special/cflipsign/README.md | 8 ++++++++ .../math/base/special/cflipsignf/README.md | 8 ++++++++ .../@stdlib/math/base/special/cfloor/README.md | 14 ++++++++++++++ .../@stdlib/math/base/special/cfloorf/README.md | 14 ++++++++++++++ .../@stdlib/math/base/special/cfloorn/README.md | 14 ++++++++++++++ .../@stdlib/math/base/special/cfloornf/README.md | 14 ++++++++++++++ .../@stdlib/math/base/special/cpolar/README.md | 16 ++++++++++++++++ .../@stdlib/math/base/special/cpolarf/README.md | 16 ++++++++++++++++ .../@stdlib/math/base/special/cround/README.md | 14 ++++++++++++++ .../@stdlib/math/base/special/croundf/README.md | 14 ++++++++++++++ .../@stdlib/math/base/special/croundn/README.md | 14 ++++++++++++++ .../@stdlib/math/base/special/csignum/README.md | 10 ++++++++++ .../@stdlib/math/base/special/csignumf/README.md | 10 ++++++++++ 16 files changed, 208 insertions(+) diff --git a/lib/node_modules/@stdlib/math/base/special/cceil/README.md b/lib/node_modules/@stdlib/math/base/special/cceil/README.md index 9ac96e4aa841..0b2c3369cd32 100644 --- a/lib/node_modules/@stdlib/math/base/special/cceil/README.md +++ b/lib/node_modules/@stdlib/math/base/special/cceil/README.md @@ -22,6 +22,20 @@ limitations under the License. > Round each component of a double-precision complex floating-point number toward positive infinity. +
+ + + +```math +\mathop{\mathrm{cceil}}(a + bi) = \lceil a \rceil + \lceil b \rceil i +``` + + + +
+ + +
## Usage diff --git a/lib/node_modules/@stdlib/math/base/special/cceilf/README.md b/lib/node_modules/@stdlib/math/base/special/cceilf/README.md index 2945eccd8ae0..bc0a61ef7a19 100644 --- a/lib/node_modules/@stdlib/math/base/special/cceilf/README.md +++ b/lib/node_modules/@stdlib/math/base/special/cceilf/README.md @@ -22,6 +22,20 @@ limitations under the License. > Round each component of a single-precision complex floating-point number toward positive infinity. +
+ + + +```math +\mathop{\mathrm{cceil}}(a + bi) = \lceil a \rceil + \lceil b \rceil i +``` + + + +
+ + +
## Usage diff --git a/lib/node_modules/@stdlib/math/base/special/cceiln/README.md b/lib/node_modules/@stdlib/math/base/special/cceiln/README.md index befda7b2b10d..cf91f2a3444d 100644 --- a/lib/node_modules/@stdlib/math/base/special/cceiln/README.md +++ b/lib/node_modules/@stdlib/math/base/special/cceiln/README.md @@ -22,6 +22,20 @@ limitations under the License. > Round each component of a double-precision complex floating-point number to the nearest multiple of `10^n` toward positive infinity. +
+ + + +```math +\mathop{\mathrm{cceiln}}(a + bi, n) = \mathop{\mathrm{ceiln}}(a, n) + \mathop{\mathrm{ceiln}}(b, n)\,i +``` + + + +
+ + +
## Usage diff --git a/lib/node_modules/@stdlib/math/base/special/cflipsign/README.md b/lib/node_modules/@stdlib/math/base/special/cflipsign/README.md index 8fd0610d4ddb..87028e633138 100644 --- a/lib/node_modules/@stdlib/math/base/special/cflipsign/README.md +++ b/lib/node_modules/@stdlib/math/base/special/cflipsign/README.md @@ -26,6 +26,14 @@ limitations under the License.
+ + +```math +w = z \cdot \mathop{\mathrm{sign}}(y) +``` + + +
diff --git a/lib/node_modules/@stdlib/math/base/special/cflipsignf/README.md b/lib/node_modules/@stdlib/math/base/special/cflipsignf/README.md index aa983fc53791..7155258c2418 100644 --- a/lib/node_modules/@stdlib/math/base/special/cflipsignf/README.md +++ b/lib/node_modules/@stdlib/math/base/special/cflipsignf/README.md @@ -26,6 +26,14 @@ limitations under the License.
+ + +```math +w = z \cdot \mathop{\mathrm{sign}}(y) +``` + + +
diff --git a/lib/node_modules/@stdlib/math/base/special/cfloor/README.md b/lib/node_modules/@stdlib/math/base/special/cfloor/README.md index 00c2385932f1..d8918742885f 100644 --- a/lib/node_modules/@stdlib/math/base/special/cfloor/README.md +++ b/lib/node_modules/@stdlib/math/base/special/cfloor/README.md @@ -22,6 +22,20 @@ limitations under the License. > Round a double-precision complex floating-point number toward negative infinity. +
+ + + +```math +\mathop{\mathrm{cfloor}}(a + bi) = \lfloor a \rfloor + \lfloor b \rfloor i +``` + + + +
+ + +
## Usage diff --git a/lib/node_modules/@stdlib/math/base/special/cfloorf/README.md b/lib/node_modules/@stdlib/math/base/special/cfloorf/README.md index 8c4c4ce3dd55..75f28097a9c5 100644 --- a/lib/node_modules/@stdlib/math/base/special/cfloorf/README.md +++ b/lib/node_modules/@stdlib/math/base/special/cfloorf/README.md @@ -22,6 +22,20 @@ limitations under the License. > Round each component of a single-precision complex floating-point number toward negative infinity. +
+ + + +```math +\mathop{\mathrm{cfloor}}(a + bi) = \lfloor a \rfloor + \lfloor b \rfloor i +``` + + + +
+ + +
## Usage diff --git a/lib/node_modules/@stdlib/math/base/special/cfloorn/README.md b/lib/node_modules/@stdlib/math/base/special/cfloorn/README.md index 65e7bd025b44..3cb38b6d20e8 100644 --- a/lib/node_modules/@stdlib/math/base/special/cfloorn/README.md +++ b/lib/node_modules/@stdlib/math/base/special/cfloorn/README.md @@ -22,6 +22,20 @@ limitations under the License. > Round each component of a double-precision complex floating-point number to the nearest multiple of `10^n` toward negative infinity. +
+ + + +```math +\mathop{\mathrm{cfloorn}}(a + bi, n) = \mathop{\mathrm{floorn}}(a, n) + \mathop{\mathrm{floorn}}(b, n)\,i +``` + + + +
+ + +
## Usage diff --git a/lib/node_modules/@stdlib/math/base/special/cfloornf/README.md b/lib/node_modules/@stdlib/math/base/special/cfloornf/README.md index 58181f0d8a44..33b87f9e16b1 100644 --- a/lib/node_modules/@stdlib/math/base/special/cfloornf/README.md +++ b/lib/node_modules/@stdlib/math/base/special/cfloornf/README.md @@ -22,6 +22,20 @@ limitations under the License. > Round each component of a single-precision complex floating-point number to the nearest multiple of `10^n` toward negative infinity. +
+ + + +```math +\mathop{\mathrm{cfloorn}}(a + bi, n) = \mathop{\mathrm{floorn}}(a, n) + \mathop{\mathrm{floorn}}(b, n)\,i +``` + + + +
+ + +
## Usage diff --git a/lib/node_modules/@stdlib/math/base/special/cpolar/README.md b/lib/node_modules/@stdlib/math/base/special/cpolar/README.md index 3175adc49d39..0f4a90ff7146 100644 --- a/lib/node_modules/@stdlib/math/base/special/cpolar/README.md +++ b/lib/node_modules/@stdlib/math/base/special/cpolar/README.md @@ -24,6 +24,18 @@ limitations under the License.
+The function computes the [absolute value][absolute-value] and [phase][complex-number-argument] of a complex number + + + +```math +z = r e^{i\theta} +``` + + + +where `r = |z|` is the absolute value (modulus) and `θ` is the phase (argument). +
@@ -223,6 +235,10 @@ int main( void ) {