Re: floating point precision



Lew wrote:
On the more general subject of floating point precision ... see previous post ... I guess that storing division results in an array would be as accurate as vfp can get ... I mean as opposed as storing them in a cursor. So I'm thinking of a routine that creates a cursor of lookup keys and an array of long division results. The routine would seek the key and return arrayelement[recno()]. Has anyone tried something like this or... do I just need more sleep?

I think you probably need more sleep. Will an array give you greater precision than a 'double' field type? I don't think so.

From the help file:

"When the Double data type is used in a table, the number of decimals specified is for presentation purposes only. Visual FoxPro stores the real value."

- Rush
.



Relevant Pages

  • floating point precision
    ... I guess that storing division results in an array would be as ... So I'm thinking of a routine that creates a cursor of lookup keys and an ... The routine would seek the key and return ...
    (microsoft.public.fox.programmer.exchange)
  • Re: [PHP] WHERE problem
    ... will never DELETE a fortune leaving a hole in your 'index' values?... ... Also, 'text' is a field type in SQL, so you may need: ... As a matter of Code Style, you MAY want to consider doing: ... that array. ...
    (php.general)
  • Re: Create an Object from an Array Class
    ... create a class of the field type ... the L[some.pkg.name.someClass; (object array) ... someObjectProperty) { ... What you are probable intending is something like this: ...
    (comp.lang.java.programmer)
  • Re: Sleep
    ... each character into an array, then print out the array one letter at a ... def print_and_wait ... # Print each character, waiting one second in between each printing ...
    (comp.lang.ruby)
  • Re: ubuntu jaunty seized up
    ... Smoot Carl-Mitchell wrote: ... # Array grows without bound ... Nice explanation, but I think you need to increase the index: ...
    (Ubuntu)