db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dag.Wan...@Sun.COM (Dag H. Wanvik)
Subject Re: Is derby sql "real" equivalent to java "float"
Date Wed, 31 Oct 2007 23:31:35 GMT
Jim Newsham <jnewsham@referentia.com> writes:

> In the meantime, I'd like to ask.  Should Java float always be safely
> settable to a field of Derby type REAL?  This has been my assumption all
> along, and refderby.pdf seems to imply this.  Or, are there edge cases, such
> as perhaps NaN which will cause the set operation to fail.

The limits I mentioned in a previous post are actually documented:

Quote from http://db.apache.org/derby/docs/dev/ref/rrefsqlj14122.html

> REAL value ranges:
> 
>     * Smallest REAL value: -3.402E+38
>     * Largest REAL value: 3.402E+38
>     * Smallest positive REAL value: 1.175E-37
>     * Largest negative REAL value: -1.175E-37
> 
> These limits are different from the java.lang.Float Java type limits.
> 
> An exception is thrown when any double value is calculated or
> entered that is outside of these value ranges.

Thanks,
Dag

Mime
View raw message