Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,24 +0,0 @@
|
|||
with Ada.Text_IO; use Ada.Text_IO;
|
||||
|
||||
procedure Infinities is
|
||||
function Sup return Float is -- Only for predefined types
|
||||
Result : Float := Float'Last;
|
||||
begin
|
||||
if not Float'Machine_Overflows then
|
||||
Result := Float'Succ (Result);
|
||||
end if;
|
||||
return Result;
|
||||
end Sup;
|
||||
|
||||
function Inf return Float is -- Only for predefined types
|
||||
Result : Float := Float'First;
|
||||
begin
|
||||
if not Float'Machine_Overflows then
|
||||
Result := Float'Pred (Result);
|
||||
end if;
|
||||
return Result;
|
||||
end Inf;
|
||||
begin
|
||||
Put_Line ("Supremum" & Float'Image (Sup));
|
||||
Put_Line ("Infimum " & Float'Image (Inf));
|
||||
end Infinities;
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
with Ada.Text_IO; use Ada.Text_IO;
|
||||
|
||||
procedure Infinities is
|
||||
type Real is digits 5 range -10.0..10.0;
|
||||
|
||||
function Sup return Real is
|
||||
Result : Real := Real'Last;
|
||||
begin
|
||||
return Real'Succ (Result);
|
||||
exception
|
||||
when Constraint_Error =>
|
||||
return Result;
|
||||
end Sup;
|
||||
|
||||
function Inf return Real is
|
||||
Result : Real := Real'First;
|
||||
begin
|
||||
return Real'Pred (Result);
|
||||
exception
|
||||
when Constraint_Error =>
|
||||
return Result;
|
||||
end Inf;
|
||||
begin
|
||||
Put_Line ("Supremum" & Real'Image (Sup));
|
||||
Put_Line ("Infimum " & Real'Image (Inf));
|
||||
end Infinities;
|
||||
|
|
@ -1 +0,0 @@
|
|||
subtype Safe_Float is Float range Float'Range;
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
print infinity
|
||||
print neg infinity
|
||||
print infinite
|
||||
print neg infinite
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
constant infinity = 1E400
|
||||
|
||||
? infinity -- outputs "inf"
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
function infinity {
|
||||
[double]::PositiveInfinity
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue