PHP : The awk subtraction giving exponential values
问题 I am getting awk result when I am subtracting two values, the error is I am getting exponent value 2.7755575615629E-17 instead of 0. Anything I am missing to apply, please suggest. These is happening with some cases only like 0.66, 0.67, 0.33, The prototype of the code I am using is given below, $_SESSION['x'] = 1; $_SESSION['x'] = $_SESSION['x'] - 0.83; echo ( $_SESSION['x']- 0.17) ; echo '<br>'; But on reversing the values It all fine with 0 $_SESSION['x'] = 1; $_SESSION['x'] = $_SESSION['x