Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does PowerShell have an Infinity value

Tags:

powershell

Does PowerShell have a variable or value for infinity?

Perhaps similar to the $null variable?

I have tried $inifinity. I have also tried 1/0 to generate the value.

like image 930
Josh Petitt Avatar asked Jan 09 '23 11:01

Josh Petitt


1 Answers

There is [double]::PositiveInfinity. I suspect if you used 1.0/0.0 you would get this value. 1/0 should produce an error, as there is no infinity value for any of the integral types.

like image 53
Mike Zboray Avatar answered Jan 18 '23 10:01

Mike Zboray