2325: [C++一本通-分治算法]1.方程f(x)的根

Memory Limit:128 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:20 Solved:13

Description

求方程f(x)=2x+3x-4x=0在[1,2]内的根。

提示:2x可以表示成exp(x*log(2))的形式(需要含cmath库)。

Input

输入[1,2]的区间值。

Output

输出方程f(x)=0的根,x的值精确小数点10位。

Sample Input Copy

1 2

Sample Output Copy

1.5071105957

HINT

加入题单

算法标签: