|
|
last edited 10 years ago by test1 |
1 2 3 4 | ||
Editor:
Time: 2007/11/17 22:08:45 GMT-8 |
||
Note: |
changed: - The coersion to InputForm produces a lispy representation for most types. E.g. \begin{axiom} )set output tex off )set output algebra on \end{axiom} \begin{axiom} p:POLY INT:=x^2+1 pSex:=p::InputForm p1:=interpret(pSex) -- p1 = p? \end{axiom} But this fails for functions \begin{axiom} f:INT->INT f(x) == x^2+1 -- force compile f(2) fSex:=f::InputForm \end{axiom} So far so good, but \begin{axiom} f1:=interpret(fSex) -- f1 = f? \end{axiom}
The coersion to InputForm? produces a lispy representation for most types. E.g.
axiom)set output tex off )set output algebra on
axiomp:POLY INT:=x^2+1 2 (1) x + 1
axiompSex:=p::InputForm (2) (+ (** x 2) 1)
axiomp1:=interpret(pSex) 2 (3) x + 1
But this fails for functions
axiomf:INT->INT
axiomf(x) == x^2+1
axiom-- force compile f(2)
Compiling function f with type Integer -> Integer (6) 5
axiomfSex:=f::InputForm (7) (coerceOrCroak (CONS '(Mapping (Integer) (Integer)) (wrap (MAP (#1 + (^ #1 2) 1)))) '(InputForm) 'noMapName)
So far so good, but
axiomf1:=interpret(fSex) >> System error: The function MAP is undefined.