[SDL] ??? c - error ?
js at dune2.de
Sat Jun 24 17:47:55 PDT 2000
On Sam, 24 Jun 2000, you wrote:
> > when i write:
> > double v3x, v3x, v1x
> > v3x = v1x + v2x;
> > and
> > v1x=-2
> > v2x=2
> > then my compiler tells me that v3x = -0 but i think it must be 0
> > !!??
> On what type of computer are you compiling this? The only thing I can
> imagine (and I do not know how to control this) happening is your
> computer or c-compiler/library using one-complement signed numbers.
> That's the only explanation I can think of that would create both a 0
> and -0 number. Unless someone has a better explanation. :)
> For fun, try: v3x = v2x + v1x, with v1x = -2 and v2x = 2. If that one
> comes up with 0 my rambling might be true. :)
> Pieter Hulshoff
thank you for answering my question but - i tried it and it got the
same out "-0.00000"
everything is correct but this won't work
i use :
-linux redhat 6.1
the problem seems to be there with every version of SDL - no wonder -
doesn't depend on this anyway .....
but - what is to do next ?
[ http://www.dune2.de || Linux - my way! ]
More information about the SDL