Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET DECIMALS TO is used if SET FIXED is OFF ?
Message
 
 
To
22/11/2003 10:34:20
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00850956
Message ID:
00852631
Views:
12
Fabio,

There is nothing aribtrary or personal about the definitions I posted. I certainly didn't created them. You can find several references to these rules in textbooks or internet pages.

In your post where you say that you "expect" 4 decimal digits sometimes, or 7 or 8 or full is just so ludicrous it is laughable. That is what is arbitray and personal. It shows that you really don't understand numerical precision very well. Which has been the basis of far too many threads that you've started.

3.1 is 3.1 ± 0.05
3.10 is 3,10 ± 0.005
3.100 is 3.100 ± 0.0005
3.1000 is 3.1000 ± 0.00005
and so on ad infinitum

Please tell me what device you have that lets you measure something with infinite precision? I'd really like to come see it.

> CREATE CURSOR orderRows (quantity N(10,1),weight N(12,6)) -- from a post you made earlier in the thread

And then you want to store such an incredibly accurate number in a n(10,1) or n(12,6) field in a table. You contradict yourself Fabio.

And none of this changes the fact that when these numbers are stored in a binary computer with a fixed number of bits that additional errors are going to be introduced.

3.1 ± 0.05 * 2.5567 ± 0.00005 is 7.9 ± 0.05.
3.1000 ± 0.00005 * 2.5567 ± 0.00005 is 7.9258 ± 0.00005

You should pick up a book on numerical analysis and read it. It should help your understanding of these topics which you keep posting as bugs in VFP.

>i link here because here you explicit your thought.
>-------
>Not smoking anything my friend... those rules were drilled into my psyche during the 6 years I spend at the University of Missouri-Rolla studying nuclear engineering and computer science. It's a pretty fundamental rule about significant digits in calculations. 3.1 is not the same as 3.1000. Every number written has an implicit error of ± 1/2 the last significant digit. So 3.1 * 2.5567 is 7.9 ± 0.05. 3.1000 * 2.5567 is 7.9258 ± 0.00005. You need to forget the way your grade school teacher taught you to do arithmetic. *g*
>
>1. point
>>Every number written has an implicit error of ± 1/2 the last significant digit.
>
>Then you cannot write a exact number ( 1 is 1 ± 0.5, 1.0 is 1.0 ± 0.05 .... )
>because you must write infinite decimal digits.
>
>But exist conventions !
>
>If I say that 3.1 are exactly 3.1 then it is like writing 3.100000000000000000....
>
>3.1 is exactly 3.1000000000000000000000000000000000......
>7.9258 is exactly 7.92580000000000000000000000.......
>
>2. point
>
>For 3.1 * 2.5567, if 3.1 is 3.1 ± 0.05, also 2.5567 is 2.5567 ± 0.00005,
>and the result is 7.92577 ± 0.1279925.
>
>You use measure * factor ( the reason is a mystery )
>But however, on this case :
>
>(3.1 ± 0.05) * 2.5567 is 7.92577 ± 0.127835.
>
>You are merging the
>theory of the measure with the theory of the calculation,
>but with a personal arbitrary arithmetic.
>
>Here, we are alone dealing the theory of the calculation,
>we are not measuring any physical event.
>
>Here we have only two factors.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform