Well i am making this operations in a program in java
public class results{
public static void main(String args[]){
double x=Math.sqrt(1/8);
double x2 = x*2;
System.out.println(x);
System.out.println(x2);
}
}
The problem is the variable x. It prints 0.0 and variable x2 0.0 as well. The result of x is 0.353553. How to fix this in order to use the 0.353553 instead of the 0.0 in variable x.