1

My function call takes some input, and throws it into a database. Usually, it's integers, but today, I need it to throw in a unix timestamp.

This overflew the FLOAT type, but works with type DOUBLE.

Is there anything I should be worried about by saving that 10-digit integer in type DOUBLE?

1

1 Answer 1

2

The total precision of a DOUBLE PRECISION value is approximately 16 decimal digits, so you should not worry, even if you store milliseconds or microseconds.

Sign up to request clarification or add additional context in comments.

2 Comments

Cheersh! So float, then, would be 8 digits, I assume?
for a 32 bit floating point, 24 bits of significand precision, log10(2^24) ≈ 7.225 decimal digits

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.