Chebyshev coefficients: Difference between revisions

Content deleted Content added
Added Algol 60
Thundergnat (talk | contribs)
m →‎{{header|Raku}}: typoed variable name
Line 1,768: Line 1,768:


my @pi-n = ( ^n »+» ½ ) »×» (π/n);
my @pi-n = ( ^n »+» ½ ) »×» (π/n);
my @f = ( @pi_n».cos »×» bma »+» bpa )».&$func;
my @f = ( @pi-n».cos »×» bma »+» bpa )».&$func;
my @sums = (^n).map: { [+] @f »×« ( @pi-n »×» $_ )».cos };
my @sums = (^n).map: { [+] @f »×« ( @pi-n »×» $_ )».cos };


Line 1,787: Line 1,787:
+6.5962992e-10
+6.5962992e-10
-1.0021994e-11</pre>
-1.0021994e-11</pre>

=={{header|REXX}}==
=={{header|REXX}}==
{{trans|C}}
{{trans|C}}