/*=============================================================================================*/
/* Project name: test */
/* Project version: 1.0.0.68 */
/*---------------------------------------------------------------------------------------------*/
/* Generated by Aqualis (algorithm and equation analyzer for lightwave simulation) */
/* Aqualis version: 185.0.3.0 */
/* Generated date: 2025/06/19 12:56:32 */
/*=============================================================================================*/
#include <stdio.h>
#include <stdlib.h>
#include <complex.h>
#include <math.h>
#undef I
#define uj _Complex_I
int ic0001;
int ic0002;
int i0001;
int i0002;
int i0003;
double complex z0001;
int *i10001;
int i10001_size[1]={-1};
double complex *z10001;
int z10001_size[1]={-1};
double complex *z20001;
int z20001_size[2]={-1,-1};
extern void zgesv_(int *n, int *nrhs, double complex *a, int *lda, int *ipiv, double complex *b, int *ldb, int *info);
int main()
{
  z20001_size[0] = 4;
  z20001_size[1] = 4;
  z20001=(double complex *)malloc(sizeof(double complex)*z20001_size[0]*z20001_size[1]);
  z10001_size[0] = 4;
  z10001=(double complex *)malloc(sizeof(double complex)*z10001_size[0]);
  for(ic0001=0; ic0001<=z20001_size[0]-1; ic0001++)
  {
    for(ic0002=0; ic0002<=z20001_size[1]-1; ic0002++)
    {
      /* ハンケル関数計算テスト */
      z0001 = j0(1.0E-1*(ic0001+2*ic0002+1))-y0(1.0E-1*(ic0001+2*ic0002+1))*uj;
      z20001[ic0002*z20001_size[0]+ic0001] = z0001;
    }
  }
  for(ic0001=0; ic0001<=z10001_size[0]-1; ic0001++)
  {
    z10001[ic0001] = 0;
  }
  for(ic0001=0; ic0001<=z10001_size[0]-1; ic0001++)
  {
    for(ic0002=0; ic0002<=z20001_size[1]-1; ic0002++)
    {
      z10001[ic0001] = z10001[ic0001]+z20001[ic0002*z20001_size[0]+ic0001]*ic0002;
    }
  }
  /* ===連立方程式の求解==================================================================== */
    i0001 = z20001_size[0];
    i0002 = 1;
    i10001_size[0] = i0001;
    i10001=(int *)malloc(sizeof(int)*i10001_size[0]);
    zgesv_(&i0001,&i0002,z20001,&i0001,i10001,z10001,&i0001,&i0003);
    i10001_size[0] = -1;
    free(i10001);
  /* ===end 連立方程式の求解================================================================ */
    
  for(ic0001=0; ic0001<=z10001_size[0]-1; ic0001++)
  {
    printf("%27.17e%27.17e\n",creal(z10001[ic0001]),cimag(z10001[ic0001]));
  }
  z10001_size[0] = -1;
  free(z10001);
  z20001_size[0] = -1;
  free(z20001);
  return 0;
}
