我这个代码哪里有问题?为什么输入0.1之后什么都输出不了?
import java.util.Scanner;
import java.lang.Math;
public class lianxi2 {
public static void main(String[] args) {
double x;
Scanner s=new Scanner(System.in);
x=s.nextDouble();
double ans=1.0;
int k=1,l;
for(l=2;(Math.abs(ans))>=1e-5;l+=2)
{
double c=0.0,b=1.0;
double a=Math.pow(x, 2*k)*Math.pow(-1.0,k);
for(int j=1;j<=l;j++)
{
b*=j;
}
c=a/b;
ans+=c;
k++;
}
System.out.printf("%.6f", ans);
}
}