Skip to content

Commit b9ec1a9

Browse files
committed
add a mathml rendering test blog post
1 parent 7ec1349 commit b9ec1a9

File tree

1 file changed

+127
-0
lines changed

1 file changed

+127
-0
lines changed
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
---
2+
date: 2026-02-20T17:00:00.000Z
3+
category: uncategorized
4+
title: MathML Rendering Test
5+
layout: blog-post
6+
author: Joyee Cheung
7+
---
8+
9+
Testing block and inline MathML rendering. Geometric series, finite and infinite:
10+
11+
<math display="block">
12+
<mtable columnalign="left">
13+
<mtr>
14+
<mtd>
15+
<msub><mi>S</mi><mi>n</mi></msub>
16+
<mo>=</mo>
17+
<munderover>
18+
<mo>&#x2211;</mo>
19+
<mrow><mi>k</mi><mo>=</mo><mn>0</mn></mrow>
20+
<mrow><mi>n</mi><mo>-</mo><mn>1</mn></mrow>
21+
</munderover>
22+
<msup><mi>r</mi><mi>k</mi></msup>
23+
<mo>=</mo>
24+
<mfrac>
25+
<mrow><mn>1</mn><mo>-</mo><msup><mi>r</mi><mi>n</mi></msup></mrow>
26+
<mrow><mn>1</mn><mo>-</mo><mi>r</mi></mrow>
27+
</mfrac>
28+
<mo>,</mo>
29+
<mspace width="0.5em"/>
30+
<mi>r</mi>
31+
<mo>&#x2260;</mo>
32+
<mn>1</mn>
33+
</mtd>
34+
</mtr>
35+
<mtr>
36+
<mtd>
37+
<msub><mi>S</mi><mo>&#x221E;</mo></msub>
38+
<mo>=</mo>
39+
<munder>
40+
<mo>&#x2211;</mo>
41+
<mrow><mi>k</mi><mo>=</mo><mn>0</mn></mrow>
42+
</munder>
43+
<msup><mi>r</mi><mi>k</mi></msup>
44+
<mo>=</mo>
45+
<mfrac>
46+
<mn>1</mn>
47+
<mrow><mn>1</mn><mo>-</mo><mi>r</mi></mrow>
48+
</mfrac>
49+
<mo>,</mo>
50+
<mspace width="0.5em"/>
51+
<mo stretchy="false">|</mo><mi>r</mi><mo stretchy="false">|</mo>
52+
<mo>&lt;</mo>
53+
<mn>1</mn>
54+
</mtd>
55+
</mtr>
56+
</mtable>
57+
</math>
58+
59+
RMSE, where <math><msubsup><mi>e</mi><mi>i</mi><mn>2</mn></msubsup><mo>=</mo><msup><mrow><mo>(</mo><msub><mi>y</mi><mi>i</mi></msub><mo>-</mo><msub><mover><mi>y</mi><mo>^</mo></mover><mi>i</mi></msub><mo>)</mo></mrow><mn>2</mn></msup></math> and capacity grows as <math><msup><mn>2</mn><mrow><mi>N</mi><mo>-</mo><mn>1</mn></mrow></msup></math>:
60+
61+
<math display="block">
62+
<mtable columnalign="left">
63+
<mtr>
64+
<mtd>
65+
<mtext>RMSE</mtext>
66+
<mo>=</mo>
67+
<msqrt>
68+
<mfrac>
69+
<mn>1</mn>
70+
<mi>N</mi>
71+
</mfrac>
72+
<munder>
73+
<mo>&#x2211;</mo>
74+
<mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow>
75+
</munder>
76+
<msup>
77+
<mrow>
78+
<mo>(</mo>
79+
<msub><mi>y</mi><mi>i</mi></msub>
80+
<mo>-</mo>
81+
<msub><mover><mi>y</mi><mo>^</mo></mover><mi>i</mi></msub>
82+
<mo>)</mo>
83+
</mrow>
84+
<mn>2</mn>
85+
</msup>
86+
</msqrt>
87+
</mtd>
88+
</mtr>
89+
<mtr>
90+
<mtd>
91+
<mtext>NRMSE</mtext>
92+
<mo>=</mo>
93+
<mn>100</mn>
94+
<mo>&#x22C5;</mo>
95+
<msqrt>
96+
<mfrac>
97+
<mn>1</mn>
98+
<msup><mi>N</mi><mn>2</mn></msup>
99+
</mfrac>
100+
<munder>
101+
<mo>&#x2211;</mo>
102+
<mrow><mi>i</mi><mo>,</mo><mi>j</mi></mrow>
103+
</munder>
104+
<msup>
105+
<mrow>
106+
<mo>(</mo>
107+
<mfrac>
108+
<mrow><msub><mi>c</mi><mrow><mi>i</mi><mo>,</mo><mi>j</mi></mrow></msub><mo>-</mo><mtext>expected</mtext></mrow>
109+
<mtext>expected</mtext>
110+
</mfrac>
111+
<mo>)</mo>
112+
</mrow>
113+
<mn>2</mn>
114+
</msup>
115+
</msqrt>
116+
</mtd>
117+
</mtr>
118+
</mtable>
119+
</math>
120+
121+
Some inline bitwise stuff:
122+
123+
- <math><mi>a</mi><mo>&#x2295;</mo><mi>b</mi><mo>&#x2295;</mo><mi>b</mi><mo>=</mo><mi>a</mi></math>
124+
- <math><mi>x</mi><mspace width="0.3em"/><mo>&amp;</mo><mspace width="0.3em"/><mo stretchy="false">(</mo><msup><mn>2</mn><mi>k</mi></msup><mo>-</mo><mn>1</mn><mo stretchy="false">)</mo><mo>&#x2261;</mo><mi>x</mi><mspace width="0.5em"/><mo>(</mo><mtext>mod</mtext><mspace width="0.3em"/><msup><mn>2</mn><mi>k</mi></msup><mo>)</mo></math>
125+
- <math><mo>-</mo><mi>x</mi><mo>=</mo><mo>&#x00AC;</mo><mi>x</mi><mo>+</mo><mn>1</mn></math>
126+
- <math><mi>x</mi><mo>&lt;&lt;</mo><mi>k</mi><mo>=</mo><mi>x</mi><mo>&#x22C5;</mo><msup><mn>2</mn><mi>k</mi></msup></math>
127+
- <math><mi>x</mi><mo>&gt;&gt;</mo><mi>k</mi><mo>=</mo><mo>&#x230A;</mo><mi>x</mi><mo>/</mo><msup><mn>2</mn><mi>k</mi></msup><mo>&#x230B;</mo></math>

0 commit comments

Comments
 (0)