Searching \ for 'AW: [PIC]:Floating point' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/devices.htm?key=pic
Search entire site for: '[PIC]:Floating point'.

Truncated match.
PICList Thread
'AW: [PIC]:Floating point'
2003\05\08@092503 by eger Stefan Georg

flavicon
face
No, it´s not floating point it´s the easy datatype "float"....for example:
float number = -2000;?

-----Ursprüngliche Nachricht-----
Von: Reinaldo Alvares [spam_OUTreinaldoalvaresTakeThisOuTspamTELIA.COM]
Gesendet: Donnerstag, 8. Mai 2003 15:19
An: .....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU
Betreff: Re: [PIC]:Floating point


If you mean floating point, like IEEE 754 then yes.The first bit is what
decides the sign. If it's set then the number is negative, if reset then the
opposite.
Best regards
RA
{Original Message removed}

2003\05\08@093716 by Spehro Pefhany

picon face
At 03:21 PM 5/8/2003 +0200, you wrote:
>No, it´s not floating point it´s the easy datatype "float"....for example:
>float number = -2000;?

If you have some kind of bastardized compiler it might be better to
write:

float number = -2000.;

Also consider using "double".

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
speffspamKILLspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\05\08@094535 by Reinaldo Alvares

picon face
What is an "easy datatype"? What is a "bastardized compiler"? Why should it
be double?
Best regards
RA
{Original Message removed}

2003\05\08@102838 by Spehro Pefhany

picon face
At 03:46 PM 5/8/2003 +0200, you wrote:
>What is an "easy datatype"?

I have not the slightest; I didn't write that. I assume it's a translation
of "simple" from another language than English.

>What is a "bastardized compiler"?

One that does not conform substantially to the
ISO/IEC 9899:1999 (E) standard. The "." I suggested prevents conversions
from taking place, so it matters less.

>Why should it be double?

There can be unholy interactions between the linked FP libraries
and the data type selected, IME. Check carefully that everything is
consistent.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
.....speffKILLspamspam.....interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\05\08@104814 by Alan B. Pearce

face picon face
>....voltage_HB1 and voltage_HB2 are voltages that I get from the A/D-
>module. At the end I have to show the voltage on a LCD- Display. But the
>display shows always the wrong value. Now, I don´t know, if the problem is
>about the variable "voltage", because I don´t know what happens, if
>voltage_HB2 is greater then voltage_HB1? But maybe the problem is caused by
>another thing!

I suspect your problem is that you are using "float" to describe the value
from the ADC, when it should be "integer". If it is not properly type cast
then you will end up with funny things happening.

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

More... (looser matching)
- Last day of these posts
- In 2003 , 2004 only
- Today
- New search...