Copyright | (C) 2019 Myrtle Software Ltd 2024 QBayLogic B.V. |
---|---|
License | BSD2 (see the file LICENSE) |
Maintainer | QBayLogic B.V. <devops@qaylogic.com> |
Safe Haskell | None |
Language | Haskell2010 |
Clash.Class.Exp
Description
Synopsis
- class Exp a
- type family ExpResult a (n :: Nat)
- (^) :: Exp a => a -> SNat n -> ExpResult a n
- expIndex# :: KnownNat m => Index m -> SNat n -> Index (Max 2 (m ^ n))
- expSigned# :: KnownNat m => Signed m -> SNat n -> Signed (Max 2 (m * n))
- expUnsigned# :: KnownNat m => Unsigned m -> SNat n -> Unsigned (Max 1 (m * n))
Documentation
Type class implementing exponentiation with explicitly resizing results.
Minimal complete definition
Arguments
:: Exp a | |
=> a | Base |
-> SNat n | Exponent |
-> ExpResult a n | Resized result, guaranteed to not have overflown |
Exponentiation with known exponent.
- Internal