Author |
Message |
Topic: floaty problem (beginner) |
Helen
Replies: 7
Views: 7463
|
Forum: Support Posted: Wed Apr 18, 2018 5:52 pm Subject: yes, thanks! |
Thanks for this... yes, I'll ride the learning curve like a trooper. Checked out that page (same one given earlier I think... great minds think alike!) |
Topic: floating number problem with write |
Helen
Replies: 2
Views: 4415
|
Forum: Support Posted: Wed Apr 18, 2018 12:15 pm Subject: cracked it! |
my problem was to refer to a as an integer...
i had a=3 and in my equation i used the value 3.
Instead, I just changed that to 3.0 everywhere, and I'm good! |
Topic: floaty problem (beginner) |
Helen
Replies: 7
Views: 7463
|
Forum: Support Posted: Wed Apr 18, 2018 12:12 pm Subject: managed a workaround |
Did a more accurate calculation on the iteration (instead of adding to previous, possibly wonky, value, I RE-calculated).
Thanks for this guys! |
Topic: floating number problem with write |
Helen
Replies: 2
Views: 4415
|
Forum: Support Posted: Wed Apr 18, 2018 12:10 pm Subject: floating number problem with write |
Again, another little problem and I hope I'm not embarassing myself here...
Here is the simple code:
real*8 :: a
do i = 1, 2000
if (i>1) then
a= 3 + ((i-1)*((4-3)/1999))
end if
w ... |
Topic: floaty problem (beginner) |
Helen
Replies: 7
Views: 7463
|
Forum: Support Posted: Tue Apr 17, 2018 10:54 pm Subject: fascinating stuff but... |
i declared my a as real*4
and all was going well but...
on the 1924th (or so) iteration of adding 0.00125 to 1.5...
when i would expect the value of 3.90255 to go to 3.90380
it actually jumps to ... |
Topic: floaty problem (beginner) |
Helen
Replies: 7
Views: 7463
|
Forum: Support Posted: Tue Apr 17, 2018 10:40 am Subject: floaty problem (beginner) |
must be a stupid question but...
i have a variable a = 1.5
i add to it 0.00125
and then a shows in a write as 1.50124999997
what am i doing wrong?
is there a different declaration for fixed f ... |
Topic: Problem WRITE |
Helen
Replies: 14
Views: 13798
|
Forum: Support Posted: Sun Apr 01, 2018 3:45 pm Subject: just a word |
i am a novice so i can quite understand why i fell at the first hurdle, but I found your forum and being here is so great of you!
I was using Simply Fortran (just found it first) at first until I had ... |
Topic: Problem WRITE |
Helen
Replies: 14
Views: 13798
|
Forum: Support Posted: Wed Mar 21, 2018 12:10 pm Subject: thank you, all! |
Thank you all so much for helping me out with my novice question! Your help has solved the problem and I'm writing with glee now! Have a great week! |
Topic: Problem WRITE |
Helen
Replies: 14
Views: 13798
|
Forum: Support Posted: Thu Mar 15, 2018 4:59 pm Subject: Problem WRITE |
Doing fortran at Uni this year and using the marvellous PLATO to edit,compile, build and run my programs on a windows 10 laptop.
Most things going swimmingly fine with one exception: I can’t work o ... |
|