Mathc complexes/a156
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define RCA RC3
#define FACTOR_E +1.E-0
/* ------------------------------------ */
/* ------------------------------------ */
void fun(void)
{
double **A = rEcsymmetric_mZ(i_mZ(RCA,RCA),455.,1E-3);
double **sinh_A = i_mZ(RCA,RCA);
double **EigsVector = i_mZ(RCA,RCA);
double **T_EigsVector = i_mZ(RCA,RCA);
double **EigsValue = i_mZ(RCA,RCA);
double **sinh_EigsValue = i_mZ(RCA,RCA);
double **T1 = i_mZ(RCA,RCA);
clrscrn();
printf(" A :");
p_mZ(A,S10,P4,S10,P4,C6);
eigs_V_mZ(A,EigsVector,FACTOR_E);
ctranspose_mZ(EigsVector,T_EigsVector);
/* EigsValue : T_EigsVector * A * EigsVector */
mul_mZ(T_EigsVector,A,T1);
mul_mZ(T1,EigsVector,EigsValue);
f_eigs_mZ(sinh,EigsValue,sinh_EigsValue);
//A == EigsVector * EigsValue * T_EigsVector
mul_mZ(EigsVector,sinh_EigsValue,T1);
mul_mZ(T1,T_EigsVector,sinh_A);
printf(" sinh(A) :");
p_mZ(sinh_A,S10,P4,S10,P4,C6);
/* ================================================================== */
eigs_V_mZ(sinh_A,EigsVector,FACTOR_E);
ctranspose_mZ(EigsVector,T_EigsVector);
/* EigsValue : T_EigsVector * A * EigsVector */
mul_mZ(T_EigsVector,sinh_A,T1);
mul_mZ(T1,EigsVector,EigsValue);
f_eigs_mZ(asinh,EigsValue,sinh_EigsValue);
//A == EigsVector * EigsValue * T_EigsVector
mul_mZ(EigsVector,sinh_EigsValue,T1);
mul_mZ(T1,T_EigsVector,A);
printf(" asinh(sinh(A)) = A :");
p_mZ(A,S10,P4,S10,P4,C6);
f_mZ(A);
f_mZ(sinh_A);
f_mZ(EigsVector);
f_mZ(T_EigsVector);
f_mZ(EigsValue);
f_mZ(sinh_EigsValue);
f_mZ(T1);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun();
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
asinh(sinh(A)) = A
Exemple de sortie écran :
------------------------------------
A :
+0.2480 +0.0000i -0.0292 -0.2345i +0.1522 +0.2135i
-0.0292 +0.2345i +0.4330 +0.0000i +0.0456 +0.0392i
+0.1522 -0.2135i +0.0456 -0.0392i +0.6489 +0.0000i
sinh(A) :
+0.2727 +0.0000i -0.0281 -0.2531i +0.1743 +0.2392i
-0.0281 +0.2531i +0.4579 +0.0000i +0.0410 +0.0529i
+0.1743 -0.2392i +0.0410 -0.0529i +0.7147 +0.0000i
asinh(sinh(A)) = A :
+0.2480 -0.0000i -0.0292 -0.2345i +0.1522 +0.2135i
-0.0292 +0.2345i +0.4330 +0.0000i +0.0456 +0.0392i
+0.1522 -0.2135i +0.0456 -0.0392i +0.6489 +0.0000i
Press return to continue
Press X return to stop