Re: Problems with multiplications of doubles and/or floats
From: John Harrison (john_andronicus_at_hotmail.com)
Date: 04/14/04
- Next message: Leor Zolman: "Re: why it seems that std::list::erase() doesnt free objects in a list, if the latter holds pointers to them?"
- Previous message: Dave Moore: "Re: Birthday Problem"
- In reply to: J.K. Becker: "Problems with multiplications of doubles and/or floats"
- Next in thread: Matt: "Re: Problems with multiplications of doubles and/or floats"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 14 Apr 2004 16:26:36 +0100
"J.K. Becker" <jkbecker@becker.de> wrote in message
news:c5jfaq$reo$1@news1.zdv.uni-mainz.de...
> Hi there,
>
> I am trying to multiply doubles with floats (actually I tried every
> possible combination by now) and it never works (well, it does something
> but it is always wrong). I have no idea what it is and where to look for
> help, maybe some of you know?
>
> double=float*double; (or every possible combination of it). An example:
>
> 0.3 * 0.7 would result in 1.7 (with lots more digits). Anyone any idea?
No that is impossible, you have a bug somewhere else in your program. Since
you didn't post the program its impossible to help. Post the code.
What else did you expect, did you think someone would say 'oh yes that's the
well known 0.7 * 0.3 bug, it's been fixed in the new compiler version'?
Compilers do not make basic arithmetic errors. If you want help with a buggy
program you have to post the program code, there is no other way.
See the FAQ http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.8
john
- Next message: Leor Zolman: "Re: why it seems that std::list::erase() doesnt free objects in a list, if the latter holds pointers to them?"
- Previous message: Dave Moore: "Re: Birthday Problem"
- In reply to: J.K. Becker: "Problems with multiplications of doubles and/or floats"
- Next in thread: Matt: "Re: Problems with multiplications of doubles and/or floats"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|