You don't always have to store the actual value the way float and double do. If the problem allows it, you can write your own data type that uses exponent representation just like you showed in your post:
Then do math on it like you learned in grade school. :)
>It's practically the same thing, in my example I used a struct anyway.
Not in C. A C compiler do not know what a class is.
I agree that struct and class are related ( and they are the same thing in C++ ( except for the default access providers) ) but they can mean a lot of difference to a considerate programmer.
If you meant "class" literally (perhaps you're too close to C++, Never mind happens to everyone :) ), then it is acceptable.
But do remember that C++ structs are not same as C structs
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...