/usr/share/genius/examples/taylor-sin.gel is in genius-common 1.0.23-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Category: Calculus
# Name: Taylor approximations of sine
LinePlotWindow = [-5,5,-2,2];
LinePlotDrawLegends=false;
function c(n) = (
if IsEven(n) then
0
else
((-1)^((n-1)/2))/(n!)
);
PlotWindowPresent(); # Make sure the window is raised
for M=0 to 12 do (
print("Taylor polynomial of degree = " + M);
LinePlot(`(x)=sin(x),`(x)=(sum n=0 to M do c(n)*(x^n)));
wait(1)
);
|