>
> I don't think this is the right thing to do. Why? Because:
>
> erf(%i),numer;
>
> returns 1.650425758797543 %i.
>
> How did I know? I cheated and looked at the code for
> float-numerical-eval-p which has a check for $numer.
> Perhaps %erf needs a 'subc property added to its property list?
I don't understand how that works, except that it has something
to to with creating a subcontext.
I just noticed there is erf_%iargs which behaves like %iargs for erf, but
maybe it is not documented ? Also it is false by default and I think %iargs
is true by default. One consequence of erf_%iargs:true is that
float(erf(%i)) givs a number, which is at least a workaround.
But float(erf(2*%i)) works as expected even with erf_%iargs:false;
tracing shows that simp-erf is called twice, the second time , 2
has been converted to 2.0, and complex-float-numerical-eval-p returns true.
But with float(erf(1*%i)), 1*%i -> %i and float leave this as it is,
so complex-float-numerical-eval-p returns false.
> I also thought that float(erf(%i)) was supposed to convert the arguments
> to float, but that doesn't seem to be happening because erf(1.0*%i)
> instantly returns a numerical result.
simp-erf calls complex-float-numerical-eval-p and finds the 1.0.
It seems there should be a way of having float(erf(%i)) work that is
independent of how erf simplifies to erfi.
John