IEEE representación de punto flotante S representa el bit de signo, el X 39s son los exponentes de bits, y el M 39s son los bits de mantisa. Obsérvese que el bit más a la izquierda se supone en los formatos real 4 y real 8, pero está presente como quot1quot en BYTE 3 del formato real10. Para desplazar el punto binario correctamente, primero descomprime el exponente y, a continuación, mueve el punto binario hacia la derecha o hacia la izquierda el número de bits apropiado. Ejemplos Los siguientes son algunos ejemplos en formato real4: En el ejemplo siguiente, el bit de signo es cero, y el exponente almacenado es 128, o 100 0000 0 en binario, que es 127 más 1. La mantisa almacenada es (1.000) 0000. 0000 0000, que tiene una dirección implícita 1 y punto binario, por lo que la mantisa real es uno. Igual que 2 excepto que el bit de signo está establecido. Esto es válido para todos los números de punto flotante del formato IEEE. La misma mantisa, el exponente aumenta en uno (el valor sesgado es 129, o 100 0000 1 en binario.) Mismo exponente, la mantisa es más grande a la mitad que 1.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 El mismo exponente que otras potencias de dos, la mantisa es uno menos de dos en 127, o 011 1111 1 en la mitad de los valores de los dígitos fraccionarios: 1/2, 1/4, 1/8 y así sucesivamente. El exponente polarizado es 126, 011 1111 0 en binario, y la mantisa es (1.) 100 0000. 0000 0000, que es 1 1/2. Exactamente igual a dos excepto que el bit que representa 1/4 es En la mantisa 1/10 es una fracción de repetición en binario. La mantisa es apenas tímida de 1,6, y el exponente sesgado dice que 1,6 es para ser dividido por 16 (es 011 1101 1 en binario, que es 123 en decimal ) El exponente verdadero es 123 127 4, lo que significa que el factor de multiplicar es 24 1/16 Observe que la mantisa almacenada se redondea en el último bit para intentar representar el número irrepresentable con la mayor exactitud posible. (La razón de que 1/10 y 1/100 no son exactamente representables en binario es similar a la razón que 1/3 no es exactamente representable en decimal.) 0 1.0 2-128 todos los ceros - un caso especial. Véase también Esta página se traduce del original usando el traductor de Google. IEEE 754 - Flotador de aritmética binaria estándar Autor: Yashkardin Vladimirnbsp nbsp softelectro. ru nbsp nbsp Esta norma está diseñada asociación IEEE (Instituto de Ingenieros Eléctricos y Electrónicos) y se utiliza para representar números reales (punto flotante) en código binario. El estándar más utilizado para el punto flotante, utilizado por muchos microprocesadores y dispositivos lógicos y software. Título completo de la norma en asociación IEEE: Norma IEEE para aritmética binaria de punto flotante (ANSI / IEEE Std 754-1985) Título de la norma en la Comisión Electrotécnica Internacional IEC: IEC 60559: 1989, Aritmética binaria de punto flotante para sistemas de microprocesadores (IEC 559: 1989 - la antigua designación de la norma) En 2008, la asociación ha publicado IEEE estándar IEEE 754-2008, que incluye el estándar IEEE 754-1985. 2. Breve descripción de la norma. La edición original de la norma: Norma IEEE para la aritmética binaria de punto flotante nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp Copyright 1985 por el Instituto de Ingenieros Eléctricos y Electrónicos, Inc 345 East 47th Street, Nueva York, NY 10017, EE. UU. Norma contiene 23 páginas de texto en 7 secciones y un anexo: 1.Escopio 1.1 Objetivos de implementación 1.2 Inclusiones 1.3 Exclusiones 2.Definiciones 3.Formatos 3.1 Conjuntos de valores 3.2 Formatos básicos 3.3 Formatos extendidos 3.4 Combinaciones de formatos 4.Rondeado 4.1 Ronda To 4.2 Rounding Roundings 4.3 Precisión de redondeo 5. Operaciones 5.1 Aritmética 5.2 Raíz cuadrada 5.3 Conversiones de formato de punto flotante 5.4 Conversión entre formatos de punto flotante y entero 5.5 Número de punto flotante redondo a valor entero 5.6 Conversión de decimal binario 5.7 Comparación 6.Infinity, NaNs y Signed Zero 6.1 Aritmética infinita 6.2 Operaciones con NaNs 6.3 El bit de signo 7.Excepciones 7.1 Operación no válida 7.2 División por cero 7.3 Desborde 7.4 Desbordamiento 7.5 Inexacta 8.Traps 8.1 Trampero 8.2 Precedencia A. Recommended Funciones y predicados nbsp nbsp nbsp nbspLamentablemente , El IEEE ha evolucionado de una organización de ingeniería pública internacional (que fue originalmente) una organización comercial. Esta organización es propietaria de los derechos de autor para publicar el estándar IEEE754-1985. Así que si quieres leer, con el estándar original, tienes que comprarlo por alrededor de 80. Sin embargo, la ley rusa me permite comentar sobre la enseñanza de esta norma. Por lo tanto, la otra enfermedad dar una presentación arbitraria de la norma y expresar su opinión sobre ella para fines de formación. El estándar IEEE 754-1985 determinará: Ser normalizado como números de coma flotante positivos y negativos Cómo representar los números de coma flotante desnormalizados positivos y negativos Cómo representar el número de cero Como un valor especial para representar el infinito (Infiniti) Cómo representar un valor especial (NaN o NaNs) Cuatro modos de redondeo IEEE 754-1985 define cuatro formatos para números de coma flotante: Single-precision (single-precision) 32-bit Double-precision (doble precisión) 64-bit With single Precisión extendida (precisión extendida simple) 43 bits (raramente utilizado) Precisión doble-extendida (precisión extendida doble) 79 bits (usan típicamente el pedacito 80) 3. Conceptos básicos en la representación de números de punto flotante. 3.1 Presentación de una forma exponencial normalizada. Tome, por ejemplo, el número decimal 155.625 Imagine el número en una forma exponencial normalizada: 1,55625872910 2 1,556258729exp 10 2 Número 1,556258729exp 10 2 consta de dos partes: una mantisa M 1,55625 y el exponente exp 10 2 Si el Mantisa está en el rango 1 -2. 3.2 Presentación de una forma exponencial desnormalizada. Tomemos, por ejemplo, el número decimal 155.625 Imagine el número de camino exponencial desnormalizado: 0,155625872910 3 0,1556258729exp 10 3 El número 0,1556258729exp 10 3 consta de dos partes: una mantisa M 0,155625 y exponente exp 10 3 Si la Mantisa está en el rango 0,1 -3. 3.3 Conversión de decimal en número de coma flotante binario. Nuestro problema se reduce a números de punto flotante decimal en números binarios de punto flotante en forma normalizada exponencial. Para ello ampliamos el número dado de dígitos binarios: 155.625 187292 7 087292 6 087292 5 187292 4 187292 3 087292 2 187292 1 187292 0 187292 -1 087292 -2 187292 -3 155.625 128 0 0 16 8 0 2 1 0,5 0 0,125 155,625 10 10011011,101 2 - el número de punto flotante decimal y binario Deje que el número resultante a la forma normalizada en sistema decimal y binario: 1,556258729exp 10 2 1,00110111018729exp 2 111 Como resultado, tenemos los principales componentes de La exponencial normalizada de los números binarios: Mantisa M1.0011011101 Exponente exp 2 111 4. Descripción conversión de números de IEEE 754. 4.1 La transformación de un número binario normalizado en formato de 32 bits IEEE 754 La aplicación principal en tecnología y formatos de programación fueron 32 y 64 Bits Por ejemplo, en VB utilizando los tipos de datos único (32 bits) y doble (64 bits). Tenga en cuenta la transformación del formato binario 10011011.101 formato de una sola precisión (32 bits) IEEE Standard 754. Otros formatos de los números en IEEE 754 es una copia ampliada de la precisión simple. Para proporcionar el número en el formato IEEE 754 de precisión simple debe llevarlo a la forma normalizada binaria. En 3, hemos hecho esta conversión en el número 155.625. Ahora considere, como un número binario normalizado se convierte en un formato de 32 bits IEEE 754 Descripción de la transformación en formato de 32 bits IEEE 754: El número puede ser o -. Por lo tanto, juegue un poco para designar el signo de: 0-positive 1-negative Este bit más significativo a la secuencia de 32 bits. Entonces vaya los bits del exponente, esto asigna 1 byte (8 pedacitos). El expositor puede ser, como el número, con el signo o -. Para determinar el signo del exponente, no introducir otro bit de signo, agregue el desplazamiento al exponente en el medio byte 127 (0111 1111). Es decir, si nuestra exhibición 7 (111 en binario), entonces desplazó el exponente 7 127 134. Y si nuestros expositores eran -7, entonces los cabinas compensadas 127-7 120. El exponente sesgado se escribe en los 8 bits asignados. Sin embargo, cuando necesitamos obtener números binarios exponenciales, simplemente restamos 127 de este byte. Los 23 bits restantes reservados para la mantisa. Sin embargo, el primer bit de la mantisa binaria normalizada es siempre 1, ya que el número está en el rango 1 La tabla muestra el número decimal 155.625 en el formato de 32 bits IEEE754: 001 1011 1010 0000 0000 0000 2 971 87761,99584e292 De lo anterior, Dado que la mayor parte de los números en el formato IEEE754 tiene un pequeño error relativo estable: El error relativo máximo posible para el número es Single 2 -23 100 11,920928955078125e-6 El error relativo máximo posible para el número de Double 2 -52 100 2,2204460492503130808472633361816e-14 7.5 Información general sobre el número de estándar IEEE de simple y doble precisión 754. Tabla 3. Información sobre el formato 32/64 bits en el estándar ANSI / IEEE Std 754-1985 número de longitud, desplazamiento de bits exponencial (E ), Bits el resto de la mantisa (M), bits desnormalizados número binario normalizado número binario desnormalizado número de decimal F (-1) S 87292 (E -126) 8729 M / 2 23 F (-1) S 87292 (E - 87222 (E-1023) 8729 (87) 8729 M / 2 52 Número normalizado de decimal F (-1) S 87292 (E-127) 8729 (1 M / 2 23) . Máx. Número de error Rel. Máx. Error denorms. Número Rel. Máx. Normas de error. Número 2 -149 8776 1,401298468729e -45 2 -1074 8776 4,940656468729e -324 2 127 8729 (2-2 -23) 8776 3,402823478729e 38 2 1023 8729 (2-2 -52) 8776 1,797693138729e 308 8 Los números de redondeo en el estándar IEEE 754. Al presentar los números de punto flotante en el estándar IEEE 754, los números suelen ser redondeados. La norma proporciona cuatro formas de redondear los números. Formas de redondeo de números de IEEE 754: Redondeo tendiendo al entero más cercano. El redondeo tiende a cero. El redondeo tiende a 8734 El redondeo tiende a -8734 Tabla 3. Ejemplos de redondeo a un decimal al número entero más cercano Cómo se redondea en los ejemplos de la Tabla 3. Cuando convierte un número para elegir una de las formas de redondeo. Por defecto, esta es la primera forma, redondeando al entero más cercano. A menudo en los diferentes dispositivos que utilizan el segundo método - redondeado a cero. Al redondear a cero, simplemente descarte los números de nivel sin sentido, por lo que este es el más fácil en la implementación de hardware. 9. Problemas informáticos causados por el uso del estándar IEEE754. El estándar IEEE 754 es ampliamente utilizado en ingeniería y programación. La mayoría de los microprocesadores modernos se fabrican con la realización de hardware de representaciones de variables reales en el formato de IEEE754. Lenguaje de programación y el programador no puede cambiar esta situación, un reposo de un número real en el microprocesador no existe. Al crear la representación IEEE754-1985 estándar de una variable real en forma de 4 o 8 bytes parecen valor muy grande, ya que la cantidad de RAM MS-DOS era igual a 1 MB. Un programa en este sistema podría ser utilizado sólo 0,64 MB. Para sistemas operativos modernos el tamaño de 8 bytes es nulo y sin valor, sin embargo las variables en la mayoría de los microprocesadores continúan en el formato IEEE754-1985. Considere la computación de error, causada por el uso de números en el formato de IEEE754 9.1 Errores asociados con la exactitud de la representación de números reales en el formato de IEEE754. Una reducción peligrosa. Este error siempre está presente en los cálculos de la computadora. La razón de su ocurrencia se describe en el párrafo 7.4. -6 para doble 10 -14 Los errores absolutos pueden ser significativos, como para single 10 31 y para double 10 292, que pueden causar problemas con los cálculos. Si el recuento de la muestra en el papel, la respuesta es 1. El error absoluto es 7. ¿Por qué conseguir la respuesta incorrecta? El número 123456789 en el solo 4CEB79A3hex (ieee) 123456792 (dec) el informe absoluto del error es 3 Número 123456788 en el solo 4CEB79A2hex (ieee) 123456784 (dec) El informe de error absoluto es -4 Error relativo en los números iniciales de aproximadamente 3,24 e-6 Como resultado, un error relativo de operación del resultado fue de 800, es decir, aumentado en 2,5 y 8 veces. Esto es lo que yo llamo una reducción peligrosa. Es decir, disminución catastrófica de la precisión en la operación en la que el valor absoluto del resultado es mucho menor que cualquiera de las variables de entrada. De hecho, la precisión de error de la representación de los más inocuos en los cálculos de computadora, y por lo general muchos programadores no están prestando atención. Sin embargo, usted puede ser muy frustrante. 9.2 Errores asociados con la coerción inapropiada de los tipos de datos. Error salvaje. Estos errores son causados por el hecho de que el número original presentado en el formato de simple y doble en un formato que no suelen ser iguales entre sí. Por ejemplo: el número original 123456789,123456789 Single: 4CEB79A3 123456792,0 (dec) Doble: 419D6F34547E6B75 123456789,12345679104328155517578125 La diferencia entre la cantidad única y doble: 2,87654320895671844482421875 Aquí hay un ejemplo para VB: El error relativo del resultado es: 8734 (Infinito) Este error se llama cero sucio. Si las variables conducen al mismo tipo, entonces este error no sucederá. Por lo tanto, las variables y los resultados intermedios de los cálculos deben llevarse al mismo tipo de datos. Por ejemplo, el requisito de mostrar el mismo tipo descrito en el lenguaje estándar C a ISO / IEC 9899: 1999. Preste atención al hecho de que no basta con traer todos los datos originales a un solo tipo. Necesario para llevar los resultados de las operaciones intermedias al mismo tipo. Aquí hay un ejemplo de un error en el resultado intermedio: Aquí el error surge porque el resultado intermedio de 1/3 en la línea c c-1/3 será de tipo doble, no único. Para deshacerse del error hay que dar un resultado intermedio al tipo de operador único usando CSng de conversión. Un ejemplo de traer el tipo de datos para GNU C, enviado por Gregory Sitkarevym: En la segunda versión se puede ver que la división de las constantes en el resultado intermedio se da al tipo de float (simple precisión en C). Estas opciones se compilaron y ejecutaron utilizando el GNU C. Si compila y ejecuta las opciones anteriores se muestran en el VC (Visual Studio), los resultados se invierten. Es decir, la opción 2 sería el resultado de -9.934108, y la opción 1 Resultado: 0.000000. Por lo tanto puede ser conclusión decepcionante que el resultado de los cálculos puede depender del tipo y la versión del compilador. En este caso, podemos suponer que el compilador de VC da automáticamente los tipos de variables y el intento de traer a la fuerza el mismo tipo falla. Si la opción 1 (sin el molde) para cumplir con doble precisión variable (doble), entonces el error no traerá datos y Resultado 0.000000 Así que en la mayoría de los casos para deshacerse de los datos de molde es simplemente utilizar el tipo de datos doble y olvidar Sobre el tipo de single (float). Errores computacionales causados por no aportar el tipo de datos que llamo los Errores Salvajes en cuanto se relacionan con el desconocimiento de los estándares y la teoría de la programación (es decir, con una educación básica deficiente) 9.3 Errores causados por el cambio de la mantisa. Agujeros circulares. Estos errores se asocian con la pérdida de precisión del resultado en números de intersección de mantisas incompletas en el eje real. Si los números de mantisa no se intersecan en el eje real, entonces suma y resta entre estos números son imposibles. Por ejemplo, tomamos el número de Single: 47FFFFFF 131071,9921875 (dec) En el sistema binario, este número se parece a: 11111111111111111,1111111 Mostramos algunas operaciones de la computadora de la adición, y este número en el formato de dígitos únicos significativos en el Mantisa del número binario en el formato de Single no más de 24 Red indica las cifras más allá de este límite y no están involucradas en el formato Single 1. adición con el mismo número (el cambio de error 0.0). 2. Además del número de menor de 2 veces (cambio de error - 0,00390625). 3. adición con un número menor de 2 23 veces (cambio de error - 0,007812). 4. adición con un número menor de 2 24 veces (cambio de error - 0,007812). En este último caso, la mantisa de los números se separa, y las operaciones aritméticas con estos números carecen de sentido. Como puede verse por los ejemplos anteriores, el error de cambio ocurre si los números normalizados iniciales son diferentes exponentes. Si los números difieren en más de 2 23 (para simple) y 2 52 (para doble), entonces la suma y la resta entre estos números no son posibles. El resultado de error relativo máximo de la operación es de aproximadamente 5,96 e-6, que no excede un error relativo de representación del número (p.9.1). Aunque el error relativo aquí está bien, hay otros problemas. En primer lugar, trabajar con los números sólo en un estrecho rango del eje real, donde la mantisa se cruzan. En segundo lugar, para cada fuente del límite de un bucle llamado agujero cíclico. Permítanme explicar, si hay un ciclo en el que el número original se agrega a la suma, hay un límite numérico en la cantidad para este número. Es decir, la cantidad que llega a cierto tamaño deja de aumentar añadiéndola al número original. Aquí está un ejemplo de un agujero cíclico en el sistema de control automático: Hay una planta farmacéutica que produce tabletas que pesan 10 mg. Consiste en: máquina formadora, tanque de almacenamiento de 500 kg, máquinas de embalaje, sistema de control automático. La máquina de moldeo se alimenta en el búnker en 10 tabletas a la vez. La máquina de llenado toma una píldora. El sistema de control automático tiene en cuenta los comprimidos recibidos en la tolva de la máquina de moldeo y sacados de las máquinas de envasado de búnker. Es decir, hay un programa que muestra la producción de la tolva de llenado en kg. Cuando en el búnker será más de 500 kg máquina de moldeo de productos se encuentra en una ruptura, que incluye el código en el búnker será de 200 kg de producto. Máquina de llenado para parar si el búnker es menos de 10 libras y comenzará cuando el búnker será sobre el producto de 100 kilogramos. Ambos coches pueden parar de tiempo para servir, no dependientes el uno del otro (gracias al bunker). Aquí está un ejemplo de un agujero cíclico en el sistema de control automático: Hay una planta farmacéutica que produce tabletas que pesan 10 mg. Consiste en: máquina de formar, tanque de almacenamiento de 500 kg, máquinas de embalaje, como usted sabe, que trabaja en un bucle sin fin. Supongamos que una máquina de llenado de un día estuviera demasiado tiempo y un búnker lleno de hasta 300 kg. Qué sucede después de encenderlo Un ejemplo simplificado de la gestión del ciclo del programa: En este ejemplo, la máquina de llenado recogió de la tolva 100 kg de producto y el peso de los productos en la tolva no ha cambiado. ¿Por qué no cambiar Porque los números de la mantisa 300 y 0.00001 disjuntos formato único. A continuación, llevar el peso de la tolva de la máquina de moldeo a 500 kg y parar. Máquina de llenado tomará todas las tabletas de la tolva y también se detiene. El programa mostrará el peso de 500kg en el búnker. Venga corriendo especialistas, probando sensores, cables, computadoras, y diga que el programa colgó. Pero el programa no cuelga, sigue funcionando sin problemas y cada cheque lo confirmará. Simplemente el número de 0.0001 golpeado en el agujero cíclico y emerger de él no puede. Como resultado, tuvimos la suerte de que era una planta farmacéutica, no la Sayan-Shushenskaya GES. De hecho, un programador experimentado nunca haría una sustracción cíclica (o sumatoria) de esta manera. Este ejemplo es un propósito ficticio, y por lo tanto no puede ser considerado, aunque en términos de matemáticas son todos impecables. Este error es típico de los matemáticos y programadores principiantes. Yo diría que el principal trabajo del programador es luchar con los errores, pero no en la solución matemática del problema. Aquí hay un ejemplo de una solución correcta a este problema, cortesía de Sitkarevym Gregory: El ejemplo anterior se toma del paquete industrial real. Para mayor claridad, simplificamos el ejemplo anterior. Como se puede ver en este ejemplo, el programador tiene que calcular el error del resultado en cada ciclo, para dar cuenta de ello en el siguiente ciclo. Tenga en cuenta que el programador debe estar absolutamente listo para hacer algunos conceptos básicos de las matemáticas no se puede satisfacer en los cálculos en un formato IEEE754. Por ejemplo, las reglas de conmutatividad algebraica (a b) a (a c) b, generalmente no se realizan en estos cálculos. Desafortunadamente, en la educación fundamental de hoy que está recibiendo muy poca atención. 9.4 Errores debidos al redondeo. Sucio cero. Cuando los cálculos de la computadora pueden distinguir dos tipos de redondeo: 1. El resultado de la operación aritmética siempre es redondeado. 2. La salida y la entrada de un número real en el cuadro Windows es redondeado. En el primer caso, la variable se redondea a uno de los 4 tipos de redondeo IEEE754, el redondeo por defecto se produce al entero más cercano. En este caso, la variable recibe un nuevo valor redondeado. En la p.9.2 consideramos la adición de dos números idénticos: 1. Adición con el mismo número (el cambio de error 0.0). Aquí el resultado de la adición de dos números es absolutamente preciso, pero el resultado fue redondeado por un microprocesador. Por lo tanto, el resultado exacto se ha añadido al error de redondeo. En general, el error de redondeo está dentro de la exactitud de los números. En el segundo caso, la variable no cambia su significado, sólo en la ventana de Windows muestra el valor redondeado de los números reales. Resulta que la variable original y mostrarla en Windows es un número diferente. Esto no es culpa del formato IEEE754, se trata de un error de Windows. La variable individual se muestra en las cifras significativas de Windows 7 redondeadas al número entero más cercano. 3DFCD6EA 0,12345679104328155517578125 La casilla se muestra como 0,1234568 Para variables de tipo Doble a una ventana de Windows muestra 15 dígitos significativos redondeados al número entero más cercano. 3FBF9ADD3746F67D 0,12345678901234609370352046653351862914860248565673828125 muestra como ,123456789012346 La cuestión de la importancia variable cuando entramos en la ventana de Windows 0,123456789012346 Este valor será igual a este número: 3FBF9ADD3746F676 0,1234567890123459965590058118323213420808315277099609375 Es decir, el valor de 3FBF9ADD3746F67D por lo general, no puede insertar directamente en El código del programa. Pero podemos engañar y pegar en el x 0.123456789012346 1 E-16. La variable resultante será igual a 3FBF9ADD3746F67D (esto se usa en el ejemplo de cero sucio) La pantalla o un PC a través de la ventana es un número imposible. Como resultado de la acción surge Windows una serie de situaciones desagradables. 1. No tiene capacidad técnica para mostrar o ingresar los valores exactos. De las variables en las ventanas, lo que en sí mismo es muy triste. 2. El surgimiento de errores graves, como el cero sucio. Cero sucio es cuando usted o el programa asume que la variable no es igual a cero - cero Muy a menudo, este error ocurre en la interfaz del operador de la máquina. Por ejemplo, después de restablecer el peso de los programas de empaquetado. El resultado del programa en el ejemplo anterior Como resultado, una variable que el operador considera cero - cero no es igual Error relativo del resultado es infinito. En la comparación lógica las operaciones que no son cero pueden desviar la ejecución del programa a otra rama del algoritmo. 9.5 Velocidad de error en los números norma / denorma. El número de asesinos. Estos errores ocurren cuando se trabaja con números ubicados en el borde de la representación numérica normalizada / desnormalizada. Se asocian con diferencias en la representación de números en formato IEEE754 y transfieren las fórmulas de diferencia en números reales de formato IEEE754. Es decir, el dispositivo (o software) debe utilizar diferentes algoritmos dependiendo de la posición de un número real en un formato de línea numérica. Además, conduce a una complicación de dispositivos y algoritmos, todavía hay incertidumbres de la zona de transición. La incertidumbre de la zona de transición es que la norma no define un valor específico del límite de transición. En esencia, el límite de transición entre dos números reales: El último número 000FFFFFFFFFFFFF desnormalizado: valor decimal exacto de este número: 2,2250738585072008890245868760858598876504231122409594654935248025624400092282356951787758888037591552642309780950 4343120858773871583572918219930202943792242235598198275012420417889695713117910822610439719796040004548973919380791 9893608152561311337614984204327175103362739154978273159414382813627511383860409424946494228631669542910508020181592 6642134996606517803095075913058719846423906068637102005108723282784678843631944515866135041223479014792369585208321 5976210663754016137365830441936037147783553066828345356340050740730401356029680463759185831631242245215992625464943 0083685186171942241764645513713542013221703137049658321015465406803539741790602258950302350193751977303094576317321 0852507299305089761582519159720757232455434770912461317493580281734466552734375e-308 y el primer número 0010000000000000 normalizada: valor decimal exacto de este número: 2,2250738585072013830902327173324040642192159804623318305533274168872044348139181958542831590125110205640673397310 3581100515243416155346010885601238537771882113077799353200233047961014744258363607192156504694250373420837525080665 0616658158948720491179968591639648500635908770118304874799780887753749949451580451605050915399856582470818645113537 9358049921159810857660519924333521143523901487956996095912888916029926415110634663133936634775865130293717620473256 3178148566435087212282863764204484681140761391147706280168985324411002416144742161856716615054015428508471675290190 3161322778896729707373123334086988983175067838846926092773977972858659654941091369095406136467568702398678315290680 984617210924625396728515625e-308 Dado que el límite es un número real, su precisión se puede ajustar hasta el infinito y los dispositivos digitales o el programa no tiene el bit de decisión de incluir algún intervalo de números. Por ejemplo, un error 53632 para PHP, que causó pánico a principios de 2011 lt htmlgt ltbodygt ltphp d 2.2250738585072011e-308 gt lt final / bobygt lt / htmlgt Introduzca un número 2.2250738585072011e-308 causó un bloqueo del proceso con casi 100 CPU de carga . Otros números de este rango de problemas no causados (2.2250738585072009e-308, 2.2250738585072010e-308, 2.2250738585072012e-308) Reportar un error recibido 30.12.2010, 10.01.2011 fijado por el desarrollador. Puesto que PHP es un preprocesador es utilizado por la mayoría de los servidores, entonces cualquier red de usuario dentro de 10 días, fue capaz de cerrar cualquier host. Cómo escribir a los desarrolladores que el error sólo funciona en sistemas de 32 bits, pero si aumenta la precisión de la frontera, entonces creo que los sistemas de 64 bits, también, cuelgan (no verificado). La razón del pánico es clara: cualquier usuario, con cierto nivel de diligencia y conocimiento, tuvo la oportunidad de recortar la mayor parte de los recursos de información del planeta en diez días. No me gustaría - daría lugar a más ejemplos de tales números y tales errores. 10 La parte final De lo que antecede queda claro que la opinión de que el resultado de coma flotante no está más allá del error relativo al informar el mayor número es falsa. Los errores enumerados en el ítem 9 se agregan juntos. Tales errores como la reducción cero y peligrosa de cero pueden hacer que los errores de cálculo sean inaceptables. Atención particular en la programación de cálculos informáticos el programador debe ser pagado a los resultados cercanos a cero. Algunos expertos creen que el formato de los números representa una amenaza para la humanidad. Usted puede leer sobre él en el artículo IEEE754-tick amenaza a la humanidad Aunque muchos de los hechos en este artículo sobre-dramatizado, y posiblemente malinterpretado, pero el problema es computar correctamente reflejado filosóficamente. Im no una dramatización de los cálculos en el estándar IEEE754. Estándar de funcionamiento desde 1985 y entró plenamente en la norma IEEE754-2008, que amplió la precisión de los cálculos. Sin embargo, el problema de la fiabilidad de la computación de hoy es muy urgente, y las recomendaciones estándar de IEEE754-2008 y ISO no han resuelto este problema. Creo que en esta área necesitaba una idea innovadora que los desarrolladores estándar IEEE754-2008 desafortunadamente no poseen. Las ideas innovadoras vienen generalmente de. Las principales ideas innovadoras en nuestro mundo fueron hechas por aficionados (personas de ideas afines no por dinero). Un ejemplo llamativo de esta situación fue la invención del teléfono. Cuando un maestro de escuela Alexander Graham Bell (Alexander Graham Bell) presentó una patente para una invención del teléfono al presidente de la compañía de telecomunicaciones Western Union Company, que es propiedad de la conexión de cable transatlántico con una oferta para comprar su patente para el Invención del teléfono, no fue expulsado - no. El presidente de esa empresa ofreció considerar esta cuestión el consejo de expertos en el campo de la telegrafía, compuesto por especialistas y académicos en el campo de las telecomunicaciones. Los expertos dieron su opinión de que esta invención es inútil en el campo de las telecomunicaciones y es inútil. Algunos expertos incluso han escrito un informe que Tsirkachestvo y charlatanismo nbsp nbsp Alexander Graham Bell, junto con su suegro, decidió independientemente para promover su invención. Después de unos 10 años, el gigante de las telecomunicaciones Western Union Co. fue prácticamente eliminado negocio telefónico de la esfera de las tecnologías de telecomunicaciones. Hoy en día se puede ver en muchas ciudades de Rusia ventanas que dice Western Union, esta empresa que se dedica a la transferencia de dinero en todo el mundo, y una vez que ella era el gigante de las telecomunicaciones internacionales. Podemos concluir: opiniones de expertos en tecnologías innovadoras son inútiles Si usted piensa que desde la invención del teléfono (1877) en la mente de las personas que algo ha cambiado, youre mal. Si los científicos (que están inventando nuevos) y los profesionales (que saben utilizar el bien conocido) no pueden resolver el problema, necesitan innovación. Enlaces a nuevas ideas en el campo de la representación de números reales en el hardware: 1. Approksimetika 2. Si conoce otras ideas innovadoras en el campo de las representaciones de números reales, entonces estaremos encantados de obtener enlaces a estas fuentes. Yo sugeriría representar números reales como punto fijo. Para ver el rango completo de números Doble suficiente para tener una variable que consta de 1075 bits parte entera y 1075 bits de parte fraccional, es decir, alrededor de 270 bytes por variable. En este caso, todos los números se presentarán con la misma precisión absoluta. Puede trabajar con números en todo el rango del eje real, es decir, se hace posible resumir grandes números de números pequeños. Los números de pasos en el eje real son uniformes, es decir, el eje real es lineal. El tipo de datos será solo uno, es decir, no necesita el tipo completo, real y de otro tipo. Aquí el problema es la realización de registros de microprocesadores dimensión de 270 bytes, pero no es un problema para la tecnología moderna. Para escribir p.9 tuve que crear un programa que representa un número como una variable a un punto fijo, 1075.1075 bytes largos. Donde el número se puede representar como una cadena de caracteres ASCII, es decir, un símbolo equivale a un dígito. Sólo tenía que escribir todas las operaciones aritméticas con cadenas ASCII. Este programa es similar a un cálculo de papel. Puesto que el microprocesador de la capacidad matemática en él no se utiliza, ella dijo lentamente. ¿Por qué lo hice? No pude encontrar un programa que podría representar con precisión el número de formato IEEE754, en forma decimal. También no encontré el programa (aunque ciertamente tienen lo que sin duda) donde se puede ingresar en la casilla 1075 de dígitos decimales significativos. Aquí, por ejemplo, sólo el valor decimal del número de dobles 7FEFFFFFFFFFFFFF: 17976931348623157081452742373170435679807056752584499659891747680315726078002853876058955 863276687817154045895351438246423432132688946418276846754670353751698604991057655128207624 549009038932894407586850845513394230458323690322294816580855933212334827479782620414472316 8738177180919299881250404026184124858368,0 Puede utilizar el nbsp v.1.0 IEEE754 para estudiar y evaluar los errores cuando se trabaja con números reales dados en el formato de IEEE754. Referencias: 1. Norma IEEE para aritmética binaria de punto flotante. Copyright 1985 por el Instituto de Ingenieros Eléctricos y Electrónicos, Inc 345 East 47th Street, Nueva York, NY 10017, EE. UU. Agradecimientos: Sitkarevu Grigory (sitkarevkomitex. ru, sinclair80gmail). Para ayuda en la creación de un artículo. Archivo de comentarios con comentarios nbspnbspnbsp (Envíenos sus comentarios sobre el correo electrónico: infosoftelectro. ru) Método de y aparato para normalizar un número binario de punto flotante US 5513362 El postprocesamiento de AA se ejecuta sobre una mantisa M y un exponente E De un número binario de punto flotante como resultado de la sustracción, por ejemplo, para obtener de este modo una mantisa m y un exponente e del resultado del post-procesado. Por lo tanto, una salida (E-1) de un decrementador y una salida (cantidad de cancelación de mantisa LSA) de un circuito de detección de avance 1 se introducen en un circuito de selección de valor mínimo. El circuito de selección de valor mínimo está adaptado para ajustar una cantidad de desplazamiento SH a (E-1) y una señal de evaluación de relación de magnitud CR a 1 cuando (E-1) es menor que LSA (es decir, cuando se requiere un tratamiento de desnormalización) . When (E-1) is not smaller than LSA (that is, when a normalize processing is required), SH is set to LSA and CR is set to 0. A left shifter is adapted to supply, as the mantissa m of the result, a value obtained by executing a left shift processing having a shift amount SH on the mantissa M. A selecting circuit is adapted to supply, as the exponent e of the result, 0 when CR is equal to 1, and an output (E-LSA) of a subtracting circuit when CR is equal to 0. This enables the denormalize processing of a floating point binary number to be executed at a high speed equivalent to that at which a normalize processing is executed. (3) 1. An operational processing apparatus for executing a shift processing on a mantissa, having a plurality of bit positions and radix point, of a floating point binary number and for adjusting an exponent of said floating point binary number, said apparatus comprising: advancing 1 detecting means for detecting the bit position of an advancing 1 in said mantissa and for supplying, as an amount of cancelling of said mantissa, a difference between said bit position and the bit position of a bit one bit position more significant than the radix point decrementing means for supplying a value obtained by subtracting 1 from said exponent comparing means for comparing in magnitude, with each other, two input data, i. e. an output of said decrementing means and an amount of cancelling supplied from said advancing 1 detecting means, thereby to supply, as a result of magnitude-relation judgment, the input data whichever is the smaller, and also to supply a magnitude-relation judging signal representing which input data is smaller out of said two input data subtracting means for supplying a value obtained by subtracting, from said exponent, an amount of cancelling supplied from said advancing 1 detecting means selecting means for supplying, as an exponent of a result of an operational processing, 0 when a magnitude-relation judging signal from said comparing means represents that, out of said two input data, said output of said decrementing means is smaller, and an output of said subtracting means when said magnitude-relation judging signal represents otherwise and shifting means for supplying, as a mantissa of said result of said operational processing, a value obtained by executing on said mantissa of said floating point binary number, a left shift processing in which shift amount is equal to a result of magnitude-relation judgment, having a plurality of bits, supplied from said comparing means, wherein the comparing means has a minimum value selecting circuit to propagate the magnitude relation of the two input data for each digit thereof from a most significant digit to a least significant digit, thereby to supply the result of magnitude-relation judgment, starting with the most significant digit, and the shifting means comprises left 2 k (k0, 1, 2. n-1) bit shifters which respectively correspond to lower n-bits of a result of magnitude-relation judgment supplied from said minimum value selecting circuit and which are connected in cascade to one another. 2. An operational processing apparatus for executing a shift processing on a mantissa, having a plurality of bit positions and a radix point, of a floating point binary number and for adjusting an exponent of said floating point binary number, said apparatus comprising: advancing 1 detecting means for detecting the bit position of an advancing 1 in said mantissa and for supplying, as an amount of cancelling of said mantissa, a difference between said bit position and the bit position of a bit one bit position more significant than the radix point decrementing means for supplying a value obtained by subtracting 1 from said exponent comparing and selecting means for comparing in magnitude, with each other, two input data, i. e. an amount of cancelling supplied from said advancing 1 detecting means and said exponent, thereby to supply, as a result of magnitude-relation judgment, said amount of cancelling when said amount of cancelling is smaller than said exponent, and an output of said decrementing means when said amount of cancelling is not smaller than said exponent, and also to supply a magnitude-relation judging signal representing which input data is smaller out of said two input data subtracting means for supplying a value obtained by subtracting, from said exponent, an amount of cancelling supplied from said advancing 1 detecting means selecting means for supplying, as an exponent of a result of an operational processing, an output of said subtracting means when a magnitude-relation judging signal from said comparing and selecting means represents that, out of said two input data, said amount of cancelling supplied from said advancing 1 detecting means is smaller, and 0 when said magnitude-relation judging signal represents otherwise and shifting means for supplying, as a mantissa of said result of said operational processing, a value obtained by executing, on said mantissa of said floating point binary number, a left shift processing in which shift amount is equal to a result of magnitude-relation judgment, having a plurality of bits, supplied from said comparing and selected means, wherein the comparing and selecting means has a comparing and selecting circuit to propagate the magnitude relation of the two input data for each digit thereof from a most significant digit to a least significant digit, thereby to supply the result of magnitude-relation judgment, starting with the most significant digit, and the shifting means comprises left 2 k (k0, 1, 2. n-1) bit shifters which respectively correspond to lower n-bits of a result of magnitude-relation judgment supplied from said comparing and selecting circuit and which are connected in cascade to one another. 3. An operational processing apparatus for executing a shift processing on a mantissa, having a plurality of bit positions and a radix point, of a floating point binary number and for adjusting an exponent of said floating point binary number, said apparatus comprising: advancing 1 detecting means for detecting the bit position of an advancing 1 in said mantissa and for supplying, as an amount of cancelling of said mantissa, a difference between said bit position and the bit position of a bit one bit position more significant than the radix point subtracting means for supplying, as a result of subtraction, a value obtained by subtracting from said exponent, an amount of cancelling supplied front said advancing 1 detecting means, and also for supplying a magnitude-relation judging signal representing whether or not said exponent is equal to or smaller than said amount of cancelling first selecting means for supplying, as an exponent of a result of an operational processing, 0 when a magnitude-relation judging signal from said subtracting means represents that said exponent is not greater than said amount of cancelling, and a result of subtraction supplied from said subtracting means when said magnitude-relation judging signal represents otherwise second selecting means for supplying said exponent when a magnitude-relation judging signal from said subtracting means represents that said exponent is not greater than said amount of cancelling, and said amount of cancelling supplied front said advancing 1 detecting means when said magnitude-relation judging signal represents otherwise and shift processing means for supplying, as a mantissa of said result of said operation processing, a value obtained by executing, on said mantissa of said floating point binary number, a left shift processing in which shift amount is equal to a value obtained by subtracting 1 from an output of said second selecting means when a magnitude-relation judging signal from said subtracting means represents that said exponent is not greater than said amount of cancelling, and in which said shift amount is equal to said output itself of said second selecting means when said magnitude-relation judging signal represents otherwise, wherein the shift processing means has: a left shifter for supplying a value obtained by executing, on the mantissa, a left shift processing in which shift amount is equal to an output of the second selecting means and a right 1-bit shifter for supplying, as a mantissa of the result of an operational processing, a value obtained by executing a right 1-bit shift processing on an output of said left shifter when a magnitude-relation judging signal from the subtracting means represents that the exponent is not greater than the amount of cancelling, and said output itself of said left shifter when said magnitude-relation judging signal represents otherwise. BACKGROUND OF THE INVENTION The present invention relates to method of and apparatus for an operational processing using a binary number of a floating point representation according to the IEEE (Institute of Electrical and Electronics Engineers) Standard 754 or one which is conformed thereto. With recent complication of scientific technical calculation or graphic procedure, there is an increased demand for a high-speed and accurate floating point operation. A computer is adapted to execute a processing using only limited digits of a floating point number. Accordingly, there often occur errors in a result obtained by a floating point operation. Operational precision considerably depends on the hardware arrangement of a computer, but by following the IEEE standard 754, errors resulting from the hardware arrangement can be prevented. In the IEEE Std. 754, a format whose total bit number is 32 including a 1-bit sign S, an 8-bit exponent E and a 23-bit fraction F, is specified for a single-precision floating point binary number. Also, a format whose total bit number is 64 including a 1-bit sign S, an 11-bit exponent E and a 52-bit fraction F, is specified for a double-precision floating point binary number. Generally, there is used a floating point number for which normalization has been performed such that a virtual non-zero value bit and the radix point are located upper than the most significant bit (MSB) of the fraction F. However, a bias is given to an actual exponent such that the exponent E is a positive value. For single precision for example, there is used, as an exponent E, a value obtained by adding 127 as a bias to an actual exponent. That is, a real number R1 expressed as a normalized number of single precision is expressed as follows: wherein 1.F is a mantissa M. In the IEEE Std. 754, it is defined that, when an operational result is a neighborhood value of 0, this is represented as a denormalized number. For single precision for example, the exponent E is made 0 and there is executed a denormalize processing to shift the fraction F such that the weight of the zero-value bit upper by one bit than the radix point is 2 -126. In this case, a real value R2 expressed as a denormalized number is expressed as follows: wherein the mantissa M is 0.F. There is a phenomenon that the number of digits of an effective numeral is greatly decreased when there are added two numerals of which absolute values are substantially the same and of which signs are different from each other. Such a phenomenon is called cancelling. In subtraction of floating point numbers slightly different in value from each other, when an exponent of the minuend is equal to an exponent of the subtrahend, subtraction of their mantissas is executed without a digit position justifying operation. For example, when a mantissa of the minuend is 1.100101. and a mantissa of the subtrahend is 1.100010. the result of subtraction of the mantissas is equal to 0.000011. Thus, when the value of the bit upper by one bit than the radix point is 0 in the result of an operation, it is said that cancelling of mantissa has been generated. The number of zeros which are present continuously from the position of the bit upper by one bit than the radix point, is called an amount of cancelling of mantissa. In this example, the amount of cancelling of mantissa is 5. A floating point number presenting such cancelling of mantissa, is normalized by executing, on a mantissa M, a left shift processing having a shift amount equal to the amount of cancelling and by correcting an exponent E such that the amount of cancelling is subtracted from the exponent E. In the following description, a left shift amount required at the time when cancelling of mantissa has been generated, will be expressed as an amount of cancelling LSA. When the exponent E is not greater than the amount of cancelling of mantissa LSA and the amount of cancelling LSA is subtracted from the exponent E for normalization, the exponent after correction becomes not greater than 0. When an operational result cannot be expressed as a normalized number, the denormalize processing above-mentioned is then required. The hardware of a conventional computer is adapted to execute a processing of a normalized number only. More specifically, when it is judged that a value obtained by executing a normalize processing on an operational result in a hardware, cannot be expressed as a normalized number, the normalize processing is interrupted as regarded that an exception has occurred, and a denormalize processing is then entrusted to the software. Accordingly, the denormalize processing is executed after the normalize processing has been executed. This presents the problem that a desired operational result cannot be obtained at a high speed. DISCLOSURE OF THE INVENTION It is an object of the present invention to enable a denormalize processing of a floating point binary number to be executed at a high speed equivalent to a speed at which a normalize processing is executed. To achieve the object above-mentioned, the present invention is arranged such that, before execution of a normalize processing, an exponent E and an amount of cancelling of mantissa LSA are compared in magnitude with each other and, based on the comparison result, either a normalize processing or a denormalize processing is executed. According to the present invention, an exponent E and an amount of cancelling of mantissa LSA are compared in magnitude with each other, and it is judged whether the result of an operational processing is a normalized number or a denormalized number. When the result of an operational processing is a normalized number (E is greater than LSA). the amount of cancelling LSA is selected as a shift amount SH for a mantissa M, and a value obtained by subtracting the amount of cancelling LSA from the exponent E is selected as an exponent e of the result (normalize processing). On the other hand, when the result of an operational processing is a denormalized number (E is not greater than LSA), a value obtained by subtracting 1 from the exponent E is selected as the shift amount SH for the mantissa M, and 0 is selected as the exponent e of the result (denormalize processing). More specifically, even though the result of an operational processing is a denormalized number, the processing can be executed at a high speed in the same manner as for a normalized number. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a flow chart showing the flow of a processing in an operational processing method according to an embodiment of the present invention FIG. 2 is a block diagram showing the arrangement of a first operational processing apparatus according to an embodiment of the present invention FIG. 3 is a circuit diagram showing the arrangement of the inside of a minimum value selecting circuit shown in FIG. 2 FIG. 4 is a block diagram showing the arrangement of a second operational processing apparatus according to an embodiment of the present invention FIG. 5 is a circuit diagram showing the arrangement of the inside of a comparing and selecting circuit shown in FIG. 4 FIG. 6 is a block diagram showing the arrangement of a third operational processing apparatus according to an embodiment of the present invention FIG. 7 is a circuit diagram showing the arrangement of the inside of a subtracting circuit shown in FIG. 6 and FIG. 8 is a block diagram showing the arrangement of a fourth operational processing apparatus according to an embodiment of the present invention. With reference to the attached drawings, the following description will discuss an operational processing method according to an embodiment of the present invention, and an operational processing apparatus to be used in the practice of the method above-mentioned. HIGO. 1 shows a sequence of executing a post-processing on a mantissa M and an exponent E of an input floating point binary number obtained as the result of an operation (for example, subtraction) of normalized numbers, thus converting the mantissa M and the exponent E into a mantissa m and an exponent e of an output floating point binary number. The following description will discuss the sequence, step by step, for single precision, but the operational processing method shown in FIG. 1 can also be applied for double precision. To obtain an amount of cancelling of mantissa LSA, the bit position of the advancing 1 in a mantissa M is first detected. The amount of cancelling LSA is obtained as a difference between the bit position of the advancing 1 thus detected and the position of the bit upper by one bit than the radix point (step 101). Then, an exponent E and the amount of cancelling LSA are compared in magnitude with each other (step 102). When E is not greater than LSA, a denormalize processing is executed such that the result of an operational processing is expressed as a denormalized number. Accordingly, it is required to decrease the exponent E such that the exponent E is equal to 0, and to execute, on the mantissa M, a left shift processing having a shift amount corresponding to the amount of such a decrease. The bit upper by one bit than the radix point in a normalized number has weight of 2 -127. but the weight of such a bit in a denormalized number is 2 -126 as shown in the equation (2). Accordingly, it is required that 1 bit is lessened from the shift amount when a left shift processing is executed on the mantissa M. In this connection, the shift amount SH for the mantissa is set to E-1 (step 103), and an exponent e of the result of the operational processing is set to 0 (step 104). On the other hand, when E is greater than LSA, the shift amount SH for the mantissa is set to LSA in order to execute a normalize processing (step 105), and an exponent e of the result of an operational processing is set to E-LSA (step 106). At this time, the exponent e (E-LSA) is positive. At a step 107, a left shift processing is executed on the mantissa M according to the shift amount SH obtained at the step 103 or 105, thus obtaining a mantissa m of the result of the operational processing. According to the operational processing method above-mentioned, the flow of the processing is controlled based on the result of comparison in magnitude between the exponent E and the amount of cancelling of mantissa LSA. Accordingly, even though the result of an operational processing is a denormalized number, the processing can be executed at a high speed likewise for a normalized number. Alternatively, the step 103 may be changed such that the shift amount SH is set to E instead of E-1, and a right 1-bit shift processing may be further executed on the mantissa M only when E is not greater than LSA, before or after the step 107 where the left shift processing is executed on the mantissa M. The following description will successively discuss first to fourth operational processing apparatus to be used in the practice of the operational processing method above-mentioned. The first operational processing apparatus shown in FIG. 2 comprises a decrementer 201, an advancing 1 detecting circuit 202, a minimum value selecting circuit 203, a left shifter unit 204, a mantissa result register 205, a subtracting circuit 206, a selecting circuit 207 and an exponent result register 208. The decrementer 201 is adapted to supply a value obtained by subtracting 1 from an exponent E. The advancing 1 detecting circuit 202 is adapted to search a mantissa M in the direction from the bit upper by one bit than the radix point to the least significant bit (LSB), thereby to detect the position of the first bit which is equal to 1, and also adapted to supply, as an amount of cancelling LSA, a difference between the position of the bit thus detected and the position of the bit upper by one bit than the radix point. The minimum value selecting circuit 203 is adapted to compare in magnitude, with each other, two input data, i. e. an output (E-1) of the decrementer 201 and an output LSA of the advancing 1 detecting circuit 202, thereby to supply, as a shift amount SH, the input data whichever is the smaller, and to supply a magnitude-relation judging signal CR representing which input data is smaller out of the two input data. When (E-1) is smaller than LSA (that is, when E is not greater than LSA), SH is equal to E-1 and CR is equal to 1. When (E-1) is not smaller than LSA (that is, when E is greater than LSA), SH is equal to LSA and CR is equal to 0. The left shifter unit 204 is adapted to supply, as a mantissa m of the result of an operational processing, a value obtained by executing, on the mantissa M, a left shift processing having a shift amount specified by an output SH of the minimum value selecting circuit 203. The mantissa result register 205 is adapted to store an output m of the left shifter unit 204. The subtracting circuit 206 is adapted to supply a value obtained by subtracting an output LSA of the advancing 1 detecting circuit 202 from an exponent E. The selecting circuit 207 is adapted to supply, as an exponent e of the result of an operational processing, 0 when CR is equal to 1, and an output (E-LSA) of the subtracting circuit 206 when CR is equal to 0. The exponent result register 208 is adapted to store an output e of the selecting circuit 207. According to the arrangement in FIG. 2, the minimum value selecting circuit 203 judges whether the result of an operational processing is a normalized number or a denormalized number, based on the fact whether or not a value obtained by subtracting an output (LSA) of the advancing 1 detecting circuit 202 from an output (E-1) of the decrementer 201, is negative. The shift amount SH for the mantissa M and an exponent e of the result of an operational processing are determined such that, based on the result of the judgment thus made, either a normalize processing or a denormalize processing is to be executed. At this time, the left shifter unit 204 is commonly used for both the normalize processing and the denormalize processing. The minimum value selecting circuit 203 in FIG. 2 has the function that two 8-bit input data X, Y are compared in magnitude with each other and the input data whichever is the smaller is set as an output data Z, and that the logical value of a magnitude-relation judging signal output terminal B is set to 1 when X is smaller than Y. As shown in FIG. 3, the minimum value selecting circuit 203 has an input circuit 311, an intermediate circuit 312 and an output circuit 313, and is arranged such that the magnitude relation of the two input data X, Y for each of the digits is propagated from the highest digit to the lowest digit, thus determining, at a high speed, an output data Z successively starting with the highest digit (See Japanese Patent Laid-Open Publication 3-12735). When the respective bits of the input and output data X, Y, Z are set as Xi, Yi, Zi (i0 to 7), a magnitude-relation determining function gi and a magnitude-relation holding function pi are formed for each digit in the input circuit 311. gi1 represents that Xi is smaller than Yi, and pi1 represents that Xi is equal to Yi. The intermediate circuit 312 forms, based on the outputs gi and pi of the input circuit 311, a magnitude-relation determining function gjk and a magnitude-relation holding function pjk for the digits from the jth digit to the kth digit (j is smaller than k). For example, g671 represents the magnitude relation of two bits that X7X6 is smaller than Y7Y6, and p671 represents the equivalence relation of two bits that X7X6 is equal to Y7Y6. Further, g471 represents the magnitude relation of four bits that X7X6X5X4 is smaller than Y7Y6Y5Y4, and p471 represents the equivalence relation of four bits that X7X6X5X4 is equal to Y7Y6Y5Y4. These magnitude-relation determining functions gi, gjk and the magnitude-relation holding functions pi, pjk are propagated from the highest digit to the lowest digit. When the magnitude-relation determining function gi7 for the digits from each digit (the ith digit) to the highest digit (the 7th digit) is obtained in the manner above-mentioned, Xi is selected in each digit when gi7 is equal to 1 and Yi is selected in each digit when gi7 is equal to 0. Then, Xi or Yi thus selected is set as Zi. Thus, an 8-bit output data Z (minimum value) can be obtained successively from the highest bit. In the output circuit 313 in FIG. 3, however, Z7 and Z6 are respectively determined according to g7 and g67, and Z5 and Z4 are determined according to g47, and Z3 to Z0 are determined according to g07. The magnitude-relation determining function g07 for the digits from the 0th digit to the 7th digit which is equal to 1 when X is smaller than Y, and which is equal to 0 when X is not smaller than Y, is supplied from the magnitude-relation judging signal output terminal B. As shown in FIG. 2, the left shifter unit 204 is formed by connecting five 16-bit, 8-bit, 4-bit, 2-bit and 1-bit left shifters to one another as arranged in this order from the input side of a mantissa M. The lower five bits of an output Z7 to Z0 of the minimum value selecting circuit 203 serve as control signals of the five left shifters, respectively. More specifically, when an output (a shift amount SH) of the minimum value selecting circuit 203 is determined successively from the highest bit, the shifters in the left shifter unit 204 are successively operated, starting with the 16-bit shifter in which the amount of shift is the greatest. Accordingly, each time each of the digits of an output of the minimum value selecting circuit 203 is determined successively from the highest digit, there is executed, on a mantissa M, a left shift processing having a shift amount (2 k bit) corresponding to the digit thus determined. As thus discussed, the arrangement in FIGS. 2 and 3 has the minimum value selecting circuit 203 for determining an output data Z successively from the highest digit, and the multi-stage left shifter unit 204 having a plurality of shifters to be successively operated, starting with the shifter in which the shift amount is the greatest. This enables the left shift processing on a mantissa M to be executed at a high speed. The minimum value selecting circuit 203 is of the 8-bit arrangement and the left shifter unit 204 is of the 5-stage arrangement of left 2 k (k0 to 4) bit shifters, with the number of bits of each of the mantissa M and the exponent E for single precision taken into consideration. However, such arrangements may be suitably changed according to the number of bits of each of the mantissa M and the exponent E. In a second operational processing apparatus in FIG. 4, the minimum value selecting circuit 203 shown in FIG. 2 is replaced with a comparing and selecting circuit 401. A selecting circuit 402 in FIG. 4 differs from the selecting circuit 207 in FIG. 2 in that the selecting circuit 402 is adapted to supply an output (E-LSA) of the subtracting circuit 206 when CR is equal to 1, and 0 when CR is equal to 0. The comparing and selecting circuit 401 is adapted to compare in magnitude, with each other, two input data, i. e. an output LSA of the advancing 1 detector circuit 202 and an exponent E, and to supply, as a shift amount SH, the output LSA when LSA is smaller than the exponent E, and an output (E-1) of the decrementer 201 when the output LSA is not smaller than the exponent E. Also, the comparing and selecting circuit 401 is adapted to supply a magnitude-relation judging signal CR representing which LSA or E is smaller. When LSA is smaller than E, SH is equal to LSA and CR is equal to 1, and when LSA is not smaller than E, SH is equal to E-1 and CR is equal to 0. According to the arrangement in FIG. 4, the comparing and selecting circuit 401 is adapted to judge whether the result of an operational processing is a normalized number or a denormalized number, based on the fact whether or not a value obtained by subtracting the exponent E from an output LSA of the advancing 1 detecting circuit 202 is negative. Unlike the minimum value selecting circuit 203 in FIG. 2, the comparing and selecting circuit 401 can start comparing in magnitude two input data with each other before an output of the decrementer 201 is determined, thus enabling the judgment to be made at a higher speed. Then, the shift amount SH for the mantissa M and an exponent e of the result of an operational processing can be determined such that, based on the result of the judgment thus made, either a normalize processing or a denormalize processing is to be executed. At this time, the left shifter unit 204 is commonly used for the normalize processing and the denormalize processing. The comparing and selecting circuit 401 in FIG. 4 has the function that first and second 8-bit input data X, Y are compared in magnitude with each other, thereby to supply, as an output data Z, X when X is smaller than Y, and a third 8-bit input data S when X is not smaller than Y, and that the logical value of the magnitude-relation judging signal output terminal B is set to 1 when X is smaller than Y. As shown in FIG. 5, the comparing and selecting circuit 401 has an input circuit 411, an intermediate circuit 412 and an output circuit 413, and is arranged, likewise the minimum value selecting circuit 203, such that the magnitude relation of the two input data X, Y for each of the digits is propagated from the highest digit to the lowest digit, thus determining, at a high speed, the output data Z starting with the highest digit. The arrangement in FIGS. 4 and 5 has the comparing and selecting circuit 401 for determining the output data Z successively from the highest digit, and the multi-stage left shifter unit 204 having a plurality of shifters to be successively operated, starting with the shifter in which the shift amount is the greatest. This enables the left shift processing on a mantissa M to be executed at a higher speed. The comparing and selecting circuit 401 is of the 8-bit arrangement and the left shifter unit 204 is of the 5-stage arrangement of left 2 k (k0 to 4) bit shifters, with the number of bits of each of the mantissa M and the exponent E for single precision taken into consideration. However, such arrangements may be suitably changed according to the number of bits of each of the mantissa M and the exponent E. In a third operational processing apparatus shown in FIG. 6, a decrementer 201, an advancing 1 detecting circuit 202 and a mantissa result register 205, a first selecting circuit 207 and an exponent result register 208 respectively have the same functions as those of the component elements designated by the same reference numerals in FIG. 2. In FIG. 6, there are also disposed a subtracting circuit 601, a second selecting circuit 602 and a left shifter 603. The subtracting circuit 601 is adapted to supply, as a result of subtraction, a value obtained by subtracting an output LSA of the advancing 1 detecting circuit 202 from an exponent E, and also to supply a magnitude-relation judging signal Ib representing whether or not E is equal to or smaller than LSA. When E is not greater than LSA, Ib is equal to 1, and when E is greater than LSA, Ib is equal to 0. The first selecting circuit 207 is adapted to supply, as an exponent e of the result of an operational processing, 0 when Ib is equal to 1, and an output (E-LSA) of the subtracting circuit 601 when Ib is equal to 0. The second selecting circuit 602 is adapted to supply, as a shift amount SH, an output (E-1) of the decrementer 201 when Ib is equal to 1, and an output LSA of the advancing 1 detecting circuit 202 when Ib is equal to 0. The left shifter 603 is adapted to supply, as a mantissa m of the result of an operational processing, a value obtained by executing, on a mantissa M, a left shift processing having a shift amount specified by an output SH of the second selecting circuit 602. The inside arrangement of the left shifter 603 is not limited to the multi-stage arrangement of the left shifter unit 204 in FIG. 2. The subtracting circuit 601 in FIG. 6 has the both functions of the subtracting circuit 206 and the minimum value selecting circuit 203 shown in FIG. 2. More specifically, the subtracting circuit 601 is adapted to supply a subtraction result (E-LSA) to be subjected to the correction of an exponent E, and to judge whether the result of an operational processing is a normalized number or a denormalized number, based on the fact whether or not a value obtained by subtracting LSA from E is equal to or smaller than 0. Then, the shift amount SH of the mantissa M and an exponent e of the result of an operational processing can be determined such that, based on the judgment thus made, either a normalize processing or a denormalize processing is to be executed. At this time, the left shifter 601 is commonly used for the normalize processing and the denormalize processing. The subtracting circuit 601 in FIG. 6 has the function that a subtraction result (X-Y) of two 8-bit input data X, Y is set as an output data Z, and that the logical value of the magnitude-relation judging signal Ib is set to 1 when X is not greater than Y. As shown in FIG. 7, the subtracting circuit 601 has an input circuit 611, an intermediate circuit 612 and an output circuit 613, and is arranged such that the magnitude relation of the two input data X, Y for each of the digits is propagated from the lowest digit to the highest digit, thus determining the output data Z. When the respective bits of the input and output data X, Y, Z are set as Xi, Yi, Zi (i0 to 7), the input circuit 611 forms a digit borrow generating signal Igi and a digit borrow propagating signal Ipi for each digit. As widely known, the digit borrow generating signal Igi is a signal for executing subtraction, which is formed such that Igi1 represents that, in an operation of Xi-Yi as to the ith digit, digit borrowing has taken place from the (i1)th digit. However, Igi1 also represents that Xi is not greater than Yi. As widely known, the digit borrow propagating signal Ipi is another signal for executing subtraction, which is formed for judging that, in an operation of Xi-Yi, when digit borrowing has taken place from the ith digit to the (i-1)th digit and if Ipi is equal to 1, digit borrowing has taken place from the (i1)th digit. However, since digit borrowing from the (i1) th digit takes place due to the digit borrowing which has taken place on the (i-1) th digit, Ipi1 also represents that Xi is equal to Yi. Based on the outputs Igi and Ipi of the input circuit 611, the intermediate circuit 611 forms a digit borrow generating signal Igjk and a digit borrow propagating signal Ipjk for the digits from the kth digit to the j th digit (k is smaller than j). For example, the digit borrow generating signal Ig32 from the second digit to the third digit is a signal for executing subtraction, which is formed such that Ig321, represents that, in an operation of two bits of X3X2-Y3Y2, digit borrowing from the fourth digit has taken place. However, Ig321 also represents the magnitude relation of two bits that X3X2 is not greater than Y3Y2. On the other hand, the digit borrow propagating signal Ip32 from the second digit to the third digit is another signal for executing subtraction, which is formed for judging that, in an operation of X3X2-Y3Y2, when digit borrowing has taken place from the second digit to two bits of first and zeroth digits and if Ip321 is equal to 1, digit borrowing has taken place from the fourth digit. Since digit borrowing from fourth digit takes place due to the digit borrowing which has taken place on the first or zeroth digit, Ip321 also represents the equivalence relationship of two bits that X3X2 is equal to Y3Y2. The digit borrow generating signals Igi, Igjk and the digit borrow propagating signals Ipi, Ipjk are propagated from the lowest digit to the highest digit. When the digit borrow generating signal Igi0 for the digits from the lowest digit (the zeroth digit) to each digit (the ith digit) is obtained, the output circuit 613 generates Zi, for each digit, based on Ipi and Ig(i-1)0. However, Z1 is generated based on Ip1 and Ig0. Since no digit is borrowed from the lowest digit, Z0 is determined based on Ip0 only. When at least one of a digit borrow generating signal Ig70 and a digit borrow propagating signal Ip70 for the digits from the zeroth digit to the 7th digit, is 1, this represents that X is not greater than Y. More specifically, the magnitude-relation judging signal Ib can be expressed by the following equation: However, the following equations are established: Accordingly, the following equation is then established: EQU1 In the output circuit 613 in FIG. 7, the magnitude-relation judging signal Ib is generated with the use of the relation of the equation (6). Generally, it is easy to judge whether or not a subtraction result is negative in a subtracting circuit for executing subtraction of X-Y. That is, it is enough to judge whether or not a digit is borrowed from the highest digit. However, it is difficult to judge whether or not a subtraction result is not greater than 0. That is, it is difficult to judge whether or not a subtraction result is equal to 0. In this connection, it may be considered to add a circuit for making sure that all the bits of a subtraction result are 0 or for making sure that (X-Y) is not negative and (X-Y-1) is negative. This may increase the amount of hardware of the subtracting circuit. In the subtracting circuit 601 in FIG. 7, however, most of the hardware is commonly used for the calculation of the output data Z and the generation of the magnitude-relation judging signal Ib representing that X is not greater than Y (X-Y is not greater than 0). It is therefore possible to reduce the amount of the hardware. In a fourth operational processing apparatus in FIG. 8, the decrementer 201 in FIG. 7 is removed but a right 1-bit shifter 604 is interposed between a left shifter 603 and a mantissa result register 205. The left shifter 603 and the right 1-bit shifter 604 form a bidirectional shifter 605. A second selecting circuit 602 is adapted to supply, as a shift amount SH, an exponent E when Ib is equal to 1, and an output LSA of the advancing 1 detecting circuit 202 when Ib is equal to 0, the exponent E and the output LSA being supplied to the left shifter 603. The right 1-bit shifter 604 is adapted to supply, as a mantissa m of the result of an operational processing, a value obtained by executing a right 1-bit shift processing on an output of the left shifter 603 when Ib is equal to 1, and the output itself of the left shifter 603 when Ib is equal to 0. According to the arrangement in FIG. 8, when the subtracting circuit 601 (having the inside arrangement shown in FIG. 7) makes a judgment that the result of an operational processing is a denormalized number (Ib 1). the shift amount SH to be given to the left shifter 603 is set to E and a shift operation of the right 1-bit shifter 604 is started. As a result, there is executed, on a mantissa M, a left shift processing having a desired shift amount (E-1). On the other hand, when it is judged that the result of the operational processing is a normalized number (Ib0), the shift amount SH to be given to the left shifter 603 is set to LSA and a shift operation of the right 1-bit shifter 604 is stopped. As a result, there is executed, on a mantissa M, a left shift processing having a desired shift amount (LSA). More specifically, according to the arrangement in FIG. 8, the provision of the right 1-bit shifter 604 eliminates the decrementer 201 in FIG. 6, thus simplifying the arrangement of the operational processing apparatus. The method of determining an exponent e of the result of an operational processing is similar to that shown in FIG. 6. In the embodiment in FIG. 8, the right 1-bit shifter 604 is disposed at the output side of the left shifter 603, but the right 1-bit shifter 604 may be disposed at the input side of the left shifter 603.
Bienvenido a la casa de los mundos de las primeras opciones binarias automatizado Asesor experto Si usted es nuevo en opciones binarias, puede leer más sobre él aquí. Acerca de nuestras señales Las opciones binarias son simplemente inversiones que usted realiza basándose en si el precio actual de un activo aumentará o disminuirá al vencimiento. La razón binaria opciones son tan populares es debido a sus cantidades increíbles de pago. Puede generar hasta 75 de su inversión en cada comercio ganador. Nuestras señales se han desarrollado y probado durante un período de años, y ahora están disponibles para ser utilizados de una manera automatizada con un asesor experto Lo que está incluido en nuestro paquete Expert Advisor que se puede utilizar ya sea automatizado o para generar señales para su no - MT4 BO broker 5 Plantillas de las que puede elegir, dependiendo de su estilo de negociación Materiales de formación de amplificadores de educación para el comercio Opciones binarias en Meta Trad...
Comments
Post a Comment