@@ -121,6 +121,13 @@ mod(a,b) - compute the modulus, i.e., the remainder after long division, of two
121121numeric_digits(arg) - set the precision to the value of arg, which is a
122122 positive integer.
123123 The result displayed is the old precision.
124+ Note: Precision refers to the total number of digits that are considered
125+ accurate. So if the precision is 5, the number 4321.12345 is actually
126+ only accurate to 4321.1 and anything after that is an artifact of
127+ approximation. QDL will show values as accurately as possible,
128+ so if the value were 1.00000009 then QDL would display 1 as the
129+ value, since up to precision, they are the same.
130+ See the reference manual for a more information.
124131 ]]>
125132 </body >
126133 </entry >
@@ -1134,7 +1141,7 @@ E.g.
11341141Note the trailing | added at the end.
11351142E.g.
11361143 detokenize([;4]], '|',2)
1137- '0 1 2 3'
1144+ 0|1|2|3
11381145
11391146omits the trailing |.
11401147See also: truncate, constants (which contains the option values for reference)
@@ -1734,6 +1741,15 @@ You may use ⟦ (\u27e6) or [| , ⟧ (\u27e7) or |].
17341741⟦ start;stop;count ⟧
17351742will create the list with count elements evenly distributed between start and stop,
17361743inclusive.
1744+ See also: slice
1745+ ]]>
1746+ </body >
1747+ </entry >
1748+ <entry id =" [|" >
1749+ <body >
1750+ <![CDATA[
1751+ Closed slice operator open bracket.
1752+ See ⟦, slice
17371753 ]]>
17381754 </body >
17391755 </entry >
@@ -1743,9 +1759,19 @@ inclusive.
17431759Unicode \u27e7. Part of a closed slice.
17441760Equivalent to: |]
17451761Please see help for ⟦
1762+ See also: slice
17461763 ]]>
17471764 </body >
17481765 </entry >
1766+ <entry id =" |]" >
1767+ <body >
1768+ <![CDATA[
1769+ Closed slice operator close bracket.
1770+ See ⟧, slice
1771+ ]]>
1772+ </body >
1773+ </entry >
1774+
17491775 <entry id =" →" >
17501776 <body >
17511777 <![CDATA[
@@ -2006,6 +2032,41 @@ This is extremely useful in many places, such as scripts.
20062032 </body >
20072033 </entry >
20082034
2035+ <entry id =" slice" >
2036+ <body >
2037+ <![CDATA[
2038+ A slice is an list of numbers. There are two main types
2039+ Open slice: [start;stop;step]
2040+ which will produce the list
2041+ [start, start+step, start +2*step, ... ]
2042+ ending when stop < start + n*step.
2043+ If start is omitted, it is assumed to be 0 (zero).
2044+ If step is omitted, it is assumed to be 1.
2045+ E.g. [;5]
2046+ [0,1,2,3,4]
2047+ E.g. using a slice in a loop
2048+ while[for_next(j, 1+2*[;6])][say(j);]
2049+ prints 1, 3, 5, 7, 9, 11
2050+ E.g. [2;5;0.7]
2051+ [2,2.7,3.4,4.1,4.8]
2052+ Note well: in an open slice, you do not necessarily know how
2053+ many elements are in the resulting list. Here there
2054+ are 5.
2055+
2056+ Closed slice [|start;stop;count|]
2057+ This will produce the list from
2058+ [start, ... , stop] (inclusive)
2059+ and will have exactly count element in it.
2060+ If start is omitted, it is assumed to be 0 (zero).
2061+ E.g. [|-pi()/4; pi()/3; 11 |]
2062+ [-0.785398163397447,-0.602138591938043, ... ,1.047197551196593]
2063+
2064+ produces a list of 11 equally spaced numbers from -pi/4 to pi/3,
2065+ including the endpoints.
2066+ ]]>
2067+ </body >
2068+ </entry >
2069+
20092070 <!--
20102071 entry template
20112072 -->
0 commit comments