JPQL arithmetic ranks Double and Float above BigDecimal

JPQL arithmetic follows the same order as the Criteria API, in the database and when it is evaluated in memory. A JPQL operation on a BigDecimal or BigInteger and a Float or Double operand now returns the floating point type instead of a BigDecimal, so n.decimalField * n.doubleField returns a Double (OPENJPA-3049). A JPQL literal with a decimal point, such as 1.5, is an exact numeric literal of type BigDecimal as before: n.floatField * 1.5 now returns a Float, and n.intField * 1.5 still returns a BigDecimal, the same types as cb.prod(floatPath, new BigDecimal("1.5")) and cb.prod(intPath, new BigDecimal("1.5")). Comparisons are not changed: a BigDecimal and a Double value are still compared as BigDecimal values. Application code that casts such results must be adapted to the new type or to Number.