Subject:
|
Re: Arithmatic operation
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Sun, 22 Nov 1998 03:30:37 GMT
|
Original-From:
|
Justin Daniel Gullotta <gulloj@/Spamcake/rpi.edu>
|
Reply-To:
|
gulloj@rpiNOSPAM.edu
|
Viewed:
|
2150 times
|
| |
| |
if you are not trying to divide numbers of great precision(many significant
figures), then you can try multiplying by some order of 10, performing your
division, then dividing by that same order of 10. i have used this before, but
not for the same reason that you would be. i was having a serious truncation
problem while incorporating PID code. it worked for me... but i think that
your case, fraction truncation can be unpredictable. in any case, getting rid
of the fractions would be a solution. good luck.
Justin D. Gullotta.. , Engineer,
Rensselaer Polytechnic Institute.
Rick Moll wrote:
> Javaid Iqbal wrote:
>
> > Hi all,
> > I am dividing 4.1 by 4.1 in following manner and getting answer 2.
> > instead of 1.
> > Dividing 4.2 by 4.2 give 1 result, dividing 4.6 by 4.6 again give 2.
> > Except 4.1 and 4.6 rest all numbers give 1 result. I am using IC 3.2. Any
> > help in this regards would be appreciated.
>
> I've asked for help with the floating point bugs in IC before, and nobody
> seems to care. Unfortunately, I've come to not use IC floating point
> variables at all, since I can't trust them. It's all very frustrating since
> none of the IC versions support long int division either; which also
> seriously cripples the use of IC for precision fixed point calculations.
>
> Later,
>
> Rick
|
|
Message has 1 Reply:
Message is in Reply To:
| | Re: Arithmatic operation
|
| (...) I've asked for help with the floating point bugs in IC before, and nobody seems to care. Unfortunately, I've come to not use IC floating point variables at all, since I can't trust them. It's all very frustrating since none of the IC versions (...) (26 years ago, 21-Nov-98, to lugnet.robotics.handyboard)
|
4 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|