#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>

typedef union
{
    double value;
    uint64_t bits;
} double_bits;

int main(void)
{
    printf("BOLSCHOE (NIIBAZZO) CHISLO:\n");
    uint64_t sign = 1;
    uint64_t exponent = ((1U << 11) - 1) - 1; // The last exponent is for NaN and INF.
    uint64_t mantissa = (1ULL << 52) - 1;
    double_bits large = { .bits = sign << 63 | exponent << 52 | mantissa };
    printf("%.1f\n", large.value);
    
    printf("\nOCHE (NIIBAZZO) MALENKOE CHISLO:\n");
    exponent = 0; // Lowest possible negative exponent (denormalized number).
    mantissa = 1; // Lowest posssible mantissa (no implicit 53th bit).
    double_bits small = { .bits = sign << 63 | exponent << 52 | mantissa };
    printf("%.1100f\n", small.value);
}
