Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.fortran    |    Putting John Backus on a giant pedestal    |    5,127 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 4,983 of 5,127    |
|    Steven G. Kargl to All    |
|    Re: FRACTION() seems broken in gfortran     |
|    10 Sep 25 02:15:55    |
      From: sgk@REMOVEtroutmask.apl.washington.edu              On Tue, 09 Sep 2025 22:41:33 +0000, Lawrence D’Oliveiro wrote:              > On Tue, 9 Sep 2025 15:16:08 -0000 (UTC), Steven G. Kargl wrote:       >       >> Seeing python's modf() does not lends itself to a "most natural       >> interpretation"       >       > ldo@theon:~> python3 -ic "import math"       > >>> fraction = lambda x : math.modf(x)[0]       > >>> fraction(3.75)       > 0.75       > >>> fraction(2.5)       > 0.5              ROTFL. Intent to column 7 and the following worked over 66 years ago.              program real_kinds        real x        fraction(x) = mod(x,1.)        x = 3.12345        print *, fraction(x)       end program real_kinds              % gfcx -o z a.f90 && ./z        0.123450041                     So, how is a user without looking at the documentation       to know what modf()?              --       steve              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca