Euler method: Difference between revisions
m
→{{header|Raku}}: stray '.' removed, use '×' for clarity
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
SqrtNegInf (talk | contribs) m (→{{header|Raku}}: stray '.' removed, use '×' for clarity) |
||
Line 2,748:
for $a, * + $h ... * > $b -> $t {
@t_y[$t] = $y;
$y += $h
}
}
Line 2,760:
sub f ( $time, $temp ) {
}
Line 2,771:
my $exact = AMBIENT_TEMP + (INITIAL_TEMP - AMBIENT_TEMP)
my $err = sub { @^a.map: { 100
my ( $a, $b, $c ) = map { @e[$_][$t] }, 2, 5, 10;
say $t.fmt('%4d '), ( $exact, $a, $b, $c )».fmt(' %7.3f'),
$err
}</syntaxhighlight>
|