Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Commit f56539b

Browse files
authored
Fix several bugs in API docs (#646)
* Fix type suffixes in API docs for math functions (microsoft/QuantumLibraries#438) * Fix API docs sample for IndexRange (microsoft/QuantumLibraries#445)
1 parent a15856e commit f56539b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/Simulation/QSharpFoundation/Arrays/Enumeration.qs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace Microsoft.Quantum.Arrays {
2121
/// The following `for` loops are equivalent:
2222
/// ```qsharp
2323
/// for (idx in IndexRange(array)) { ... }
24-
/// for (idx in IndexRange(array)) { ... }
24+
/// for (idx in 0 .. Length(array) - 1) { ... }
2525
/// ```
2626
function IndexRange<'TElement>(array : 'TElement[]) : Range {
2727
return 0..(Length(array) - 1);

src/Simulation/QSharpFoundation/Math/Math.qs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ namespace Microsoft.Quantum.Math {
4343
///
4444
/// # Example
4545
/// ```qsharp
46-
/// Message($"{AbsD(314)}"); // 314
47-
/// Message($"{AbsD(-271)}"); // 271
46+
/// Message($"{AbsI(314)}"); // 314
47+
/// Message($"{AbsI(-271)}"); // 271
4848
/// ```
4949
///
5050
/// # See Also
@@ -66,8 +66,8 @@ namespace Microsoft.Quantum.Math {
6666
///
6767
/// # Example
6868
/// ```qsharp
69-
/// Message($"{AbsD(314L)}"); // 314L
70-
/// Message($"{AbsD(-271L)}"); // 271L
69+
/// Message($"{AbsL(314L)}"); // 314L
70+
/// Message($"{AbsL(-271L)}"); // 271L
7171
/// ```
7272
///
7373
/// # See Also
@@ -182,7 +182,7 @@ namespace Microsoft.Quantum.Math {
182182
///
183183
/// # Example
184184
/// ```qsharp
185-
/// let max = MaxD(314, 271); // 314
185+
/// let max = MaxI(314, 271); // 314
186186
/// ```
187187
///
188188
/// # See Also
@@ -207,7 +207,7 @@ namespace Microsoft.Quantum.Math {
207207
///
208208
/// # Example
209209
/// ```qsharp
210-
/// let max = MaxD(314L, 271L); // 314L
210+
/// let max = MaxL(314L, 271L); // 314L
211211
/// ```
212212
///
213213
/// # See Also
@@ -257,7 +257,7 @@ namespace Microsoft.Quantum.Math {
257257
///
258258
/// # Example
259259
/// ```qsharp
260-
/// let min = MinD(314, 271); // 271
260+
/// let min = MinI(314, 271); // 271
261261
/// ```
262262
///
263263
/// # See Also
@@ -282,7 +282,7 @@ namespace Microsoft.Quantum.Math {
282282
///
283283
/// # Example
284284
/// ```qsharp
285-
/// let min = MinD(314L, 271L); // 271L
285+
/// let min = MinL(314L, 271L); // 271L
286286
/// ```
287287
///
288288
/// # See Also

0 commit comments

Comments
 (0)