version 1.1, 2018/09/19 05:45:07 |
version 1.3, 2020/10/06 06:31:19 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM$ |
* $OpenXM: OpenXM_contrib2/asir2018/engine/QM.c,v 1.2 2018/09/28 08:20:28 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
|
|
Line 83 void mulmq(m,n1,n2,nr) |
|
Line 83 void mulmq(m,n1,n2,nr) |
|
int m; |
int m; |
MQ n1,n2,*nr; |
MQ n1,n2,*nr; |
{ |
{ |
int a,b; |
unsigned int a,b; |
|
|
if ( !n1 || !n2 ) |
if ( !n1 || !n2 ) |
*nr = 0; |
*nr = 0; |
Line 96 void divmq(m,n1,n2,nq) |
|
Line 96 void divmq(m,n1,n2,nq) |
|
int m; |
int m; |
MQ n1,n2,*nq; |
MQ n1,n2,*nq; |
{ |
{ |
int a,b; |
unsigned int a,b; |
|
|
if ( !n2 ) |
if ( !n2 ) |
error("divmq : division by 0"); |
error("divmq : division by 0"); |
|
|
else if ( !n1 ) |
else if ( !n1 ) |
*nr = 0; |
*nr = 0; |
else { |
else { |
a = pwrm(m,CONT(n1),QTOS(n)); STOMQ(a,*nr); |
a = pwrm(m,CONT(n1),ZTOS(n)); STOMQ(a,*nr); |
} |
} |
} |
} |
|
|