Skip to content

Commit 10930aa

Browse files
committed
Upadte TI|BD input, and clean up more special chars / replacements.
1 parent e021fea commit 10930aa

25 files changed

+380
-97
lines changed

tibd_downloader.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,8 @@ for (const page of pages) {
445445
// Discard the sidebar content (ends at the token size thing), remove the empty end, resize titles, and do some cleanup.
446446
articleHTML = articleHTML
447447
.replace(/.*Token Size<\/a><\/strong><\/p>\n<p>(?:N\/A|\d bytes?(?: \(\w+\))?)<\/p>\n(?:<p><sub>\*OS [\d.]{1,10} or later<\/sub><\/p>\n)?<\/div>\n/s, '')
448-
.replaceAll('re^θi', 'r𝑒^θ𝑖')
448+
.replaceAll('θi', 'θ𝑖').replaceAll('re^θ𝑖', 'r𝑒^θ𝑖').replaceAll('1e^', '1𝑒^').replaceAll(/^e\^/gm, '𝑒^')
449+
.replaceAll('e^(πi)', '𝑒^(π𝑖)').replaceAll('e^(180i)', '𝑒^(180𝑖)').replaceAll('a+bi', 'a+b𝑖')
449450
.replaceAll('<a class="newpage" href="/"></a>', '')
450451
.replaceAll('<a href="http://tibasicdev.wikidot.com/', '<a href="')
451452
.replaceAll('<a href="/', '<a href="')
@@ -470,8 +471,9 @@ for (const page of pages) {
470471
const markdown = turndownService.turndown(articleHTML)
471472
.replaceAll(/____$/gm, '')
472473
.replaceAll('\\(.md">', '(.md">') // fix up bad link stuff after "escaping" transformation above
473-
.replaceAll('](e-exponent)', '](𝑒^(.md)')
474474
.replaceAll('"e^(.md"', '"𝑒^(.md"')
475+
.replaceAll('\\\\(.md)', '\\(.md)') // fix up bad link stuff after "escaping" transformation above
476+
.replaceAll('](e-exponent)', '](𝑒^\\(.md)')
475477
.replaceAll('[°](degree-symbol)', '[°](°.md)')
476478
.replaceAll('<a href="degree-symbol">°</a>', '<a href="°.md">°</a>')
477479
.replaceAll(/<a href="([^"]*)[<>]([^"]*)\.md">/gmi, '<a href="$1$2.md">')

tokens/0x01.md

+27
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,40 @@ It will also work when displaying a number by putting it on the last line of a p
4242

4343
Although <tt>►DMS</tt> is meant as a way to format angles in <tt><a href="Degree mode.md">Degree mode</a></tt>, it doesn't depend on the angle mode chosen, only on the number itself. Note that entering a number as _degree_°_minute_'_second_" will also work, in any mode, and it will not be converted to radians in <tt><a href="Radian mode.md">Radian mode</a></tt>.
4444

45+
## Rounding to Nearest Second
46+
47+
If you'd prefer to not have seconds with decimal places, you can round your answer to the nearest second with the following formula:
48+
49+
```ti-basic
50+
round(Ans*3600,0)/3600►DMS
51+
```
52+
53+
Or a slightly shorter version:
54+
55+
```ti-basic
56+
round(Ans36,2)/36►DMS
57+
```
58+
59+
**Tip:** If you find yourself needing this formula regularly, put it into a Y= graphing-function as:
60+
61+
```ti-basic
62+
Y1=round(X36,2)/36
63+
```
64+
65+
And then you can call it from your home screen via:
66+
67+
```ti-basic
68+
Y1(123.45678►DMS
69+
```
70+
4571
## Error Conditions
4672

4773
* **[ERR:SYNTAX](errors#syntax)** is thrown if the command is used somewhere other than the allowed display commands.
4874
* **[ERR:DATA TYPE](errors#datatype)** is thrown if the value is complex, or if given a list or matrix as argument.
4975

5076
## Related Commands
5177

78+
* [° (Degree Symbol) Command](degree-symbol) (includes info on inserting degrees, minutes and seconds)
5279
* <tt><a href="►Dec.md">►Dec</a></tt>
5380
* <tt><a href="►Frac.md">►Frac</a></tt>
5481
* <tt><a href="►Polar.md">►Polar</a></tt>

tokens/0x04.md

+33-3
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,45 @@ However, you can use [Equ►String(](equ-string) (outside a program) to get the
6262

6363
You can remove closing parentheses, braces, brackets, and quotes that are before a → command.
6464

65+
Here are a series of examples of using the → command. The first line of each example uses more bytes than necessary. The line following strips out the unnecessary characters and uses less bytes.
66+
67+
##### Real Variables
68+
6569
```ti-basic
66-
:"Hello"→Str1
67-
can be
68-
:"Hello→Str1
70+
1/(2*(3/4))→X
71+
1/(2(3/4→X
6972
```
7073

74+
##### Strings
75+
76+
```ti-basic
77+
"Hello"→Str1
78+
"Hello→Str1
79+
```
80+
81+
##### Lists
82+
83+
```ti-basic
84+
{1,2,3,2(X+1)}→L₁
85+
{1,2,3,2(X+1→L₁
86+
```
87+
88+
```ti-basic
89+
5→L₁(1)
90+
5→L₁(1
91+
```
92+
93+
```ti-basic
94+
{4,5,6}→ʟLISTX
95+
{4,5,6→LISTX
96+
```
97+
98+
Tip: You can remove the <tt>ʟ</tt> character when storing an entire list to a custom named list, but you must keep the <tt>ʟ</tt> character present when storing to a specific item, such as <tt>3→ʟLISTX(1</tt>
99+
71100
## Related Commands
72101

73102
* [DelVar](DelVar.md)
103+
* [The ʟ Command](l) - used when referencing lists with a custom name
74104

75105
* * *
76106

tokens/0x0B.md

+23-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
Normally, when the calculator is in radian mode, the trigonometric functions only return values calculated in radians. With the ° symbol you can have the angle evaluated as if in degree mode because it converts the angle into radians.
2323

24+
You can insert the degree symbol by pressing [2ND] [ANGLE] [ENTER].
25+
2426
One full rotation around a circle is 2π radians, which is equal to 360°. To convert an angle in radians to degrees you multiply by 180/π, and to convert from degrees to radians multiply by π/180.
2527

2628
In radian mode:
@@ -32,7 +34,6 @@ sin(45°)
3234
.7071067812
3335
```
3436

35-
3637
In degree mode:
3738

3839
```ti-basic
@@ -42,6 +43,26 @@ sin(45°)
4243
.7071067812 \\ There's no difference when in degrees
4344
```
4445

46+
## Converting Degrees, Minutes & Seconds
47+
48+
The degree symbol also allows you to convert degrees, minutes and seconds into decimal degrees. For example:
49+
50+
```ti-basic
51+
90°30'
52+
90.5
53+
90°30'09"
54+
90.5025
55+
```
56+
57+
The minute symbol is inserted by pressing [2ND] [ANGLE] [2]. The seconds symbol is inserted via [ALPHA] [+].
58+
59+
To convert back the other way (decimal to degrees-minutes-seconds) use the <tt><a href="►DMS.md">►DMS</a></tt> command, accessed via [2ND] [ANGLE] [4]:
60+
61+
```ti-basic
62+
90.5025►DMS
63+
90°30'09"
64+
```
65+
4566
## Optimization
4667

4768
When you only call the trig function once in a program and want it calculated in degrees, instead of changing the mode you can just use ° to save one-byte (the newline from using the command Degree)
@@ -56,6 +77,7 @@ can be
5677
## Related Commands
5778

5879
* <sup><a href="ʳ.md">ʳ</a></sup> (radian symbol)
80+
* [►DMS](►DMS.md)
5981

6082
* * *
6183

tokens/0x12.md

+15-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Returns a number, expression, list, or matrix rounded to `#decimals` ( 9).
3131

3232
## Description
3333

34-
round(_value_[,_#decimals_]) returns _value_ rounded to _#decimals_ decimal places. _#decimals_ must be < 10. The default value for _#decimals_ is 9. Also works on complex numbers, lists and matrices.
34+
<tt>round(<em>value</em>[,<em>#decimals</em>])</tt> returns _value_ rounded to _#decimals_ decimal places. _#decimals_ must be < 10. The default value for _#decimals_ is 9. Also works on complex numbers, lists and matrices.
3535

3636
```ti-basic
3737
round(5.45,0)
@@ -53,9 +53,21 @@ round([[1.8,3.5,120.3][3,‾1,0.2]],0)
5353

5454
## Advanced Uses
5555

56-
Sometimes, round-off error will cause the result of an expression to be slightly off of the correct integer value — for example, a result may be 5.0000000013 instead of 5. If the error is small enough, it will not even be visible if you recall the variable on the home screen. However, this is enough to cause a [ERR:DOMAIN](errors#domain) error with commands such as [sub(](sub\(.md) and [Output(](Output\(.md), which require their arguments to be integers.
56+
Sometimes, round-off error will cause the result of an expression to be slightly off of the correct integer value — for example, a result may be 5.0000000013 instead of 5. If the error is small enough, it will not even be visible if you recall the variable on the home screen. However, this is enough to cause a <tt><a href="ERR:DOMAIN.md">ERR:DOMAIN</a></tt> error with commands such as <tt><a href="sub(.md">sub(</a></tt> and <tt><a href="Output(.md">Output(</a></tt>, which require their arguments to be integers.
5757

58-
The easiest way to fix this problem is by wrapping the different arguments in a round( instruction. For example, you may replace Output(X,1,">") with Output(round(X),1,">"). The [int(](int\(.md) command will not work here because the round-off error may be negative, such as 4.9999999986 instead of 5, in which case the number will be rounded down to 4.
58+
The easiest way to fix this problem is by wrapping the different arguments in a <tt><a href="round.md">round</a>(</tt> instruction. For example, instead of:
59+
60+
```ti-basic
61+
Output(X,1,">")
62+
```
63+
64+
Try:
65+
66+
```ti-basic
67+
Output(round(X,0),1,">")
68+
```
69+
70+
The <tt><a href="int(.md">int(</a></tt> command will not work here because the round-off error may be negative, such as 4.9999999986 instead of 5, in which case the number will be rounded down to 4.
5971

6072
## Error Conditions
6173

tokens/0x14.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ However, the following way is faster and more memory-efficient while the program
101101

102102
## Related Commands
103103

104-
* <tt><a href="dim(.md">dim(</a></tt>
105-
* <tt><a href="seq(.md">seq(</a></tt>
106-
* <tt><sup><a href="transpose">T</a></sup></tt> (transpose)
104+
* <tt><a href="dim(.md">dim(</a></tt> – for retrieving the size of a list
105+
* <tt><a href="seq(.md">seq(</a></tt> – for creating a list based on a formula, or to create a subset of an existing list
106+
* <tt><sup><a href="transpose">T</a></sup></tt> – to transpose a 2D matrix
107107

108108
* * *
109109

tokens/0x45.md

+32-13
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,48 @@
1919

2020
## Description
2121

22+
The <tt>E</tt> symbol is used for entering numbers in scientific notation: it's short for *10^. This means that in many cases, its function is identical to that of the <tt><a href="10^(.md">10^(</a></tt> command (aside from the parenthesis). However, the exponent of <tt>E</tt> is limited to constant integer values ‾99 to 99.
2223

23-
## Examples
24+
The <tt>E</tt> symbol is used in display by the calculator for large numbers, or when in <tt><a href="Sci.md">Sci</a></tt> (scientific) or <tt><a href="Eng.md">Eng</a></tt> (engineering) mode.
2425

25-
Explanation 1
26-
```ti-basic
27-
code 1
28-
```
29-
---
30-
Explanation 2
31-
```ti-basic
32-
code 2
33-
```
26+
Unlike the exponent of <tt>E</tt>, the mantissa (a special term for the A in A*10^B, in scientific notation) isn't limited in variable type: it can be a constant, a real or complex variable or expression, a list, a matrix, or even omitted entirely (and then it will be assumed to equal 1). The reason for this versatility is simple: internally, only the exponent is taken to be an actual argument for this command. The rest of the calculation is done through implied multiplication.
3427

35-
## Error Conditions
28+
5E3
29+
………………5000
30+
E‾5
31+
……………….00001
3632

33+
## Advanced Uses
3734

38-
## Advanced Notes
35+
<tt>E</tt>99 and -<tt>E</tt>99 are often used for negative and positive infinity because the TI-83 series of calculators doesn't have an infinity symbol. Commands that often need to use infinity include <tt><a href="solve(.md">solve(</a></tt>, <tt><a href="fnInt(.md">fnInt(</a></tt>, <tt><a href="normalcdf(.md">normalcdf(</a></tt> (and the other distributions), and many others. The error introduced in this way is usually irrelevant, because it's less than the minimum calculator precision, anyway: <tt>E</tt>99 is mindbogglingly huge.
3936

37+
## Optimization
38+
39+
Don't add the mantissa when it's 1:
40+
41+
1E5
42+
should be
43+
E5
44+
45+
In addition, <tt>E</tt>2 or <tt>E</tt>3 can be used as shorthand ways of writing 100 and 1000 respectively. This could be continued, in theory, for higher powers of 10, but those aren't necessary as often.
46+
47+
## Command Timings
48+
49+
<tt>E</tt> is much faster than using the <tt><a href="10^(.md">10^(</a></tt> command or typing out 10^. The drawback, of course, is that it's limited to constant values.
50+
51+
## Related Commands
52+
53+
* <tt><a href="^.md">^</a></tt>
54+
* <tt><a href="10^(.md">10^(</a></tt>
55+
* <tt><a href="𝑒^(.md">e^(</a></tt>
56+
57+
* * *
58+
59+
**Source**: parts of this page were written by the following TI|BD contributors: alexrudd, burr, DarkerLine, GoVegan, Myles_Zadok, simplethinker, Timothy Foster.
4060

4161
## History
4262
| Calculator | OS Version | Description |
4363
|------------|------------|-------------|
4464
| <b>TI-82</b> | 1.0 | Added |
4565

46-
## Related Commands
4766

tokens/0x64.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ The output is differently expressed:
4444

4545
However, some commands are notably unaffected by angle mode, even though they involve angles, and this may cause confusion. This happens with the [SinReg](SinReg.md) command, which assumes that the calculator is in Radian mode even when it's not. As a result, the regression model it generates will graph incorrectly in Degree mode.
4646

47-
Also, complex numbers in polar form are an endless source of confusion. The angle( command, as well as the polar display format, are affected by angle mode. However, complex exponentials (see the [𝑒^(](𝑒^(.md) command), defined as $e^{i\theta}=\cos\theta+i\sin\theta$, are evaluated as though in Radian mode, regardless of the angle mode. This gives mysterious results like the following:
47+
Also, complex numbers in polar form are an endless source of confusion. The angle( command, as well as the polar display format, are affected by angle mode. However, complex exponentials (see the [e^(](𝑒^\(.md) command), defined as $e^{i\theta}=\cos\theta+i\sin\theta$, are evaluated as though in Radian mode, regardless of the angle mode. This gives mysterious results like the following:
4848

4949
```ti-basic
5050
Degree:r𝑒^θ𝑖
5151
Done
5252
𝑒^(πi)
5353
1𝑒^(180i)
54-
Ans=𝑒^(180i)
54+
Ans=𝑒^(180𝑖)
5555
0 (false)
5656
```
5757

tokens/0x65.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ The output is differently expressed:
4444

4545
However, some commands are notably unaffected by angle mode, even though they involve angles, and this may cause confusion. This happens with the <tt><a href="SinReg.md">SinReg</a></tt> command, which assumes that the calculator is in <tt>Radian</tt> mode even when it's not. As a result, the regression model it generates will graph incorrectly in <tt>Degree</tt> mode.
4646

47-
Also, complex numbers in polar form are an endless source of confusion. The <tt>angle(</tt> command, as well as the polar display format, are affected by angle mode. However, complex exponentials (see the <tt><a href="𝑒^(.md">𝑒^(</a></tt> command), defined as $e^{i\theta}=\cos\theta+i\sin\theta$, are evaluated as though in Radian mode, regardless of the angle mode. This gives mysterious results like the following:
47+
Also, complex numbers in polar form are an endless source of confusion. The <tt>angle(</tt> command, as well as the polar display format, are affected by angle mode. However, complex exponentials (see the <tt><a href="𝑒^(.md">e^(</a></tt> command), defined as $e^{i\theta}=\cos\theta+i\sin\theta$, are evaluated as though in Radian mode, regardless of the angle mode. This gives mysterious results like the following:
4848

4949
```ti-basic
5050
Degree:r𝑒^θ𝑖
5151
Done
5252
𝑒^(πi)
5353
1𝑒^(180i)
54-
Ans=𝑒^(180i)
54+
Ans=𝑒^(180𝑖)
5555
0 (false)
5656
```
5757

0 commit comments

Comments
 (0)