Floating-point-operations
Java floating-point operations [JLS14:4.2.4].
Here we provide abstract notions for
all the unary and binary operations on floating-point values
that are not conversions (those are formalized separately).
[JLS14:4.2.4] also lists the prefix and posfix ++ and -- operators,
but those operate on variables, not just values,
and therefore must be formalized elsewhere.
[JLS14:4.2.4] also lists the conditional operator ? :,
but that one is non-strict,
and therefore must be formalized as part of expression evaluation.
[JLS14:4.2.4] also lists the string concatenation operator +,
but that is best formalized in terms of integral-to-string conversions,
elsewhere.
[JLS14:4.2.4] also lists the cast operator, which involves conversions,
which, as mentioned above, are formalized separately.
Subtopics
- Float-greateq
- Greater-than-or-equal-to comparison >= on floats
[JLS14:4.2.4] [JLS14:15.20.1].
- Double-lesseq
- Less-than-or-equal-to comparison <= on doubles
[JLS14:4.2.4] [JLS14:15.20.1].
- Double-greateq
- Greater-than-or-equal-to comparison >= on doubles
[JLS14:4.2.4] [JLS14:15.20.1].
- Double-great
- Greater-than-or-equal-to comparison > on doubles
[JLS14:4.2.4] [JLS14:15.20.1].
- Float-lesseq
- Less-than-or-equal-to comparison <= on floats
[JLS14:4.2.4] [JLS14:15.20.1].
- Float-less
- Less-than comparison < on floats
[JLS14:4.2.4] [JLS14:15.20.1].
- Float-great
- Greater-than comparison > on floats
[JLS14:4.2.4] [JLS14:15.20.1].
- Double-less
- Less-than comparison < on doubles
[JLS14:4.2.4] [JLS14:15.20.1].
- Float-sub
- Subtraction - on floats [JLS14:4.2.4] [JLS14:15.18.2].
- Float-rem
- Remainder % on floats [JLS14:4.2.4] [JLS14:15.17.3].
- Float-neq
- Non-equality != on floats [JLS14:4.2.4] [JLS14:15.21.1].
- Float-mul
- Multiplication * on floats [JLS14:4.2.4] [JLS14:15.17.1].
- Double-sub
- Subtraction - on doubles [JLS14:4.2.4] [JLS14:15.18.2].
- Double-rem
- Remainder % on doubles [JLS14:4.2.4] [JLS14:15.17.3].
- Double-neq
- Non-equality != on doubles [JLS14:4.2.4] [JLS14:15.21.1].
- Double-mul
- Multiplication * on doubles [JLS14:4.2.4] [JLS14:15.17.1].
- Double-eq
- Equality == on doubles [JLS14:4.2.4] [JLS14:15.21.1].
- Double-div
- Division / on doubles [JLS14:4.2.4] [JLS14:15.17.2].
- Double-add
- Addition + on doubles [JLS14:4.2.4] [JLS14:15.18.2].
- Float-eq
- Equality == on floats [JLS14:4.2.4] [JLS14:15.21.1].
- Float-div
- Division / on floats [JLS14:4.2.4] [JLS14:15.17.2].
- Float-add
- Addition + on floats [JLS14:4.2.4] [JLS14:15.18.2].
- Double-plus
- Unary plus + on doubles [JLS14:4.2.4] [JLS14:15.15.3].
- Double-minus
- Unary minus - on doubles [JLS14:4.2.4] [JLS14:15.15.4].
- Float-plus
- Unary plus + on floats [JLS14:4.2.4] [JLS14:15.15.3].
- Float-minus
- Unary minus - on floats [JLS14:4.2.4] [JLS14:15.15.4].