login  home  contents  what's new  discussion  bug reports help  links  subscribe  changes  refresh  edit

# Edit detail for SandBox Zero revision 1 of 1

 1 Editor: Time: 2007/11/18 18:44:59 GMT-8 Note: use 0 instead of Zero

changed:
-
We are trying to create a Zero

\begin{aldor}
#include "axiom.as"

INT ==> Integer;
NNI ==> NonNegativeInteger;
P ==> UnivariatePolynomial(x ,F);
FP ==> Fraction P ;
LFP ==> List FP;

NTBA(x:Symbol,F:Field): with {
0:% ;
coerce: LFP -> % ;
coerce: % -> LFP ;
coerce: % -> OutputForm ;

dummy:% -> % ;

}  == add {
Rep ==> LFP;
import from INT, NNI ;
import from F, P, LFP ;
import from PrintPackage ;

0:% == per [0$FP] ; coerce (f:LFP):% == per f; coerce (f:%):LFP == rep f; coerce (f:%):OutputForm == { a1 := rep f :: OutputForm ; a2 := message("D ")$OutputForm;
hconcat(a2,a1) }

dummy (f:%):% == {
0$% ; } } \end{aldor} Let see \begin{axiom} a := [1,2,3] :: List FRAC UP(x, FRAC INT) :: NTBA(x, FRAC INT) dummy( a) )show NTBA(x,FRAC INT) \end{axiom} So there should be one .. \begin{axiom} 0$NTBA(x,FRAC INT)
\end{axiom}



We are trying to create a Zero

aldor
#include "axiom.as"
INT ==> Integer;
NNI ==> NonNegativeInteger;
P ==> UnivariatePolynomial(x ,F);
FP ==> Fraction P ;
LFP ==> List FP;
NTBA(x:Symbol,F:Field): with {
0:% ;
coerce: LFP -> % ;
coerce: % -> LFP ;
coerce: % -> OutputForm ;
dummy:% -> % ;
}  == add {
Rep ==> LFP;
import from INT, NNI ;
import from F, P, LFP ;
import from PrintPackage ;
0:% == per [0$FP] ; coerce (f:LFP):% == per f; coerce (f:%):LFP == rep f; coerce (f:%):OutputForm == { a1 := rep f :: OutputForm ; a2 := message("D ")$OutputForm;
hconcat(a2,a1) }
dummy (f:%):% == {
0$% ; } } aldor  Compiling FriCAS source code from file /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/3380871952956020278-25px001.as using Aldor compiler and options -O -Fasy -Fao -Flsp -lfricas -Mno-ALDOR_W_WillObsolete -DFriCAS -Y$FRICAS/algebra -I $FRICAS/algebra Use the system command )set compiler args to change these options. The )library system command was not called after compilation. Let see fricas a := [1,2,3] :: List FRAC UP(x, FRAC INT) :: NTBA(x, FRAC INT) There are no library operations named NTBA Use HyperDoc Browse or issue )what op NTBA to learn if there is any operation containing " NTBA " in its name. Cannot find a definition or applicable library operation named NTBA with argument type(s) Variable(x) Type Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.

So there should be one ..

fricas
0$NTBA(x,FRAC INT) There are no library operations named NTBA Use HyperDoc Browse or issue )what op NTBA to learn if there is any operation containing " NTBA " in its name. Cannot find a definition or applicable library operation named NTBA with argument type(s) Variable(x) Type Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.