Intel Fortran ver.12 では、Fortran2008 の機能の一部が先取りされています。その中から Bessel 関数を表示させてみました。また FORMAT の新機能、無限反復指定子 * と、万能フォーマット G0 も試してみました。
またクロス・リファレンス機能がついたので、そのオプションも試してみました。出力は30年前くらいの大型機のラインプリンタ用垂れ流し向きの懐かしい感じの形式です。
なお Visual Studio 用のシンタックス・カラーリングのエラーか、Bessel_J0 にだけ色がついていませんでした。
ソース・コード
PROGRAM bessel IMPLICIT NONE INTEGER, PARAMETER :: kd = 8 INTEGER :: i REAL(kd) :: x DO i = 0, 10 x = REAL(i, kd) / 10.0_kd PRINT '(*(1X, G0))', i, x, BESSEL_J0(x), BESSEL_J1(x), BESSEL_Jn(2, x) PRINT '(*(1X, G0))', i, x, BESSEL_Jn(0, 2, x) ! ! PRINT '(*(1X, G0))', i, x, BESSEL_Y0(x), BESSEL_Y1(x), BESSEL_Yn(2, x) ! PRINT '(*(1X, G0))', i, x, BESSEL_Yn(0, 2, x) END DO STOP END PROGRAM bessel
クロス・リファレンス・リスト
Page 1 Source Listing BESSEL 2010-11-13 01:49 C:\FORTRAN\chain\bessel\bessel.f90 1 PROGRAM bessel 2 IMPLICIT NONE 3 INTEGER, PARAMETER :: kd = 8 4 INTEGER :: i 5 REAL(kd) :: x 6 7 DO i = 0, 10 8 x = REAL(i, kd) / 10.0_kd 9 PRINT '(*(1X, G0))', i, x, BESSEL_J0(x), BESSEL_J1(x), BESSEL_Jn(2, x) 10 PRINT '(*(1X, G0))', i, x, BESSEL_Jn(0, 2, x) 11 ! 12 ! PRINT '(*(1X, G0))', i, x, BESSEL_Y0(x), BESSEL_Y1(x), BESSEL_Yn(2, x) 13 ! PRINT '(*(1X, G0))', i, x, BESSEL_Yn(0, 2, x) 14 END DO 15 16 STOP 17 END PROGRAM bessel ENTRY POINTS Name _MAIN__ SYMBOL CROSS REFERENCE Name Object Declared Type Bytes Dimen Elements Attributes References BESSEL Prog 1 BESSEL_J0 Func 9 scalar 9 BESSEL_J1 Func 9 scalar 9 BESSEL_JN Func 9 scalar 9,10 I Local 4 I(4) 4 scalar 7,8,9,10 KD Param 3 I(4) 4 scalar 5,8 REAL Func 8 scalar 8 X Local 5 R(8) 8 scalar 8,9,10 Page 2 Source Listing BESSEL 2010-11-13 01:49 Subprograms/Common Blocks C:\FORTRAN\chain\bessel\bessel.f90 SUBPROGRAMS/COMMON BLOCKS Name Object Declared Type Bytes Dimen Elements Attributes References BESSEL Prog 1 COMPILER OPTIONS BEING USED /align:nocommons /align:nodcommons /align:noqcommons /align:records /align:nosequence /align:norec1byte /align:norec2byte /align:norec4byte /align:norec8byte /align:norec16byte /altparam /assume:accuracy_sensitive /assume:nobscc /assume:nobuffered_io /assume:nobyterecl /assume:nocc_omp /assume:nocstring /assume:nodummy_aliases /assume:nofpe_summary /assume:noieee_fpe_flags /assume:nominus0 /assume:noold_boz /assume:old_unit_star /assume:old_ldout_format /assume:noold_logical_ldio /assume:old_maxminloc /assume:old_xor /assume:protect_constants /assume:noprotect_parens /assume:split_common /assume:source_include /assume:nostd_mod_proc_name /assume:norealloc_lhs /assume:nounderscore /assume:no2underscores /noauto /auto_scalar /nobintext /ccdefault:default /check:noargs /check:noarg_temp_created /check:bounds /check:noformat /check:nooutput_conversion /check:nooverflow /check:nopointers /check:nopower /check:noshape /check:nounderflow /check:nouninitialized /Qcoarray-num-procs:0 /noQcoarray-config-file /convert:native /cross_reference /D:__INTEL_COMPILER=1200 /D:_DEBUG /D:_MT /D:_M_IX86=700 /D:__SSE2__ /D:__SSE__ /D:_WIN32 /D:__INTEL_COMPILER_BUILD_DATE=20101006 /double_size:64 /nod_lines /noQdyncom /error_limit:30 /nof66 /nof77rtl /nofast /fpscomp:nofilesfromcmd /fpscomp:nogeneral /fpscomp:noioformat /fpscomp:noldio_spacing /fpscomp:nolibs /fpscomp:nologicals /nofpconstant /fpe3 /noftz /fp_model:noprecise /fp_model:fast /fp_model:nostrict /fp_model:nosource /fp_model:nodouble /fp_model:noextended /fp_model:novery_fast /fp_model:noexcept /fp_model:nono_except /fp_modbits:nofp_contract /fp_modbits:nono_fp_contract /fp_modbits:nofenv_access /fp_modbits:nono_fenv_access /fp_modbits:nocx_limited_range /fp_modbits:nono_cx_limited_range /fp_modbits:noprec_div Page 3 Source Listing BESSEL 2010-11-13 01:49 C:\FORTRAN\chain\bessel\bessel.f90 /fp_modbits:nono_prec_div /fp_modbits:noprec_sqrt /fp_modbits:nono_prec_sqrt /fp_modbits:noftz /fp_modbits:nono_ftz /fp_modbits:nointrin_limited_range /fp_modbits:nono_intrin_limited_range /fp_modbits:notrunc_compares /fp_modbits:nono_trunc_compares /fp_modbits:noieee_nan_compares /fp_modbits:nono_ieee_nan_compares /fp_modbits:honor_f32_conversion /fp_modbits:nono_honor_f32_conversion /fp_modbits:nohonor_f64_conversion /fp_modbits:nono_honor_f64_conversion /fp_modbits:nono_x87_copy /fp_modbits:nono_no_x87_copy /fp_modbits:noexception_semantics /fp_modbits:nono_exception_semantics /fp_modbits:noprecise_libm_functions /fp_modbits:nono_precise_libm_functions /heap_arrays:0 /nothreadprivate_compat /free /gen_interfaces /debug2 /iface:noc /iface:nocref /iface:nocvf /iface:default /iface:nostdcall /iface:nostdref /iface:nomixed_str_len_arg /iface:nono_mixed_str_len_arg /nointconstant /integer_size:32 /libdir:automatic /libdir:user /module:Debug\ /names: /nonoinclude /O0 /nopad_source /real_size:32 /norecursive /reentrancy:threaded /nosharable_localsaves /Qvec:simd /show:noinclude /show:map /show:options /nosyntax_only /nothreadcom /noU /novms /warn:noall /warn:nonone /warn:alignments /warn:noargument_checking /warn:nodeclarations /warn:general /warn:noignore_bounds /warn:noignore_loc /warn:interfaces /warn:notruncated_source /warn:uncalled /warn:uninitialized /warn:nounused /warn:usage /include path : C:\Program Files\Intel\ComposerXE-2011\compiler\include\,c:\Program Files\Microsoft Visual Studio 9.0\VC\include\, .FOR,C:\FORTRAN\chain\bessel\.FOR,.\.FOR,C:\PROGRA~1\Intel\COMPOS~1\compiler\include\ia32\.FOR,C:\Program Files\Intel\ComposerXE-2011\compiler\include\.FOR, C:\Program Files\Intel\ComposerXE-2011\compiler\include\ia32\.FOR,C:\Program Files\Intel\ComposerXE-2011\mkl\include\.FOR, c:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include\.FOR,c:\Program Files\Microsoft Visual Studio 9.0\VC\include\.FOR, c:\Program Files\Microsoft Visual Studio 9.0\VC\PlatformSDK\include\.FOR,c:\Program Files\Microsoft Visual Studio 9.0\VC\PlatformSDK\include\.FOR, C:\Program Files\Intel\ComposerXE-2011\compiler\include\.FOR,C:\Program Files\Intel\ComposerXE-2011\compiler\include\ia32\.FOR, C:\Program Files\Intel\ComposerXE-2011\mkl\include\.FOR,c:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include\.FOR, c:\Program Files\Microsoft Visual Studio 9.0\VC\include\.FOR,c:\Program Files\Microsoft Visual Studio 9.0\VC\PlatformSDK\include\.FOR, c:\Program Files\Microsoft Visual Studio 9.0\VC\PlatformSDK\include\.FOR /list filename : Debug\bessel.lst /object filename : none /nobrowser /Fd filename : none COMPILER: Intel(R) Visual Fortran 12.0-1176