-- --
-- B o d y --
-- --
--- Copyright (C) 1996-2010, Free Software Foundation, Inc. --
+-- Copyright (C) 1996-2012, Free Software Foundation, Inc. --
-- --
-- GARLIC is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
F_Bytes : SEO renames Fields (I).F_Bytes;
F_Size : Integer renames Fields (I).F_Size;
- Positive : Boolean;
- Exponent : Long_Unsigned;
- Fraction : Long_Unsigned;
- Result : Float;
- S : SEA (1 .. F_L);
- L : SEO;
+ Is_Positive : Boolean;
+ Exponent : Long_Unsigned;
+ Fraction : Long_Unsigned;
+ Result : Float;
+ S : SEA (1 .. F_L);
+ L : SEO;
begin
Ada.Streams.Read (Stream.all, S, L);
Result := Float'Scaling (Float (Fraction), -F_Size);
if BS <= S (1) then
- Positive := False;
+ Is_Positive := False;
Exponent := Long_Unsigned (S (1) - BS);
else
- Positive := True;
+ Is_Positive := True;
Exponent := Long_Unsigned (S (1));
end if;
(1.0 + Result, Integer (Exponent) - E_Bias);
end if;
- if not Positive then
+ if not Is_Positive then
Result := -Result;
end if;
F_Bytes : SEO renames Fields (I).F_Bytes;
F_Size : Integer renames Fields (I).F_Size;
- Positive : Boolean;
- Exponent : Long_Unsigned;
- Fraction : Long_Long_Unsigned;
- Result : Long_Float;
- S : SEA (1 .. LF_L);
- L : SEO;
+ Is_Positive : Boolean;
+ Exponent : Long_Unsigned;
+ Fraction : Long_Long_Unsigned;
+ Result : Long_Float;
+ S : SEA (1 .. LF_L);
+ L : SEO;
begin
Ada.Streams.Read (Stream.all, S, L);
Result := Long_Float'Scaling (Long_Float (Fraction), -F_Size);
if BS <= S (1) then
- Positive := False;
+ Is_Positive := False;
Exponent := Long_Unsigned (S (1) - BS);
else
- Positive := True;
+ Is_Positive := True;
Exponent := Long_Unsigned (S (1));
end if;
(1.0 + Result, Integer (Exponent) - E_Bias);
end if;
- if not Positive then
+ if not Is_Positive then
Result := -Result;
end if;
F_Bytes : SEO renames Fields (I).F_Bytes;
F_Size : Integer renames Fields (I).F_Size;
- Positive : Boolean;
+ Is_Positive : Boolean;
Exponent : Long_Unsigned;
Fraction_1 : Long_Long_Unsigned := 0;
Fraction_2 : Long_Long_Unsigned := 0;
Result := Long_Long_Float'Scaling (Result, HF - F_Size);
if BS <= S (1) then
- Positive := False;
+ Is_Positive := False;
Exponent := Long_Unsigned (S (1) - BS);
else
- Positive := True;
+ Is_Positive := True;
Exponent := Long_Unsigned (S (1));
end if;
(1.0 + Result, Integer (Exponent) - E_Bias);
end if;
- if not Positive then
+ if not Is_Positive then
Result := -Result;
end if;
F_Bytes : SEO renames Fields (I).F_Bytes;
F_Size : Integer renames Fields (I).F_Size;
- Exponent : Long_Unsigned;
- Fraction : Long_Unsigned;
- Positive : Boolean;
- Result : Short_Float;
- S : SEA (1 .. SF_L);
- L : SEO;
+ Exponent : Long_Unsigned;
+ Fraction : Long_Unsigned;
+ Is_Positive : Boolean;
+ Result : Short_Float;
+ S : SEA (1 .. SF_L);
+ L : SEO;
begin
Ada.Streams.Read (Stream.all, S, L);
Result := Short_Float'Scaling (Short_Float (Fraction), -F_Size);
if BS <= S (1) then
- Positive := False;
+ Is_Positive := False;
Exponent := Long_Unsigned (S (1) - BS);
else
- Positive := True;
+ Is_Positive := True;
Exponent := Long_Unsigned (S (1));
end if;
(1.0 + Result, Integer (Exponent) - E_Bias);
end if;
- if not Positive then
+ if not Is_Positive then
Result := -Result;
end if;
F_Size : Integer renames Fields (I).F_Size;
F_Mask : SE renames Fields (I).F_Mask;
- Exponent : Long_Unsigned;
- Fraction : Long_Unsigned;
- Positive : Boolean;
- E : Integer;
- F : Float;
- S : SEA (1 .. F_L) := (others => 0);
+ Exponent : Long_Unsigned;
+ Fraction : Long_Unsigned;
+ Is_Positive : Boolean;
+ E : Integer;
+ F : Float;
+ S : SEA (1 .. F_L) := (others => 0);
begin
if not Item'Valid then
-- Compute Sign
- Positive := (0.0 <= Item);
+ Is_Positive := (0.0 <= Item);
F := abs (Item);
-- Signed zero
-- Store Sign
- if not Positive then
+ if not Is_Positive then
S (1) := S (1) + BS;
end if;
F_Size : Integer renames Fields (I).F_Size;
F_Mask : SE renames Fields (I).F_Mask;
- Exponent : Long_Unsigned;
- Fraction : Long_Long_Unsigned;
- Positive : Boolean;
- E : Integer;
- F : Long_Float;
- S : SEA (1 .. LF_L) := (others => 0);
+ Exponent : Long_Unsigned;
+ Fraction : Long_Long_Unsigned;
+ Is_Positive : Boolean;
+ E : Integer;
+ F : Long_Float;
+ S : SEA (1 .. LF_L) := (others => 0);
begin
if not Item'Valid then
-- Compute Sign
- Positive := (0.0 <= Item);
+ Is_Positive := (0.0 <= Item);
F := abs (Item);
-- Signed zero
-- Store Sign
- if not Positive then
+ if not Is_Positive then
S (1) := S (1) + BS;
end if;
HFS : constant Integer := F_Size / 2;
- Exponent : Long_Unsigned;
- Fraction_1 : Long_Long_Unsigned;
- Fraction_2 : Long_Long_Unsigned;
- Positive : Boolean;
- E : Integer;
- F : Long_Long_Float := Item;
- S : SEA (1 .. LLF_L) := (others => 0);
+ Exponent : Long_Unsigned;
+ Fraction_1 : Long_Long_Unsigned;
+ Fraction_2 : Long_Long_Unsigned;
+ Is_Positive : Boolean;
+ E : Integer;
+ F : Long_Long_Float := Item;
+ S : SEA (1 .. LLF_L) := (others => 0);
begin
if not Item'Valid then
-- Compute Sign
- Positive := (0.0 <= Item);
+ Is_Positive := (0.0 <= Item);
+
if F < 0.0 then
F := -Item;
end if;
-- Store Sign
- if not Positive then
+ if not Is_Positive then
S (1) := S (1) + BS;
end if;
F_Size : Integer renames Fields (I).F_Size;
F_Mask : SE renames Fields (I).F_Mask;
- Exponent : Long_Unsigned;
- Fraction : Long_Unsigned;
- Positive : Boolean;
- E : Integer;
- F : Short_Float;
- S : SEA (1 .. SF_L) := (others => 0);
+ Exponent : Long_Unsigned;
+ Fraction : Long_Unsigned;
+ Is_Positive : Boolean;
+ E : Integer;
+ F : Short_Float;
+ S : SEA (1 .. SF_L) := (others => 0);
begin
if not Item'Valid then
-- Compute Sign
- Positive := (0.0 <= Item);
+ Is_Positive := (0.0 <= Item);
F := abs (Item);
-- Signed zero
-- Store Sign
- if not Positive then
+ if not Is_Positive then
S (1) := S (1) + BS;
end if;