- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
! ***** Printing results *****
print *," Method :: vsRng Gaussian Box Mueller."
print *," ---------------------------------------------!!-------------------------"
print *," seed=2000*(100-mul) + 100000000*j*mul"
print *,""
print *," Parameters:"
print 11," a = ",a
print 11," sigma = ",sigma
print 11," Variance = ",sigma*sigma
print 15," Mult = ",mul
print 15," seed = ",seed
print 15," Number = ",n
Any idea why the second print statement puts in a new line where there is not one.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dunno! Is this windows 11? Recent W11 have a defualt console that is "Windows Terminal" as opposed the "Windows Console Host", the behaviour is different in many ways. Maybe it is a 'word wrap' thing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
List-directed wraps at column 80 by default. Here's what the docs say:
There is a property of list-directed sequential WRITE statements called the right margin. If you do not specify RECL as an OPEN statement specifier or in environmental variable FORT_FMT_RECL, the right margin value defaults to 80. When RECL is specified, the right margin is set to the value of RECL. If the length of a list-directed sequential WRITE exceeds the value of the right margin value, the remaining characters will wrap to the next line. Therefore, writing 100 characters will produce two lines of output, and writing 180 characters will produce three lines of output. You can turn off the right margin using the wrap-margin compiler option or the FORT_FMT_NO_WRAP_MARGIN environment variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But there is a longer single line lower down the page so why has it broken the long line where it has? There is something more than just the 80 char wrap going on I think.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No. Is that text longer than the bottom "---..." line?
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
He didn't show the WRITE for that line. If it's formatted, then the margin doesn't apply.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
dum = 2.0/float(n)
ttest = (sM - tM)/(sqrt(dum)*sqrt((sD + tD)/2.0))
print *,"---------------------------------------------------------------------------------------------80----------------------"
write(2,221)a,sigma, sigma*sigma,mul,seed,n
write(*,221)a,sigma, sigma*sigma,mul,seed,n
221 format(" Method :: vsRng Gaussian Box Mueller.",/,&
" ----------------------------------------------------------------------",/,&
" seed=2000*(100-mul) + 100000000*j*mul",//,&
" Parameters:",/,&
" a = ",f12.3,/,&
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
vsRngGaussian is not nice nor does seed play nicely.
I have had to factor every single seed to get a different number set.
The problem was I ended up with a dependent set of supposedly independent variables and then I got the same answer 10000 times.
![](/skins/images/C4F7392A5C68ACA60290C9576F107044/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page