sigmaMinus property Null safety
final
Implementation
static final NormalOperation sigmaMinus = NormalOperation.floatOnly(
stackLift: StackLift.disable,
floatCalc: (Model m) {
final reg = m.memory.registers;
final x = m.xF;
final y = m.yF;
reg[7] = Value.fromDouble(reg[7].asDouble - x * y);
reg[6] = Value.fromDouble(reg[6].asDouble - y * y);
reg[5] = Value.fromDouble(reg[5].asDouble - y);
reg[4] = Value.fromDouble(reg[4].asDouble - x * x);
reg[3] = Value.fromDouble(reg[3].asDouble - x);
final newReg = reg[2].asDouble - 1;
reg[2] = Value.fromDouble(newReg);
if (m.isComplexMode) {
m.lastXC = m.xC;
m.xC = Complex(m.xF, newReg);
} else {
m.lastX = m.x;
m.x = reg[2];
}
},
name: 'E-');