- BB9F9D07462F2B8D71CCC7FF3D3EC92F0B1BC1C59306D2D9130462E32D4A4FC4C0F89C22404C7B6BB09B08A772053E1582BDFF8D2BC2E5A24DDEA2CA78B01223
+ 79E6526E650E729CE3925E841085F515E2D57F4B1B629AF5F39F9A0EEF61AAA30A4C67BFC40D222FB4919B22BCBD62D238F2CA36500163AA02D40A8F8FA5672B
ffa/libffa/fz_mul.ads
(24 . 11)(24 . 37)
417
418 pragma Pure;
419
420 -- Comba's multiplier.
421 -- Karatsuba Threshhold - at or below this many words, we use Comba mult.
422 Karatsuba_Thresh : constant Indices := 8;
423
424 -- Multiply. (CAUTION: UNBUFFERED)
425 procedure FZ_Multiply(X : in FZ;
426 Y : in FZ;
427 XY : out FZ);
428 pragma Precondition(X'Length = Y'Length and
429 XY'Length = (X'Length + Y'Length));
430
431 -- Comba's multiplier. (CAUTION: UNBUFFERED)
432 procedure FZ_Mul_Comba(X : in FZ;
433 Y : in FZ;
434 XY_Lo : out FZ;
435 XY_Hi : out FZ);
436 XY : out FZ);
437 pragma Precondition(X'Length = Y'Length and
438 XY'Length = (X'Length + Y'Length));
439
440 -- Karatsuba's Multiplier. (CAUTION: UNBUFFERED)
441 procedure Mul_Karatsuba(X : in FZ;
442 Y : in FZ;
443 XY : out FZ);
444 pragma Precondition(X'Length = Y'Length and
445 XY'Length = (X'Length + Y'Length) and
446 X'Length mod 2 = 0);
447 -- CAUTION: Inlining prohibited for Mul_Karatsuba !
448
449 -- Multiplier. Preserves the inputs.
450 procedure FZ_Mult(X : in FZ;
451 Y : in FZ;
452 XY_Lo : out FZ;
453 XY_Hi : out FZ);
454 pragma Precondition(X'Length = Y'Length and
455 XY_Lo'Length = XY_Hi'Length and
456 XY_Lo'Length = ((X'Length + Y'Length) / 2));