home bbs files messages ]

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,979 of 5,127   
   Steven G. Kargl to All   
   Re: FRACTION() seems broken in gfortran    
   09 Sep 25 15:16:08   
   
   From: sgk@REMOVEtroutmask.apl.washington.edu   
      
   On Tue, 09 Sep 2025 07:23:54 +0000, Lawrence D’Oliveiro wrote:   
      
   > On Tue, 9 Sep 2025 08:09:12 +0200, pehache wrote:   
   >   
   >> Le 09/09/2025 à 00:16, Lawrence D’Oliveiro a écrit :   
   >>>   
   >>> Python doesn’t have a fraction() function as such,   
   >>   
   >> Neither any of the other languages. In contrast to your initial   
   >> assertion.   
   >   
   > WHAT “initial assertion”?   
      
   After Gary described a decimal fraction, you wrote:   
      
      The way you describe is obviously the most natural interpretation, these   
      days. And most other languages do it that way. But not Fortran.   
      
   We're still waiting for a list of "most other languages".  C does   
   not have a fraction() intrinsic function.   
      
   >>> but it does have modf   
   >>> , which is   
   >>> documented as returning “the fractional and integer parts” of its   
   >>> argument.   
   >>   
   >> Which is a behavior that you can hardly guess without reading the   
   >> doc, same as `FRACTION()` in Fortran.   
   >   
   > Maybe check the actual Fortran docs and behaviour? We *did* discuss   
   > all this in the thread, you know.   
      
   Seeing python's modf() does not lends itself to a "most natural   
   interpretation", so of course you need to read the documentation.   
   The same applies to C.   
      
   PS: Fortran has MOD() and MODULO().  See the docs for the differences.   
      
   --   
   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