File: xsin.hpc

package info (click to toggle)
hp48cc 1.3-7
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 380 kB
  • sloc: yacc: 452; ansic: 184; lex: 108; makefile: 90; sh: 90
file content (7 lines) | stat: -rw-r--r-- 169 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
// xsin.hpc -- Calculate the sine -*- C -*-

declare xsin(x) : s(0), n(0) {
	for (n = 0; n < 20; ++n)
		s += (-1)**n * x**(2*n + 1) / (2*n + 1)!;
	s;		// Return value
}