View previous topic :: View next topic |
Author |
Message |
Guillermo Alvarado Guest
|
I need information about mantisa and floating point. |
Posted: Thu Aug 30, 2001 12:28 pm |
|
|
Hi i need information about mantisa and float point... i want have a float point in two or more byte for separate...
for example
void main()
{
float ejemplo;
int a,b,c,d;
ejemplo=20,39;
I need in a=2, b=0, c=3, d=9 and how to i know the point
thanks
___________________________
This message was ported from CCS's old forum
Original Post ID: 104 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
Re: Necesito saber sobre puntos flotantes y mantisa |
Posted: Thu Aug 30, 2001 12:56 pm |
|
|
:=Hi i need information about mantisa and float point... i want have a float point in two or more byte for separate...
---------------------------------------------------------
Check the compiler manual for the format of floating point numbers. Look in the section called "What is the format
of floating point numbers ?" on page 163.
See the link below.
___________________________
This message was ported from CCS's old forum
Original Post ID: 106 |
|
|
Darren Rook
Joined: 06 Sep 2003 Posts: 287 Location: Milwaukee, WI
|
Or... |
Posted: Thu Aug 30, 2001 3:35 pm |
|
|
Check out the new FAQ page located on the menu to the left.. It answers the question of the floating point format.
___________________________
This message was ported from CCS's old forum
Original Post ID: 112 _________________ I came, I saw, I compiled. |
|
|
Doug Kennedy Guest
|
Re: Necesito saber sobre puntos flotantes y mantisa |
Posted: Fri Aug 31, 2001 7:20 am |
|
|
Using the example in the manual 0f 100 decimal here is how it works
100 85 48 00 00
decimal hex
exp mantissa
(85-7f(bias))+1 is 7 the positive exponent is 7
the extra 1 adjusts for the .1 implied conventional representation
48 is the mantissa but has a sign bit hex 48 is 01001000 binary
so after removing the sign and noting (0 is positive) we have 1001
there is an implied binary point of .1 so we have .1+1001 or positive .11001 binary
to be raised 7 powers of 2 ( same as a shift)
the result is 1100100 which is 100 decimal
___________________________
This message was ported from CCS's old forum
Original Post ID: 129 |
|
|
dave2007 Guest
|
sobre mantisas y puntos flotantes |
Posted: Wed Dec 19, 2007 11:51 am |
|
|
Hello friends, i´m designing a digital filter and i ´m working with float number inside. Later I need to transmit to another micro the data after processing it in format int16. I study the CCS compiler and i don´t know how can i form the new valor to be transmitted and work with mantissa and exponent bytes. My number look like this in the watch option:
74.488878
96.343322
-43.556547
....
thanks a lot
Dave |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
|