]> AND Public Git Repository - simgrid.git/blobdiff - examples/smpi/NAS/nas_common.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
in MC mode, failed xbt_assert() are reported as MC_assert()s
[simgrid.git] / examples / smpi / NAS / nas_common.c
index cda03cc85b4d63030ccdcc36bd8232de340bff29..04c435ef6f3051c1a3c0a9444ef206c5bc0898c6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016. The SimGrid Team.
+/* Copyright (c) 2016-2022. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -101,8 +101,8 @@ double timer_read(int n)
 double vranlc(int n, double x, double a, double *y)
 {
   int i;
-  long  i246m1=0x00003FFFFFFFFFFF;
-  long  LLx, Lx, La;
+  uint64_t  i246m1=0x00003FFFFFFFFFFF;
+  uint64_t  LLx, Lx, La;
   double d2m46;
 
 // This doesn't work, because the compiler does the calculation in 32 bits and overflows. No standard way (without
@@ -111,8 +111,8 @@ double vranlc(int n, double x, double a, double *y)
 
   d2m46=pow(0.5,46);
 
-  Lx = (long)x;
-  La = (long)a;
+  Lx = (uint64_t)x;
+  La = (uint64_t)a;
   //fprintf(stdout,("================== Vranlc ================");
   //fprintf(stdout,("Before Loop: Lx = " + Lx + ", La = " + La);
   LLx = Lx;