≡
Homepage
Primo
ECB
FNX
NUTS
Notes
Contact
Ellipsa > NUTS > Example #4
Conversions of
Float32
values to
Float128
values and, then, back to
Float32
values.
===================== Float32 (conversions) ===================== ------------------- Compiler directives ------------------- NUTS_DEBUG : defined NUTS_THREAD_SAFE : not defined NUTS_ASM_CODE : not defined ------- Context ------- Masks = [feInexact,feUnderflow] Flags = [] Rounding mode = rmTiesToEven ------------ Random value ------------ x = 8.338238597E-1 x (bits) = 00111111010101010111010101111011 q = 8.33823859691619873046875e-1 y = 8.338238597E-1 y (bits) = 00111111010101010111010101111011 Check (q is Float32) .. : TRUE Check (x = y) ......... : TRUE ------------------ 1000 random values ------------------ Check conversions : TRUE ----- -Zero ----- x = 0.000000000 x (bits) = 10000000000000000000000000000000 q = -0.0 y = 0.000000000 y (bits) = 10000000000000000000000000000000 Check (q is Float32) .. : TRUE Check (x = y) ......... : TRUE ------------ MinSubnormal ------------ x = 1.401298464E-45 x (bits) = 00000000000000000000000000000001 q = 1.40129846432481707092372958328991613e-45 y = 1.401298464E-45 y (bits) = 00000000000000000000000000000001 Check (q is Float32) .. : TRUE Check (x = y) ......... : TRUE ------------ MaxSubnormal ------------ x = 1.175494211E-38 x (bits) = 00000000011111111111111111111111 q = 1.17549421069244107548702944484928735e-38 y = 1.175494211E-38 y (bits) = 00000000011111111111111111111111 Check (q is Float32) .. : TRUE Check (x = y) ......... : TRUE --------- MinNormal --------- x = 1.175494351E-38 x (bits) = 00000000100000000000000000000000 q = 1.17549435082228750796873653722224568e-38 y = 1.175494351E-38 y (bits) = 00000000100000000000000000000000 Check (q is Float32) .. : TRUE Check (x = y) ......... : TRUE --------- MaxNormal --------- x = 3.402823466E+38 x (bits) = 01111111011111111111111111111111 q = 3.40282346638528859811704183484516925e+38 y = 3.402823466E+38 y (bits) = 01111111011111111111111111111111 Check (q is Float32) .. : TRUE Check (x = y) ......... : TRUE -------- Infinity -------- x = +Inf x (bits) = 01111111100000000000000000000000 q = Infinity y = +Inf y (bits) = 01111111100000000000000000000000 Check (q is Float32) .. : TRUE Check (x = y) ......... : TRUE ---- sNaN ---- x = Nan x (bits) = 01111111100000000000000000000001 q = NaN y = Nan y (bits) = 01111111110000000000000000000001 Check (q is Float32) ................. : TRUE Check ((x is sNaN) and (y is qNaN)) .. : TRUE ---- qNaN ---- x = Nan x (bits) = 01111111110000000000000000000000 q = NaN y = Nan y (bits) = 01111111110000000000000000000000 Check (q is Float32) ................. : TRUE Check ((x is qNaN) and (y is qNaN)) .. : TRUE
Sorry, this part cannot be displayed on small screens!
URL: www.ellipsa.eu/public/nuts/example04.html
Last update October 30, 2022
Copyright © 2022, Marcel Martin. All rights reserved.
Hosted by
Online