How To Do Math and Arithmetic in PowerShell

Learn how to do math in PowerShell, from the basic arithmetic operators to the .NET Math class. Covers integer and floating-point division, exponents and square roots, rounding, precision, random numbers, and summing a collection with Measure-Object.

$sumupdated Aug 202626 examples

How To Do Advanced Math Calculation Using bc?

Learn how to use the GNU Linux bc command line to do math arithmetic and algebra with square root, sine, cosine, tangent, arctangent, bessel, and more.

echo "a=1;updated Sep 20208 examples

Math Arithmetic: How To Do Calculation in Bash?

Learn how to do math arithmetic with integer and floating-point in Bash. Includes addition, subtraction, division, multiplication, and also floating-point precision.

expr 1updated Oct 202434 examples