Formal power series: Difference between revisions
Content added Content deleted
SqrtNegInf (talk | contribs) (→{{header|Perl 6}}: more fixes, 'tan' works too) |
SqrtNegInf (talk | contribs) m (→{{header|Perl}}: typo) |
||
Line 1,894: | Line 1,894: | ||
print "exp(x) ~= $exp\n"; |
print "exp(x) ~= $exp\n"; |
||
print "sin^2 + cos^ |
print "sin^2 + cos^2 = ", $sin*$sin + $cos*$cos, "\n"; |
||
1; |
1; |
||
Line 1,905: | Line 1,905: | ||
tan(x) ~= 0 + 1x^1 + 1/3x^3 + 2/15x^5 + 17/315x^7 + 62/2835x^9 |
tan(x) ~= 0 + 1x^1 + 1/3x^3 + 2/15x^5 + 17/315x^7 + 62/2835x^9 |
||
exp(x) ~= 1 + 1x^1 + 1/2x^2 + 1/6x^3 + 1/24x^4 + 1/120x^5 + 1/720x^6 + 1/5040x^7 + 1/40320x^8 + 1/362880x^9 + 1/3628800x^10 |
exp(x) ~= 1 + 1x^1 + 1/2x^2 + 1/6x^3 + 1/24x^4 + 1/120x^5 + 1/720x^6 + 1/5040x^7 + 1/40320x^8 + 1/362880x^9 + 1/3628800x^10 |
||
sin^2 + cos^ |
sin^2 + cos^2 = 1 |
||
</pre> |
</pre> |
||