dsub 0x67
Subtracts two doubles on top of the stack; pushes the result.
- Opcode
0x67(103)- Family
- Arithmetic and bitwise
- Operands
- none
- Length
- 1 byte
- Operand stack
…, value1 (double), value2 (double) → …, result (double)- Can throw
- nothing at run time (beyond linking errors)
What it does
a - b on two doubles: pops b, then a, and pushes the result.
How often javac uses it
In JDK 25.0.5's java.base module, dsub appears 255 times in 32 of its 7,391 classes: 0.01% of all instructions, the 141st most common of 194 opcodes in use. Some of the methods that use it: java.lang.FdLibm$Acos.compute, java.lang.FdLibm$Asin.compute, java.lang.FdLibm$Atan.compute, java.lang.FdLibm$Atan2.compute.
Example
From the sample classes, compiled by javac 25 with -g. Each Java line is shown above the bytecode it compiled to; dsub is highlighted.
static double doubles(double a, double b) in Tour, compiled by javac 25Related instructions
isub Subtracts two ints on top of the stack; pushes the result.lsub Subtracts two longs on top of the stack; pushes the result.fsub Subtracts two floats on top of the stack; pushes the result.
Specification: JVMS §6.5, dsub (Java SE 25).