Polynomial regression: Difference between revisions

→‎{{header|Raku}}: use the same formula as in the explanation
(→‎{{header|Raku}}: rationale)
(→‎{{header|Raku}}: use the same formula as in the explanation)
Line 2,138:
 
constant $y = [+] @y Z* @e;
 
my $J = $x1 ∧ $x2;
my $I = $x0 ∧ $J;
 
my $I2 = ($I*$I).Real;
 
.say for
(($y ∧ y∧$J)*x1∧$I)x2/($I2x0∧$x1∧$x2),
(($y ∧ y∧$x2∧$x0/($x2 ∧ x1∧$x2∧$x0))*$I)/$I2,
$y∧$x0∧$x1/($x2∧$x0∧$x1);
(($y ∧ ($x0 ∧ $x1))*$I)/$I2;</syntaxhighlight>
</syntaxhighlight>
{{out}}
<pre>1
1,934

edits