|
Does anyone know what the maximum and minimum size of integer which can be
stored is?
Likewise, what is the floating point accuracy of BrickOS for variables of
type "float" and "double" (is there such thing in BrickOS?) ?
Both of these questions could be answered if someone could give me a
breakdown of how integers and floats are stored by the microprocessor (the
number of bits for the exponent and mantissa, etc).
Many thanks,
Ralph Clark
|
|
Message has 2 Replies: | | Re: Float and int
|
| (...) int is 16 bits, big endian, signed. It goes from -32768 to 32767. unsigned int goes from 0 to 65535. char is 8, long is 32, long long is 64, with the standard limits. Floats and doubles are emulated in software, as the H8/300 processor has no (...) (22 years ago, 30-Dec-02, to lugnet.robotics.rcx.legos)
| | | Re: Float and int
|
| (...) You should look in the gnu gcc compiler documentation for this. Float support is not OS but compiler specific. As I recall, gcc uses IEEE float format, the specification should be found somewhere in the net. But doing float with the brick is (...) (22 years ago, 30-Dec-02, to lugnet.robotics.rcx.legos)
|
6 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|