octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #54217] Build fails with error: call of overlo


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #54217] Build fails with error: call of overloaded ‘pow(int,int)’ is ambiguous
Date: Sat, 30 Jun 2018 20:25:24 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0

Follow-up Comment #1, bug #54217 (project octave):

Can you try changing the two calls to pow like the following diff?


diff --git a/libinterp/corefcn/__betainc__.cc
b/libinterp/corefcn/__betainc__.cc
--- a/libinterp/corefcn/__betainc__.cc
+++ b/libinterp/corefcn/__betainc__.cc
@@ -77,7 +77,7 @@
         b = args(2).float_array_value ();
 
       // Initialize variables used in algorithm
-      static const float tiny = pow (2, -50);
+      static const float tiny = octave::math::exp2 (-50.0f);
       static const float eps = std::numeric_limits<float>::epsilon ();
       float xj, x2, y, Cj, Dj, aj, bj, Deltaj, alpha_j, beta_j;
       int j, maxit;
@@ -148,7 +148,7 @@
         b = args(2).array_value ();
 
       // Initialize variables used in algorithm
-      static const double tiny = pow (2, -100);
+      static const double tiny = octave::math::exp2 (-100.0);
       static const double eps = std::numeric_limits<double>::epsilon ();
       double xj, x2, y, Cj, Dj, aj, bj, Deltaj, alpha_j, beta_j;
       int j, maxit;
diff --git a/libinterp/corefcn/__gammainc__.cc
b/libinterp/corefcn/__gammainc__.cc
--- a/libinterp/corefcn/__gammainc__.cc
+++ b/libinterp/corefcn/__gammainc__.cc
@@ -69,7 +69,7 @@
         a = args(1).float_array_value ();
 
       // Initialize variables used in algorithm
-      static const float tiny = pow (2, -50);
+      static const float tiny = octave::math::exp2 (-50.0f);
       static const float eps = std::numeric_limits<float>::epsilon();
       float y, Cj, Dj, bj, aj, Deltaj;
       int j, maxit;
@@ -124,7 +124,7 @@
         a = args(1).array_value ();
 
       // Initialize variables used in algorithm
-      static const double tiny = pow (2, -100);
+      static const double tiny = octave::math::exp2 (-100.0);
       static const double eps = std::numeric_limits<double>::epsilon();
       double y, Cj, Dj, bj, aj, Deltaj;
       int j, maxit;


If that change fixes it for you I believe this can be fixed in time for a
4.4.1 release.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?54217>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]