dmult.c

来自「SecuDe是一个由安全应用程序接口组成,对验证机制、证件处理、PEM、X.40」· C语言 代码 · 共 58 行

C
58
字号
/* *  SecuDE Release 4.1 (GMD) *//******************************************************************** * Copyright (C) 1991, GMD. All rights reserved.                    * *                                                                  * *                                                                  * *                         NOTICE                                   * *                                                                  * *    Acquisition, use, and distribution of this module             * *    and related materials are subject to restrictions             * *    mentioned in each volume of the documentation.                * *                                                                  * ********************************************************************/#include "double.h"void _dmult(a, b, high, low)	L_NUMBER        a, b;	L_NUMBER       *high, *low;{	/* split words input parm */	Word            A, B;	/* split words of multiplikation */	Word            mult, mult_0, mult_16, mult_32;	/* move parameter */	W(A) = a;	W(B) = b;	/* 1. product */	W(mult) = LSW(A) * LSW(B);	W(mult_0) = LSW(mult);	W(mult_16) = HSW(mult);	W(mult_32) = 0;	/* 2. product, shift 16 */	HSW(mult_32) = _cadd(LSW(A) * HSW(B),			     HSW(A) * LSW(B),			     &W(mult), 0		);	HSW(mult_32) += _cadd(W(mult), W(mult_16), &W(mult), 0);	HSW(mult_0) = LSW(mult);	LSW(mult_32) = HSW(mult);	/* 3. product, shift 32 */	W(mult_32) += HSW(A) * HSW(B);	/* result is catenation of mult_32|mult_0 */	*high = W(mult_32);	*low = W(mult_0);	return;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?