-
+ CF9E5BBCD7DD4DF94DD9A95F52B631CB5C9D29EB6EC7EEEC1ED40E06B7A80019F55206D3C3C0E210BC5A056E12203360C9F51EC2FE060542805A1BE2E68949A9
ffa/libffa/fz_divis.ads
(0 . 0)(1 . 51)
282 ------------------------------------------------------------------------------
283 ------------------------------------------------------------------------------
284 -- This file is part of 'Finite Field Arithmetic', aka 'FFA'. --
285 -- --
286 -- (C) 2017 Stanislav Datskovskiy ( www.loper-os.org ) --
287 -- http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html --
288 -- --
289 -- You do not have, nor can you ever acquire the right to use, copy or --
290 -- distribute this software ; Should you use this software for any purpose, --
291 -- or copy and distribute it to anyone or in any manner, you are breaking --
292 -- the laws of whatever soi-disant jurisdiction, and you promise to --
293 -- continue doing so for the indefinite future. In any case, please --
294 -- always : read and understand any software ; verify any PGP signatures --
295 -- that you use - for any purpose. --
296 -- --
297 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
298 ------------------------------------------------------------------------------
299 ------------------------------------------------------------------------------
300
301 with FZ_Type; use FZ_Type;
302
303
304 package FZ_Divis is
305
306 pragma Pure;
307
308 -- Dividend is divided by Divisor, producing Quotient and Remainder.
309 -- WARNING: NO div0 test here! Caller must test.
310 procedure FZ_IDiv(Dividend : in FZ;
311 Divisor : in FZ;
312 Quotient : out FZ;
313 Remainder : out FZ);
314 pragma Precondition(Dividend'Length = Divisor'Length and
315 Quotient'Length = Remainder'Length and
316 Dividend'Length = Quotient'Length);
317
318 -- Exactly same thing as IDiv, but keep only the Quotient
319 procedure FZ_Div(Dividend : in FZ;
320 Divisor : in FZ;
321 Quotient : out FZ);
322 pragma Precondition(Dividend'Length = Divisor'Length and
323 Dividend'Length = Quotient'Length);
324
325 -- Exactly same thing as IDiv, but keep only the Remainder
326 procedure FZ_Mod(Dividend : in FZ;
327 Divisor : in FZ;
328 Remainder : out FZ);
329 pragma Precondition(Dividend'Length = Divisor'Length and
330 Dividend'Length = Remainder'Length);
331
332 end FZ_Divis;