Power series for the exponential function: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 15: | Line 15: | ||
// | // | ||
var s = board1.createElement('slider', [0.75,-2.0,5,0,10,0], {name:'S'}); | var s = board1.createElement('slider', [0.75,-2.0,5,0,10,0], {name:'S'}); | ||
var t = board1.createElement('text',[-2, | var t = board1.createElement('text',[-2,8, function() { | ||
var val = 0; | |||
for(var i=0;i<= Math.floor(s.X()); i++) { | |||
val+= 1.0/board1.factorial(i); | |||
} | |||
return 'e~'+board1.round(val,10); | |||
}, | |||
]); | |||
// | // | ||
board1.createElement('curve', [ | board1.createElement('curve', [ |
Revision as of 09:09, 11 December 2008