File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed 
PythonForDelphi/Components/Sources/Core Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -3168,7 +3168,7 @@ procedure MaskFPUExceptions(ExceptionsMasked : boolean;
31683168implementation 
31693169
31703170{ $IFDEF MSWINDOWS} 
3171- uses  Registry;
3171+ uses  Math,  Registry;
31723172{ $ENDIF} 
31733173
31743174
@@ -9732,19 +9732,17 @@ function PyType_HasFeature(AType : PPyTypeObject; AFlag : Integer) : Boolean;
97329732procedure  MaskFPUExceptions (ExceptionsMasked : boolean;
97339733  MatchPythonPrecision : Boolean);
97349734begin 
9735-  { $IFNDEF CPUARM} 
9736-   if  MatchPythonPrecision then  begin 
9737-     if  ExceptionsMasked then 
9738-       Set8087CW($1232  or  $3F )
9739-     else 
9740-       Set8087CW($1232 );
9741-   end  else  begin 
9742-     if  ExceptionsMasked then 
9743-       Set8087CW($1332  or  $3F )
9735+   if  ExceptionsMasked then 
9736+     SetExceptionMask([exInvalidOp, exDenormalized, exZeroDivide,
9737+       exOverflow, exUnderflow, exPrecision])
9738+   else 
9739+     SetExceptionMask([exDenormalized, exUnderflow, exPrecision]);
9740+ { $IFNDEF NEXTGEN} 
9741+   if  MatchPythonPrecision then 
9742+       SetPrecisionMode(pmDouble)
97449743    else 
9745-       Set8087CW($1332 );
9746-   end ;
9747-  { $ENDIF} 
9744+       SetPrecisionMode(pmExtended);
9745+ { $ENDIF !NEXTGEN} 
97489746end ;
97499747
97509748{ $IFDEF MSWINDOWS} 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments