% Copyright The Numerical Algorithms Group Limited 1992-94. All rights reserved. % !! DO NOT MODIFY THIS FILE BY HAND !! Created by ht.awk. \newcommand{\RomanNumeralXmpTitle}{RomanNumeral} \newcommand{\RomanNumeralXmpNumber}{9.68} % % ===================================================================== \begin{page}{RomanNumeralXmpPage}{9.68 RomanNumeral} % ===================================================================== \beginscroll The Roman numeral package was added to \Language{} in MCMLXXXVI %-% \HDindex{Roman numerals}{RomanNumeralXmpPage}{9.68}{RomanNumeral} for use in denoting higher order derivatives. \xtc{ For example, let \spad{f} be a symbolic operator. }{ \spadpaste{f := operator 'f \bound{f}} } \xtc{ This is the seventh derivative of \spad{f} with respect to \spad{x}. }{ \spadpaste{D(f x,x,7) \free{f}} } \xtc{ You can have integers printed as Roman numerals by declaring variables to be of type \spadtype{RomanNumeral} (abbreviation \spadtype{ROMAN}). }{ \spadpaste{a := roman(1978 - 1965) \bound{a}} } This package now has a small but devoted group of followers that claim this domain has shown its efficacy in many other contexts. They claim that Roman numerals are every bit as useful as ordinary integers. \xtc{ In a sense, they are correct, because Roman numerals form a ring and you can therefore construct polynomials with Roman numeral coefficients, matrices over Roman numerals, etc.. }{ \spadpaste{x : UTS(ROMAN,'x,0) := x \bound{x}} } \xtc{ Was Fibonacci Italian or ROMAN? %-% \HDindex{Fibonacci numbers}{RomanNumeralXmpPage}{9.68}{RomanNumeral} }{ \spadpaste{recip(1 - x - x**2) \free{x}} } \xtc{ You can also construct fractions with Roman numeral numerators and denominators, as this matrix Hilberticus illustrates. }{ \spadpaste{m : MATRIX FRAC ROMAN \bound{m}} } \xtc{ }{ \spadpaste{m := matrix [[1/(i + j) for i in 1..3] for j in 1..3] \free{m} \bound{m1}} } \xtc{ Note that the inverse of the matrix has integral \spadtype{ROMAN} entries. }{ \spadpaste{inverse m \free{m1}} } \xtc{ Unfortunately, the spoil-sports say that the fun stops when the numbers get big---mostly because the Romans didn't establish conventions about representing very large numbers. }{ \spadpaste{y := factorial 10 \bound{y}} } \xtc{ You work it out! }{ \spadpaste{roman y \free{y}} } Issue the system command \spadcmd{)show RomanNumeral} to display the full list of operations defined by \spadtype{RomanNumeral}. \endscroll \autobuttons \end{page} %