diff options
author | dos-reis <gdr@axiomatics.org> | 2007-08-14 05:14:52 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2007-08-14 05:14:52 +0000 |
commit | ab8cc85adde879fb963c94d15675783f2cf4b183 (patch) | |
tree | c202482327f474583b750b2c45dedfc4e4312b1d /src/hyper/pages/HEXADEC.ht | |
download | open-axiom-ab8cc85adde879fb963c94d15675783f2cf4b183.tar.gz |
Initial population.
Diffstat (limited to 'src/hyper/pages/HEXADEC.ht')
-rw-r--r-- | src/hyper/pages/HEXADEC.ht | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/hyper/pages/HEXADEC.ht b/src/hyper/pages/HEXADEC.ht new file mode 100644 index 00000000..e807f91f --- /dev/null +++ b/src/hyper/pages/HEXADEC.ht @@ -0,0 +1,59 @@ +% Copyright The Numerical Algorithms Group Limited 1992-94. All rights reserved. +% !! DO NOT MODIFY THIS FILE BY HAND !! Created by ht.awk. +\newcommand{\HexadecimalExpansionXmpTitle}{HexadecimalExpansion} +\newcommand{\HexadecimalExpansionXmpNumber}{9.33} +% +% ===================================================================== +\begin{page}{HexadecimalExpansionXmpPage}{9.33 HexadecimalExpansion} +% ===================================================================== +\beginscroll + +All rationals have repeating hexadecimal expansions. +The operation \spadfunFrom{hex}{HexadecimalExpansion} returns these +expansions of type \spadtype{HexadecimalExpansion}. +Operations to access the individual numerals of a hexadecimal expansion can +be obtained by converting the value to \spadtype{RadixExpansion(16)}. +More examples of expansions are available in the +\downlink{`DecimalExpansion'}{DecimalExpansionXmpPage}\ignore{DecimalExpansion}, +\downlink{`BinaryExpansion'}{BinaryExpansionXmpPage}\ignore{BinaryExpansion}, and +\downlink{`RadixExpansion'}{RadixExpansionXmpPage}\ignore{RadixExpansion}. + +\showBlurb{HexadecimalExpansion} + +\xtc{ +This is a hexadecimal expansion of a rational number. +}{ +\spadpaste{r := hex(22/7) \bound{r}} +} +\xtc{ +Arithmetic is exact. +}{ +\spadpaste{r + hex(6/7) \free{r}} +} +\xtc{ +The period of the expansion can be short or long \ldots +}{ +\spadpaste{[hex(1/i) for i in 350..354] } +} +\xtc{ +or very long! +}{ +\spadpaste{hex(1/1007) } +} +\xtc{ +These numbers are bona fide algebraic objects. +}{ +\spadpaste{p := hex(1/4)*x**2 + hex(2/3)*x + hex(4/9) \bound{p}} +} +\xtc{ +}{ +\spadpaste{q := D(p, x) \free{p}\bound{q}} +} +\xtc{ +}{ +\spadpaste{g := gcd(p, q) \free{p}\free{q}} +} +\endscroll +\autobuttons +\end{page} +% |