can't use mpmath python library with Python4Lazarus lazarus / 21-General ---------------------------------------------------------------------- Jurassic Pork · 2025-04-08 05:02 Hello, i try to use the mpmath python library  with Python4Lazarus but when i try to import this library , i have an exception : External: FLT INVALID OPERATION code : Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.Bt_CalculClick(Sender: TObject);var  script  : TStringList;beginscript := TStringList.Create();script.Add('from mpmath import mp');GetPythonEngine.ExecStrings(script);end; Lazarus 2.2.6  64 bits Python4Lazarus 1.4.0.0     Python 3.8.10  (mpmath 1.2.1) Friendly, J.P ---------------------------------------------------------------------- AlexTP · 2025-04-08 06:45 You need to disable Floating point exceptions. Read topics here https://github.com/pyscripter/python4delphi/issues?q=is%3Aissue%20stat e%3Aclosed%20floating%20point ---------------------------------------------------------------------- Jurassic Pork · 2025-04-08 08:22 thanks AlexTP , it is OK now and i can do what i ask for in this post (power(2,0.5) 50 digits) with python4Lazarus and mpmath : Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  implementation uses math;{$R *.lfm} { TForm1 } procedure TForm1.Bt_CalculClick(Sender: TObject);var  script  : TStringList;beginscript := TStringList.Create();Memo1.Clear;Memo1.Append('Calculate  2**0.5');script.Add('from mpmath import *');script.Add('mp.dps = 50') ;script.Add('print(mpf(2)**mpf(0.5))');GetPythonEngine.ExecStrings(scr ipt);end; procedure TForm1.FormCreate(Sender: TObject);begin  SetExcep tionMask([exDenormalized,exInvalidOp,exOverflow,exPrecision,exUnderflo w,exZeroDivide]);end;