|
From: Stavros M. (Σ. Μ. <mac...@al...> - 2014-09-29 18:10:28
|
You are calling dy(y=0). I think you want to call dy(0). On Mon, Sep 29, 2014 at 1:30 PM, Dimiter Prodanov <dim...@gm...> wrote: > Hello, > > I define a function > > dy(y):=if y#0 and y#0.0 then 1/(2*y) else 'nan; > > Then I wanted to substitute it's first argument by a value. The idea is to > use pass a function having a variable number of arguments as a method > parameter and then to evaluate it only on certain arguments. > > > I stumbled on the following weird behavior: > > apply(dy, [y=0]); > expt: undefined: 0 to a negative exponent. > -- an error. > > also here > > at(dy(y),[y=0]); > > expt: undefined: 0 to a negative exponent. > -- an error. > > while dy(0) correctly evaluates to 'nan > > best regards, > > Dimiter > > > > > > > ------------------------------------------------------------------------------ > Slashdot TV. Videos for Nerds. Stuff that Matters. > > http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > > |