Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,34 +0,0 @@
|
|||
with Ada.Text_IO; use Ada.Text_IO;
|
||||
with Ada.Float_Text_IO; use Ada.Float_Text_IO;
|
||||
with Ada.Numerics.Elementary_Functions; use Ada.Numerics.Elementary_Functions;
|
||||
|
||||
procedure Write_Float_Array is
|
||||
type Float_Array is array (1..4) of Float;
|
||||
procedure Write_Columns
|
||||
( File : File_Type;
|
||||
X : Float_Array;
|
||||
Y : Float_Array;
|
||||
X_Pres : Natural := 3;
|
||||
Y_Pres : Natural := 5
|
||||
) is
|
||||
begin
|
||||
for I in Float_Array'range loop
|
||||
Put (File => File, Item => X(I), Fore => 1, Aft => X_Pres - 1);
|
||||
Put (File, " ");
|
||||
Put (File => File, Item => Y(I), Fore => 1, Aft => Y_Pres - 1);
|
||||
New_Line (File);
|
||||
end loop;
|
||||
end Write_Columns;
|
||||
|
||||
File : File_Type;
|
||||
X : Float_Array := (1.0, 2.0, 3.0, 1.0e11);
|
||||
Y : Float_Array;
|
||||
begin
|
||||
Put ("Tell us the file name to write:");
|
||||
Create (File, Out_File, Get_Line);
|
||||
for I in Float_Array'range loop
|
||||
Y(I) := Sqrt (X (I));
|
||||
end loop;
|
||||
Write_columns (File, X, Y);
|
||||
Close (File);
|
||||
end Write_Float_Array;
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
identification division.
|
||||
program-id. wr-float.
|
||||
environment division.
|
||||
input-output section.
|
||||
file-control.
|
||||
select report-file assign "float.txt"
|
||||
organization sequential.
|
||||
data division.
|
||||
file section.
|
||||
fd report-file
|
||||
report is floats.
|
||||
working-storage section.
|
||||
1 i binary pic 9(4).
|
||||
1 x-values comp-2.
|
||||
2 value 1.0.
|
||||
2 value 2.0.
|
||||
2 value 3.0.
|
||||
2 value 1.0e11.
|
||||
1 redefines x-values comp-2.
|
||||
2 x occurs 4.
|
||||
1 comp-2.
|
||||
2 y occurs 4.
|
||||
report section.
|
||||
rd floats.
|
||||
1 float-line type de.
|
||||
2 line plus 1.
|
||||
3 column 1 pic -9.99e+99 source x(i).
|
||||
2 column 12 pic -9.9999e+99 source y(i).
|
||||
procedure division.
|
||||
begin.
|
||||
open output report-file
|
||||
initiate floats
|
||||
perform varying i from 1 by 1
|
||||
until i > 4
|
||||
compute y(i) = function sqrt (x(i))
|
||||
generate float-line
|
||||
end-perform
|
||||
terminate floats
|
||||
close report-file
|
||||
stop run
|
||||
.
|
||||
end program wr-float.
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
constant x = {1, 2, 3, 1e11},
|
||||
y = {1, 1.4142135623730951, 1.7320508075688772, 316227.76601683791}
|
||||
|
||||
integer fn
|
||||
|
||||
fn = open("filename","w")
|
||||
for n = 1 to length(x) do
|
||||
printf(fn,"%.3g\t%.5g\n",{x[n],y[n]})
|
||||
end for
|
||||
close(fn)
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
$x = @(1, 2, 3, 1e11)
|
||||
$y = @(1, 1.4142135623730951, 1.7320508075688772, 316227.76601683791)
|
||||
$xprecision = 3
|
||||
$yprecision = 5
|
||||
$arr = foreach($i in 0..($x.count-1)) {
|
||||
[pscustomobject]@{x = "{0:g$xprecision}" -f $x[$i]; y = "{0:g$yprecision}" -f $y[$i]}
|
||||
}
|
||||
($arr | format-table -HideTableHeaders | Out-String).Trim() > filename.txt
|
||||
Loading…
Add table
Add a link
Reference in a new issue