Hi All -
Before I begin, I am very new to powershell and and just started learning it.
I am trying to do some very basic arithmetic operations (subtractions) in powershell and I am unable to understand the way it works.
The documentations seem to explain more about the arithmetic operations with full numbers and internet explanations talk more about .NET classes which I don’t understand.
Below are the samples -
PS C:\windows\system32> 5-4
1
PS C:\windows\system32> 5.1-4
1.1
PS C:\windows\system32> 5-4.9 # Why not 0.1?
0.0999999999999996
PS C:\windows\system32> 5.1-4.9 # Why not 0.2?
0.199999999999999
PS C:\windows\system32> 5.1-4.1
1
PS C:\windows\system32> 5.1-4.05
1.05
PS C:\windows\system32> 96.9-96.1 # Why not 0.8?
0.800000000000011
PS C:\windows\system32> 96.9-95 # Why not 1.9?
1.90000000000001
PS C:\windows\system32> 120-100.9
19.1
PS C:\windows\system32> 128-126.9 # Why not 1.1?
1.09999999999999
PS C:\windows\system32> 130-100.9
29.1
PS C:\windows\system32> 130-120.9 # Why not 9.1?
9.09999999999999