For faster navigation, this Iframe is preloading the Wikiwand page for Problemas aritméticos.

Problemas aritméticos

Este artículo o sección necesita referencias que aparezcan en una publicación acreditada. Busca fuentes: «Problemas aritméticos»noticias · libros · académico · imágenesPuedes avisar al redactor principal pegando lo siguiente en su página de discusión: ((sust:Aviso referencias|Problemas aritméticos)) ~~~~Este aviso fue puesto el 29 de mayo de 2024.

Un problema aritmético (dentro de la computación), se denomina al desbordamiento de datos debido a la sobre ocupación (overflow) de la memoria disponible como tipos de datos.

Supongamos el siguiente trozo de código de un programa en C:

#include <stdio.h>
int main()
{
  int x, y;
  x = 32000;
  y = 7;
  printf("%d",x*y);
}

Este sería un caso de desbordamiento de entero, ya que para el lenguaje C, se define el tipo de dato entero dentro del rango de -32764 a +32764, siendo el resultado de esta multiplicación, fuera del rango de los enteros.

También en el lenguaje Delphi de Borland podría darse el siguiente caso.

function Multiplicar(X, Y: Integer): Integer;
begin
  try
    Result := X * (999999999 * Y);
  except
    Result := 0;
  end;
end;

Al utilizar esta función, aunque no da ningún error de diseño, compilación o de ejecución si devuelve datos erróneos que pueden causar problemas graves dentro del procesamiento de los datos en dicha aplicación.

Por lo general, este tipo de errores producen cálculos erróneos y hacen que la vulnerabilidad del programa quede manifiesta.

Véase también

{{bottomLinkPreText}} {{bottomLinkText}}
Problemas aritméticos
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?