[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] semantics of #1
From: |
Martin Rubey |
Subject: |
Re: [Axiom-developer] semantics of #1 |
Date: |
Wed, 23 Jun 2004 17:29:11 +0000 |
It's worse, the following works:
interpolate(qx, lx, ly, m, k) ==
px := RationalInterpolation(lx, ly, m, k)$RIA(F, UP(xx, F))
(px case "failed") => "failed"
if ((qnum := retractIfCan(numer qx)@Union(F, "failed")) case F) and
((qden := retractIfCan(denom qx)@Union(F, "failed")) case F) then
q := qnum/qden
una := px.unattainable
if any?(q::F=elt(lx, #1), una) then return "failed"
-- for i in px.unattainable repeat
-- if elt(lx, i)=q then return "failed"
[elt(px.function, qx), px.undefined, px.unattainable]
but not if I inline "una". Still more interesting:
interpolate(qx, lx, ly, m, k) ==
px := RationalInterpolation(lx, ly, m, k)$RIA(F, UP(xx, F))
(px case "failed") => "failed"
if ((qnum := retractIfCan(numer qx)@Union(F, "failed")) case F) and
((qden := retractIfCan(denom qx)@Union(F, "failed")) case F) then
q := qnum/qden
una := px.unattainable
if any?(q::F=elt(lx, #1), px.unattainable) then return "failed"
-- for i in px.unattainable repeat
-- if elt(lx, i)=q then return "failed"
[elt(px.function, qx), px.undefined, px.unattainable]
works!
Martin