axiom-mail
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-mail] Using a polynomial inside a function


From: Alasdair McAndrew
Subject: [Axiom-mail] Using a polynomial inside a function
Date: Tue, 17 Nov 2015 11:39:53 +1100

Here's a minimum (non)-working example: I have a function which returns a polynomial:

mult(xs)==
  return(reduce(*,[x-z for z in xs]))

and I have another function which needs such a polynomial:

intm(xs,a,b)==
  g:=(x:Float):Float+->mult(xs)
  return(numeric(integrate(g(x),x=a..b)))

which doesn't work.  I've tried replacing the second line with

  function(mult(xs),g,x)

which works on the command line, but not in a function.  Any ideas as to how I can get over this hump?

ever confused,
Alasdair

--
http://www.facebook.com/alasdair.mcandrew https://plus.google.com/+AlasdairMcAndrew/posts https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108 https://twitter.com/amca01 http://numbersandshapes.net

reply via email to

[Prev in Thread] Current Thread [Next in Thread]