浮点近似值(I)【难度:2级】:
答案1:
public class ApproxFloat
{
public static double f(double x)
{
return x / 2 - x * x / 8 + x *x* x / 16 - 5 *x* x *x* x / 128;
}
}
答案2:
using System;
public class ApproxFloat
{
public static double f(double x)
{
return x / (1.0 + Math.Sqrt(1.0 + x));
}
}
答案3:
using System;
public class ApproxFloat
{
public static double f(double x)
{
return x/(1 + Math.Sqrt(1 + x));
}
}
答案4:
using System;
public class ApproxFloat
{
public static