File: mycos.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-- 438 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
function y = mycos (x)
  x2 = x.*x;
  y = 0;
  y = y .* x2 + to_double(0xAC00000000000, -45);
  y = y .* x2 - to_double(0x9394000000000, -37);
  y = y .* x2 + to_double(0x1EED8C0000000, -29);
  y = y .* x2 - to_double(0x27E4FB7400000, -22);
  y = y .* x2 + to_double(0xA01A01A018000, -16);
  y = y .* x2 - to_double(0x6C16C16C16C00, -10);
  y = y .* x2 + to_double(0x5555555555554,  -5);
  y = y .* (x2 .* x2) - .5 * x2 + 1.;
endfunction