-
+ C53D7E85E48B1C7BA062AEC40E7D95C2230EE1D09F70DC19681B7759EE1F07F2AA599764AE2742FD3AF4FB6CBDD599EAC0E0C4E1F4F07C11B0F843EFB73B02E5
ffa/libffa/fz_type.ads
(0 . 0)(1 . 47)
623 ------------------------------------------------------------------------------
624 ------------------------------------------------------------------------------
625 -- This file is part of 'Finite Field Arithmetic', aka 'FFA'. --
626 -- --
627 -- (C) 2017 Stanislav Datskovskiy ( www.loper-os.org ) --
628 -- http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html --
629 -- --
630 -- You do not have, nor can you ever acquire the right to use, copy or --
631 -- distribute this software ; Should you use this software for any purpose, --
632 -- or copy and distribute it to anyone or in any manner, you are breaking --
633 -- the laws of whatever soi-disant jurisdiction, and you promise to --
634 -- continue doing so for the indefinite future. In any case, please --
635 -- always : read and understand any software ; verify any PGP signatures --
636 -- that you use - for any purpose. --
637 -- --
638 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
639 ------------------------------------------------------------------------------
640 ------------------------------------------------------------------------------
641
642 -- FZ -- the fundamental FZ type: an unsigned integer of fixed width,
643 -- i.e. a contiguous array of machine words. There is no 'meta'-anything:
644 -- in particular, there is no normalization nor will there ever be any
645 -- normalization, nor any provisions for resizing, nor any such thing.
646 -- Note that endianness is irrelevant, here and elsewhere in FFA.
647
648 with Words; use Words;
649
650 package FZ_Type is
651
652 pragma Pure;
653
654 -- Indices of all indexable items:
655 type Indices is new Natural;
656
657 -- Index of a particular Word in an FZ:
658 subtype Word_Index is Indices;
659
660 -- The FZ, in person! I.e. a bignum of permanently fixed bitness.
661 type FZ is array(Word_Index range <>) of Word;
662
663 -- A count of Words in an FZ (cannot be 0):
664 subtype Word_Count is Indices range 1 .. Indices'Last;
665
666 -- An index of a particular ~bit~ in an FZ:
667 subtype FZBit_Index is Indices;
668
669 end FZ_Type;