On 19-01-2021 10:38, Zh id wrote:
> I want to enter the number 0.0000247542259. But the recorded numbers
> don't match.
> I've changed the data type to double precision. When I enter the number
> 0.0004 it works. But when I enter the number 0.00004 it records 4E-5.
> There is something wrong?
There is nothing wrong here. 4E-5 is the scientific notation of 0.00004.
This is a presentation matter, which depends on the tooling you use to
view a query result. Also keep in mind, in double precision, some
numbers cannot be represented exactly.
> And here :
>
> Why is the result like that? even though I have used double precision.
> 2.jpg1.jpg
The result is like that because you're using double precision, and your
query tool uses scientific notation for very small (and probably very
large) values.
> This will be a problem when you need to see a 0 or a number that is
> close to 0 .
If you want precise results, you'll need to use DECIMAL or NUMERIC, or -
in Firebird 4 - DECFLOAT.
--
Mark Rotteveel