Close
Close window
numtheory(deprecated)/pdexpand - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


Home : Support : Online Help : numtheory(deprecated)/pdexpand
[フレーム] [フレーム]

numtheory(deprecated)

pdexpand

compute the periodic expansion of a rational number

Calling Sequence

pdexpand(n)

Parameters

n

-

rational number

Description

Important: The numtheory package has been deprecated . Use the superseding command NumberTheory[RepeatingDecimal] instead.

pdexpand returns the periodic decimal expansion of the given rational number n.

Every rational number has a periodic (or terminating) decimal expansion. The converse is also true; a periodic expansion always represents a rational number.

The result is returned as in the form PDEXPANDs,q,np,p where s is the sign of n, q the positive integer part, np the non-periodic part, and p the periodic part of n.

Use convert/rational to find the rational number of a periodic decimal expansion.

The command with(numtheory,pdexpand) allows the use of the abbreviated form of this command.

Examples

Important: The numtheory package has been deprecated . Use the superseding command NumberTheory[RepeatingDecimal] instead.

>

withnumtheory:

>

pdexpand17

PDEXPAND1,0,,1,4,2,8,5,7

(1)
>

convert,rational

17

(2)
>

pdexpand8374

PDEXPAND−1,1,1,2,1,6

(3)
>

convert,rational

8374

(4)


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /