12.07.2015 Views

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2 Intel <strong>Fortran</strong> <strong>Libraries</strong> <strong>Reference</strong>The same value for iseed generates the same sequence of random numbers. To vary the sequence,call SRAND with a different iseed value each time the program is executed.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIBSee Also: “RAND, RANDOM”, “IRAND, IRANDM”, the RANDOM_NUMBER andRANDOM_SEED intrinsic subroutines in the Language <strong>Reference</strong>Example! How many random numbers out of 100 will be between .5 and .6?USE IFPORTICOUNT = 0CALL SRAND(123)DO I = 1, 100X = RAND(0)IF ((X > .5).AND.(X < .6)) ICOUNT = ICOUNT + 1END DOWRITE(*,*) ICOUNT, "numbers between .5 and .6!"ENDSSWRQQPortability Subroutine: Returns the floating-point processor status word. .Module: USE IFPORTSyntaxCALL SSWRQQ (status)status(Output) INTEGER(2). Floating-point processor status word.SSWRQQ performs the same function as the run-time subroutine GETSTATUSFPQQ and isprovided for compatibility.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIBSee Also: “LCWRQQ”, “GETSTATUSFPQQ”ExampleUSE IFPORTINTEGER(2) statusCALL SSWRQQ (status)2-474

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!