totalling a multivalue field (AREV Specific)
At 17 SEP 2002 11:13:40AM Mark Watford wrote:
Using Arev 1.16 . In a Rlist statement we TOTAL a field called EXT.
EXT is a multivalue symbolic field. The formula is @Ans={Price}*{Qty}. PRICE and QTY are mutivalue Data fields, all of the fields display type is MD2, except QTY which is blank. For Example a result 7.37 3.58 14.37 13.75 14.37 will total as 53.45 instead of 53.44. Any suggestions on what I need to do to have this total correctly. Thanks </QUOTE> —- === At 17 SEP 2002 04:09PM Jim Jefferson wrote: === <QUOTE>Could this be caused by rounding? Maybe not, if your prices are actually stored MD2, and your quantities MD0 (by default, if the conversion spec is blank). But, your results sure look like rounding error. Jim </QUOTE> —- === At 17 SEP 2002 04:46PM The Sprezzatura Group wrote: === <QUOTE>AREV 1.16 ? OK - cast the brain cells back to 1990… The 386 processor arrives, then the later (1994) Pentium coprocessor bugs… http://www.eee.bham.ac.uk/woolleysi/teaching/microhistory.htm http://ivs.cs.uni-magdeburg.de/~zbrog/asm/86bugs.html As we recall there was an option AREV.EXE /E to switch on/off the maths coprocessor emulation. Try using this and see what you get. Also try increasing the numeric precision of the stored operands, and check these for consistent length. You have to store more decimal places than you require in the output (especially using multiplication and division) because the last place may be effectively in error. For interest, try writing a bespoke multiplication of your values, within a loop, rather than using the * operator, and check the product at each stage. Also check for truncation artefacts - 7.000 is not the same precision as 7.0.
World Leaders in all things RevSoft
At 17 SEP 2002 06:11PM RWilson wrote:
I still have a copy of 1.16 running. if you want to give me a sample
of your data I'll see if I can duplicate the result
At 17 SEP 2002 09:40PM Mark Watford wrote:
Thanks for the invite. I can send you the files for the data. Tomorrow I will be back at work.I can send you the two REV files which make up the DATA file which is in question.
Thanks