|
|
last edited 10 years ago by test1 |
1 2 3 4 | ||
Editor: test1
Time: 2014/04/23 19:08:01 GMT+0 |
||
Note: |
added:
From test1 Wed Apr 23 19:08:01 +0000 2014
From: test1
Date: Wed, 23 Apr 2014 19:08:01 +0000
Subject:
Message-ID: <20140423190801+0000@axiom-wiki.newsynthesis.org>
Severity: normal => minor
The coersion to InputForm produces a lispy representation for most types. E.g.
)set output tex off
)set output algebra on
p:POLY INT:=x^2+1
2 (1) x + 1
Type: Polynomial(Integer)
pSex:=p::InputForm
(2) (+ (^ x 2) 1)
Type: InputForm
p1:=interpret(pSex)
2 (3) x + 1
Type: Polynomial(Integer)
But this fails for functions
f:INT->INT
Type: Void
f(x) == x^2+1
Type: Void
-- force compile f(2)
Compiling function f with type Integer -> Integer
(6) 5
Type: PositiveInteger
fSex:=f::InputForm
(7) (coerceOrCroak (CONS '(Mapping (Integer) (Integer)) (wrap (MAP (#1 + (^ #1 2) 1)))) '(InputForm) 'noMapName)
Type: InputForm
So far so good, but
f1:=interpret(fSex)
Cannot convert from type (Integer -> Integer) to InputForm for value theMap(MAP)