F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_14801823_31673.cpp: In function 'double BinSearch(double, double)':
0_0_14801823_31673.cpp:19:18: error: call of overloaded 'abs(double)' is ambiguous
     while(abs(r-l)>=eps){
                  ^
0_0_14801823_31673.cpp:19:18: note: candidates are:
In file included from 0_0_14801823_31673.cpp:2:0:
GCC4.9.2/x86_64-w64-mingw32/include/math.h:205:15: note: int abs(int)
   int __cdecl abs(int _X);
               ^
0_0_14801823_31673.cpp:12:8: note: double abs(double)
 double abs(double x){
        ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:38:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:66,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62,
                 from 0_0_14801823_31673.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:91:3: note: constexpr long double std::abs(long double)
   abs(long double __x)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:87:3: note: constexpr float std::abs(float)
   abs(float __x)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:81:3: note: constexpr double std::abs(double)
   abs(double __x)
   ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:59:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62,
                 from 0_0_14801823_31673.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/cstdlib:174:3: note: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cstdlib:166:3: note: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^
0_0_14801823_31673.cpp:28:20: error: call of overloaded 'abs(double)' is ambiguous
         if(abs(v-vo)<=eps){
                    ^
0_0_14801823_31673.cpp:28:20: note: candidates are:
In file included from 0_0_14801823_31673.cpp:2:0:
GCC4.9.2/x86_64-w64-mingw32/include/math.h:205:15: note: int abs(int)
   int __cdecl abs(int _X);
               ^
0_0_14801823_31673.cpp:12:8: note: double abs(double)
 double abs(double x){
        ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:38:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:66,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62,
                 from 0_0_14801823_31673.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:91:3: note: constexpr long double std::abs(long double)
   abs(long double __x)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:87:3: note: constexpr float std::abs(float)
   abs(float __x)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:81:3: note: constexpr double std::abs(double)
   abs(double __x)
   ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:59:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62,
                 from 0_0_14801823_31673.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/cstdlib:174:3: note: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cstdlib:166:3: note: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-23 05:18:56, Gzip enabled