-
+ 614AD5186CB1FE04E3019AF0E9EC9AE3F70B82EEE7F2D7436BE2C23A256677C76E2EDC91F6DF9E50A443EF03AEAA78FF86A2B83C8F0BF5326427AF3C9BA2E9B5
ffa/libffa/fz_arith.ads
(0 . 0)(1 . 42)
577 ------------------------------------------------------------------------------
578 ------------------------------------------------------------------------------
579 -- This file is part of 'Finite Field Arithmetic', aka 'FFA'. --
580 -- --
581 -- (C) 2017 Stanislav Datskovskiy ( www.loper-os.org ) --
582 -- http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html --
583 -- --
584 -- You do not have, nor can you ever acquire the right to use, copy or --
585 -- distribute this software ; Should you use this software for any purpose, --
586 -- or copy and distribute it to anyone or in any manner, you are breaking --
587 -- the laws of whatever soi-disant jurisdiction, and you promise to --
588 -- continue doing so for the indefinite future. In any case, please --
589 -- always : read and understand any software ; verify any PGP signatures --
590 -- that you use - for any purpose. --
591 -- --
592 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
593 ------------------------------------------------------------------------------
594 ------------------------------------------------------------------------------
595
596 with Words; use Words;
597 with FZ_Type; use FZ_Type;
598
599 -- Fundamental Arithmetic operators on FZ:
600 package FZ_Arith is
601
602 pragma Pure;
603
604 -- Sum := X + Y; Overflow := Carry
605 procedure FZ_Add(X : in FZ;
606 Y : in FZ;
607 Sum : out FZ;
608 Overflow : out WBool);
609 pragma Precondition(X'Length = Y'Length and X'Length = Sum'Length);
610
611 -- Difference := X - Y; Underflow := Borrow
612 procedure FZ_Sub(X : in FZ;
613 Y : in FZ;
614 Difference : out FZ;
615 Underflow : out WBool);
616 pragma Precondition(X'Length = Y'Length and X'Length = Difference'Length);
617
618 end FZ_Arith;