// make description for beginner Embedded enginners.
// make improvement porosal, advice and suggestion for next steps journal
// wegc100gcc/b.c 20250207
// description: Beginning C language on windows 11
// machine: laptop windows11
// os: PRETTY_NAME="Ubuntu 24.04.1 LTS" on WSL
// langauge : C language
// IDE: VS code on Windows11
// Remote - WSL (Microsoft)
// C/C++ Extension Pack (Microsoft)
// cd /home/miura/WEGC100gcc
// gcc --version >> gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
// gcc -o b31 b31.c
// ./b31

#include <float.h>
#include <limits.h>
#include <stdio.h>
int main(){
    printf("double max value:%g\n", DBL_MAX);
    printf("double min value:%g\n", DBL_MIN);
    printf("double dig value:%d\n", DBL_DIG);
    printf("float max value: %g\n", FLT_MAX);
    printf("float min value: %g\n", FLT_MIN);
    printf("float dig value: %d\n", FLT_DIG); 
    printf("int max value:%d\n", INT_MAX);
    printf("int min value:%d\n", INT_MIN);
    return 0;
}
/* result
double max value:1.79769e+308
double min value:2.22507e-308
double dig value:15
float max value: 3.40282e+38
float min value: 1.17549e-38
float dig value: 6
int max value:2147483647
int min value:-2147483648
*/

/*
Description: This journal entry documents my initial exploration of the C language on Windows 11 using WSL (Ubuntu 24.04.1 LTS). I'm a beginner embedded engineer and this is my first attempt at understanding data type limits in C.

Machine: Laptop (Windows 11)
OS: Ubuntu 24.04.1 LTS (WSL)
Language: C
IDE: VS Code (Windows 11) with Remote - WSL (Microsoft) and C/C++ Extension Pack (Microsoft)

Steps:

Navigated to the project directory: cd /home/miura/WEGC100gcc
Checked GCC version: gcc --version (gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0)
Compiled the C code: gcc -o b31 b31.c
Executed the compiled program: ./b31
Code Description:

The C code (b31.c) aims to print the maximum and minimum values, as well as the number of decimal digits of precision, 
for double, float, and int data types. It utilizes constants defined in <float.h> and <limits.h> headers.
he output confirms the expected ranges and precisions for the different data types.  
It's helpful to see the magnitude of these values, especially in the context of embedded systems 
where resource constraints are often a concern.  


Understanding the limitations of each data type is crucial for avoiding overflow and precision issues.

*/