[elementary_functions] fix nearfloat regression after 7a41f82d 90/20690/3
St├ęphane Mottelet [Fri, 11 Jan 2019 14:23:13 +0000 (15:23 +0100)]
Change-Id: Iffadd661184a4d26c172dba4210bcecf41e5b9cf

scilab/modules/elementary_functions/sci_gateway/cpp/sci_nearfloat.cpp

index 791f52b..05574d0 100644 (file)
@@ -59,11 +59,11 @@ types::Function::ReturnValue sci_nearfloat(types::typed_list &in, int _iRetCount
         wchar_t* wcsString = pStr->get(0);
         if (wcscmp(wcsString, L"succ") == 0)
         {
-            dblMode = DBL_MAX;
+            dblMode = std::numeric_limits<double>::infinity();
         }
         else if (wcscmp(wcsString, L"pred") == 0)
         {
-            dblMode = -DBL_MAX;
+            dblMode = -std::numeric_limits<double>::infinity();
         }
         else
         {