From d00d4572620a474660e9b4879c33b83a1d71b062 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Thu, 4 Nov 2021 18:08:10 -0500 Subject: [PATCH] Docs: `TwicePrecision` is an internal type (#42863) Fixes #42857 --- base/twiceprecision.jl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/base/twiceprecision.jl b/base/twiceprecision.jl index 84972d5c849eb..8f80b2c8438a0 100644 --- a/base/twiceprecision.jl +++ b/base/twiceprecision.jl @@ -162,7 +162,18 @@ div12(x, y) = div12(promote(x, y)...) TwicePrecision{T}((num, denom)) A number with twice the precision of `T`, e.g., quad-precision if `T = -Float64`. `hi` represents the high bits (most significant bits) and +Float64`. + +!!! warn + `TwicePrecision` is an internal type used to increase the + precision of floating-point ranges, and not intended for external use. + If you encounter them in real code, the most likely explanation is + that you are directly accessing the fields of a range. Use + the function interface instead, `step(r)` rather than `r.step` + +# Extended help + +`hi` represents the high bits (most significant bits) and `lo` the low bits (least significant bits). Rational values `num//denom` can be approximated conveniently using the syntax `TwicePrecision{T}((num, denom))`.