Displaying 3 results from an estimated 3 matches for "newexp".
Did you mean:
new_exp
2009 Dec 01
1
Adding and Multiplying two Unevaluated Expressions
HI,
As I'm trying to compute Taylor series, I'm having problems in adding and multiplying unevaluated expressions. I searched for a solution but found none.
my Taylor function works fine for evaluating functions as you can see here:
rTaylorVal=function(exp,x0,dx,n) {
ls=list(x=x0)
newexp=eval(exp,ls)
exp0=exp
for (i in 1:n){
exp0=D(exp0,"x")
newexp=newexp+eval(exp0,ls)/factorial(i)*dx^i
}
return(newexp)
}
Where exp is an expression like exp=expression(x^2*sin(x)), x0 is the startvalue, dx the difference between startvalue and searched value and n is the length of the...
2009 Dec 02
0
[Fwd: Re: Adding and Multiplying two Unevaluated Expressions]
...rner at auckland.ac.nz>
Referenzen: <20091201144125.316310 at gmx.net>
<8E40E49F-E8FC-4FBD-8CC5-93789FFB0E53 at auckland.ac.nz>
This works fine for your example, but doesn't work as simple if there's
more than these expressions.
In my example this would be in line 11:
newexp=as.expression(substitute(a+con1/con2*b^con3,list(a=newexp[[1]],b=expression(dx)[[1]],con1=eval(exp0,ls),con2=factorial(i),con3=1*i)))
this works just fine and you can still evaluate this. thank you very much!
If there's an easier way, let me know.
Greets,
Ben M?ller
Rolf Turner schrieb:
>...
2002 Oct 10
2
tcng version 8z
...ices with packets pending at "end"
(tests/tcstimstp)
- updated tests/basic, tests/tcssnap, tests/u32dlb, and tests/u32slb according
to above change
- -Wexpensive did not warn about implicit negation (tests/tcng-8z)
- tcc: replaced -E with -Wexperror, and -E -E with -Wexppostopt (tests/newexp)
- updated tests/bitfield, tests/bittest, tests/expensive, tests/ne,
tests/tcng-5y, and tests/tcng-7a according to above change
- tcc -E now runs cpp without any further processing (just like gcc -E;
tests/tccin)
- tcc: added option -f infile to read from specified file, ignoring input file
a...