I got a problem trying to plot a function that uses the erf funtion. It 
seems that the reason was that erf is sometimes left unevaluated by FriCAS 
even in expressions that only involve erf and numbers.
To replicate one can define the expression like

Ce:=((S*erf(((2*log((S/K))+T*s^2+2*T*r)/(2*s*sqrt(2)*sqrt(T))))-K*%e^((-T*r))*erf(((2*log((S/K))-T*s^2+2*T*r)/(2*s*sqrt(2)*sqrt(T))))-K*%e^((-T*r))+S)/2)

This contains variables S,r,T,K,s. I set the first three:

S:=10.0,r:=0.05,T:=0.8

Then I create a function C of the remaining K,s variables:

function(Ce,'C,'K,'s)

But then when I try to evaluate the function C 

C(11.0,0.05)

I get an Expression(Float) 

5.2843419153_377776519*erf(0.8903421181_7640573378)-5.0*erf(0.8587193415_7472194046)-0.2843419153_3777765192

I am using TEXmacs interface.

Curiously, this expression can be evaluated, sending it back in another 
field returns 0.0239032946_195444183

Is there a way to force the evaluation of erf so that the function  
s+->C(11.0,s)  can be plotted?

Thanks,

Slawomir Kolodynski


-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to