What is the maximum value of a REAL variable in sqlite3?

1.8k Views Asked by At

I want to know the maximum value a REAL variable can store. Or is there any way I can find the maximum value a data-type can hold?

1

There are 1 best solutions below

0
On

The max is "+Infinity", which probably isn't helpful. The biggest number that you're probably interested in is 1.7976931348623157e308.

sqlite> create table reals (r real);
sqlite> insert into reals values (1.7976931348623157e308);
sqlite> insert into reals values (1e310);
sqlite> select * from reals;
1.79769313486232e+308
Inf

The value stored seems to actually be 1.7976931348623157e308.

sqlite> select r, r = 1.7976931348623157e308 from reals;
1.79769313486232e+308                               1
Inf                                                 0