- Float: 7 digits
- Double: 16 digits
- Decimal: 29 digits
I have been researching F# and came across a data type called BigInt. I now knew that I could go back to PowerShell and take advantage of this type.
The process to do so is straight forward:
First add a reference to the FSharp.Core assembly
Add-Type -Path 'C:\Program Files (x86)\FSharp-1.9.6.16\bin\fSharp.Core.dll'
Now you do things like:
PS C:> [Microsoft.FSharp.Math.BigInt]::Pow(17,71).toString()
PS C:>2300771122759378216336589429524308
0278517973481542540644504860767306
72752491528319986033
So if you are a fan of http://projecteuler.net/ you now have another tool you can utilize.
Enjoy!