Skip to content

Instantly share code, notes, and snippets.

@kjunichi
Last active June 1, 2018 07:11
Show Gist options
  • Save kjunichi/7609266ed1119d5756bf9c4ac72ac817 to your computer and use it in GitHub Desktop.
Save kjunichi/7609266ed1119d5756bf9c4ac72ac817 to your computer and use it in GitHub Desktop.
2018/5/21

Fortranの多次元配列は列優先 (Column Major) です。(C/C++言語では行優先) 例えば3行4列の2次元整数配列は integer a(3,4) のように宣言され、メモリ上には以下の順番で数値が格納されます。

複素数の割り算は、分母に分母の共役な複素数をかけて計算する

分母に、分母の共役な複素数「a-bi」をかけて計算

real(x)*y/(x^2+y^2)

#define ZMPLXFUNC_Z_Z_(_f)
void _f(dcmplx_t *dcmplx, double real1, double imag1,
double real2, double imag2)

__mth_i_idnint

(import "env" "__mth_i_idnint" (func $__mth_i_idnint (param f64 i32) (result i32))) <- flang

(export "___mth_i_idnint" (func $___mth_i_idnint))

(func $___mth_i_idnint (; 23 ;) (param $$0 f64) (result i32)

n=nint(dz)

関連

アクセス解析タグ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment