File: sin_pi4.m

package info (click to toggle)
vc 1.4.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,552 kB
  • sloc: cpp: 19,220; ansic: 15,669; sh: 453; xml: 186; makefile: 30
file content (12 lines) | stat: -rw-r--r-- 407 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
function y = sin_pi4(_x)
  x = _x - pi/4;
  y =          1/(sqrt(2)*factorial(8));
  y = y .* x - 1/(sqrt(2)*factorial(7));
  y = y .* x - 1/(sqrt(2)*factorial(6));
  y = y .* x + 1/(sqrt(2)*factorial(5));
  y = y .* x + 1/(sqrt(2)*factorial(4));
  y = y .* x - 1/(sqrt(2)*factorial(3));
  y = y .* x - 1/(sqrt(2)*factorial(2));
  y = y .* x + 1/(sqrt(2)*factorial(1));
  y = y .* x + 1/sqrt(2);
endfunction