@@ -1436,14 +1436,21 @@ class RealDigits(Builtin):
14361436 >> RealDigits[123.55555]
14371437 = {{1, 2, 3, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0}, 3}
14381438
1439- >> RealDigits[0.000012355555]
1440- = {{1, 2, 3, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0}, -4}
1439+ Return an explicit recurring decimal form:
1440+ >> RealDigits[19 / 7]
1441+ = {{2, {7, 1, 4, 2, 8, 5}}, 1}
14411442
1442- >> RealDigits[-123.55555]
1443- = {{1, 2, 3, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0}, 3}
1443+ The 10000th digit of is an 8:
1444+ >> RealDigits[Pi, 10, 1, -10000]
1445+ = {{8}, -9999}
14441446
1445- #> RealDigits[0.004]
1446- = {{4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -2}
1447+ 20 digits starting with the coefficient of 10^-5:
1448+ >> RealDigits[Pi, 10, 20, -5]
1449+ = {{9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2, 3, 8, 4, 6, 2, 6, 4, 3}, -4}
1450+
1451+ RealDigits gives Indeterminate if more digits than the precision are requested:
1452+ >> RealDigits[123.45, 10, 18]
1453+ = {{1, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Indeterminate, Indeterminate}, 3}
14471454
14481455 #> RealDigits[-1.25, -1]
14491456 : Base -1 is not a real number greater than 1.
@@ -1453,77 +1460,22 @@ class RealDigits(Builtin):
14531460 >> RealDigits[Pi, 10, 25]
14541461 = {{3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2, 3, 8, 4, 6, 2, 6, 4, 3}, 1}
14551462
1456- #> RealDigits[19 / 7, 10, 25]
1457- = {{2, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5}, 1}
1458-
1459- Return an explicit recurring decimal form:
1460- >> RealDigits[19 / 7]
1461- = {{2, {7, 1, 4, 2, 8, 5}}, 1}
1462-
1463- #> RealDigits[100 / 21]
1464- = {{{4, 7, 6, 1, 9, 0}}, 1}
1465-
1466- #> RealDigits[1.234, 2, 15]
1467- = {{1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1}, 1}
1468-
1469- 20 digits starting with the coefficient of 10^-5:
1470- >> RealDigits[Pi, 10, 20, -5]
1471- = {{9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2, 3, 8, 4, 6, 2, 6, 4, 3}, -4}
1472-
1473- #> RealDigits[Pi, 10, 20, 5]
1474- = {{0, 0, 0, 0, 0, 3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9}, 6}
1463+ #> RealDigits[-Pi]
1464+ : The number of digits to return cannot be determined.
1465+ = RealDigits[-Pi]
14751466
1476- The 10000th digit of is an 8:
1477- >> RealDigits[Pi, 10, 1, -10000]
1478- = {{8}, -9999}
1467+ #> RealDigits[I, 7]
1468+ : The value I is not a real number.
1469+ = RealDigits[I, 7]
14791470
14801471 #> RealDigits[Pi]
14811472 : The number of digits to return cannot be determined.
14821473 = RealDigits[Pi]
14831474
1484- #> RealDigits[20 / 3]
1485- = {{{6}}, 1}
1486-
1487- #> RealDigits[3 / 4]
1488- = {{7, 5}, 0}
1489-
1490- #> RealDigits[23 / 4]
1491- = {{5, 7, 5}, 1}
1492-
14931475 #> RealDigits[3 + 4 I]
14941476 : The value 3 + 4 I is not a real number.
14951477 = RealDigits[3 + 4 I]
14961478
1497- #> RealDigits[abc]
1498- = RealDigits[abc]
1499-
1500- #> RealDigits[abc, 2]
1501- = RealDigits[abc, 2]
1502-
1503- #> RealDigits[45]
1504- = {{4, 5}, 2}
1505-
1506- #> RealDigits[{3.14, 4.5}]
1507- = {{{3, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1}, {{4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1}}
1508-
1509- #> RealDigits[123.45, 40]
1510- = {{3, 3, 18, 0, 0, 0, 0, 0, 0, 0}, 2}
1511-
1512- #> RealDigits[0.00012345, 2]
1513- = {{1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0}, -12}
1514-
1515- #> RealDigits[12345, 2, 4]
1516- = {{1, 1, 0, 0}, 14}
1517-
1518- #> RealDigits[123.45, 2, 15]
1519- = {{1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1}, 7}
1520-
1521- RealDigits gives Indeterminate if more digits than the precision are requested:
1522- >> RealDigits[123.45, 10, 18]
1523- = {{1, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Indeterminate, Indeterminate}, 3}
1524-
1525- #> RealDigits[0.000012345, 2]
1526- = {{1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1}, -16}
15271479
15281480 #> RealDigits[3.14, 10, 1.5]
15291481 : Non-negative machine-sized integer expected at position 3 in RealDigits[3.14, 10, 1.5].
@@ -1533,77 +1485,6 @@ class RealDigits(Builtin):
15331485 : Machine-sized integer expected at position 4 in RealDigits[3.14, 10, 1, 1.5].
15341486 = RealDigits[3.14, 10, 1, 1.5]
15351487
1536- #> RealDigits[Pi, 10, 20, -5]
1537- = {{9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2, 3, 8, 4, 6, 2, 6, 4, 3}, -4}
1538-
1539- #> RealDigits[305.0123, 10, 17, 0]
1540- = {{5, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, Indeterminate, Indeterminate, Indeterminate}, 1}
1541-
1542- #> RealDigits[220, 140]
1543- = {{1, 80}, 2}
1544-
1545- # #> RealDigits[Sqrt[3], 10, 50]
1546- # = {{1, 7, 3, 2, 0, 5, 0, 8, 0, 7, 5, 6, 8, 8, 7, 7, 2, 9, 3, 5, 2, 7, 4, 4, 6, 3, 4, 1, 5, 0, 5, 8, 7, 2, 3, 6, 6, 9, 4, 2, 8, 0, 5, 2, 5, 3, 8, 1, 0, 3}, 1}
1547-
1548- #> RealDigits[0]
1549- = {{0}, 1}
1550-
1551- #> RealDigits[1]
1552- = {{1}, 1}
1553-
1554- #> RealDigits[0, 10, 5]
1555- = {{0, 0, 0, 0, 0}, 0}
1556-
1557- #> RealDigits[11/23]
1558- = {{{4, 7, 8, 2, 6, 0, 8, 6, 9, 5, 6, 5, 2, 1, 7, 3, 9, 1, 3, 0, 4, 3}}, 0}
1559-
1560- #> RealDigits[1/97]
1561- = {{{1, 0, 3, 0, 9, 2, 7, 8, 3, 5, 0, 5, 1, 5, 4, 6, 3, 9, 1, 7, 5, 2, 5, 7, 7, 3, 1, 9, 5, 8, 7, 6, 2, 8, 8, 6, 5, 9, 7, 9, 3, 8, 1, 4, 4, 3, 2, 9, 8, 9, 6, 9, 0, 7, 2, 1, 6, 4, 9, 4, 8, 4, 5, 3, 6, 0, 8, 2, 4, 7, 4, 2, 2, 6, 8, 0, 4, 1, 2, 3, 7, 1, 1, 3, 4, 0, 2, 0, 6, 1, 8, 5, 5, 6, 7, 0}}, -1}
1562-
1563- #> RealDigits[1/97, 2]
1564- = {{{1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}}, -6}
1565-
1566- #> RealDigits[1/197, 260, 5]
1567- = {{1, 83, 38, 71, 69}, 0}
1568-
1569- #> RealDigits[1/197, 260, 5, -6]
1570- = {{246, 208, 137, 67, 80}, -5}
1571-
1572- #> RealDigits[Pi, 260, 20]
1573- = {{3, 36, 211, 172, 124, 173, 210, 42, 162, 76, 23, 206, 122, 187, 23, 245, 241, 225, 254, 98}, 1}
1574-
1575- #> RealDigits[Pi, 260, 5]
1576- = {{3, 36, 211, 172, 124}, 1}
1577-
1578- #> RealDigits[1/3]
1579- = {{{3}}, 0}
1580-
1581- #> RealDigits[1/2, 7]
1582- = {{{3}}, 0}
1583-
1584- #> RealDigits[3/2, 7]
1585- = {{1, {3}}, 1}
1586-
1587- #> RealDigits[-3/2, 7]
1588- = {{1, {3}}, 1}
1589-
1590- #> RealDigits[3/2, 6]
1591- = {{1, 3}, 1}
1592-
1593- #> RealDigits[1, 7, 5]
1594- = {{1, 0, 0, 0, 0}, 1}
1595-
1596- #> RealDigits[I, 7]
1597- : The value I is not a real number.
1598- = RealDigits[I, 7]
1599-
1600- #> RealDigits[-Pi]
1601- : The number of digits to return cannot be determined.
1602- = RealDigits[-Pi]
1603-
1604- #> RealDigits[Round[x + y]]
1605- = RealDigits[Round[x + y]]
1606-
16071488 """
16081489
16091490 attributes = ("Listable" ,)
0 commit comments