home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.arch      Apparently more than just beeps & boops      131,241 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 129,676 of 131,241   
   Waldek Hebisch to Thomas Koenig   
   Re: Saving and restoring FP state   
   14 Sep 25 16:22:33   
   
   From: antispam@fricas.org   
      
   Thomas Koenig  wrote:   
   > Michael S  schrieb:   
   >> On Sun, 14 Sep 2025 07:18:38 -0000 (UTC)   
   >> Thomas Koenig  wrote:   
   >>   
   >>> Michael S  schrieb:   
   >>> > On Sat, 13 Sep 2025 14:55:58 -0000 (UTC)   
   >>> > Thomas Koenig  wrote:   
   >>> >   
   >>> >> Similarly, rounding modes are saved and restored for procedures.   
   >>> >   
   >>> > I am not sure that I understand.   
   >>> > 1. Is Fortran's equivalent of C's fesetround() is considered a   
   >>> > languge primitive rather than procedure?   
   >>>   
   >>> Fortran has intrinsic procedures (like SIN, MATMUL or CPU_TIME),   
   >>> procedures from intrinsic modules, like COMPILER_OPTIONS   
   >>> from ISO_FORTRAN_ENV, and user-defined procedures.   
   >>> IEEE_SET_ROUNDING_MODE is a procedure from an intrinsic module   
   >>> (but an optional one).  It need not be an external function;   
   >>> the compiler is free to do other things to implement it.   
   >>>   
   >>> (Hope this answers your question)   
   >>>   
   >>   
   >   
   > OOOPS.   
   >   
   > Seems I misread the standard, missing out on clause 17.4 paragraph 5,   
   > which states   
   >   
   > In a procedure other than IEEE_SET_ROUNDING_MODE or IEEE_SET_STATUS,   
   > the processor shall not change the rounding modes on entry, and   
   > on return shall ensure that the rounding modes are the same as   
   > they were on entry.   
      
   IIUC this means that user can not define routine like 'MY_SET_ROUNDING_MODE'   
   and get desired effect (this probably can be worked around using   
   foreign function interface).   
      
   --   
                                 Waldek Hebisch   
      
   --- 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