SubtractFxP operation

Warning

This documentation refers to the Classic QDK, which has been replaced by the Modern QDK.

Please see https://aka.ms/qdk.api for the API documentation for the Modern QDK.

Namespace: Microsoft.Quantum.Arithmetic

Package: Microsoft.Quantum.Numerics

Computes minuend - subtrahend and stores the difference in minuend.

operation SubtractFxP (minuend : Microsoft.Quantum.Arithmetic.FixedPoint, subtrahend : Microsoft.Quantum.Arithmetic.FixedPoint) : Unit is Adj + Ctl

Input

minuend : FixedPoint

The minuend of the subtraction - the number from which the other is subtracted.

subtrahend : FixedPoint

The subtrahend of the subtraction - the number to be subtracted.

Output : Unit

Remarks

Computes the difference by inverting subtrahend before and after adding it to minuend. Notice that minuend, the first argument is updated.