⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 div.c

📁 SecuDe是一个由安全应用程序接口组成,对验证机制、证件处理、PEM、X.400报文处理和密钥管理提供支持。SecuDe提供DES、 RSA杂凑函数、密钥生成以及数字签名的生成和核实等多种密码机制。
💻 C
字号:
/* *  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.                * *                                                                  * ********************************************************************//* *	division for LNUMBERs * *	div(A,B,Q,R) * *	exceptions for zero divide *	benoetigt dw division cdiv(dw,d,q,r) */#include	"arithmetic.h"void _div(A, B, Q, R)	L_NUMBER        A[], B[], Q[], R[];{	L_NUMBER        runA[MAXGENL];	/* acc for the R */	L_NUMBER        local[MAXGENL];	/* prepare result */	register L_NUMBER w, *Qp = Q;	register int    i;	if (!*B)		ALU_exception(*B);	/* zero divide */	i = lngtouse(A) - lngtouse(B);	if (i < 0) {		trans(A, R);		if (Q != R)			inttoln(0, Q);		return;	}	trans(A, runA);	shift(B, i, local);	lngofln(Qp) = i / WLNG + 1;	w = 1 << (i % WLNG);	Qp += lngofln(Qp);	for (; Qp > Q; Qp--) {		*Qp = 0;		for (; w; w >>= 1, shift(local, R1, local)) {			if (comp(runA, local) >= 0) {				*Qp |= w;				sub(runA, local, runA);			}		}		w = HSBIT;	}	normalize(Q);	trans(runA, R);	return;}

⌨️ 快捷键说明

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