chiark / gitweb /
Use trusty
[nlopt.git] / api / general.c
index dfe20102de0d8d9a2a1d8ddb46bd75948b5fee41..672163d4e6899e897c49233fa5b9085e0111ec80 100644 (file)
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
  */
 
-#include <math.h>
-#include <float.h>
-
 #include "nlopt-internal.h"
 
 /*************************************************************************/
 
-int nlopt_isinf(double x) {
-     return fabs(x) >= HUGE_VAL * 0.99
-#ifdef HAVE_ISINF
-         || isinf(x)
-#endif
-         ;
-}
-
-int nlopt_isfinite(double x) {
-    return fabs(x) <= DBL_MAX;
-}
-
-/*************************************************************************/
-
 void NLOPT_STDCALL nlopt_version(int *major, int *minor, int *bugfix)
 {
      *major = MAJOR_VERSION;
@@ -136,7 +119,7 @@ void NLOPT_STDCALL nlopt_srand(unsigned long seed) {
 }
 
 void NLOPT_STDCALL nlopt_srand_time(void) {
-     nlopt_srand(nlopt_time_seed() + my_gettid() * 314159);
+     nlopt_srand(nlopt_time_seed() + (unsigned long)my_gettid() * 314159);
 }
 
 void nlopt_srand_time_default(void) {