Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created May 28, 2018 02:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fhernd/91e5a2f33799e0560f54d597a1d381e0 to your computer and use it in GitHub Desktop.
Save Fhernd/91e5a2f33799e0560f54d597a1d381e0 to your computer and use it in GitHub Desktop.
Validación de estado de valores numéricos. OrtizOL.
import math
menos_infinito = float('-inf')
mas_infinito = float('inf')
NaN = float('nan')
print(menos_infinito)
print(mas_infinito)
print(NaN)
print(math.isinf(menos_infinito))
print(math.isinf(mas_infinito))
print(math.isnan(NaN))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment