You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Functions for smallest and largest representable fixed point
Conceptual overview
This provides two functions to return the smallest and largest representable fixed point based on number of integer and fractional bits.
This should be added to the Numerics package.
Proposal
New and modified functions, operations, and UDTs
namespaceMicrosoft.Quantum.Math {
/// # Summary/// Returns the smallest representable number for specific fixed point dimensions////// # Input/// ## integerBits/// Number of integer bits/// ## fractionalBits/// Number of fractional bits////// # Remark/// The value can be computed as $-2^{p-1}$, where $p$ is the number of integer bits.functionSmallestFixedPoint(integerBits : Int, fractionalBits : Int) : Double { ... }
/// # Summary/// Returns the largest representable number for specific fixed point dimensions////// # Input/// ## integerBits/// Number of integer bits/// ## fractionalBits/// Number of fractional bits////// # Remark/// The value can be computed as $2^{p-1} - 2^{-q}$, where $p$/// is the number of integer bits and $q$ is the number of fractional bits.functionLargestFixedPoint(integerBits : Int, fractionalBits : Int) : Double { ... }
}
Functions for smallest and largest representable fixed point
Conceptual overview
This provides two functions to return the smallest and largest representable fixed point based on number of integer and fractional bits.
This should be added to the
Numericspackage.Proposal
New and modified functions, operations, and UDTs
Open questions
Which namespace fits well?
Microsoft.Quantum.ArithmeticMicrosoft.Quantum.CanonMicrosoft.Quantum.Math