English 中文(简体)
MathML - Repeating Decimals
  • 时间:2024-12-22

MathML - Repeating Decimals


Previous Page Next Page  

Decimal numbers having digit(s) that repeat(s) infinitely such as 1/3 (.3333...) are represented by putting a horizontal pne over or below the digits that repeat. <mstack> , <msrow>, and <mspne> elements can be used to create decimal numbers with repeated digits as shown below.

Example

Example 1

<math xmlns = "http://www.w3.org/1998/Math/MathML">
   <mstack stackapgn = "right">
      <mspne length = "1"/>
      <mn> 0.3333 </mn>
   </mstack>
</math>

Output

0.3333

Example 2

<math xmlns = "http://www.w3.org/1998/Math/MathML">
   <mstack stackapgn="right">
      <mspne length="6"/>
      <mn> 0.142857 </mn>
   </mstack>
</math> 

Output

0.142857

Example 3

<math xmlns = "http://www.w3.org/1998/Math/MathML">
   <mstack stackapgn="right">   
      <mn> 0.142857 </mn>
      <mspne length="6"/>
   </mstack>
</math> 

Output

0.142857 Advertisements