Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created July 24, 2013 23:55
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/6075711 to your computer and use it in GitHub Desktop.
Save Fhernd/6075711 to your computer and use it in GitHub Desktop.
Demostración de operaciones que producen valores infinitos positivos y negativos en código fuente C#.
class DivisionPorCeroValoresInfinitos
{
static void Main()
{
Console.WriteLine(1.0 / 0.0); // Infinity
Console.WriteLine(-1.0 / 0.0); // -Infinity
Console.WriteLine(1.0 / -0.0); // -Infinity
Console.WriteLine(-1.0 / -0.0); // Infinity
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment