Mathc complexes/a150
Installer et compiler ce fichier dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
/* ------------------------------------ */
nb_Z asin_Z(
nb_Z A
)
{
nb_Z A_n;
nb_Z sA;
nb_Z sinA = i_Z(0,0);
int n = 10;
int i;
for(i=0.; i <= n; i++)
{
A_n = pow_Z((2.*i+1.), A);
sA = smul_Z( factorial(2.*i)
/
(pow(4.,i)*pow(factorial(i),2.)*(2.*i+1.)),
A_n);
sinA = add_Z(sinA,sA);
}
return (sinA);
}
/* ------------------------------------ */
int main(void)
{
nb_Z a;
nb_Z b;
clrscrn();
a = i_Z(-.38112545, .02453546);
printf(" sin(");
p_Z(a,S3,P8,S3,P8);
printf(") = ");
p_Z(sin_Z(a),S3,P8,S3,P8);
printf("\n\n\n");
b = sin_Z(a);
printf(" asin(");
p_Z(b,S3,P8,S3,P8);
printf(") = ");
p_Z(asin_Z(b),S3,P8,S3,P8);
printf("\n\n\n");
stop();
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Cet exemple pose des problèmes. Je l'ai installé pour mémoire.
Exemple de sortie écran :
sin(-0.38112545+0.02453546i ) = -0.37207737+0.02277724i
asin(-0.37207737+0.02277724i ) = -0.38112545+0.02453546i
Press return to continue.
# --------------------------------
# Copy/Past into the octave window
#
x = sin(-0.38112545+0.02453546i )
y = asin(-0.37207737+0.02277724i )
#