Write float arrays to a text file: Difference between revisions
m
→Idiomatic: tweak
m (→{{header|R}}: not necessary to postprocess) |
SqrtNegInf (talk | contribs) m (→Idiomatic: tweak) |
||
Line 1,159:
<lang perl6>sub writefloat($filename, @x, @y, :$x-precision = 3, :$y-precision = 3) {
open($filename, :w).print:
join '', flat (@x
}
my @x = 1, 2, 3, 1e11;
writefloat('sqrt.dat', @x, @x
{{out}}
<pre>1 1
|