It would be powerful for 'big math' users of Powershell if we could integrate F# and Microsoft's Solver Foundation into Powershell 3.0. Microsoft's Solver Foundation provides for "Programming in the Optimization Modeling Language (OML), in C# imperatively, in F# functionally, or in any .NET language".
So will it work with a DLR language like Powershell 3.0 Beta? I don't know yet but here is some exploratory script.:
Historic Blog. No longer active. A script repository that stopped at Powershell 4.0 is at www.rmfdevelopment.com/PowerShell_Scripts . My historic blog (no longer active) on Network Security ( http://thinking-about-network-security.blogspot.com ) is also Powershell heavy. AS of 2/27/2014 all Scripts are PS 4.0.
Thursday, July 26, 2012
Thursday, July 19, 2012
"Big Math"[0] : [BigInt] to the rescue!
BigInt to the rescue. Only with .NET 4.0. From PS 3.0 Beta:
Normally:
${2^1023}=[math]::POW(2,1023)
${2^1023}
8.98846567431158E+307
${2^1024}=[math]::POW(2,1024)
${2^1024}
Infinity
${2^1023} * 1.99999999999999988
1.79769313486232E+308
$AMAX=${2^1023} * 1.99999999999999988
[Double]::MaxValue
1.79769313486232E+308
[Double]::MaxValue - $AMAX
0
...and thus integer factorial is limited to 170:
Subscribe to:
Posts (Atom)