program random * * File: ~/numerical/random.f * * Example illustrating generating random numbers (uniform [0,1]) * in HP Fortran. * * Note - must compile with "+E1" option. * * ECG (10-99) * iseed = 11111 ! should be a large odd integer ! different seed will give different sequence do i = 1, 10 print *, ran(iseed) ! single-precision random numbers end do stop end * * Sample output: * * .1786802 * .2634503 * .2517036 * .9159438 * .322982 * 4.06833E-02 * .9544297 * .5043409 * .3232859 * 3.77548E-02 *