- 384FBD4D5207234D75ACFD11E7C62891ECFCB1C1CBD0205FF71E1B24846E43126538DBE6CDF63A3B78FD660BBE1671FA598C359703680E3AECB5144895893C31
+ 438A4D222ED5F2FDFF3F3E4B5E5B5E1BC0017635F455658FE655F9706D77516468DBF3F9086C5BB0EA4E1911F68D6FDB858E0C3C276586028E24654704869428
ffa/libffa/fz_arith.ads
(20 . 11)(20 . 24)
148 with Words; use Words;
149 with FZ_Type; use FZ_Type;
150
151
152 -- Fundamental Arithmetic operators on FZ:
153 package FZ_Arith is
154
155 pragma Pure;
156
157 -- Destructive Add: X := X + Y; Overflow := Carry; optional OF_In
158 procedure FZ_Add_D(X : in out FZ;
159 Y : in FZ;
160 Overflow : out WBool;
161 OF_In : in WBool := 0);
162 pragma Precondition(X'Length = Y'Length);
163
164 -- Destructive Add: X := X + W; Overflow := Carry
165 procedure FZ_Add_D_W(X : in out FZ;
166 W : in Word;
167 Overflow : out WBool);
168
169 -- Sum := X + Y; Overflow := Carry
170 procedure FZ_Add(X : in FZ;
171 Y : in FZ;
(55 . 4)(68 . 15)
173 Underflow : out WBool);
174 pragma Precondition(X'Length = Y'Length and X'Length = Difference'Length);
175
176 -- Destructive: If Cond is 1, NotN := ~N; otherwise NotN := N.
177 procedure FZ_Not_Cond_D(N : in out FZ;
178 Cond : in WBool);
179
180 -- Subtractor that gets absolute value if underflowed, in const. time
181 procedure FZ_Sub_Abs(X : in FZ;
182 Y : in FZ;
183 Difference : out FZ;
184 Underflow : out WBool);
185 pragma Precondition(X'Length = Y'Length and X'Length = Difference'Length);
186
187 end FZ_Arith;