Display: Cloud | List
Most Popular Tags
Results (3 total) All > powershell (x) > system.math (x)
PI sample using PowerShel (Math Fields (System))
# get-mathpi.ps1# Sample with Math class PI field# Thomas Lee - tfl@psp.co.uk# Calculate Pi $pi = [math]::pi# Display the value"The Value of Pi is {0}" -f $pi This sample produces the following output: PS C:\FOO> C:\FOO\get-mathpi.ps1The Value of Pi is 3.14159265358979
Last modified by Thomas Lee on 7/23/2008 10:01:43 AM
Tags:  code  pi  powershell  system.math
E sample using PowerShell (Math Fields (System))
# get-mathe.ps1# Sample with Math class E field# Thomas Lee - tfl@psp.co.uk#get the value$e = [math]::e#print it out"The Value of E is {0}" -f $e This script produces the following output: PSH [C:\foo]: .\get-mathe.ps1The Value of E is 2.71828182845905
Last modified by Thomas Lee on 7/23/2008 10:01:33 AM
BigMul method using PowerShell (Math.BigMul Method (System))
#multiply-bignumber.ps1# demonstratexs the use of the BigMul method# Thomas Lee - tfl@psp.co.uk$int1 = [system.Int32]::MaxValue$int2 = [system.Int32]::MaxValue$longResult = [system.Math]::BigMul($int1, $int2);"Calculate the product of two Int32 values:""{0} * {1} = {2}" -f $int1, $int2, $longResultThis script produces the following output:PS C:\foo> .\multiply-bignumber.ps1Calculate the product
Last modified by Thomas Lee on 7/21/2008 8:03:59 PM
Page view tracker