J
James Martin
Hello there,
I have a table that Assays (single) and Weights (long integer). At various
places in the database I need to multiply assays by weights. However, I am
getting slight errors when the weights are large. Upon investigation, I've
found the cause.
Suppose I write an assay of 1.234 to the table and then retrieve it into a
variable called sngAssay.
? sngAssay yields 1.234
But
? sngAssay * 1000000 yields something like 1234000.0069
Change things to double precision doesn't help.
I can fix the problem by rounding the assay before using it in a
calculation. But, given the zillions of places I use assays in calculations
of various kinds, I was wondering if there's a simpler way to fix the
problem.
Any advice would be greatly appreciated.
Thanks in advance.
James
I have a table that Assays (single) and Weights (long integer). At various
places in the database I need to multiply assays by weights. However, I am
getting slight errors when the weights are large. Upon investigation, I've
found the cause.
Suppose I write an assay of 1.234 to the table and then retrieve it into a
variable called sngAssay.
? sngAssay yields 1.234
But
? sngAssay * 1000000 yields something like 1234000.0069
Change things to double precision doesn't help.
I can fix the problem by rounding the assay before using it in a
calculation. But, given the zillions of places I use assays in calculations
of various kinds, I was wondering if there's a simpler way to fix the
problem.
Any advice would be greatly appreciated.
Thanks in advance.
James