From a5e3bfabdeddd73c5c6cda268d648ed11b266569 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 11 May 2020 11:13:02 -0400 Subject: [PATCH] Reference signbit from cispi and vice versa --- base/complex.jl | 7 ++++--- base/number.jl | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/base/complex.jl b/base/complex.jl index 974d8f38e2f04c..1e97844381d79e 100644 --- a/base/complex.jl +++ b/base/complex.jl @@ -554,9 +554,10 @@ This function also accepts integer or boolean arguments, and then returns integer results. This allows calculating ``(-1)^s`` conveniently and efficiently. -`cispi` is related to `signbit`, and allows decomposing integers into -sign bit and absolute value: ``cispi(signbit(n)) * abs(n) == n``. For -boolean values, it is also, ``signbit(cispi(b)) == b``. +`cispi` is related to [`signbit`](@ref), and allows decomposing +integers into sign bit and absolute value: ``cispi(signbit(n)) * +abs(n) == n``. For boolean values, it is also, ``signbit(cispi(b)) == +b``. # Examples ```jldoctest diff --git a/base/number.jl b/base/number.jl index 9dd3bae09908fa..bb5a39f533d48a 100644 --- a/base/number.jl +++ b/base/number.jl @@ -92,8 +92,8 @@ copy(x::Number) = x # some code treats numbers as collection-like Returns `true` if the value of the sign of `x` is negative, otherwise `false`. -Related to `signbit` is `cispi` (which calculates `(-1)^n`). This -allows decomposing integers into sign bit and absolute value: +Related to `signbit` is [`cispi`](@ref) (which calculates `(-1)^n`). +This allows decomposing integers into sign bit and absolute value: ``cispi(signbit(n)) * abs(n) == n``. For boolean values, it is also, ``signbit(cispi(b)) == b``.